參數(shù)資料
型號(hào): C505L
廠商: SIEMENS AG
英文描述: Microcontrollers(8位微控制器)
中文描述: 微控制器(8位微控制器)
文件頁數(shù): 18/25頁
文件大小: 113K
代理商: C505L
LCD Control
Using the C505L
18 of 25
AP0829 05.99
EAN4 = 0;
SYSCON &= 0xEF;
ADCON0 = 0x00;
ADCON1 = 0x44;
EADC = 1;
// EANBLE CHANNEL 4 FOR A/D
// DISABLE ACCESS TO A/D P1ANA REG
// SINGLE CONVERSION
// fADC = fOSC/8
// SELECT CHANNEL 4 (P1.4)
// ENABLE ADC INTERRUPT
IP0 = 0x02;
IP1 = 0x01;
// Set Interrupt Priority Levels
// A/D has higher priority than T0
}
//////////////////////////////////////////////////////////
// Timer 0 Overflow ISR
// In this ISR the A/D conversion is started
//////////////////////////////////////////////////////////
void T0ISR (void)
interrupt 1
{
ADDATL = 0x01; // AD conversion is started by
// writing a dummy value in
// ADDATL
}
//////////////////////////////////////////////////////////
// A/D Conversion Complete ISR
// In this ISR, 128 A/D converter readings are averaged.
// The A/D converter results are converted to Volts.
// The Volt value is converted into digits for display
// on the LCD.
//////////////////////////////////////////////////////////
void ADC_ISR (void)
interrupt 8
{
/////////// Variables ///////////////
static unsigned int count = 0;
static unsigned int sum = 0;
unsigned int avg;
unsigned int volt;
unsigned int temp;
// Counter for Averaging A/D reads
count ++;
sum = sum + ((((int)ADDATH) << 1) | (ADDATL >> 7));
// Use only 9 digits
if (count == 128)
{
TR0 = 0;
avg = sum >> 7;
// Stop the timer 0
// Calculate average voltage
temp = avg * 91;
volt = temp / 93;
// convert to volts*100
printf("\n%03u %s", volt, "VOLT");
DIG[0] = DIG[0] | decimal_point;
// Set the Decimal Point
相關(guān)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
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
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 系列:* 零件狀態(tài):最後搶購 標(biāo)準(zhǔn)包裝:1
C505L4EMCCFXUMA1 功能描述:IC MCU 32BIT 80MQFP 制造商:infineon technologies 系列:* 零件狀態(tài):最後搶購 標(biāo)準(zhǔn)包裝:1
C505-LM 制造商:INFINEON 制造商全稱:Infineon Technologies AG 功能描述:8-Bit CMOS Microcontroller