View previous topic :: View next topic |
Author |
Message |
EmbdFreak
Joined: 28 Jul 2005 Posts: 23
|
Without Level Shifter |
Posted: Tue Apr 04, 2006 11:04 pm |
|
|
hi all,
had something to enquire here. I have used PICbasic PRO as well as CCS. While doing the serial transmission and reception, a simple resistor suffices instead of a level shifter in the case of PICBasicPRO compiler. Ive observed that this doesnt work well with CCS. That means the SEROUT2 command of basic sets some additional bits to work around this. Any idea related to this ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Apr 04, 2006 11:19 pm |
|
|
Quote: | While doing the serial transmission and reception, a simple resistor
suffices instead of a level shifter in the case of PICBasicPRO compiler.
I've observed that this doesnt work well with CCS. |
You must define a software UART with the #use rs232() statement
and add the INVERT parameter to it. You need to use a 22K resistor
on the PIC's Rx pin. This limits the current going into the PIC's input
protection diodes to a tolerable amount. If you use the hardware
UART pins, then you must also add the FORCE_SW parameter. Example:
Code: | #use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, FORCE_SW, INVERT) |
|
|
|
EmbdFreak
Joined: 28 Jul 2005 Posts: 23
|
|
Posted: Wed Apr 05, 2006 12:09 am |
|
|
ok.
Thanks again |
|
|
|