PIC16C770 Microchip Technology Inc., PIC16C770 Datasheet - Page 28

no-image

PIC16C770

Manufacturer Part Number
PIC16C770
Description
18/20-pin, 8-bit Cmos Microcontrollers With 10/12-bit A/d
Manufacturer
Microchip Technology Inc.
Datasheet
PIC16C717/770/771
EXAMPLE 3-1:
FIGURE 3-1:
DS41120B-page 26
BCF
CLRF
BSF
MOVLW
MOVWF
MOVLW
MOVWF
BCF
STATUS, RP0
PORTA
STATUS, RP0
0Fh
TRISA
03
ANSEL
STATUS, RP0
To A/D Converter input or LVD Module input
BLOCK DIAGRAM OF RA0/AN0, RA1/AN1/LVDIN
RD
PORT
Data
Bus
WR
PORT
WR
TRIS
RD
TRIS
WR
ANSEL
Initializing PORTA
; Select Bank 0
; Initialize PORTA by
; clearing output
; data latches
; Select Bank 1
; Value used to
; initialize data
; direction
; Set RA<3:0> as inputs
; RA<7:4> as outputs. RA<7:6>availability depends on oscillator selection.
; Set RA<1:0> as analog inputs, RA<7:2> are digital I/O
; Return to Bank 0
Analog Select
TRIS Mode
Data Latch
D
D
D
CK
CK
CK
Q
Q
Q
Q
Q
Q
Q
EN
D
V
V
P
N
SS
DD
Schmitt
Trigger
2002 Microchip Technology Inc.
V
SS
V
DD

Related parts for PIC16C770