PDA

View Full Version : help!! serin problem



danlo
01-13-2007, 11:19 AM
I builded a IR transmitter by·using IC555, then used TSOP1836 to receiver ASCII data
I used command "SEROUT" to test the IR transmitter, it works, however, when i used command "SERIN" to test the IR receiver, no response.
my code is shown below:

' {$STAMP BS2}
' {$PBASIC 2.5}

value·var byte

DO
IF (IN10 = 1) THEN······················· 'press button
SEROUT 8,396,["A"]······················ 'transmit
SERIN 9,396,100,no_data,[value]···· 'receiver
DEBUG "ok"··································
ENDIF
no_data:
DEBUG "time out "
LOOP

what problems of my programming code?.....Please help!!