Hello,
sorry maybe I am too stupid but seems I have a problem even with the basic operation of HSERIN to receive the data, I don't know, how to solve it.
Immagine, that I want to simple receive two variables from my terminal, I cannot manage the timming:
E.g. I want to send p123 and I want to have it in two byte variables:
in one variable the ascii code of p and in second variable the value 123.

Looks easy, what I simple tried to do:
COMMAND var byte
SERIALBYTE var byte

while 1
if (PIR1.5==1) then
HSERIN 10, jump [command, DEC SERIALBYTE]
gosub managebytes
endif
:jump
wend

The problem is, that this doesn't work and I always have in command == "p" and in SERIALBYTE = 1.
I think, that the reason is, that the buffer of the pic has only two bytes for the serial buffer, so when I sent these 4 bytes, only first two are stored and saved to the buffer and PBP is not fast enough to manage it. My PIC is working only on 3.5 Mhz..... Do you have any other idea, how could I receive safely several bytes not just 2? I cannot use other PINS then RX and TX, so the HW flow control cannot be used.

Thanks Robert