데이터의 표현 : pulse distance encoding
- 1개의 562.5us pulse 이후 562.5us(total : 1.125ms)의 space는 0을 의미
- 1개의 562.5us pulse 이후 1.6875ms(total : 2.25ms)의 space는 1을 의미
하나의 message frame은 아래와 같이 구성
- 9ms 의 leading pulse로 시작 , 4.5ms의 space를 가짐
- 8bit의 address 코드 및 inverse코드 ( 이로 인해 0,1의 갯수는 같으며 27ms의 길이를 갖게 됨0
- 8bit의 command 코드 및 inverse 코드
- 종결을 알리는 1pulse
- leading pulse + address + command (inverse 포함)
Repeat 코드
- 9ms leading pulse
- 2.25ms space
- end pulse로 구성 108ms 주기로 반복됨.
======================================================================
The NEC IR transmission protocol uses pulse distance encoding of the message bits. Each pulse burst (mark – RC transmitter ON) is 562.5µs in length, at a carrier frequency of 38kHz (26.3µs). Logical bits are transmitted as follows:
- Logical '0' – a 562.5µs pulse burst followed by a 562.5µs space, with a total transmit time of 1.125ms
- Logical '1' – a 562.5µs pulse burst followed by a 1.6875ms space, with a total transmit time of 2.25ms
When a key is pressed on the remote controller, the message transmitted consists of the following, in order:
- a 9ms leading pulse burst (16 times the pulse burst length used for a logical data bit)
- a 4.5ms space
- the 8-bit address for the receiving device
- the 8-bit logical inverse of the address
- the 8-bit command
- the 8-bit logical inverse of the command
- a final 562.5µs pulse burst to signify the end of message transmission.
The four bytes of data bits are each sent least significant bit first. Figure 1 illustrates the format of an NEC IR transmission frame, for an address of 00h (00000000b) and a command of ADh (10101101b).
Figure 1. Example message frame using the NEC IR transmission protocol.
Notice from Figure 1 that it takes:
- 27ms to transmit both the 16 bits for the address (address + inverse) and the 16 bits for the command (command + inverse). This comes from each of the 16 bit blocks ultimately containing eight '0's and eight '1's - giving (8 * 1.125ms) + (8 * 2.25ms).
- 67.5ms to fully transmit the message frame (discounting the final 562.5µs pulse burst that signifies the end of message).
REPEAT CODES
If the key on the remote controller is kept depressed, a repeat code will be issued, typically around 40ms after the pulse burst that signified the end of the message. A repeat code will continue to be sent out at 108ms intervals, until the key is finally released. The repeat code consists of the following, in order:
- a 9ms leading pulse burst
- a 2.25ms space
- a 562.5µs pulse burst to mark the end of the space (and hence end of the transmitted repeat code).
Figure 2 illustrates the transmission of two repeat codes after an initial message frame is sent.
Figure 2. Example repeat codes sent for a key held down on the transmitting remote controller.
출처: <https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol>
'linux' 카테고리의 다른 글
Network interface Restart 시 주의 사항 (0) | 2019.11.21 |
---|---|
4.9.x driver 중, memcpy 시도 할 경우, kernel panic #PAN emulation (0) | 2019.10.15 |
scp 사용법 (0) | 2019.06.21 |
git commit/ clone 관련 tip (0) | 2019.06.13 |
USB 버전 별 속도 및 전압/전류 (0) | 2019.06.12 |