I'm trying to control a pulse counter with a PIC and I'm having problems with the initialization, the code is:
BANKSEL ADCON1
MOVLW 0x0F
MOVWF ADCON1
MOVLW 0x10
MOVWF TRISA
MOVLW 0x00
MOVWF TRISB
BANKSEL PORTA
MOVLW 0x3F
MOVWF PORTB
But whatever I put on PORTB (wich is intended to send a "0" to a digit display) I always get a 0xFF, (so a 8 into display) in fact, all pins of the PIC are on High level. I guess I must be forgetting something as the Pic doesn't seem to be broken, I can read and program it without any issue, so the problema hast to be another one.
Can someone please help me with this? I'd be really grateful.
Thanks.
BANKSEL ADCON1
MOVLW 0x0F
MOVWF ADCON1
MOVLW 0x10
MOVWF TRISA
MOVLW 0x00
MOVWF TRISB
BANKSEL PORTA
MOVLW 0x3F
MOVWF PORTB
But whatever I put on PORTB (wich is intended to send a "0" to a digit display) I always get a 0xFF, (so a 8 into display) in fact, all pins of the PIC are on High level. I guess I must be forgetting something as the Pic doesn't seem to be broken, I can read and program it without any issue, so the problema hast to be another one.
Can someone please help me with this? I'd be really grateful.
Thanks.