Jeff>Yeah, I've seen that as well. For i = 0 to 0 will still produce one cycle through the loop.
I've not scoped the signal, but to be honest I don't know what I'm looking for! - I've never done it before, but it would be valuable for me to learn.
I'll do some reserach on the web to learn what to look for and scope it tonight after work. This should be very valuable - thanks!<<
There has been many a times, I have had a working program, yet my "Blinks" were wrong. When I scoped the received signal, it was perfect. then later on, I found that I forgot a bit shift or whatever error it was on my side.
I now barf it to a LCD, or scope it. If the LCD shows wrong, I will scope it.
You will have a start bit, then your data. Depending on your scope, your may have to read your data from RIGHT to LEFT. My favorite trick, is to use a duel trace scope... One on the transmit side, and one on the receive side. If they are not equal, there is a problem.
The receive side, I kick it out to a pin.
Receiver:
SERIn port,baud data
Serout anotherport, baud, data.
That way, you *know* the output of that pin is the input of the transmitter pin.
Make sure you transmit a *known* bit of data. Something you *know* you can recognize. Like maybe a hex 0E, so you can see the relationship between the ones, zeros, and the start bit.
If you send one byte at a time, Send something like a 4, then a 5.
Though I do not have a picture here at work, I am attaching a picture of the Number 9 that is being sent on a project that I worked on about 1 year ago. You can see on the top probe 4 spikes (for easier reading) a "Hit" to designate the start of each bit being sent. Notice you read the scope from right to left. Depending on your scope, you can flip it around, invert the signal, or do other things.
This signal was used to make a homemade serial communication between two chips that exceeded standard serial communication from 4mhz chip of greater than 10,000 baud.
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks