>From: Jim Murphy >Reply-To: pic microcontroller discussion list >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC]: serial garbage >Date: Mon, 21 May 2001 15:41:15 -0600 > >>Not sure what you want, but you can trap a character on >>the scope and read the bits right off it. > > I scoped serial output the other day to see what I could see, and >realized that if I didn't have some way of producing a clock signal for the >trigger of the scope, I would be beating my head against the wall. The >problem I think I encountered was that the scope doesn't trigger off every >9th bit, but triggers its sweep from the highs or lows which you set. So >the result is that the first bit which occurs at trigger time gives you a >nice square waveform, but after that, who knows what's there? Did the start >of the scope sweep occur at the beginning of a character, the middle, or >the >end? Search me. > Do any of you know how to produce an accurate trigger, without getting >too complicated, so that you can see an actual "byte" pattern? > You need to set the rep rate of the character and the sweep speed of the scope to get a solid picture. I haven't done this in a while (since I got a storage scope), but here's the basic idea. Assuming 115k 8N1, you have a total character time of about 86 usec including start and stop bits. If you set the scope for 10 usec/div, the total sweep time will be 100 usec. If you send the characters every 150-200 usec, the only trigger the scope should see is the start bit. You should see the waveform spread pretty much across the whole screen and not moving around. (The scope can't retrigger until after its sweep completes. By then, one character has been displayed and the scope waits for the next start bit to begin the next sweep.) Boy, oh boy, storage scopes sure have spoiled me. YMMV, obviously. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu