 |
WinPicProg Forums A forum to support WinPicProg
|
| View previous topic :: View next topic |
| Author |
Message |
greg
Joined: 05 Nov 2006 Posts: 2
|
Posted: Sun Nov 05, 2006 2:45 am Post subject: tutorial 7: 9600bps => baud rate? |
|
|
hi,
very beginner question here. i've programmed my pic16f648a with the code from tutorial 7.1, but i'm unsure of what baud rate to set my serial line at on the receiving machine.
your tutorial states the code speed is running at 9600bps, and i'm wondering if in this case the baud rate would be 9600 as well? i'm new to serial pic programming and i don't know how many bits are sent per baud using this code. 1? 2? 4?
i've tried many baud rates (300,1200,2400,etc) but keep getting gibberish on the output side.
thanks |
|
| Back to top |
|
 |
greg
Joined: 05 Nov 2006 Posts: 2
|
Posted: Sun Nov 05, 2006 5:03 am Post subject: |
|
|
ok after re-reading several bps vs. baud write-ups, i'm thinking that since the pic is only capable of two voltages, that 9600bps means its also 9600 baud.
for anyone that cares or has the same question i did, the baud rate is the maximum rate at which the signal voltage could change. for a pic chip, it could theoretically change from 0 to 1 or 1 to 0 for each bit (101010101010). since it can send 9600 bits per second, that equates to a maximum possibility of 9600 changes in voltage per second. baud is changes per second, bps is total number of bits per second.
now if the pic could transmit 0, .25. .5 and 1 you could get a higher BPS rate for a lower baud rate. that is, the signal could be any one of 4 voltages at any time, so you have to multiply your baud rate by 4 to get the BPS value. |
|
| Back to top |
|
 |
KC
Joined: 05 May 2006 Posts: 99 Location: Victoria BC Canada
|
Posted: Sun Nov 05, 2006 6:51 pm Post subject: |
|
|
| Quote: | | for anyone that cares or has the same question i did, the baud rate is the maximum rate at which the signal voltage could change. |
You are correct in this. However the tutorial assumes that 9600bps which is the same term used in HyperTerminal. What terminal program are you using? I think the real issue with your PIC is that you are running it at a different clock speed than that in the tutorial. At what BPS did it appear to work at? _________________ KC |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|