View previous topic :: View next topic |
Author |
Message |
PRAVEENKUMAR
Joined: 08 Jan 2006 Posts: 3
|
help for rs232 |
Posted: Mon Jan 09, 2006 3:21 am |
|
|
Good day all,
I am new to PIC controllers, any how i managed to creat a program for rs232 comm. with the pc. Just i want to send a letter continiously, i tried but the pc reads some garbage.
i just wrote printf("I");, after setting the baud rate and all.
anyone help,
thanks |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Mon Jan 09, 2006 7:54 am |
|
|
First, post your code here, using the "code" button so it stays formatted. Also tell us what version of the compiler you are using. The version is printed near the top of the .lst file. What circuitry do you have between the PIC pin and the PC serial port?
Second, Can you capture some of that "garbage" so we can see what it looks like? If you can capture it in hex so much the better. Is the garbage repeatable? Is the garbage consistant or does it vary with time?
Based on what little you tell us I would guess either you have the signal inverted, or the speed is wrong either because the baud rate or the crystal is wrong. It is also possible you have a weak signal and it is being corrupted by noise. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
Paolino
Joined: 19 Jan 2004 Posts: 42
|
|
|
|