From: Jujitsu Lizard on 10 Dec 2008 12:01 Hi, I develop embedded software for a living. We need to instrument the bidirectional serial interface between our product and a daughterboard (containing its own microprocessor) so that we can have another piece of software (which we write to run under XP or Vista) examine the serial communication and look for logical errors. It would seem most convenient for us to use two of those cheap USB->Serial adapters and just wire them up so that only the receive portion is used. One of the adapters would monitor the communication from our product to the daughterboard, and the second adapter would monitor communication going in the other direction. Questions: a)Is there a better approach (especially recognizing that we want maximum portability and that very few laptops these days ship with one let alone two serial ports)? b)Will Windows keep up with 2 streams at 19,200 baud? c)Are there any web pages that you've found especially helpful? I did find this one: http://msdn.microsoft.com/en-us/library/ms810467.aspx Is this the correct API to use? d)Are there any books or additional resources on this topic that you'd recommend? e)Our boards work at 3V, but I think serial communication is 12V by specification. If anyone is aware of a commercial level-shifter so that we don't need to build one ... Thanks sincerely for the help, The Lizard
From: LittleAlex on 10 Dec 2008 12:23 On Dec 10, 10:01 am, "Jujitsu Lizard" <jujitsu.liz...(a)gmail.com> wrote: > Hi, > > I develop embedded software for a living. We need to instrument the > bidirectional serial interface between our product and a daughterboard > (containing its own microprocessor) so that we can have another piece of > software (which we write to run under XP or Vista) examine the serial > communication and look for logical errors. > > It would seem most convenient for us to use two of those cheap USB->Serial > adapters and just wire them up so that only the receive portion is used. > One of the adapters would monitor the communication from our product to the > daughterboard, and the second adapter would monitor communication going in > the other direction. > > Questions: > > a)Is there a better approach (especially recognizing that we want maximum > portability and that very few laptops these days ship with one let alone two > serial ports)? > > b)Will Windows keep up with 2 streams at 19,200 baud? > > c)Are there any web pages that you've found especially helpful? I did find > this one: > > http://msdn.microsoft.com/en-us/library/ms810467.aspx > > Is this the correct API to use? > > d)Are there any books or additional resources on this topic that you'd > recommend? > > e)Our boards work at 3V, but I think serial communication is 12V by > specification. If anyone is aware of a commercial level-shifter so that we > don't need to build one ... > > Thanks sincerely for the help, > The Lizard A) Probably not. One improvement would be to use a dual-port serial adapter rather than two single adapters. KeySpan makes one. B) Depends on what else it's doing. Disk I/O blocks serial activity, so your buffering requirements are "unknown". C) That's a 13-year old app note. Good luck getting it to compile with current tools. D) A web search? "Jan Axelson's Lakeview Research" is a good resource. E) V.24 communication is at 12V. Serial communication is at whatever levels -you- choose. AL
From: Rich Webb on 10 Dec 2008 13:37 On Wed, 10 Dec 2008 12:01:04 -0500, "Jujitsu Lizard" <jujitsu.lizard(a)gmail.com> wrote: >e)Our boards work at 3V, but I think serial communication is 12V by >specification. If anyone is aware of a commercial level-shifter so that we >don't need to build one ... That would be an FTDI TTL-232R-3V3 or TTL-232R-3V3-WE cable. USB on one end, 3.3 V async serial on the other, 0.1" SIL or tinned wires. Carried by the usual vendors. A roll yer own approach may be to use the FTDI interface chips to an internal USB hub to a single cable to the PC. Haven't tried this but it seems this could get you two virtual comm ports over a single USB cable. Or, a plethora of microcontrollers have USB peripherals nowadays. The FTDI cable approach may still be simpler, though. -- Rich Webb Norfolk, VA
From: Jujitsu Lizard on 10 Dec 2008 13:42 "Vladimir Vassilevsky" <antispam_bogus(a)hotmail.com> wrote in message news:VNT%k.13651$Ws1.2332(a)nlpi064.nbdc.sbc.com... > >> e)Our boards work at 3V, but I think serial communication is 12V by >> specification. If anyone is aware of a commercial level-shifter so that >> we don't need to build one ... > > An embedded system engineer never heard of MAX232, eh? Surprisingly, I have an MSEE but I never design hardware. In a best case, it gives me the background to check hardware designed by others. I joined The Dark Side (software) very early in my career. However, I am now an expert at designing and building two different circuits. a)The two-resistor voltage divider. (I even know the formulas by heart!) On a very good day, I can do three resistors! b)The LED indicator (I can even select the resistor myself!). So, with 12 volts in, I can make the LED light! I also know that, unlike resistors, LEDs can only work in the circuit one way! (Naturally, the way I deal with this is to grab about 10 LEDs and start plugging them up until one works. The probability is about 2**(-10) that they all won't work. Other engineers actually figure out which is the plus thingie and which is the minus thingie--too much work for me.) (a) and (b) are pretty much the limit of my hardware design experience for the past 15 years. Design-checking is another matter ... The Lizard
From: Frank-Christian Kruegel on 10 Dec 2008 15:16 On Wed, 10 Dec 2008 12:01:04 -0500, "Jujitsu Lizard" <jujitsu.lizard(a)gmail.com> wrote: >Questions: > >a)Is there a better approach (especially recognizing that we want maximum >portability and that very few laptops these days ship with one let alone two >serial ports)? Two independent USB-Serial bridges will work if you can tell which one is inbound and which is outbound. The order in wich Windows detects the two bridges is random. If the timing between the two serial streams is important I'd suggest a different approach: Use a microcontroller with two hardware serial ports and USB (eg Atmel AT90USB1286/1287). Monitor each serial stream on the microcontroller and send the packets to the host together with a header containing the direction and a timestamp. The PC then gets both streams through a single connection and can identify the timing through the timestamps. USB is not realtime(*), but since the microcontroller provides the timestamps they are precise and reliable. >b)Will Windows keep up with 2 streams at 19,200 baud? If you do it my way Windows won't see any serial stream. Full Speed USB (11 MBps) should have plenty of headroom for your data. >c)Are there any web pages that you've found especially helpful? I did find >this one: You really should have the Visual Studio, the MSDN Library and the DDK. (*) There are may serial devices that will run poorly with USB-serial bridges due to timing issues. Serial ports transmit byte by byte, USB works on blocks, so the whole timing will change. I don't use USB-serial bridges at all. Cardbus or ExpressCard serial interfaces have real UARTs and behave like real serial ports. Watch out! ExpressCard has both a single PCIe lane and one USB, and some lazy bones use the USB part of ExpressCard for interfacing. So watch out that you get a card that really use the PCIe lane. Mit freundlichen Gr��en Frank-Christian Kr�gel
|
Next
|
Last
Pages: 1 2 3 Prev: UART interfacing pc and pic problem Next: Beginner questions: driving an LCD display |