|
摘要: |
AT90S1200是基于增强性能精简指令集、低功耗、CMOS技术全新的单片机。采用RC模拟转换原理利用该片内的模拟比较器,可以组成精度高、速度快、廉价的A/D转换器。实现A/D转换的电路设计简单,即在AT90S1200单片机外部接口加一个电阻和电容,并使用片内的定时器/计数器中断和模拟比较器中断。实现A/D转换的软件是:模拟比较器中断、A/D转换初始化、定时器/计数器中断、A/D转换器启动等子程序。叙述了硬件电路的原理,给出了子程序的代码,并提供了实例子程序。 |
关键词: 单片机,外部接口,A/D转换器,硬件,控制电路 |
DOI: |
分类号:TN79 |
基金项目: |
|
A/D conversion using AT90S1200 |
ZHANG Xin-hai ZHANG Rui-bin
|
Abstract: |
AT 90S1200 singlechip is based on enhanced RISC(Reduced Instruction Set CPU) and CMOS technology with low power consumption.Applying RC analog conversion principle and using its internal analog comparator to construct an A /D converter with high precision,high speed and low cost.The design of A /D conversion circuit is simple:only a resistor and a capacitor are connected to its peripheral interfaces.The internal timer /counter interruption and analog comparator interruption are used.The subroutines for implementing A /D conversion are analog comparator interruption,A /D conversion initialization,timer /counter interruption,A /D converter startup,and so on.The principle of hardware is described.The subroutine programs as well as an example are given. |
Key words: singlechip,peripheral interface,A /D converter,hardware,control circuit |