Hey mackrackit, I think we've cracked it
Instead of just sending a '3' over from the transmit box which didn't work, I changed it to 'DEC:3' clicked send and the LED's lit for 5 seconds then went off as per the program below. Is that what I should type, DEC:1-9 or should it work on just sending '3'
Code:ANSEL = %00000000 'Disable analog select so ports work as digital i/o. CMCON0 = %00000111 'Disable analog comparators. TRISA = %00000000 'Set PORTA as OUTPUT. PORTA = %00000000 'Set PORTA pins all low. TRISC = %00000000 'Set PORTC as OUTPUT. PORTC = %00000000 'Set PORTC pins all low. MYVAR VAR BYTE MAIN: PAUSE 250 SERIN2 PORTC.5, 16780, [DEC MYVAR] '2400 INVERTED IF MYVAR = 3 THEN HIGH PORTA.5 PAUSE 5000 low PORTA.5 GOTO MAIN





Bookmarks