參數(shù)資料
型號(hào): VMX1C1020
廠商: Electronic Theatre Controls, Inc.
英文描述: Versa Mix 8051 Mixed-Signal MCU
中文描述: 反之亦然混合8051混合信號(hào)微控制器
文件頁數(shù): 28/80頁
文件大小: 3605K
代理商: VMX1C1020
VMX51C1020
_________________________________________________________________________________________________
www.ramtron.com
page 28 of 80
The following table provides a summary of the
Interrupt control and Flag bits associated with
the Timer0 and Timer1 interrupts.
Bit Name
Location
Description
EA
IEN0.7
General interrupt control bit
0, Interrupt Disabled
1, Enabled Interrupt active
Timer 0 Overflow Interrupt
1 = Enable
0 = Disable
Timer 1 Overflow Interrupt
1 = Enable
0 = Disable
TF0 Flag is set when Timer 0
Overflow occurs.
Automatically cleared when
Timer 0 interrupt is serviced.
This flag can also be cleared
by software
TF1 Flag is set when Timer 1
Overflow occurs.
Automatically cleared when
Timer 1 interrupt is serviced.
This flag can also be cleared
by software
T0IE
IEN0.1
T1IE
IEN0.3
TF0
TCON.5
TF1
TCON.7
Setting Up Timer0 Example
In order to use Timer0, the first step is to setup
the interrupt and then configure the module and
this is described in the following code example.
Sample C code to set up Timer 0:
//---------------------------------------------------------------------------
// Sample C code to setup Timer 0
//---------------------------------------------------------------------------
//
(…)
PROGRAM INITIALIZATION OMITTED
AT
0
X
0100
VOID MAIN
(
VOID
){
//
I
NTERRUPT
+
TIMER
0
SETUP
IEN0
|=
0
X
80;
//
E
NABLE ALL INTERRUPTS
IEN0
|=
0
X
02;
//
E
NABLE INTERRUPT
T
IMER
0
TMOD
=
0
X
02;
//
T
IMER
0
M
ODE
2
TCON
=
0
X
10;
//
START
T
IMER
0
DO
{}
WHILE
(1);
//
WAIT FOR TIMER
0
INTERRUPT
}//
END OF MAIN
()
//---------------------------------------------------------------------------
//
I
NTERRUPT FUNCTION
VOID INT
_
TIMER
_0
(
VOID
)
I
NTERRUPT
1
{
IEN0
&=
0
X
7F;
//
D
ISABLE ALL INTERRUPTS
/*------------------------*/
/*Put Interrupt code here*/
/*------------------------*/
IEN0 |= 0x80;
// Enable all interrupts
}
//---------------------------------------------------------------------------
Setting Up Timer1 Example
The following code provides an example of how
to configure Timer1 (first part of the code is the
interrupt
setup
and
whereas the second part is the interrupt
function).
Example1: Delay function
//-------------------------------------------------------------------------
// Sample C code using the Timer 1: Delay function
//-------------------------------------------------------------------------
VOID DELAY
1
MS
(
UNSIGNED CHAR DLAIS
)
{
IDATA UNSIGNED CHAR X
=0;
TMOD
=
0
X
10;
TL1
=
0
X
33;
TH1
=
0
X
FB;
;//
TIMER
1
RELOAD VALUE FOR
TCON
=
0
X
40;
WHILE
(
DLAIS
>
0)
{
DO
{
X
=TCON;
X
=
X
&0
X
80;
}
WHILE
(
X
==0);
TCON
=
TCON&0
X
7F;
TL1
=
0
X
33;
TH1
=
0
X
FB;
;//
TIMER
1
RELOAD VALUE FOR
DLAIS
=
DLAIS
-1;
}
}//
END OF DELAY
1
MS
Example 2: Timer1 interrupt example
//-------------------------------------------------------------------------
// Sample C code using the Timer 1: Interrupt
//-------------------------------------------------------------------------
//
(…)
PROGRAM INITIALIZATION OMITTED
at 0xo100 void main(void){
// TIMER 1 setup
IEN0 |= 0x80;
// Enable all interrupts
IEN0 |= 0x08;
// Enable interrupt Timer1
TMOD = 0x20;
// Timer 1 mode 2
TCON = 0x40;
// Start Timer 1
TL1 = 0xFC;
// Timer1 offset
do {
}while(1);
//Wait Timer 1 interrupt
}//end of main() function
//----------------------------------------
// Timer 1 Interrupt function
//----------------------------------------
void int_timer_1 (void) interrupt 3
{
IEN0 &= 0x7F;
// Disable all interrupts
/* Put Interrupt code here*/
IEN0 |= 0x80;
// Enable all interrupts
}
module
configuration
相關(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