PIC16F690 portc6 and portc7 not responding

Help
Oscar Mier
2012-02-28
2013-04-02
  • Oscar Mier
    Oscar Mier
    2012-02-28

    I try to test portc with this portc.asm:

    include "p16f690.inc"
    __CONFIG ( _FCMEN_OFF & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_ON & _PWRTE_OFF & _WDT_OFF & _INTRC_OSC_NOCLKOUT )
    banksel ADCON0
    clrf ADCON0
    banksel ADCON1
    clrf ADCON1
    banksel ANSEL
    clrf ANSEL
    banksel ANSELH
    clrf ANSELH
    banksel TRISC
    clrf TRISC
    bcf TRISC,6
    bcf TRISC,7
    banksel SSPCON
    bcf SSPCON,5
    start
    movlw B'11000001'
    banksel PORTC
    movwf PORTC
    bsf PORTC,6
    bsf PORTC,7
    bsf PORTC,5
    nop
    goto start
    end

    But portc6 and portc7 never seem to switch from 0 to 1. Nor can I make portc6 or portc7 behave as digital inputs my setting the appropriate TRISC bits. Why?