Hello,
I am trying to use a BasicATOM (28pin) to read a serial input and its not working for reasons i don’t understand!!
The serial data is coming in at non-inverted 9600, but the ATOM never picks up any data.
I have tested the data line by connecting it directly to the LCD screen and monitoring the raw serial data - it works!
But the ATOM does not see it for some reason!
I would be very grateful if you could help me with my code - shown below…
[code]
DatStr VAR Byte(2) 'Set up the variable to hold the incoming data
'************************************************************
MCP:
Pause 5000
SEROUT 8,I9600,“AT”,13,10] 'Send the letters A and T followed by a carriage return and line feed to pin 8
SERIN 7,I9600,1000,NoData,[DatStr] 'Receive the data back (should receive “OK”) on pin 7
Pause 500
SEROUT 0,N9600,"Data Received: "DatStr,13,10] 'Send DatStr to an LCD display connected to pin 0
GOTO MCP
'************************************************************
NoData:
SEROUT 0,N9600,“FAIL”,13,10] 'Send the word FAIL to the LCD screen if no data was received
Pause 3000
GOTO MCP
'************************************************************[/code]