Hserout [DEC5 period,DEC5 period2,"T",13,10]
'IF PORTA.5 = 0 THEN return ' If PORTA, pin 5 is low (0), return to menu
HSERIN 100, skip,[MI]
“This where I would like to check for USART receive”
If MI = "Z" then return
Skip:
period2 = 0
GoTo sloop
If you want to get out of the subroutine when you receive a byte (I used "Z" but you can use any byte) the above three lines of code will solve the problem. I have used a timeout of 100 millisecs but you can short it if too long for your need.
Merry Christmas to you too.
Al.
All progress began with an idea
Bookmarks