Hi Fredrick,

Here is how you can test the TX code and the RX with a terminal emulator.

* * *

You can test the TX code if you connect the PIC to the serial
port of your PC. The 1k resistor is mandatory.

Open your terminal emulator with these settings:

2400 baud, 8 data bits, No-parity, 1 stop bit.


Code:
'                       1k
' PIC TX pin ---------/\/\/\---------- DB9 (Pin 2) RS232 port RX data
'
'
' PIC GND -----------------------------DB9 (pin 5) RS232 port GND 
'
'
'
Counter = 65  '65 = character A
SEROUT2 TransmitterPIN,16780,["!",Counter]
If you run this code you should see in the terminal emulator: !A


* * *


You can test the RX code if you connect the PIC to the serial
port of your PC. The 22k resistor is mandatory.

Open your terminal emulator with these settings:

2400 baud, 8 data bits, No-parity, 1 stop bit.


Code:
'                       22k
' PIC RX pin ---------/\/\/\---------- DB9 (Pin 3) RS232 port TX data
'
'
' PIC GND -----------------------------DB9 (pin 5) RS232 port GND 
'
'
'
SERIN2 reciverpin, 16780, [WAIT("!"),Counter]
After you run the code you must type !A in the terminal emulator.

* * *

Note that this direct connection with series resistors works only if you
use Inverted logic for SEROUT2 and SERIN2.

Best regards,

Luciano