XC912BC32CFU8 Motorola Semiconductor Products, XC912BC32CFU8 Datasheet - Page 313
![no-image](/images/no-image-200.jpg)
XC912BC32CFU8
Manufacturer Part Number
XC912BC32CFU8
Description
M68HC12B Family Data Sheet
Manufacturer
Motorola Semiconductor Products
Datasheet
1.XC912BC32CFU8.pdf
(362 pages)
- Current page: 313 of 362
- Download datasheet (5Mb)
17.5 Using the ATD to Measure a Potentiometer Signal
17.5.1 Equipment
17.5.2 Code Listing
; ----------------------------------------------------------------------
;
; ----------------------------------------------------------------------
;
MAIN:
DONE:
; ----------------------------------------------
;
; ----------------------------------------------
INIT:
M68HC12B Family — Rev. 8.0
MOTOROLA
ORG
BSR
BSR
BRA
LDAA
STAA
BSR
LDAA
STAA
LDAA
STAA
RTS
NOTE:
MAIN PROGRAM
Subroutine INIT: Initialize ATD
$7000
INIT
CONVERT
DONE
#$80
ATDCTL2
DELAY
#$00
ATDCTL3
#$01
ATDCTL4
This exercise allows the student to utilize the ATD on the HC12 to measure a
potentiometer signal output routed from the UDLP1 board to the HC12 ATD pin
PAD6. First the ATDCTL registers are initialized. A delay loop of 100 µs is then
executed. The resolution is set up followed by a conversion set up on channel 6.
After waiting for the status bit to set, the result goes to the D accumulator. If the
program is working properly, a different value should be found in the D accumulator
as the left potentiometer is varied for each execution of the program.
For this exercise, use the M68HC912B32EVB emulation board.
A comment line is deliminted by a semi-colon. If there is no code before comment,
an “;” must be placed in the first column to avoid assembly errors.
Analog-to-Digital Converter (ATD)
; 16K On-Board RAM, User code data area,
; Branch to INIT subroutine to Initialize ATD
; Branch to CONVERT Subroutine for conversion
; Branch to Self, Convenient place for breakpoint
; Allow ATD to function normally,
; ATD Flags clear normally & disable interrupts
; Delay (100 uS) for WAIT delay time.
; Select continue conversion in BGND Mode
; Ignore FREEZE in ATDCTL3
; Select Final Sample time = 2 A/D clocks
; Prescaler = Div by 4 (PRS4:0 = 1)
; Return from subroutine
start main program at $7000
;
Using the ATD to Measure a Potentiometer Signal
Analog-to-Digital Converter (ATD)
Data Sheet
313
Related parts for XC912BC32CFU8
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![T6410D](/images/no-image3.png)
Part Number:
Description:
Triacs
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![T6410](/images/no-image3.png)
Part Number:
Description:
Triacs
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![3N209](/images/no-image3.png)
Part Number:
Description:
6367254 Motorola SC (xstrs/r F)
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![BUT34](/images/no-image3.png)
Part Number:
Description:
50 Amperes NPN Silicon Power Darlington Transistor 850 Volts 250 Watts
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![3N202](/images/no-image3.png)
Part Number:
Description:
DUAL GATE Mosfet VHF Amplifier
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![3N201](/images/no-image3.png)
Part Number:
Description:
DUAL GATE Mosfet VHF Amplifier
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![MJD44E3](/images/no-image3.png)
Part Number:
Description:
NPN Darlington Silicon Power Transistor 10 Amperes 80 Volts 20 Watts
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![MC855](/images/no-image3.png)
Part Number:
Description:
Integrated Circuits
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![MC88913](/images/no-image3.png)
Part Number:
Description:
Low Skew CMOS Clock Driver
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![MC88914](/images/no-image3.png)
Part Number:
Description:
Low Skew CMOS Clock Driver With Reset
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![MSC7115](/images/no-image3.png)
Part Number:
Description:
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![MSC7116_08](/images/no-image3.png)
Part Number:
Description:
Low-cost 16-bit DSP with DDR Controller and 10/100 Mbps Ethernet MAC
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![MBR871](/images/no-image3.png)
Part Number:
Description:
Fast Recovery Power Rectifiers
Manufacturer:
Motorola Semiconductor Products
Datasheet:
![MBR872](/images/no-image3.png)
Part Number:
Description:
Fast Recovery Power Rectifiers
Manufacturer:
Motorola Semiconductor Products
Datasheet: