Brief introduction to the function and principle of DEI1016 and its interface design with single chip microcomputer

Publisher:QuantumPulseLatest update time:2012-06-05 Source: 21IC 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 status of sent data can be set;

●Can automatically generate spaces between words;

●Using a 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 the data of receiver 2 be sent 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 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

move a, #d11; get the lower 8 bits of word 1

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

mov dptr,#c000h

move a, #d1h; get 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

move a, #d21; get the lower 8 bits of word 2

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

mov dptr,#c000h[page]

move a, #d2h; get 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

SETPB1.4

Use U1 to receive data. DR1, DR2 and TXR should be connected to INT0 of U1 through AND gate U13. After an interrupt is generated at INT0 port, U1 performs a read operation and controls 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 applies for an interrupt to INT0 port of U1 and determines 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 low level, and P1.0 (connected to OE1 of DEI1016) or P1.1 (connected to OE2 of DEI1016) can be set to low level at the same time, so that the data of word 1 appears on the data bus, and P1.0 and P1.1 are output after XORing 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). The two-way reception of DEI1016 may produce the phenomenon of simultaneous reception. That is, when the above 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.

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 into

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 into

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

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:Brief introduction to the function and principle of DEI1016 and its interface design with single chip microcomputer

Previous article:Design of eight-way LED display based on AT89S51 single-chip microcomputer control
Next article:Design and implementation of taxi meter using μPD78F0034 single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 15:56

Design of contactless IC card prepayment watt-hour meter based on AT89C52
  The accuracy of the user's electricity consumption measurement method depends on the accuracy of the transformer and the meter. Contact IC card prepaid electricity meters have emerged, which have changed the past cumbersome manual meter reading and manual pricing to the user holding a card to purchase electricity, r
[Microcontroller]
Design of contactless IC card prepayment watt-hour meter based on AT89C52
51 single chip microcomputer (AT89C52) A/D conversion
#include reg52.h   #define uchar unsigned char   #define uint unsigned int   #define PORT P3   #define dula_h P2|=0x40   #define stay_l P2&=0xbf   #define temperature_h P2|=0x80   #define wela_l P2&=0x7f   sbit cs=P2^0;   sbit rd=P2^1;   sbit wr=P2^2;   fly read;   uchar table ={ //Common anode digital tube   0xc0,0xf
[Microcontroller]
51 single chip microcomputer (AT89C52) A/D conversion
Interface circuit and source code between AT89C52 microcontroller and DS18B20
This article will introduce the temperature measurement system composed of 51 single-chip microcomputer AT89C52 and temperature sensor chip DS18B20, and provide source code for readers' reference. The temperature measurement accuracy reaches 0.1 degrees, and the measured temperature range is between -20 degrees and
[Microcontroller]
Interface circuit and source code between AT89C52 microcontroller and DS18B20
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号