
Originally Posted by
Peter987
Howdy
Can anyone give me some examples please in more detailed depth regarding the MELabs Pic Compiler command serin.
Welcome on the forum Peter987. Well there's many code example in here, just type SERIN in the search engine. OK you'll have to spend few minutes/hours days, but you may found some interesting tips as well.
I have two 16F84 PICS communicating perfectly using one byte at a time, however I am in the dark as to how to use the command
serin 1,N1200,b10,b11,b12,b13 to receive multiple bytes.
How does the serin command know when the last byte is sent etc.
Well, serin will receive one byte at the time and will finish once B13 is received... even if it take 1 mSec, 1minute or 1 Hour to have it.
It always depend of what else you PIC will do, and what you need to do with those data... tell us more... don't be afraid, you won't break your keyboard by typing more infos 
What do you do in the case of less bytes are transmitted than there are variables allocated for in the serin command?
usually, i will cry or find a solution 
As Skimask said, the Timeout option may work.
If it was me, i would choose another PIC with a USART for that... it open a wide range of better option than using a Timeout label.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks