SubZero...
Try this... and then I want you to send a number 4 from your PC's keyboard... and then I want you to send an UPPERCASE 'A'... and see what happens... (try it also with a lowercase 'a')...
Code:
test var byte
loop:
hserin [test]
if test=52 then
HSEROUT ["I've struck Gold",13,10]
else
If test=65 then
HSEROUT ["Hey it's really working",13,10]
else
HSEROUT ["No Cigar",13,10]
endif
endif
goto Loop
end
And now your homework (and please, NOBODY, but NOBODY give the answer here!)... I want you to find out WHY when you send a "4" from your PC's keyboard, we look for a 52 here in the PIC program. And when you send an Uppercase A we look for a 65 (and that is the BIGGEST clue you're going to get!). Question 1. What is the relationship? Question 2. What number would you need to detect, if we wanted to capture the lowercase 'a' instead of the UPPERCASE 'A'? By answering those two questions you will have learnt the answer to your original problem (as well as looking at your logical program flow to the flaws in your original program).
Bookmarks