MOTOROLA
10-2
MC68HC05T16
ANALOG TO DIGITAL CONVERTER
10
10.1
ADC Inputs
The ADC has two input channels: one dedicated input pin at ADCIN0 and one shared pin at
PF4/ADCIN1.
10.1.1
PF4/ADCIN1
ADCIN1 multiplexes with PF4 at this pin. When the ADC1 bit of Port F Configuration register is
cleared, PF4/ADCIN1 is configured for PF4 and follows Port F DDR assignment. When ADC1 bit
is set, PF4 is configured as ADCIN1 analog input, and Port F DDR has no effect on this pin.
Reading PF4 when configured as an ADC input is zero.
10.1.2
ADCIN0
ADCIN0 is a dedicated analog input channel.
10.2
Program Example
The following example shows how to convert analog input channel 0 (ADCIN0). For ADCIN1
conversion, change #$00 to #$20. ADCSR is the ADC Control/Status register.
LDA
#$00
STA
ADCSR
;ADC Control and Status Register
DTA
BRSET
7, ADCSR, ATD
INC
ADCSR
LDA
ADCSR
AND
#$1F
CMP #$1F
BLS
DTA
;out of range
ATD
...
;analog value in ADC.
;ANALOG IN = ([AD4:0] +1)*0.15625V at Vdd = 5V
TPG
88
Summary of Contents for MC68HC05T16
Page 2: ......
Page 14: ...MOTOROLA vi MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 12 ...
Page 16: ...MOTOROLA viii MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 14 ...
Page 18: ...MOTOROLA x MC68HC05T16 THIS PAGE LEFT BLANK INTENTIONALLY TPG 16 ...
Page 54: ...MOTOROLA 5 12 MC68HC05T16 TIMERS 5 THIS PAGE LEFT BLANK INTENTIONALLY TPG 52 ...
Page 64: ...MOTOROLA 6 10 MC68HC05T16 M BUS SERIAL INTERFACE 6 THIS PAGE LEFT BLANK INTENTIONALLY TPG 62 ...
Page 110: ...MOTOROLA 12 4 MC68HC05T16 LOW POWER MODES 12 THIS PAGE LEFT BLANK INTENTIONALLY TPG 108 ...
Page 116: ...MOTOROLA 13 6 MC68HC05T16 OPERATING MODES 13 THIS PAGE LEFT BLANK INTENTIONALLY TPG 114 ...