HELP! Debugin does not work
I am seeing strange behavior with the 12F609. I have a start up port toggle to let me know it is going through the code. When it gets to the debugin I can't seem to make the ports work.
INCLUDE "Modedefs.Bas"
@ DEVICE PIC12F609, MCLR_OFF, IOSCFS_8MHZ, INTRC_OSC_NOCLKOUT,protect_off
GPIO = 0
TRISIO = %001100
'TRISIO.0 ' Output
'TRISIO.1 ' Output
'TRISIO.2 ' Input IR module input
'TRISIO.3 ' Input turn off MCLR
'TRISIO.4 ' Output
'TRISIO.5 ' Output
DEFINE DEBUGIN_REG GPIO ' Set as software RX in
DEFINE DEBUG_BAUD 1200 ' Set bit rate
DEFINE DEBUGIN_BIT 2 ' Set GPIO bit 2
DEFINE DEBUGIN_MODE 1 ' Set Debugin mode: 0 = true, 1 = inverted
; VARIABLES
Payload VAR byte
pause 100 ' pause holds up startup initialization for programming
pause 1000
GPIO = %010001
pause 1000
GPIO = %000000
pause 1000
GPIO = %010001
pause 1000
GPIO = %000000
main:
debugin [wait (255), payload]
select case Payload
case 0 'All stop
GPIO = %000000
CASE 10 'Right spin
GPIO = %100000
CASE 50 'Left spin
GPIO = %000001
case 100 'Straight
GPIO = %010001
END SELECT
goto main