i wrote this code but it s not working! so any ideas


N2400 con 0 'Set Serial mode
T9600 con 2 ' Set serial mode Baud Rate (T = True)
VARB0 var BYTE 'Define a variable VARB0 of type byte
TRISA=$FF 'Set port A to 1 (input)
TRISB=$00 'Set port B to 0 (output)

loop:
Serin PORTA.0,2,VARB0 ' B0 = input character Input the data serially from port A, pin0, at a Baud rate of 9600,
PORTB = VARB0 'send the data in VARB0 to PORTB (output)

PAUSE 50 'delay 50ms

Goto loop ' Forever repeat the loop

END 'end the program