I was using PORTC as inputs for switches, but as it appears that the PIC18F2550 has no PORTC.3, i've to to move all to PORTA. However, after changing all the PORTC in code to PORTA, the PIC doesn't perform correctly.
Am i missing something?
This is what i had.
Which i thought i'd simply changed to-Code:' ---------- [ I/O Definition ] ---------- TRISA = %11111111 ' Set PORTA to all input TRISB = %10000001 ' Set PORTB (0)INPUT (1-5)OUTPUTS TRISC = %00000111 ' Set PORTC (0-2 input) rest Outputs ' ---------- [ System Inputs ] ---------- Circle Var PORTC.0 ' 1 - Circle Switch MaskSwitch=PORTC & $07 Select Case MaskSwitch Case 1 '%00000001 or Circle Switch If Circle = 1 Then Gosub Procedure_Circle If Circle = 0 THEN EndIf ..........
Thank you,Code:' ---------- [ System Inputs ] ---------- Circle Var PORTA.0 ' 1 - Circle Switch MaskSwitch=PORTA & $07 Select Case MaskSwitch Case 1 '%00000001 or Circle Switch If Circle = 1 Then Gosub Procedure_Circle If Circle = 0 THEN EndIf ..........
Steve
Bookmarks