PIC18C242 MICROCHIP [Microchip Technology], PIC18C242 Datasheet - Page 167

no-image

PIC18C242

Manufacturer Part Number
PIC18C242
Description
High-Performance Microcontrollers with 10-Bit A/D
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC18C242-I/SO
Manufacturer:
MICROCHIP
Quantity:
2 000
Part Number:
PIC18C242/JW
Manufacturer:
NS
Quantity:
10
16.0
The analog-to-digital (A/D) converter module has five
inputs for the PIC18C2x2 devices and eight for the
PIC18C4x2 devices. This module has the ADCON0
and ADCON1 register definitions that are compatible
with the mid-range A/D module.
The A/D allows conversion of an analog input signal to
a corresponding 10-bit digital number.
Register 16-1: ADCON0 Register
bit 7:6
bit 5:3
bit 2
bit 1
bit 0
7/99 Microchip Technology Inc.
10-BIT ANALOG-TO-DIGITAL
CONVERTER (A/D) MODULE
Legend:
R = Readable bit
- n = Value at POR reset
bit 7
ADCS1:ADCS0: A/D Conversion Clock Select bits (shown in bold)
000 = F
001 = F
010 = F
011 = F
100 = F
101 = F
110 = F
111 = F
CHS2:CHS0: Analog Channel Select bits
000 = channel 0, (AN0)
001 = channel 1, (AN1)
010 = channel 2, (AN2)
011 = channel 3, (AN3)
100 = channel 4, (AN4)
101 = channel 5, (AN5)
110 = channel 6, (AN6)
111 = channel 7, (AN7)
GO/DONE: A/D Conversion Status bit
When ADON = 1
1 = A/D conversion in progress (setting this bit starts the A/D conversion which is automatically
0 = A/D conversion not in progress
Unimplemented: Read as ’0’
ADON: A/D On bit
1 = A/D converter module is powered up
0 = A/D converter module is shut off and consumes no operating current
ADCS1
R/W-0
Note:
Note:
cleared by hardware when the A/D conversion is complete)
RC
OSC
OSC
OSC
OSC
OSC
OSC
RC
(clock derived from the internal A/D RC oscillator)
The ADCS2 bit is located in the ADCON1 register
The PIC18C2X2 devices do not implement the full 8 A/D channels, the unimple-
mented selections are reserved. Do not select any unimplemented channel.
(clock derived from the internal A/D RC oscillator)
/2
/8
/32
/4
/16
/64
ADCS0
R/W-0
R/W-0
CHS2
W = Writable bit
’1’ = Bit is set
R/W-0
CHS1
Preliminary
U = Unimplemented bit, read as ‘0’
’0’ = Bit is cleared
R/W-0
CHS0
The A/D module has four registers. These registers
are:
The ADCON0 register, shown in Register 16-1, con-
trols the operation of the A/D module. The ADCON1
register, shown in Register 16-2, configures the func-
tions of the port pins.
• A/D Result High Register (ADRESH)
• A/D Result Low Register (ADRESL)
• A/D Control Register 0 (ADCON0)
• A/D Control Register 1 (ADCON1)
GO/DONE
R/W-0
x = Bit is unknown
U-0
PIC18CXX2
bit 0
ADON
R/W-0
DS39026B-page 167

Related parts for PIC18C242