I am trying to build a two part system where I will have a MC on a self-acquire satellite dish, and another MC in a handheld unit joined by BT. (This also allows for BT control from a phone or other SPP device) I fried my LCD, so I changed my attack plan to work from a terminal for now. I am having trouble getting the menu system to react properly so I hooked up another BT module TX/RX reversed and opened another terminal. I can see the terminal sending out "1" or "2" but the chip is registering it as [00]. I figured this out by putting in a debug line to echo it back before continuing the loop. I'm sure it's probly some formatting issue, but I sure don't see my error......

#CONFIG
__config _FOSC_HS & _WDT_OFF & _PWRTE_ON & _BODEN_ON & _LVP_OFF & _CPD_OFF & _WRT_OFF & _DEBUG_OFF & _CP_OFF
#ENDCONFIG


DEFINE OSC 12


TX var PORTC.6
RX var PORTC.7
CNT var word
cereal var word
i var byte


goto MainMenu


CLR:
For i = 0 to 30
serout TX, 2, [10]
next i
return


MainMenu:
gosub CLR
serout Tx, 2, ["******** MAIN MENU ********", 13, 10, 10]
serout Tx, 2, [" 1. Start Homing Sequence", 13, 10]
serout Tx, 2, [" 2. Manual JOG Mode", 13, 10]
serout Tx, 2, [" 3. Auto-Acquire Satellite", 13, 10]
serout Tx, 2, [" 4. Stow Dish for Travel", 13, 10, 10]
serout Tx, 2, ["Enter Your Selection:", 13, 10]
Serin RX, 2, cereal

If cereal = "1" then goto HomeDish
If cereal = "2" then goto JogMode
If cereal = "3" then goto AutoAcquire
If cereal = "4" then goto StowDish
serout TX, 2, [cereal] 'For debugging only
pause 500
goto MainMenu


HomeDish:
gosub CLR
serout Tx, 2, ["******** HOME DISH ********", 13, 10, 10]
serout Tx, 2, [" 1. Start Homing Sequence", 13, 10, 10]
serout Tx, 2, [" 2 Abort Homing", 13, 10, 10]
serout Tx, 2, ["Enter Your Selection:", 13, 10]
Serin RX, 2, cereal
if cereal = "1" then goto StartHoming
if cereal = "2" then goto MainMenu
serout TX, 2, [cereal] 'For debugging only
pause 500
goto HomeDish


JogMode:
gosub CLR
serout TX, 2, [" JOG MENU ", 13, 10, 10]
serout TX, 2, ["*** UNDER CONSTRUCTION *** ", 13, 10]
pause 3000
goto MainMenu


AutoAcquire:
gosub CLR
serout TX, 2, [" AUTO-ACQUIRE ", 13, 10, 10]
serout TX, 2, ["*** UNDER CONSTRUCTION *** ", 13, 10]
pause 3000
goto MainMenu


StowDish:
gosub CLR
serout TX, 2, [" STOW DISH ", 13, 10, 10]
serout TX, 2, ["*** UNDER CONSTRUCTION *** ", 13, 10]
pause 3000
goto MainMenu


StartHoming:
gosub CLR
serout TX, 2, [" Begin Homing, Homie ", 13, 10, 10]
serout TX, 2, ["*** UNDER CONSTRUCTION *** ", 13, 10]
pause 3000
goto MainMenu