參數(shù)資料
型號: VMX1C1020
廠商: Electronic Theatre Controls, Inc.
英文描述: Versa Mix 8051 Mixed-Signal MCU
中文描述: 反之亦然混合8051混合信號微控制器
文件頁數(shù): 44/80頁
文件大?。?/td> 3605K
代理商: VMX1C1020
VMX51C1020
_________________________________________________________________________________________________
www.ramtron.com
page 44 of 80
Differential Interface Use Example
The following code provides and an example of
configuration and use of the VMX51C1020
Differential Interface.
#pragma SMALL
#pragma UNSIGNEDCHAR
#include <vmixreg.h>
// --- function prototypes
void txmit1( unsigned char charact);
void uart1differential(void);
// - global variables
// - Constants definition
sbit UART_TX_EMPTY = USERFLAGS^1;
code char irq0msg[]="Ramtron inc”;
//---------------------------------------------------------------------------------------------//
// MAIN FUNCTION
//---------------------------------------------------------------------------------------------//
at 0x0100 void main (void) {
// Enable and configure the UART1
uart1differential();
//Config UART1 diff interface
//
Warning
: The Clock Control circuit does affect the dedicated baud rate
// generator S0REL, S1REL and Timer1 operation
//*** Configure the interrupts
IEN0 |= 0x81;
//Enable interrupts + Ext. 0 interrupt
IEN2 |= 0x01;
//Enable UART1 Interrupt
Txmit1(“A’);
//Transmit one character on UART1
do
{
}while(1);
//Wait for UART1 Rx interrupt
}// End of main()...
//---------------------------------------------------------------------------------------------//
// UART1 Differential interface interrupt
//
// In this example, the source of UART1 interrupt would be caused
// by bytes reception on the differential interface
//----------------------------------------------------------------------------------------------//
void int_uart1 (void) interrupt 16 {
unsigned char charact;
IEN0 &= 0x7F;
// -- Put you code here…
S1CON = S1CON & 0xFC;
IEN0 |= 0x80;
}// end of uart1 INTERRUPT
//clear both R1I & T1I bits
// enable all interrupts
//---------------------------------------------------------------------------------------------//
// EXT INT0 interrupt
//
//
// when the External interrupt 0 is triggered A Message string is sent over the
// the serial UART1
//---------------------------------------------------------------------------------------------//
void int_ext_0 (void) interrupt 0 {
int x=0;
idata unsigned char
IEN0 &= 0x7F;
cptr = cptr-1;
while( irq0msg[cptr] != '\n')
//Send a text string over the differential interface
{
txmit1( irq0msg[cptr]);
cptr = cptr +1;
}
IEN0 = 0x81;
//----------------------------------------------------------------------------------------------------//
//------------------------------- Individual Functions ----------------------------------------//
//----------------------------------------------------------------------------------------------------//
//----------------------------------------------------------------------------------------------------//
// UART1 DIFFERENTIAL CONFIG
//
// Configure the UART1 differential interface to operate in
// RS232 mode at 115200bps with a crystal of 14.7456MHz
//
//----------------------------------------------------------------------------------------------------//
void uart1differential(void)
{
DIGPWREN |= 0x06;
P0PINCFG |= 0x04;
P0PINCFG = 0x00;
S1RELL = 0xFC;
S1RELH = 0x03;
S1CON = 0x90;
}//end of uart1differential() function
//-----------------------------------------------------------------------------------------------//
// TXMIT1
//
// Transmit one byte on the UART1 Differential interface
//
//-----------------------------------------------------------------------------------------------//
void txmit1( unsigned char charact){
S1BUF = charact;
USERFLAGS = S1CON;
//Wait TX EMPTY flag to be raised
while (!UART_TX_EMPTY) {USERFLAGS = S1CON;}
S1CON = S1CON & 0xFD;
}//end of txmit1() function
cptr=0x01;
//disable ext0 interrupt
//Enable all interrupts + int_0
// enable uart1 & differential transceiver
// pads for uart1
// Set com speed = 115200bps
// Mode B, receive enable
//clear both R1I & T1I bits
相關(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