Hi,
Welcome to the forum.
Which PIC are you using? Depending on which on it is you might need to enable digital mode on the pins you're using. Check comparator and ADC section of the datasheet to find out if it's applicable in your case.
Your send code looks alright although I'd probably introduce some delay or interlock mechanism so that it sends "A" one time for each button press. As it's currently written it keeps sending "A" (rapidly) as long as the button is held down - perhaps that's what you want, I don't know.
Your receiver code on the other hand isn't quite alright.
Code:
Serin portc.7,2,["A"]
if portc.7=="A" then
You need to create a variable, use that in the SERIN statment and then check the content of the variable with the IF statement.
Code:
char VAR BYTE
SERIN PortC.7, 2, [char]
IF char = "A" THEN
Something like that.
Also, your CONFIG/ENDCONFIG block is blank and that's probably not that great. You either don't include it at all thus relying on the PBP default for the particlar chip OR you include it with ALL the settings (or at least those you want changed from what the hardware default (see datasheet) is.)
Finally, whenever you're posting code to the forum please do use the appropriate code tags, see here.
/Henrik.
/Henrik.
Bookmarks