PIC16F506 Microchip Technology, PIC16F506 Datasheet - Page 55

no-image

PIC16F506

Manufacturer Part Number
PIC16F506
Description
(PIC12F510 / PIC16F506) 8-Bit Flash Microcontroller
Manufacturer
Microchip Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F506-I/P
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F506-I/SL
Manufacturer:
MICROCHIP
Quantity:
16 700
Part Number:
PIC16F506-I/SL
Manufacturer:
Microchip Technology
Quantity:
33 360
Part Number:
PIC16F506-I/SL
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F506-I/SL
0
Part Number:
PIC16F506-I/ST
Manufacturer:
MICROCHIP
Quantity:
2 000
Part Number:
PIC16F506-I/ST
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F506-I/ST
0
Company:
Part Number:
PIC16F506-I/ST
Quantity:
8 000
Part Number:
PIC16F506T-I/SL
Manufacturer:
ROHM
Quantity:
400 000
Part Number:
PIC16F506T-I/SL
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC16F506T-I/ST
Manufacturer:
ZARLINK
Quantity:
320
9.1.6
The ADRES register contains the results of the last
conversion. These results are present during the sam-
pling period of the next analog conversion process.
After the sampling period is over, ADRES is cleared
(= 0). A ‘leading one’ is then right shifted into the
ADRES to serve as an internal conversion complete
bit. As each bit weight, starting with the MSB, is con-
verted, the leading one is shifted right and the con-
verted bit is stuffed into ADRES. After a total of 9 right
shifts of the ‘leading one’ have taken place, the conver-
sion is complete; the ‘leading one’ has been shifted out
and the GO/DONE bit is cleared.
REGISTER 9-1:
© 2006 Microchip Technology Inc.
bit 7-6
bit 5-4
bit 3-2
bit 1
bit 0
ANALOG CONVERSION RESULT
REGISTER
ADCON0 REGISTER
ANS<1:0>: ADC Analog Input Pin Select bits
00 = No pins configured for analog input
01 = GP2/AN2 configured as an analog input
10 = GP2/AN2 and GP0/AN0 configured as analog inputs
11 = GP2/AN2, GP1/AN1 and GP0/AN0 configured as analog inputs
ADCS<1:0>: ADC Conversion Clock Select bits
00 = F
01 = F
10 = F
11 = INTOSC/8
CHS<1:0>: ADC Channel Select bits for PIC16F506
00 = Channel 00 (GP0/AN0)
01 = Channel 01 (GP1/AN1)
10 = Channel 02 (GP2/AN2)
11 = 0.6V absolute voltage reference
GO/DONE: ADC Conversion Status bit
1 = ADC conversion in progress. Setting this bit starts an ADC conversion cycle. This bit is automatically
0 = ADC conversion completed/not in progress. Manually clearing this bit while a conversion is in process
ADON: ADC Enable bit
1 = ADC module is operating
0 = ADC module is shut-off and consumes no power
Legend:
R = Readable bit
-n = Value at POR
bit 7
R/W-1
Note 1: On the PIC16F506, the term is RBx, on PIC12F510, the term is GPx.
ANS1
cleared by hardware when the ADC is done converting.
terminates the current conversion.
OSC
OSC
OSC
2: When the ANS bits are set, the channels selected will automatically be forced into Analog
3: The ANS<1:0> bits are active regardless of the condition of ADON.
4: CHS<1:0> bits default to 11 after any Reset.
5: If the ADON bit is clear, the GO/DONE bit cannot be set.
6: C1OUT, when enabled, overrides AN2.
/32
/16
/8
mode, regardless of the pin function previously defined. The only exception to this is the com-
parator, where the analog input to the comparator and the ADC will be active at the same
time. It is the users responsibility to ensure that the ADC loading on the comparator input does
not affect their application.
R/W-1
ANS0
ADCS1
R/W-1
Preliminary
W = Writable bit
‘1’ = Bit is set
(5)
ADCS0
R/W-1
If the GO/DONE bit is cleared in software during a con-
version, the conversion stops. The data in ADRES is
the partial conversion result. This data is valid for the bit
weights that have been converted. The position of the
‘leading one’ determines the number of bits that have
been converted. The bits that were not converted
before the GO/DONE was cleared are unrecoverable.
(1), (2), (3), (6)
PIC12F510/16F506
(4), (6)
R/W-1
CHS1
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
R/W-1
CHS0
GO/DONE
x = Bit is unknown
R/W-0
DS41268B-page 53
ADON
R/W-0
bit 0

Related parts for PIC16F506