Log in

View Full Version : Using SERIN.BAS to test setup



TurboLS
- 16th February 2005, 04:23
OK, I have SERIN.BAS compiled, assembled, and programmed on my PIC18F4520. I looked in the MODEDEFS.BAS file and I was trying to figure out how to wire up the serial port connector to the pic chip. SERIN.BAS defines S0 and S1 as pins, but I don't see how those descriptors correspond to the pic chip pins, such as PORTA.0 . Am I missing something really simple? I currently have the RS232 connector wired in the following configuration. I have the send and receive pins connected to the TX and RX pins on the PIC chip respectively.

mister_e
- 16th February 2005, 05:33
well since your pic already have a USART, use TX and RX pins and forget about SERIN or SEROUT stuff. Use HSERIN and HSEROUT instead. They will use the TX and RX pin of your PIC. But you'll need a RS232 inverter chip like the MAX232.

BUT if you still want to use SERIN SEROUT
rc6/tx => PORTC.6
rc7/rx => PORTC.7

SERIN PORTC.7 ......
SEROUT PORTC.6 .......

be sure to set mode to Inverted