View previous topic :: View next topic |
Author |
Message |
angeloflight
Joined: 13 Jun 2007 Posts: 4
|
rs232 |
Posted: Wed Jun 13, 2007 3:40 am |
|
|
Hi..i have a problem..I am tryng to comunicate 2 pic with rs232..can I change default pin of comunication?? i'm using 18f4431..the pin of comunication are C6 anc C7. can I use any pin or there is a problem?? thanks |
|
|
inservi
Joined: 13 May 2007 Posts: 128
|
|
Posted: Mon Jun 18, 2007 10:35 am |
|
|
Hello,
You can simply change these port in the #use rs232.
here is an example:
Code: |
#define TX PIN_C4
#define RX PIN_C5
#use rs232( baud=9600, parity=N, xmit=TX, rcv=RX, bits=8 ) |
dro. _________________ in médio virtus |
|
|
Ttelmah Guest
|
|
Posted: Mon Jun 18, 2007 12:58 pm |
|
|
You asked exactly this question only a few days ago.
The same answer applies.
You can use _any_ pin for RS232, but unless you use the hardware pins, you have to live with the restrictions of _software_ RS232. No buffering in either direction, to receive, your code _must_ be waiting for the characters as they arrive.
Best Wishes |
|
|
|