參數(shù)資料
型號(hào): AN1775
廠商: 飛思卡爾半導(dǎo)體(中國(guó))有限公司
英文描述: Expanding Digital Input with an A/D Converter
中文描述: 擴(kuò)展數(shù)字輸入與A / D轉(zhuǎn)換器
文件頁(yè)數(shù): 10/12頁(yè)
文件大小: 283K
代理商: AN1775
Application Note
AN1775 Rev. 1
Code Listings
* ----------------------------------------------------------------------------------
* EXPANDIO.ASM
* Written for the MC68HC705P6A microcontroller
* A code segment example to illustrate the use of the A/D
* converter for key input arbitration
*
* This simple example polls the AD0 channel, compares the
* conversion result to a lookup table, and determines
* which of 8 keys were pressed.
* ----------------------------------------------------------------------------------
; Memory map equates
RAMSPACE
ROMSPACE
EQU
EQU
$50
$100
; A/D Registers
ADC
ADSC
EQU
EQU
$1D
$1E
;A/D Data register
;A/D Status and control
; ADSC Bits
CC
ADRC
ADON
EQU
EQU
EQU
7
6
5
;Conversion complete flag
;A/D RC oscillator enable
;A/D enable bit
* ----------------------------------------------------------------------------------
; RAM Variables
* ----------------------------------------------------------------------------------
ORG
RAMSPACE
InKey
RMB
1
ADValue
RMB
1
;Start of user RAM
;Identifies the last key pressed
;Stores the last ADC result
* ----------------------------------------------------------------------------------
; Program code
; Simply loops, polling the A/D converter channel AD0
; and determining which key was pressed
* ----------------------------------------------------------------------------------
ORG
ROMSPACE
Start:
LDA
#$20
STA
ADSC
;Start of user ROM
;Turn on A/D, select AD0 channel
MainLoop:
BRCLR
LDA
STA
CLR
CLRX
CC,ADSC,*
ADC
ADValue
InKey
;Wait for conversion complete
;Get the result
;Record the result
;Clear the InKey variable
;Clear the offset
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.
相關(guān)PDF資料
PDF描述
AN1816 USING THE HC912B32 TO IMPLEMENT THE DISTRIBUTED SYSTEMS INTERFACE (DSI) PROTOCOL
AN2104 Using Background Debug Mode for the M68HC12 Family
AN2154FAP TV/Video Signal Processor
AN22011A For Video·Audio - MD
AN2241 Video Camera Circuit
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN17800A 制造商:Panasonic Industrial Company 功能描述:IC
AN17801A 制造商:Panasonic Industrial Company 功能描述:IC
AN17805A 制造商:Panasonic Industrial Company 功能描述:Audio Power Matsushita IC 12-Pin SIP-Hs
AN17807A 制造商:Panasonic Industrial Company 功能描述:IC
AN17808B 功能描述:IC AUDIO AMP 5W 2CH SIL-12 RoHS:是 類別:集成電路 (IC) >> 線性 - 音頻放大器 系列:- 標(biāo)準(zhǔn)包裝:2,000 系列:- 類型:AB 類 輸出類型:2 通道(立體聲) 在某負(fù)載時(shí)最大輸出功率 x 通道數(shù)量:- 電源電壓:4 V ~ 18 V 特點(diǎn):- 安裝類型:通孔 供應(yīng)商設(shè)備封裝:8-DIP 封裝/外殼:8-DIP(0.300",7.62mm) 包裝:管件