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

89C5115-TISUM 参数 Datasheet PDF下载

89C5115-TISUM图片预览
型号: 89C5115-TISUM
PDF下载: 下载PDF文件 查看货源
内容描述: [Microcontroller, 8-Bit, FLASH, 40MHz, CMOS, PDSO28, SOIC-28]
分类和应用: 时钟ATM异步传输模式微控制器光电二极管外围集成电路
文件页数/大小: 113 页 / 730 K
品牌: ATMEL [ ATMEL ]
 浏览型号89C5115-TISUM的Datasheet PDF文件第82页浏览型号89C5115-TISUM的Datasheet PDF文件第83页浏览型号89C5115-TISUM的Datasheet PDF文件第84页浏览型号89C5115-TISUM的Datasheet PDF文件第85页浏览型号89C5115-TISUM的Datasheet PDF文件第87页浏览型号89C5115-TISUM的Datasheet PDF文件第88页浏览型号89C5115-TISUM的Datasheet PDF文件第89页浏览型号89C5115-TISUM的Datasheet PDF文件第90页  
Figure 41. ADC interrupt structure  
ADCI  
ADEOC  
ADCON.2  
EADC  
IEN1.1  
Routine Examples  
1. Configure P1.2 and P1.3 in ADC channels  
// configure channel P1.2 and P1.3 for ADC  
ADCF = 0Ch  
// Enable the ADC  
ADCON = 20h  
2. Start a standard conversion  
// The variable ’channel’ contains the channel to convert  
// The variable ’value_converted’ is an unsigned int  
// Clear the field SCH[2:0]  
ADCON &= F8h  
// Select channel  
ADCON |= channel  
// Start conversion in standard mode  
ADCON |= 08h  
// Wait flag End of conversion  
while((ADCON & 01h)!= 01h)  
// Clear the End of conversion flag  
ADCON &= EFh  
// read the value  
value_converted = (ADDH << 2)+(ADDL)  
3. Start a precision conversion (need interrupt ADC)  
// The variable ’channel’ contains the channel to convert  
// Enable ADC  
EADC = 1  
// clear the field SCH[2:0]  
ADCON &= F8h  
// Select the channel  
ADCON |= channel  
// Start conversion in precision mode  
ADCON |= 48h  
Note:  
To enable the ADC interrupt: EA = 1  
86  
AT89C5115  
4128F–8051–05/06  
 
 复制成功!