Problems with 18f252 port A and port B
October 15, 2009
I wrote a simple program with MPLAB for my PIC18F252.
CONFIG WDT = OFF ; DISABLE WATCH DOG TIMER
CONFIG OSC = HS ; USE CRYSTAL
org 0 ; START CODE AT 0
MOVWF PORTB ; MAKE ALL PINS 1(HIGH)
MOVWF PORTA ; MAKE ALL PINS 1(HIGH)
From this program, it should make all the pins in porta and portb high. So, if i connect and led to any of these pins (postive to pin, negative to ground) it should light up. However , it does not work for pin RA4 and does not work for RB5, RB6 and RB7. What could be the problem? Thanks.