Electronics > Projects, Designs, and Technical Stuff
IrDA transceiver - level confusion - santity check me please??
(1/1)
max_torque:
Hi all,
Ok i'm going to use a pair of MAX3120 https://datasheets.maximintegrated.com/en/ds/MAX3120.pdf to convert TTL to IR light, and back from IR light to TTL again on the other side. The TTL data is from a boggo UART, coming from a basic 8bitter (AVR ATmega) so is 0-5v TTL, with HIGH = MARK(1) and LOW = SPACE (0), and line IDLE = HIGH(1).
From the MAX3120 datasheet Page 5 in the table of pin allocations
"IR Transmitter TTL/CMOS Data Input. High = IR LED on"
and
"IR Receiver TTL/CMOS Data Output. Pulses low for IR input pulse"
This therefore to me suggests the MAX3120 transciever INVERTS the signal as it passes through ie TTL HIGH -> IR LED ON -> IR LIGHT FALLS ON RECIVER DIODE -> RX OUTPUT TTL LOW
And to avoid running the IR led all the time when just idling the line (which is most of the time), i want a logic level inversion between the AVR TX output and the MAX3120 TX input.
With an inverter in the line:
at IDLE or MARK:
TTL HIGH -> TTL LOW (inversion) -> IR LED OFF -> NO IR on reciever -> TTL HIGH output
at SPACE
TTL LOW -> TTL HIGH(inversion) -> IR LED ON -> IR on reciever -> TTL LOW output
SO far so good i think?? :scared:
For data coming back the other way, it the reverse that's required, ie the thing sending the data to the MAX3120 needs to have an inverter in between them to achieve the same result as the data comes back (in fact, because the thing sending the UART at the other end is an FTDI USB->UART device, and they have a software pin inversion, i don't need h/w to achieve this)
That, was, in my head, all fine, and looked correct! But then i looked at the "typical operating circuit" on Page 1 of the MAX3120 datasheet and it also shows an inverter in the RX line between the MAX3120 and the UART device (in that case, a MAX3100 SPI UART expander)??? why? This doesn't look right to me, as that would cause a double inversion (because the MAX3120 inverts itself)??
Can someone check my working and see who you think is right?? |O
Renate:
IRDA SIR is RZI 3/16
That means you can't just connect a standard UART to a transceiver like the MAX3120
The datasheet for the MAX3120 shows it being used with a MAX3100.
The MAX3100 chops up the signal with 3/16 ratio on transmit and can decode the same signal on receive.
You can take a standard UART, when the output is high you do nothing, when the output is low you shoot out a light pulse with a duration of 3/16 of a bit.
Sure, you could "chop" the output of the standard UART, but then you need the 3/16 generator synchronized to the bit clock of the UART.
Also, receiving takes more brains than a normal UART.
As a hack, you could try stretching the zero light pulses until they are bit sized.
max_torque:
ah, right! I had missed that rather important bit! I supidly assumed that the transciever did all the necessary encoding / decoding to the IR bit....... :palm:
max_torque:
ok, assume i slip a TIR1000 http://www.ti.com/lit/ds/symlink/tir1000.pdf IrDA encoder / decoder in between the UART and the MAX3120?
Look likes a straight pass through, with the TX_U to TX_IR automatically inverting to account for the RX inversiobn inherent and to prevent excessive LED current from it being continuously on?
Renate:
Yes, that looks like it should work. The polarity checks out.
Navigation
[0] Message Index
Go to full version