I don't see what is causing the syntax error.
There is a sample program that shows various inputs using SerIn here...I believe HSerIn uses the same syntax.
Also, lose the quote marks - you are waiting for $AA (i.e. 0xaa, a hex byte, binary %10101010) not ascii AA which would be "AA" without the $.
Bookmarks