ISD40 4 single-chip based on automatic voice broadcast system station
I successfully applied ISD4004 and AT89C51 microcontroller design of the station signal automatic voice broadcast system, the railway line through the station the uplink and downlink control, vehicle scheduling, main and auxiliary power system to enable other multi-channel signal detection and acquisition, according to security risks prevention requirements, security warning from the SCM check voice messages and broadcast, to achieve prompt and safe operation of the alarm. System console room at the station signal installation, stable operation, the signal broadcast accurate, and achieved good results.
1 hardware design
system hardware design block diagram shown in Figure 1 by the microcontroller AT89C51, ISD4004 voice circuits, audio power amplifier circuit, a programmable parallel interface 8255 , optical isolation, level shifting, signal input interface, the system clock, reset and keyboard unit circuit.
1.1ISD4004 features
ISD4004 series voice storage chip using CMOS technology, contains the oscillator, anti-aliasing filter, smoothing filter, audio amplifier, automatic squelch, and high-density multi-level flash store display, built-in microcontroller serial communication interface. Chip micro-controller, all operations must be controlled, the operation command via the serial communication interface (SPI or Microwire) give as gifts. External audio signals in the chip-level multi-volume direct analog storage technology, information can be multi-stage process, each sample value directly stored in the flash memory chip, so can be very real, natural reproduction of voice, music , tone and effect sound. Stored in the flash memory chip of information that can be saved in case of power failure 100 years. Chip operating voltage of 3V, operating current 25 ~ 30mA, maintain current 1μA, no power, single recording time 8 ~ 16min, recording can be repeated 100,000 times.
1.2ISD4004 pin and package
ISD4004 28-pin SOIC package, the pinout shown in Figure 2.
1.3ISD4004 with AT89C51 microcontroller interface
ISD4004 SPI serial interface to operate in accordance with the SPI synchronous serial data transmission protocol, all single-chip serial data transmission begins with the master sent to the ISD4004 falling edge of chip select signal SS. SS must remain in the low transmission period, between the two remains high command. Serial data input from the MOSI pin of the serial synchronous clock rising edge is latched to the ISD4004 MISO pin serial data output of data out of the falling edge of SCLK. ISD4004 any of the recording and playback operations (including fast-forward), are carried out by sub-addresses, each containing a number of lines, each line is equivalent to the storage unit, the row address clock signal RAC under the control of recording information storage management. RAC signal cycle is 200ms, high duty cycle is 3 / 4. When the recording and playback operation to the end of the address within the memory cell, the EOM or OVF will generate a flag signal the end, if you encounter EOM or OVF, then generate an active-low INT interrupt signal, the interrupt status in the next SPI beginning of the cycle to be cleared. ISD4004 to connect with AT89C51 microcontroller shown in Figure 3.
ISD4004 chip-select signal SS pin and the AT89C51 microcontroller I / O port P1.0 connected by the program instructions to produce effective low-level signals. Serial data input pin MOSI and MISO serial data output pin with P1.1 and P1.3 are connected to the serial data send and receive information under the control of program instructions from the on-chip shift register latches, the synchronous clock signal SCLK from the MCU P1.2 control. RAC and the row address clock interrupt request signal INT, respectively P3.2 (INT1) and P3.3 (INTO) connection.
1.4 audio output
system signal corresponding to the voice prompts, such as “train came up, the range of occupation,” “upward departure request, signal open” and other information, by Address by special equipment has been cured to the ISD4004 segment storage unit within the E2PROM. Under program control, the corresponding voice signal from the ISD4004 13 feet (AUOUT) output, the coupling capacitor C4 and the volume control potentiometer RW, into low-noise power amplifier integrated circuits for amplification, to promote the speaker sound. To output audio noise to a minimum, the system of separate analog and digital ground traces, as close to the power supply is connected at the end, and were diverted to the ISD4004 chip VSSA and VSSD pins, decoupling capacitors should be as close as possible chip.
1.5I / O port expansion
system 36 signals to be handled by the microcontroller, at least 36 I / O port lines to meet demand, by remaining AT89C51 The I / O port is clearly not enough, the need for I / O port expansion. System uses programmable parallel input and output interface chip shortage of 8255 expansion I / O port, hardware-specific connection in Figure 4. 8255 is a microprocessor system with the standard expansion of the external parallel interface circuit using NMOS process, the 40 foot double row DIP DIP package. 8255 exchange information with external devices through port A, B port, c port 24 I / O lines to complete, each port is 8. Where C is divided into the port, Port C (PC7 ~ PC4 high four) and the next port C (PC3 ~ PC0 low 4). The method can be programmed to specify the input port of the work, the master program initialization to complete. 8255 P1.4 completed by the selection signal, address bus A0 and A1 through the address latch 74LS373 lock.
1.6 signal conversion
system signal from the station control room signal relay contacts, the main switch is AC 24V signal must be converted to single-chip system can match the TTL level, that is, transform the AC to DC 5V 24V , the signal level conversion circuit shown in Figure 5. AC signal from the rectifier diode D32, capacitor C32 filter, the input current limiting resistor R32 optocoupler 4N25, by the internal LED and light sensitive photoelectric conversion receiver to achieve effective control, while the electrical network and an external signal single-chip control system to isolate, improve system reliability and performance. Transform the output signal is low, in order to maintain the input signal and output signal level synchronization, plus after-class inverter, the output standard TTL5V signal sent to the parallel interface 8255.
2 overall design software
system software design directly affects the overall system performance. Software main function is real-time access to the railway signals, signals accurately determine the validity and reliability to find the signal corresponding to the voice storage address, remove the information in real-time broadcast. Software programs, including master program, the signal check program, voice broadcast, data transmission program, ISD4004 of power and power-down procedures. Program several times using delay subroutine, because the structure is simple, versatile, this will not elaborate.
2.1
master program master program flow shown in Figure 6, the system is initialized on power to complete the I / O port, the signal unit and signal flags bit cleared and the initial set ISD4004 and 8255, and completed when the system power-on self-test and product information voice broadcast advertising. Then check the incoming signal and voice broadcast cycle control processes. In order to prevent the system from false alarms, omissions, or even reported in the program designed to ensure that factors, such as image stabilization to determine the use of signal delay, signal level to determine the level of cross signs and signals unit address look-up table and other methods to improve system reliability.
2.2 signal check signal
subroutine subroutine processes the query shown in Figure 7, the system occupied more than 30 signals were part of AT89C51 microcontroller I / O lines and programmable interface 8255 A, B, C port input line 24. Program for multi-channel signals each query, and the arrival of the effective signal storage sub-unit mark, to pass parameters to the master program.
2.3 voice broadcast subroutine
ISD4004 chip micro-controller, all operations must be controlled by the operation command through the interface into the SPI serial communication protocol. SPI control register controls the chip sound recording, information retrieval, power, power-down, start and stop functions, from software programming instructions to change the SPI control register control bits, SPI control register control bits shown in Figure 8, command format is: 8-bit control code 16-bit address code. ISD of any operation set in the run position C4 starts, set 0 end, if you encounter EOM or OVF, an interrupt is generated, using the “read” instruction to interrupt the state of the MISO pin displacement of ISD, the control and address data synchronization from the side into MOSI. So pay attention to whether the data into the ongoing operation of the device compatibility. Of course, allows one SPI cycle, while the read status and start a new operation (the new data into the device may not be compatible with the current operation).
voice broadcast subroutine in strict accordance with the requirements of the above programming ISD4004, the process shown in Figure 9. System recognizes the current broadcast signal is available through the store to find the voice address to get 16-bit broadcast address. First call on the electronic program, to send power commands, then wait for a delay of about 25μs, and then transfer 16-bit playback and 8-bit start address parameter start playback from the specified address of the instruction, data transmission subroutine calls respectively to complete the information the broadcast.
2.4 data transmission subroutine
data transmission subroutine flow chart shown in Figure 1O, mainly 16-bit address and 8-bit playback function control command data in accordance with the standard SPI protocol, the serial clock synchronous transmission of the ISD4004 of MOSI.
2.5 power, out of electronic program
ISD4004 can realize the power management mode of operation, through the programming instructions to complete power and power-down operation, the program flow chart shown in Figure 11 and 12. The chip into low-power state after power-down, about 1μA current consumption, power-on operation is completed only after the chip to work properly.
3 Conclusion
described ISD4004 chip design based on single-chip control signal voice broadcast system station control room in a practical application examples, describes the system hardware and software design, its purpose is to provide a multi-line voice prompts industrial process control or alarm computer control module, can be slightly modified and easily with conventional industrial control systems or equipment used in conjunction with, even with complex systems can be easily used in conjunction with the DCS system and, complete a variety of industrial control and monitoring alarm system working state and operating tips.
September 12, 2011 at 6:59 pm Comments (0)