Try this. It echo's everything you type on hyperterminal, but echo the same character 3 times and toggle the led every time you hit a key, that way you know it's really working..
Include "modedefs.bas"
DEFINE OSC 4
rx var portc.7 : output rx : tx var portc.6 : input tx
led var portd.2 : output led : serialdata var byte : ADCON1 = $F
main:
toggle led 'just show the program is running
serin rx , N2400 , serialdata
serout tx , n2400 , [ serialdata , serialdata , serialdata ]
goto main
Once again, you break it down, make it super simple, then build it back up...





Bookmarks