INCLUDE "modedefs.bas"
TRISB=%00000010
B0 VAR BYTE
loop:
SerOut2 PORTB.0,84,["Put a number",13,10]
SerIn2 PORTB.1,84,[DEC B0]
SerOut2 PORTB.0,84,["I took number:",DEC B0,13,10]
GoTo loop
------------------------------
For me this code has worked.You must connect your serial port with PORTB.0
and PORTB.1 with your computer.If you open terminal (Start->Accesories->Communications->Hyperterminal and set up a communication of 9600 (that means the number 84 in the above code) you must see "Put a number".
I don;t know if i helped you....
Bookmarks