欢迎访问ic37.com |
会员登录 免费注册
发布采购

AN1775 参数 Datasheet PDF下载

AN1775图片预览
型号: AN1775
PDF下载: 下载PDF文件 查看货源
内容描述: 膨胀中的数字输入与A / D转换器 [Expanding Digital Input with an A/D Converter]
分类和应用: 转换器
文件页数/大小: 12 页 / 422 K
品牌: FREESCALE [ Freescale ]
 浏览型号AN1775的Datasheet PDF文件第4页浏览型号AN1775的Datasheet PDF文件第5页浏览型号AN1775的Datasheet PDF文件第6页浏览型号AN1775的Datasheet PDF文件第7页浏览型号AN1775的Datasheet PDF文件第8页浏览型号AN1775的Datasheet PDF文件第9页浏览型号AN1775的Datasheet PDF文件第10页浏览型号AN1775的Datasheet PDF文件第12页  
Freescale Semiconductor, Inc.  
Application Note  
Code Listings  
;Check the entries in the table, to find the ADC value range  
;that corresponds to the ADC data register value.  
KeyLoop:  
LDA  
CMP  
BLS  
LDA  
CMP  
BLS  
INCX  
INCX  
KeyTable+1,X  
ADValue  
Match  
KeyTable,X  
ADVAlue  
Match  
;Check high range  
;Within range  
;Check low range  
;Within range  
;Point to next table record  
;Increment the key value, when a match is made,  
;the variable will contain the key that was pressed.  
INC  
BRA  
InKey  
KeyLoop  
; At this point, InKey variable holds keypress information  
; One can arbitrate the key press here. For this simple example  
; we just repeat the main loop  
Match:  
BRA  
MainLoop  
* ----------------------------------------------------------------------------------  
; Key lookup table. Holds the minimum and maximum ADC values  
; which identify a particular key in the resistor ladder  
* ----------------------------------------------------------------------------------  
KeyTable:  
NoKey  
Key1  
Key2  
Key3  
Key4  
Key5  
Key6  
Key7  
Key8  
FCB  
FCB  
FCB  
FCB  
FCB  
FCB  
FCB  
FCB  
FCB  
$EF,$FF  
$00,$0F  
$0F,$2F  
$2F,$4F  
$4F,$6F  
$6F,$8F  
$8F,$AF  
$AF,$CF  
$CF,$EF  
;No key pressed  
* ----------------------------------------------------------------------------------  
; Vector definitions  
* ----------------------------------------------------------------------------------  
ORG  
FDB  
$1FFE  
Start  
;Reset vector  
AN1775 Rev. 1  
For More Information On This Product,  
Go to: www.freescale.com