Re: PIC puzzle




"randy.day" <randy.day@xxxxxxxx> wrote in message
news:Hkzcj.14667$vd4.6960@xxxxxxxxxxxx
Okay, new PIC issue causing premature forcible hair removal. The code
below
is supposed to put 1's on the PORTB pins (PIC16F690). It's not happening;
what am I missing?

BANKSEL 0x01
clrf TRISB ; PORTB all output
clrf TRISC ; PORTC all output
BANKSEL 0x00
bcf SSPCON, 5
movlw 0xFF
movwf PORTB
goto $

banksel TRISB
clrf TRISB
movlw 0xFF
banksel PORTB
movwf PORTB

See your Microchip documentation for how to use
'banksel' properly.

-Mike


.



Relevant Pages

  • Re: PIC puzzle
    ... is supposed to put 1's on the PORTB pins. ... BANKSEL 0x01 ... and linker to generate bank selecting code to set the bank to the bank ... So, unless 0x01 is a label that somehow defines TRISB, it looks like you are ...
    (sci.electronics.basics)
  • PIC puzzle
    ... is supposed to put 1's on the PORTB pins. ... BANKSEL 0x01 ... clrf TRISB; PORTB all output ...
    (sci.electronics.basics)