View previous topic :: View next topic |
Author |
Message |
shambhuvetal
Joined: 29 Aug 2008 Posts: 17 Location: Pune
|
Problem in RS-232 |
Posted: Tue Oct 07, 2008 4:43 am |
|
|
Hi,
when i write program for 1200 baud rate .
it shows some garbage values displayed over hyper terminal.
#use delay(clock = 8MHz)
#use RS232(baud = 1200,rcv = PIN_C7,xmit = PIN_C6)
& in program
set_uart_speed(1200);
Pl help on this topic.
Thanks _________________ shambhuvetal |
|
|
Rohit de Sa
Joined: 09 Nov 2007 Posts: 282 Location: India
|
|
Posted: Tue Oct 07, 2008 5:17 am |
|
|
Could you please be a little clearer with your problem. There could be several reasons why you're receiving garbage. Stating the PIC you are using, the compiler version, fuses, and other relevant details make troubleshooting a bit easier for us.
Another thing - once you've used a #use rs232 and set the baud rate, you need not use a set_uart_speed (unless, of course, you want to change the baud).
Rohit |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Tue Oct 07, 2008 6:51 am |
|
|
Does it work at other baud rates and only gives garbage at 1200?
What is the connection between the PIC chip and the PC running Hyperterminal? If the signal is inverted or not level shifted correctly you will get garbage.
Do you get about the correct number of characters? far too many? or far too few?
Are you using a crystal, a resonator, a RC network, or an internal oscillator? _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|