Можно открыть мануал и почитать, например:
Цитата:
Note 1: RA5 shares function with V PP . When V PP
voltage levels are applied to RA5, the
device will enter Programming mode.
2: On Reset, the TRISA register is set to all
inputs. The digital inputs (RA<3:0>) are
disabled and the comparator inputs are
forced to ground to reduce current
consumption.
3: TRISA<6:7> is overridden by oscillator
configuration. When PORTA<6:7> is
overridden, the data reads ‘0’ and the
TRISA<6:7> bits are ignored.
Т.е. при вкл. контроллера "digital inputs (RA<3:0>) are disabled and the comparator inputs". И в мануале есть инициализация порта:
Цитата:
EXAMPLE 5-1: Initializing PORTA
CLRF PORTA ;Initialize PORTA by
;setting
;output data latches
MOVLW 0x07 ;Turn comparators off and
MOVWF CMCON ;enable pins for I/O
;functions
BCF STATUS, RP1
BSF STATUS, RP0;Select Bank1
MOVLW 0x1F ;Value used to initialize
;data direction
MOVWF TRISA ;Set RA<4:0> as inputs
;TRISA<5> always
;read as ‘1’.
;TRISA<7:6>
;depend on oscillator
;mode
РЕЗИСТОР писал(а):
Вот код прошивки на микропаскале (сам знаю что извращение)
Да уж...
