introduction

In recent years, with people’s pursuit of quality of life, every family increasingly needs a centralized control center to connect various household appliances in the family, and realize remote access, control and automatic monitoring and alarm functions. The development of network technology has made this idea a reality, but most management systems are based on powerful PCs. In recent years, embedded technology has developed rapidly and gradually began to mature. Although it cannot realize the powerful functions of a PC, its advantages such as low cost, low power consumption, and small size are incomparable to PCs, especially the price factor. It is also a highlight for easy promotion. Therefore, embedded products as control terminals will also have the opportunity to become a development trend.

1. Introduction of Actel digital-analog combined with FPGA

Actel’s Fusion series FPGA is a series of chips based on ProASIC3/E. It has all the characteristics of FPGA with Flash architecture, such as high security, high reliability, single chip, power-on, non-volatile, low power consumption, etc.; Users of 4 Mb can use Flash, 1 Kb of internal Flash, and 108 Kb of RAM; the maximum frequency of 2 PLLs can reach 350 MHz; it supports a variety of I/O level standards, among which the differential I/O standards include LVPECL, LVDS, BLVDS, M-LVDS; with AES, FlashLock encryption technology. Other

In addition, a unique analog section is integrated:

◆A/D converter with resolution up to 12 bits, sampling rate up to 600 ksps, 30 input channels, 2.56 V internal reference source;

◆Up to 30 analog input I/Os, can withstand ±12 V input voltage, and has 10 MOSFET gate drive outputs with adjustable drive capability;

◆It can realize voltage, temperature and current detection;

◆Integrated on-chip 100 MHz RC oscillator with 1% accuracy;

◆External crystal oscillator of 32 kHz to 20 MHz can be connected;

◆With programmable real-time counter (RTC);

◆There is a 1.5 V voltage regulator on the chip, which can provide the core voltage and realize the low power consumption mode of sleep and standby.

2. Implementation principle and system structure

The system uses the Fusion development platform as the main controller, and the 8051 soft core is embedded in the chip to control and manage the system. Two 8051 soft cores are embedded in the system, which effectively separates management, control and detection. The two cores communicate with each other through parallel I/O internally and use the “imitation printer protocol” to communicate; an IP core expands the MiniISA bus. , the 32 KB SRAM, LCD interface and 82C55 interface are expanded through the parallel bus to realize printer control and infrared remote control reception; through the telephone module CR6269A and the network module ZNE-100T, the telephone information and network information are converted into serial data, and the home appliances can be remotely controlled. Control; analog I2C bus interface expands PCF8563 real-time clock chip, E2PROM memory AT24C256 chip and ZLG7290 serial display/keyboard controller to obtain accurate real-time clock, related parameters, and realize system information storage, 4×4 keyboard dynamic scanning Control; extended digital temperature sensor DSl8820 is used to measure room temperature; 4 channels of A/D are expanded in the chip to realize the measurement of household parameters (smoke concentration, gas concentration, AC voltage and AC current). The block diagram of the system structure is shown in Figure 1.

3. System hardware design

3.1 MiniISA bus expansion board

MiniISA bus expansion board is mainly used for expansion of various parallel bus devices and I2C devices. These include:

82C55 parallel I/O expansion, LCD interface, ZLG7290 serial keyboard/display interface, PCF8563 real-time clock interface, AT24C256 interface, etc. The Mi-niISA bus interface is shown in Figure 2.

3.1.1 Peripheral address selection and allocation

The system realizes the selection and distribution of the base address through the programmable logic array device GAL16V8. The addressing space of the MiniISA bus interface is 256 bytes, of which the upper 4 bits (A4~A7) are the base address of the board, and the base address is set through 4 toggle switches; the lower 4 bits are the interface address of the ISA board, A2 , A3 is used for the address selection of the external expansion chip on the board, and the addressing space of each peripheral is 4 bytes. The base address base (higher 4 bits) of the board is determined by SA7, SA6, SA5, and SA4. A3 and A2 perform chip selection on the peripherals on the board. The address allocation is listed in Table 1.

3.2.2 Introduction of board resources

(1) 82055 parallel I/O expansion

The programmable parallel interface 82C55 is an interface chip with two 8-bit (A port and B port) and two 4-bit (C port high/low 4 bits) parallel I/O ports, the interface is programmable, I/O Port control function is strong. The chip interface address is listed in Table 2.

In this design, 82C55 is mainly used to control the input and output of the printer, and its interface circuit is shown in Figure 3.

(2) Chinese character micro-printer extension

The Chinese character micro-printer is a dot matrix printer. As shown in Figure 3, the printer data line is connected to the PA port of 82C55, and the PA port is set to output; the busy line (BUSY) and the strobe line (STB) are connected to PC7 and PCO respectively. The high 4-bit I/O port of the 82C55’s PC port is set as input, and the low 4-bit I/O port is set as output.

(3) Serial keyboard display controller ZLG7290

