Simple SERIN command not working! WHY?!

Hello,

I am trying to use a BasicATOM (28pin) to read a serial input and its not working for reasons i don’t understand!! :angry:
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]

Hi,

Your code seems fine at a glance. Unfortunately, we have very little information about the BasicATOM 28 (it is a discontinued product) and cannot offer much direct help with using it.
We recommend that you consult the manual for reference and maybe contact the manufacturer for more support (basicmicro.com/).

As you can see in a previous thread (robotshop.com/forum/basic-micro-commands-for-serial-input-output-t5562), the use of SERIN can lead to unexpected results as it will only capture data while it is running.
If the data arrives before or after the command is executed, then it will not receive it.

We recommend using the hardware serial on the chip to receive data from another device.

Sincerely,