Hi,
I'm trying to use a PIC18F2420 and configure all pins on PortB to be digital I/O's. I usually follow the datasheet quite literally, so have configured port b as follows:
@ __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L ;LV PROGRAMMER OFF
ASM
;PORT B
CLRF PORTB
MOVLW 11111111b ;ALL PORTB PINS DIGITAL
MOVWF ADCON1 ;A/D'S OFF
MOVLW 11000000b ;PIN DIRECTION PORT B
MOVWF TRISB
ENDASM
After doing this, I'm trying to toggle PORTB.5 with just a short loop:
START:
HIGH PORTB.5
PAUSE 100
LOW PORTB.5
PAUSE 100
GOTO START
It absolutely doesn't budge.
Would someone please tell me what I missed? It's been one of those days.
Thanks much!
Bookmarks