ZLG7290 is a keyboard/display controller with serial I2C bus, which can extend up to 8×8 keyboards and 64 LEDs. All interfaces are drawn out in the MiniISA bus expansion board, and the circuit is shown in Figure 4. In this design, only the 4×4 keyboard is used for interface operation.

(4) Real-time clock chip PCF8563

Extended PCF8563 real-time clock chip, used to obtain accurate time for time display. PCF8563 is an industrial-grade, multi-functional clock/calendar chip with extremely low power consumption that contains I2C bus interface function and is introduced by Philips. The working current is O. 25μA, using O. 1F capacitor power supply; in case of power failure, it can still work normally for 10 to 13 days.

(5) Serial E2PROM AT240256

AT24C256 is an E2PROM of serial I2C bus, the storage space is 32 KB, it is mainly used for the storage of alarm parameters, passwords, infrared codes and related product information.

3.2 Telephone module CR6269A

The CR6269A telephone module can realize all the functions required for automatic telephone applications: telephone interface, off-hook circuit, ringing identification, FSK caller ID reception, telephone signal tone identification, DTMF transceiver, multi-segment digital voice, multi-polyphonic music and ringtones, hands-free Amplification, user voice input and telephone voice output, 2-way remote control drive output. The bottom layer control of all hardware is completed by the MCU in the module. The user completes the command and data communication through a standard RS232 interface. The function is powerful and the application is very simple. It can be used only by connecting to 5V power supply, telephone line and serial port line.

3.3 Network module ZNT-100T

ZNT-100T network module is an embedded network module developed by Zhou Ligong Company. It integrates TCP/IP protocol stack, 10M Ethernet interface, serial port TTL level mode, baud rate is 300~115 200 bps, provides 5 controllable I/Os, and can control any port through web page or TCP control. set up. Table 3 is the interface description of ZNE-100T. In this design, this module is used for network control.

3.4 AC detection circuit

In this design, the DVDI-001 voltage/current transformer is used to sample the voltage and current of the alternating current, and then rectified by the precision rectifier circuit, and filtered by RC, and finally the voltage of 0~5V enters the A/D measurement terminal of the FPGA.

(1) Used as a voltage transformer

DVDI-001 is a current-type voltage transformer when used as a voltage transformer. The voltage sampling circuit is shown in Figure 5. According to the actual situation of the circuit, the resistance value of Rr is selected as 5 kΩ, and CO is selected as O. 1µF. Because the induction of current is 1:1, Rr is selected as 5 kΩ; at the same time, be careful not to let the load exceed the range of the transformer. In this way, the desired amplitude range can be obtained safely.

(2) Used as a current transformer

When DVDI-001 is used as a current transformer, the user only needs to wear one turn of the bus bar in the center hole as the input coil. The current sampling circuit is shown in Figure 6. Since the induction ratio of the current is 3 000:1, the load in the circuit is very small, so according to the actual situation of the circuit, the resistance value of Rr is selected as 5 kΩ, and CO is selected as 0.22μF. In this way, the desired amplitude range (0 to 5 V) can be safely obtained.

3.5 Temperature detection

The digital temperature sensor DSl8B20 has the advantages of convenient interface with the CPU, direct digital output, etc. It can provide 12-bit (binary) temperature readings to indicate the temperature information of the device. Send into DSl8820 through single-line interface or send out from DSl8B20, so only need one line from host CPU to DSl8820. The indoor temperature is detected using a digital temperature sensor, and its circuit is shown in Figure 7.

4, binuclear communication

The system adopts a master-slave architecture. The master core sends commands and the slave cores respond to control and manage peripheral devices together. Among them, COREl as the main core, expands the SRAM of 32 KB outside, mainly communicates with the outside world through MiniISA bus line; CORE2 acts as the slave core, communicates with the outside through I/O. COREl and CORE2 are relatively independent in structure. The dual-core uses imitation printer protocol to communicate, and the two are connected by I/O ports (parallel data line 8 bits, control line 2 bits). The dual-core communication interface is shown in Figure 8, and the interface pin definitions are listed in Table 4.

In each core, the system has opened up a 16-byte cache to store the received data. Its sending format is:

The slave device addresses are listed in Table 5.

5. Software design

5.1 System main program flow

The system has dual cores inside, and each core executes programs independently. The main program flow is shown in Figure 9.

5.2 Dual-core communication process

Dual-core communication adopts the mode of read busy line transmission and interrupt reception, which enhances the reliability of data transmission, as shown in Figure 10.

6. Conclusion

This paper uses Actel’s latest Fusion series digital-analog FPGA to realize remote home appliance control, which ensures the coordination and stability of communication in a multi-CPU environment. The innovation of this paper: the digital-analog FPGA is used, and two 8051 IP soft cores are embedded. The main core realizes data processing and system management by extending the MiniISA bus, and the slave core is directly used for parameter acquisition and control. /D converters are 12-bit on-chip A/Ds.

Responsible editor: gt

Leave a Reply

Your email address will not be published.