Hi,
I am trying to use SERIN & SEROUT in a PIC12F675, it works fine with the SEROUT giving me a beatiful "Hello World", but things gone wrong with SERIN. It just does not work.
Somebody help me please!!!!
I am using the following code, is there any trick that I don't know?
Tks in advance.
************************************************** *
@ DEVICE pic12F675
@ DEVICE pic12F675, INTRC_OSC_NOCLKOUT
@ DEVICE pic12F675, WDT_ON
@ DEVICE pic12F675, PWRT_ON
@ DEVICE pic12F675, MCLR_OFF
@ DEVICE pic12F675, BOD_ON
' Internal Oscillator
' Enable watch dog timer
' Enable power up timer
' Disable MCLR pin
' Enable brown out detect
DEFINE OSCCAL_1K 1
INCLUDE "modedefs.bas"
TRISIO.0 = 1 ' set GPIO.0 as input
TRISIO.2 = 0 ' set GPIO.0 as output
CMCON = 7 ' turn off analog comparator
ADCON0.0 = 0
OPTION_REG.7 = 0
VRCON = 0
B0 var byte
Pause 200 ' Allow pic to Stabilize
loop:
serin GPIO.0,T9600,["A"],b0
SerOut GPIO.2,T9600,["Hello World"]
Pause 1000
SerOut GPIO.2,T9600,[#B0,13,10]
Pause 1000
GoTo loop
Bookmarks