Introduction
MSC1210 United States Texas Instruments ' (TI) the production of highly integrated mixed signal processor.
It integrates an enhanced 8051 core, 8-channel 24-bit Σ-Δ high accuracy A/D conversion, 21 interrupt sources, 16-bit PWM, full-duplex UART (and compatible with SPI functions), 32K bytes FLASH, on-chip SRAM up to 1.2K bytes. MSC1210 has a high level of integration of analog and digital, small size, high precision, flexible, and other characteristics, the chip can be widely used in industrial processes, intelligent transmitter, intelligent sensors, etc.1 micro-controller MSC1210 works
Microcontrollers TI launched MSC1210 is a set of analog, digital, Flash memory, which integrates high-performance micro-control system.
Its wide range of applications. Use the enhanced processing cores and a high-speed Flash memory with a high-performance analog and peripheral components, you can achieve superior performance. MSC1210 includes on-chip Flash, SRAM, Flash memory, SFR, staging and Boot ROM. Its storage in the physical structure has four storage space: chip, chip-on-chip program memory, and external data memory chip. By different addressing instructions on 0000H ~ FFFFH total 64 KB of space to be addressed. As a result of using different addressing mode, program and data segments can overlap. Program memory read by MCU automatically, you can also use directive MOVC specifies the program that you want to read, this is typically used to find the form. The data store using directive MOVX for reading, this directive provides a variety of addressing ways to specify the destination address, for reads 64KB data memory. When the on-chip memory enabled, chip-wide operations will be on-chip memory for reading, movie, wide operations will pass P0 and P2 port read external storage. Users have the flexibility to configure the program and data storage space. Partition size through hardware configuration bits to determine, either through a serial or parallel approach to programming. In the user application mode, the programs and data Flash storage space are readable and writable.2 hardware system design
National "ninth five" major scientific and engineering HIRFL-CSR (Lanzhou heavy-ion Accelerator cooling storage ring) power supply control system's main function is to pass power supply and computer communications module with central control centres to exchange information, receive remote control center in monitoring and remote control commands and the power of various kinds of status information back to the control center.
Control system design is communication module for the formation of switching power supply control system lies in the design of communication modules and computer communication, computer and power of the master-slave bus 1: N (N = 26 this system) means of communication, and adopted the RS232C and RS485 serial communication bus standard dual interface. Computer through the communications module can live on power control circuit for switching power supply, switching power supply for main circuit, switch power supply, power supply fault reset, power polarity switching power supply current status, reading, reading power current current value, read power current current value, write supply current values, and so on. Real-time access to power, load failure, power failure, cooling water, fast output over-current molten state, IGBT, AC phase, input over-voltage, over-current and power input temperature of State examination information.3 software design
Software design and development platform is Keil company Keil C7.0. In order to achieve the microcontroller to command operations, MSC1210Y5 applied C1210 languages CSR power control system of the main program code as follows.
Void serial_init (void) file://serial port initialization
{
PCON |=0x80;
SCON = 0x52;
TMOD |= 0x20;
file://TH1 = 0xfe;
TH1 = 0xff;
TR1 = 1;
IE=0x80;
ES0 = 1;
CON_TXD=0;
}
Void read_cmd (char i_cmd_buf) file://read command operations
{
}
Void init_I_O (void) file://initialize I/O port
{
P0DDRL= 0x55; File://p0 is output mode
P0DDRH= 0x55;
P2DDRL= 0xff; File://p2 is input mode
P2DDRH= 0xff;
P3DDRH= 0x55;
P0=0xff;
P3 |=0xc0;
}
Void init_dac_adc (void) file://initialization DAC and ADC
{
int decimation=1728;
/* Timer Setup */
CKCON = 0;
USEC= 10;
/* A
DC-Vref, SPI and Systimers */PDCON = 0x1b;
PDCON &= 0x14;
SPICON = 0x06;
SPITCON = 0x28;
ACLK = 9;
/* Set up Aux interrupt */
[1] [2]
No comments:
Post a Comment