參數(shù)資料
型號: VMX1C1020
廠商: Electronic Theatre Controls, Inc.
英文描述: Versa Mix 8051 Mixed-Signal MCU
中文描述: 反之亦然混合8051混合信號微控制器
文件頁數(shù): 70/80頁
文件大?。?/td> 3605K
代理商: VMX1C1020
VMX51C1020
_________________________________________________________________________________________________
www.ramtron.com
page 70 of 80
Setting up INT0 and INT1 Interrupts
The IT0 and IT1 bits of the TCON register define
whether external interrupts 0 and 1 will be edge
or level triggered.
When an interrupt condition occurs on INT0 or
INT1, the associated interrupt flag IE0 or IE1 will
be set. The interrupt flag is automatically
cleared when the interrupt is serviced.
T
ABLE
122:
(TCON)
T
IMER
0,
T
IMER
1
T
IMER
/C
OUNTER CONTROL
-
SFR
88
H
7
6
TF1
TR1
3
2
IE1
IT1
Bit
Mnemonic
Function
7
TF1
Timer 1 overflow flag set by hardware
when Timer 1 overflows. This flag can be
cleared by software and is automatically
cleared when interrupt is processed.
6
TR1
Timer 1 Run control bit. If cleared Timer 1
stops.
5
TF0
Timer 0 overflows flag set by hardware
when Timer 0 overflows. This flag can be
cleared by software and is automatically
cleared when interrupt is processed.
4
TR0
Timer 0 Run control bit. If cleared timer 0
stops.
3
IE1
Interrupt 1 edge flag. Set by hardware
when falling edge on external INT1 is
observed. Cleared when interrupt is
processed.
2
IT1
Interrupt 1 type control bit. Selects falling
edge or low level on input pin to cause
interrupt.
1
IE0
Interrupt 0 edge flag. Set by hardware
when falling edge on external pin INT0 is
observed. Cleared when interrupt is
processed.
0
IT0
Interrupt 0 type control bit. Selects falling
edge or low level on input pin to cause
interrupt.
5
4
TF0
TR0
1
IE0
0
IT0
INT0 example
The following provides example code for
interrupt setup and module configuration.
//---------------------------------------------------------------------------
// Sample C code to setup INT0
//---------------------------------------------------------------------------
#pragma TINY
#include <vmixreg.h>
at 0x0100 void main (void) {
// INT0 Config
TCON |= 0x01; //Interrupt on INT0 will be caused by a High->Low
//edge on the pin
// Enable INT0 interrupts
IEN0 |= 0x80;
// Enable all interrupts
IEN0 |= 0x01;
// Enable interrupt INT0
// Wait for INT0…
do
{
}while(1);
//Wait for INT0 interrupts
}//end of main function
//---------------------------------------------------------------------------
// Interrupt Function
void int_ext_0 (void) interrupt 0
{
IEN0 &= 0x7F;
// Disable all interrupts
/* Put the Interrupt code here*/
IEN0 |= 0x80;
// Enable all interrupts
}
//---------------------------------------------------------------------------
INT1 example
The following code example shows the INT1
interrupt setup and module configuration:
//-------------------------------------------------------------------------
// Sample C code to setup INT1
//-------------------------------------------------------------------------
#pragma TINY
#include <vmixreg.h>
at 0x0100 void main (void) {
// INT1 Config
TCON |= 0x04; //Interrupt on INT1 will be caused by a High->Low
//edge on the pin
// Enable INT1 interrupts
IEN0 |= 0x80;
IEN0 |= 0x04;
// Wait for INT1…
do
{
}while(1);
//Wait for INT1 interrupts
// Interrupt function
void int_ext_1 (void) interrupt 2
{
IEN0 &= 0x7F;
// Disable all interrupts
/* Put the Interrupt code here*/
IEN0 |= 0x80;
// Enable all interrupts
}
// Enable all interrupts
// Enable interrupt INT1
相關(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)場效應(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