Hi Dave,
1. The attachment is my circuit diagram, pls comment to me if there are something wrong.
Thanks
2. Source Code:
'################################################# #########
Define OSC 10
include "Modedefs.bas"
ADCON1 = 7
TRISA = %010000 'RA4 as serial input, RA3 as serial output
TRISB = 0 'PortB used to ON the LED
CHAR var byte
PORTB = 0
Main:
SERIN PORTA.3,T9600,CHAR
PORTB = CHAR
SEROUT PORTA.3,T9600,[CHAR,10] 'I used hyperterminal to received the data
'that sent to pic
GOTO MAIN
############################################
3. I was try to change the value of OSC but still get the same result. For Example: when i sent "1" from hyperterminal to pic but the result that returned to hyperterminal is " ' " then the result on LED is "11111010". I was checked the ASCII table, the result is not same with the data i sent.
Bookmarks