Why not send a character, take a conversion, and then sit in a loop waiting for a character to come in using HSERIN? When the character is received (it can be *any* character, or a specific one of your own choosing),
then send another character...
If the sample has to be current (i.e. taken just before the command), you could continuously take A/D readings in a loop. In that loop check PIR1.5 = 1. If it is set, grab the character with HSERIN. If it the right character - send...
Bookmarks