Design of interface between 51 single chip microcomputer and ARINC429 aviation bus

Publisher:beta13Latest update time:2011-12-28 Keywords:DEI1016 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Main functions of DEI1016

DEI1016 is a serial receiving and transmitting device produced by Device Engineering Instrumented that supports the ARINC429 aviation bus protocol. The main functions of this device are as follows:

●Serial data word length is 32 or 25 bits;

●Serial data rate is 100kbps or 12.5kbps;

●With independent receiving and transmitting circuits;

●Two independent receivers can directly interface with the ARINC429 bus;

●It has the functions of serial/parallel receiving data conversion and parallel/serial sending data conversion;

●Parity check can be performed on received data, and parity setting can be performed on sent data;

●Can automatically generate spaces between words;

●Use single +5V power supply.

2 Working principle of DEI1016

The pin functions and features of DEI1016 have been introduced before, and now we will only describe the working principle of the device.

2.1 Reset and initialization of DEI1016

After the circuit is powered on, first apply a 200μs low-level pulse to the MR pin to reset DEI1016, and then write the control word to the 16-bit data bus. In this way, applying a low level to the LDCW pin can write the control word to the control word register, and then data can be received and sent.

2.2 Data transmission process of DEI1016

The data transmission timing of DEI1016 is shown in Figure 1. When sending data, first check whether the TXR pin is high. If it is high, it means that the transmission memory is empty. At this time, set the ENTX pin to low to stop sending data and write the data to be sent to the 16-bit data bus. After that, if you want to send data word 1, set LD1 to low and LD2 to high; if you want to send data word 2, set LD1 to high and LD2 to low. At this time, check whether the TXR pin is low. If it is low, it means that the transmission data has been loaded into the memory. At this time, set the ENTX pin to high to send data. The transmission memory of DEI1016 can load up to 8 32-bit word length data. DEI1016 adopts the first-in-first-out transmission order.

2.3 Data Receiving Process of DEI1016

The data receiving timing of DEI1016 is shown in Figure 2. When receiver 1 receives data, the system will set DR1 to a low level; and when receiver 2 receives data, the system will set DR2 to a low level. To make receiver 1 send word 1 of the received data to the 16-bit data bus, first set SEL to a low level, then set OE1 to a low level and set OE2 to a high level. Then set SEL to a high level, and word 2 can be sent to the 16-bit data bus. To make receiver 2 send data to the 16-bit data bus, set OE2 to a low level and OE1 to a high level.

Table 1 74LS373 Function Table

Output control OE Enable G Input D Output Q
L H H H
L H L L
L L X Q
H X X Z

3 Interface Design between AT89C52 and DEI1016

When the AT89C52 (U1) 8-bit microcontroller exchanges data with the 16-bit data bus of DEI1016, the latch must be used to latch the data first. The interface circuit block diagram is shown in Figure 3. When sending data, U1 first divides the data to be sent into the lower 8 bits and the upper 8 bits and sends them out, and enters U3 and U4 for latching, and then sends the 16-bit data together to the data bus of DEI1016 (U2). U3, U4, U5, and U6 all use 74LS373 chips, and their internal parts are composed of D latches and three-state output gates. Their function table is listed in Table 1. When OE is low and G is high, the output Q and input D are in direct connection. When OE is high and G changes from high to low, the input data of D is latched by D latch. Even if the input data of D (P0 port) changes again, it will not affect the latched data. If OE is low, the system will output the previously latched data. In order to latch the lower 8-bit data, the WR of U1 and the address selection signal Y7 (decoded by decoder U7) need to control the G terminal of U3 through the NOR gate U8. In fact, only when U1 is performing a write operation, WR and Y7 are both low, and at this time the lower 8-bit data can be temporarily latched by U3. The latching of the high 8-bit data is similar to this. When P3.4 of U1 changes from high to low, it can open the output gates of U3 and U4, so that U3 and U4 send data to the data bus of U2. When P1.3 or P1.4 of U1 changes from high to low to load the 16-bit data into the transmission memory, P3.4 will change from low to high. At this time, the output of U3 and U4 is in a high impedance state, but it will not affect the data output state of U2. The transmission procedure is as follows:

mov dptr,#e000h

mov a,#d11; take the lower 8 bits of word 1

movx @dptr,a ; lock the lower 8 bits of word 1 into U3

mov dptr,#c000h

mov a,#d1h ; take the high 8 bits of word 1

movx @dptr,a ; lock the upper 8 bits of word 1 into U4

clr p3.4 ; turn on the output of U3 and U4

nop

clr p1.3 ; word 1 data loaded into DEI1016

nop

SETBB P3.4 ; Turn off the output of U3 and U4

SET 1.3

mov dptr,#e000h

mov a,#d21; take the lower 8 bits of word 2

movx @dptr,a ; lock the lower 8 bits of word 2 into U3

mov dptr,#c000h

mov a,#d2h ; take the high 8 bits of word 2

movx @dptr,a ; lock the upper 8 bits of word 2 into U3

clr p3.4 ; turn on the output of U3 and U4

