The IR (Infrared Ray) Transmission function is used widely. According to this, Alpha’s programmable IC has included the IR function, such as, AM4F series IC. Thus, this article introduces how to use IR function in programming in EzCode4F.
1. Circuits for IR Sending and Receiving
Figure 1 shows the frequently used circuits for IR Sending and Receiving:

The circuit at the left side is the High Mode circuit. In this circuit, writing ‘1’ to the carrier wave output port can send the IR signals. For the Low Mode circuit (Middle one), the IR signals can be sent by writing ‘0’ to output port. EzCode4F provides different modes for you to select.
Another circuit, at the right side, is the IR Receiving circuit. When the data output pin in this circuit receive IR signals, it will output low level. Otherwise, it will output high level.
2. Data Format of IR Function
Figure 2 shows IR data format (or the order of launched Bits) of High and Low Modes.

In Figure 2, the Head is the 6ms carrier wave.
For EzCode4F, the maximum number of sent bits is 16. You can define the bit number during programming as desired.
Figure 3 shows the code sending logic waveforms of High and Low Modes.
According to the circuits in figure 1, whether output high level to the IR pin of Low Mode circuit or output low level to the IR pin of High Mode circuit, the emitting diode cannot send infrared carrier wave. Therefore, the receiver cannot get the infrared signals and the Data output pin will maintain in high level. On the contrary, if the receiver gets infrared wave sent by emitting diode, the output pin would be in low level. That is, if only the sent data are the same, the received infrared waveforms are the same no matter High Mode or Low Mode.
... ...