HSERIN problem

Hello,
I am currently writing a program to collect characters from Bot Board II COM port. When I used the following code:

main:
serin s_in,i9600,[temp]
....
....
goto main

I could get the characters, but unfortunately this command gets stuck waiting for another character. I need to collect characters, but on the background. I decided to use HSERIN, but for some reason I don’t catch the characters with it. I used the following code:

sethserial1 h9600
ENABLEHSERIAL 

temp		var byte

main:
hserin [temp]
....
....
goto main

What can be wrong?
Thank you.

It is doing exactly what you are asking it to do. It will wait in a HSERIN until it completes. There are ways around this, like:

main:
    if (hserinnext 0x81) <>= -1 then
	hserin [temp]
    endif
...
goto main

HSERINNEXT is in the manual right after HSERIN…

Kurt

Thank you for the fast reply. I also don’t really understand can I use the BOT BOARD II COM port to receive the data as I did it with serin command (I just plugged male connection from the device X to BOT BOARD II COM port) or should I connect the transmitter of that device to pin 14 receiver on BB II now?

The hardware serial port is on pins 14 and 15, so to use HSERIN/HSEROUT, you would need to be connected to those pins.