View Single Post
Old 12-27-2011, 07:14 PM   #2
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
TTL Level Shifter "Theory of Operation"

TTL voltage level definitons:
For both 5v and 3.3v TTL devices, a logic ONE is defined as a voltage level between 2v and 5v. All 3.3v devices must tolerate up to 5v on their inputs. All 5v and 3.3v TTL devices must output at least 2v for a logic ONE under normal operating loads, and must accept any voltage from 2v to 5v as a logic ONE. All 5v and 3.3v TTL must accept any input voltage below 0.8v as a logic zero, but *should* output 0.5v for logic ZERO (to allow for some voltage drop due to long narrow conductive traces on a circuit board). 1.8v TTL must accept any input voltage above 0.65v as a logic ONE, and any input voltage below 0.35v as a logic ZERO. Voltage levels between the logic ONE low voltage and logic ZERO high voltage specifications are undefined and cause TTL circuits to operate in the linear range where they may draw excessive current, and must be avoided except in special (hack) circuits specifically designed to use their analog properties. Read more about TTL voltage levels and level shifting here:
http://www.analog.com/static/importe...als/MT-098.pdf
and here:
http://www.pericom.com/pdf/applications/AN066.pdf


Kindle TxD level shifter circuit description:
When the kindle outputs a TxD logic ZERO, the level shifter uses diode D1 to let the kindle pull the adapter RxD pin down to 0.7v (the voltage drop across one silicon diode while conducting current through it). When the kindle outputs a TxD logic ONE, diode D1 blocks current flow, and resistor R1 pulls the adapter RxD pin up to its logic ONE level. Anything from 2v to 5v should work fine for the adapter RxD circuit supply voltage. For some USB serial adapters, you may not need resistor R1 or the supply voltage (do to an internal pull-up resistor), but it will not hurt to leave them in the circuit.

USB Serial adapter modifications (if needed):
If the serial adapter contains an LED that lights to show data on its RxD line, that diode might supply too much current for the kindle to pull it down to a logic one. You can measure this with an oscilloscope as the lowest voltage level on the pulsing data line while serial traffic is flowing across it. If the PC connected to the adapter USB port does not see data, you might have to remove that RxD LED (like I did on mine) to get it to work.

Kindle RxD level shifter circuit description:
The kindle RxD level shifter uses diodes D2 and D3 to limit the adapter TxD output to 1.4v (the voltage drop across two series-connected silicon diodes while conducting current through them). Resistor R2 limits the current flowing though the diodes so to a safe value that will not overload the adapter TxD output. When the adapter TxD is at a logic ZERO level, there will be no current flowing through diodes D2 and D3, and the kindle will see a logic ZERO.

Possible improvements:
You can improve (and complicate) this circuit design by adding transistors so the kindle TxD can sink more current (no need to remove an adapter RxD LED). You can use a level shifter IC designed for this purpose. EDIT: Although in theory, 1.8v TTL used in the kindle is not guaranteed to treat voltage levels between 0.35v and 0.8v as a logic ZERO, in practice, real devices such as the kindle are fairly tolerant of logic voltages a little ways into the "no man's land" between logic ZERO and logic ONE, and the kindle does just fine seeing the logic ZERO output from the higher-voltage USB TTL serial adapter. A proper TTL level shifter IC will also shift the logic ZERO voltage levels, unlike this "Super Simple" version. Or, you can instead buy a USB 1.8v TTL serial adapter that needs no extra circuitry such as is provided in this thread (recommended).

Any questions?

Last edited by geekmaster; 12-30-2011 at 05:22 AM.
geekmaster is offline   Reply With Quote