nop

clr p1.4; word 2 data loaded into DEI1016

nop

SET 3.4

SET 1.4

When receiving data with U1, DR1, DR2 and TXR should be connected to INT0 of U1 through AND gate U13. After an interrupt is generated at INT0 port, U1 will perform a read operation and control U14 and U15 through RD and Y5 to read the status of DR1, DR2 and TXR. After U2 receives data or completes sending data, it will apply for an interrupt to INT0 port of U1 and judge the status of DR1, DR2 and TXR in the interrupt program. TXR is low, indicating that the transmission is completed, while DR1 or DR2 is low, indicating that the data has been received. At this time, P1.2 (SEL) can be set to a low level, and P1.0 (connected to OE1 of DEI1016) or P1.1 (connected to OE2 of DEI1016) can also be set to a low level, so that the data of word 1 appears on the data bus, and P1.0 and P1.1 are output after being XORed by U11 to make the G terminals of U5 and U6 high level, thereby locking the data into U5 and U6. Since the output after RD is ORed with Y7 and Y6 is connected to the OE gates of U5 and U6, when U1 performs a read operation, the OE gates of U5 and U6 should be opened successively to read the data. The receiving procedure is as follows: (taking receiver 1 as an example).

clr p1.2 ; Set DEI1016 SEL = 0, read word 1

clr p1.0 ; set DEI1016/OE1=0

SET b p1.1 ; Set DEI1016/OE2=1

nop

mov dptr,#e000h

movx a,@dptr ; read the lower 8 bits of word 1

mov 10h,a

mov dptr,#c000h

movx a,@dptr ; read the high 8 bits of word 1 into

mov 11h,a

SET b p1.2 ; Set DEI1016 SEL = 1, read word 2

nop

mov dptr,#e000h

movx a,@dptr ; read the lower 8 bits of word 2

mov 12h,a

mov dptr,#c000h

movx a,@dptr ; read the high 8 bits of word 2 into

mov 13h,a

SET 1.0 ; Set DEI1016/OE1=1

SET b p1.1 ; Set DEI1016/OE2=1

SET 1.2 ; Set DEI1016's SEL = 1

The two receiving channels of DEI1016 may receive data at the same time. That is, when the two channels share an interrupt source, if one channel has applied for an interrupt and entered the receiving program, the data received by the other channel at the same time may be blocked. The solution is: after entering the interrupt program, query the status of the other channel DR during the data receiving process. Of course, if each channel uses an interrupt source separately, the effect will be better.

4 Conclusion

In fact, the interface circuit of AT89C52 and DEI1016 can be applied to other 16-bit data bus interface circuits after improvement. If ISP devices are used to replace latches and their gate circuits, the area of ​​the circuit board can be greatly reduced.

Keywords:DEI1016 Reference address:Design of interface between 51 single chip microcomputer and ARINC429 aviation bus

Previous article:Design and implementation of digital barometer based on 51 single chip microcomputer
Next article:Communication software design of 51 compatible carrier communication microcontroller PL3105

Recommended ReadingLatest update time:2024-11-16 17:43

Design of Data Acquisition System Based on AT89C52 and USB Interface
In industrial production and scientific and technological research, PCs or industrial computers are often used to collect various data to obtain the required control information and experimental data. Traditional data acquisition systems mostly complete data transmission in the form of ISA, EISA or PCI cards. This meth
[Microcontroller]
Design of Data Acquisition System Based on AT89C52 and USB Interface
Design of AT89C52 microcontroller to realize calendar clock chip DS12C887 display
In banks or other public places, you often see displays showing real-time information, including year, month, day, week, time, etc. The function of this example is to set, obtain, and record real-time information in the 51 microcontroller system. The calendar clock information is displayed through a digital tube. The
[Microcontroller]
Design of AT89C52 microcontroller to realize calendar clock chip DS12C887 display
Design of intelligent temperature controller based on AT89C52
1 Working Principle Figure 1 System structure diagram The temperature controller designed in this paper consists of three parts: temperature monitoring, signal processing, and output control. The system block diagram is shown in Figure 1. It obtains the winding t
[Microcontroller]
Design of intelligent temperature controller based on AT89C52
Using AT89C52 Single Chip Microcomputer to Realize the Conversion from RS422 to CAN Bus
Introduction RS422 is a widely used standard bus in serial communication. It can easily connect various computers, external devices, and measuring instruments to form a measurement and control system. However, it has a low transmission rate, a short transmission distance, and is prone to crosstalk between signal
[Microcontroller]
Using AT89C52 Single Chip Microcomputer to Realize the Conversion from RS422 to CAN Bus
Design of buzzer based on AT89C52 single chip microcomputer
This circuit is relatively simple. It uses a PNP transistor to drive the buzzer. When P3.7 is at a low level, the PN junction is forward biased, the transistor is turned on, and the buzzer sounds. The procedure is as follows: #include #define uchar unsigned char sbit sounder=P3^7; void delay(flying z) {
[Microcontroller]
Design of buzzer based on AT89C52 single chip microcomputer
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号