參數(shù)資料
型號(hào): VMX1C1020
廠商: Electronic Theatre Controls, Inc.
英文描述: Versa Mix 8051 Mixed-Signal MCU
中文描述: 反之亦然混合8051混合信號(hào)微控制器
文件頁(yè)數(shù): 62/80頁(yè)
文件大?。?/td> 3605K
代理商: VMX1C1020
VMX51C1020
_________________________________________________________________________________________________
www.ramtron.com
page 62 of 80
ADC Status Register
The ADC shares interrupt vector 0x6B with the
Interrupt on Port 1 Change and the Compare
and Capture Unit 3. To enable the ADC
interrupt, the ADCIE bit of the ADCCTRL
register must be set. Before or at the same time
this bit is set, the ADCIRQCLR and the ADCIRQ
bits must be cleared. The ADCPCIE bit of the
IEN1 register must also be set, as well as the
EA bit of the IEN0 register.
Once the ADC interrupt occurs, ADC Interrupt
must be cleared by writing a ‘1’ into the
ADCINTCLR bit of the ADCCTRL register. The
ADCIF flag in the IRCON register must also be
cleared.
A/D Converter Example
The following provides example code for the A/D
converter. The first section of the code covers
interrupt setup/module configuration whereas
the second section is the interrupt function itself.
Sample C code to setup the A/D converter:
//-----------------------------------------------------------------------//
// MAIN FUNCTION
//-----------------------------------------------------------------------//
(…)
at 0x0100 void main (void) {
//*** Initialize the Analog Peripherals ***
ANALOGPWREN = 0x07;
//Enable the following analog
//peripherals: ISRC, ADC, PGA,
// BGAP. TA = OFF (mandatory)
//Configure the ADC and Start it
ADCCLKDIV=0x0F;
//SET ADC CLOCK SOURCE
ADCCONVRLOW=0x00;
//CONFIGURE CONVERSION RATE
ADCCONVRMED=0x40;
//= 100Hz @ 14.74 MHz
ADCCONVRHIGH =0x02;
INMUXCTRL=0x0F;
//Enable All ADC External inputs
//buffers and select ADCI0
ADCCTRL=0xEA;
//Configure the ADC as follow:
//bit 7: =1 ADCIRQ Clear
//Bit 6: =1 XVREFCAP (always)
//Bit 5: =1 (always)
//Bit 4: =0 = ADCIRQ (don’t care)
//Bit 3: =1 = ADC IRQ enable
//Bit 2: =0 conversion on 4
//channels
//Bit 1: =1 Continuous conversion
//Bit 0: =0 No single shot mode
//*** Configure the interrupts
IEN0 |= 0x80;
IEN1 |= 0x020;
while(1);
}// End of main()...
//-----------------------------------------------------------------------//
// ADC INTERRUPT ROUTINE
//-----------------------------------------------------------------------//
void int_adc (void) interrupt 13 {
idata int value = 0;
IEN0 &= 0x7F;
ADCCTRL |=0x80;
// Read ADC channel 0
value = ADCD0HI;
value = valeur*256;
value = valeur + ADCD0LO;
(…)
// Read ADC channel 3
value = ADCD3HI;
value = valeur*256;
value = valeur + ADCD3LO;
(…)
IRCON &= 0xDF;
ADCCTRL |=0xFA;
IEN0 |= 0x80;
}// End of ADC IRQ
(…)
Warning:
When using the ADC, make sure the
output multiplexer controlled by the
TAEN bit of the ANALOGPWREN
register (92h) is powered down at all
times, otherwise, the signal present on
the ISRCOUT can be routed back to the
selected ADC input, causing conversion
errors.
//enable main interrupt
//Enable ADC Interrupt
//Infinite loop waiting ADC interrupts
//disable ext0 interrupts
//Clear ADC interrupt
//Clear adc irq flag
//prepare adc for next acquisition
// enable all interrupts
相關(guān)PDF資料
PDF描述
VMX51C900 Versa Mix 8051 MCU with LCD Controller and ADC
VN0104 N-Channel Enhancement-Mode Vertical DMOS FET(擊穿電壓40V,N溝道增強(qiáng)型垂直DMOS結(jié)構(gòu)場(chǎng)效應(yīng)管)
VN0104 N-Channel Enhancement-Mode Vertical DMOS FET
VN0104N3 N-Channel Enhancement-Mode Vertical DMOS FET
VN0109NE N-Channel Enhancement-Mode Vertical DMOS Power FETs Quad Array
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
VMX200USB 制造商:Behringer 功能描述:Pro Mixer VMX200USB Professional 2CH DJ Mixer w/USB Audio Interface 制造商:BEHRINGER 功能描述:TWO CHANNEL DJ MIXER WITH USB / VCA AND BPM COUNT
VMX2208 制造商:Panasonic Industrial Company 功能描述:WASHER
VMX2699 制造商:Panasonic Industrial Company 功能描述:WASHER
VMX300USB 制造商:Behringer 功能描述:Pro Mixer VMX300USB Professional 3CH DJ Mixer w/USB Audio Interface 制造商:Behringer 功能描述:Three Channel Professional DJ Mixer with USB Audio Interface 制造商:BEHRINGER 功能描述:COMPACT DJ MIXER 3 CHANNEL WITH USB OUTPUT
VMX3114 制造商:Panasonic Industrial Company 功能描述:WASHER