参数资料
型号: C505L
厂商: SIEMENS AG
英文描述: Microcontrollers(8位微控制器)
中文描述: 微控制器(8位微控制器)
文件页数: 16/25页
文件大小: 113K
代理商: C505L
LCD Control
Using the C505L
16 of 25
AP0829 05.99
Figure 11:
Structure of Voltmeter Software
Below is a brief description of how the peripherals are configured:
Timer 0 -
Timer 0 is placed in Mode 0 (8 bit timer with divide by 32 prescaler). This causes an
interrupt to occur every (8192)* 6 / f
osc
seconds (4.096 ms with a 12 MHz external clock).
In the Timer 0 Interrupt Service Routine (ISR), the A/D conversion is started.
A/D Converter -
The A/D converter is placed in single conversion mode (bit ADM is set to 0). When the
conversion is complete, an interrupt is generated. The A/D ISR reads 9 bits of the 10 bit
A/D result. This provides an accuracy of approximately 10 mV, so two digits to the right of
the decimal are displayed on the LCD.
128 results are averaged together. Averaging 128 results ensures a consistent result and
still allows the sum of all the results to be contained in a 16 bit integer variable.
The average of the 128 samples is then converted into volts * 100 by multiplying by 91/93.
This provides the closest approximation that can be accomplished using simple 16 bit
integer math (the exact conversion is 5*100/511). The resulting 16 bit value is then
displayed in decimal format on the LCD and a decimal point is added after the second
digit.
Appendix A shows the C code for the application. The code was created for use with the
Keil C51 compiler.
Timer 0 ISR
Start A/D
Conversion
A/D ISR
Average Samples
Convert to Volts
Display on LCD
Main Program
Initialize
Peripherals
Start Timer 0
Endless “While”
Loop
相关PDF资料
PDF描述
C508 8-Bit CMOS Microcontroller
C508 Previous Vectron Model Numbers
C509-L 8-Bit CMOS Microcontroller
C509-L 8-Bit CMOS Microcontroller
C513A-2RM 8-Bit CMOS Microcontroller
相关代理商/技术参数
参数描述
C505-L 制造商:INFINEON 制造商全称:Infineon Technologies AG 功能描述:8-Bit Single-Chip Microcontroller
C505L_1 制造商:INFINEON 制造商全称:Infineon Technologies AG 功能描述:8-Bit CMOS Microcontroller
C505L4EMCCFXQMA1 功能描述:IC MCU 32BIT 80MQFP 制造商:infineon technologies 系列:* 零件状态:最後搶購 标准包装:1
C505L4EMCCFXUMA1 功能描述:IC MCU 32BIT 80MQFP 制造商:infineon technologies 系列:* 零件状态:最後搶購 标准包装:1
C505-LM 制造商:INFINEON 制造商全称:Infineon Technologies AG 功能描述:8-Bit CMOS Microcontroller