Just a ramdom idea, MAX7219, PROP outputs
TC
Posts: 1,019
Hello all,
I am working on hooking a MAX7219 to a prop. Looking at the data sheet a min logic high for the MAX is 3.5V. I came up with an idea, it could be a bad idea, but it also could be a good one. Tell me what you think, and your opinions about it. I know the MAX input pins would always be high when the prop is not driving the pins low.
Thanks
TC
I am working on hooking a MAX7219 to a prop. Looking at the data sheet a min logic high for the MAX is 3.5V. I came up with an idea, it could be a bad idea, but it also could be a good one. Tell me what you think, and your opinions about it. I know the MAX input pins would always be high when the prop is not driving the pins low.
Thanks
TC
Comments
That relies on the substrate diodes in the Prop, and open drain mode ?
That's 'sort of ok', but needs some care.
* The Prop + regulator, needs to present a load exceeding the total pullup, otherwise you can drift up the Prop Vcc, and that is risky.
* The rise times are slower, and some slave devices do not like slow clock edges.
An alternative is a series power diode (slow, hi C) , and a higher pullup, with CMOS drive mode.
You could find if you were to just drive these signals high directly from the prop side you might only see 3.3V (or whatever voltage level you are running the prop at), not necessarily the 3.5V minimum you want for reading a logic high on the MAX7219. The 10k pull ups won't bring the high voltage level up rapidly (depending on capacitance) for really high speed operation > 1MHz but it might be fast enough. You can drop the resistors down a little bit further to speed it up but ideally no lower than around 2.2k (higher is safer) otherwise you risk over stressing the protection diodes in the prop. There are other threads that discuss the suitable resistances to safely interface to 5V. The rise time for clock inputs might be an issue if the MAX has any tight timing requirements there.
Technically 2.2K isn't really within specs. The current through the clamping diodes is not supposed to exceed 500uA. 2.4K is the lowest resistor value that will meet this limit.
The clamping diodes will pull the 5V line down to 3.8V. This is still higher than the desired 3.5V so it might work in this application. I erroneously thought a line pulled to 5V would have 5V on it. I was only recently set straight by Phil in a 5V/3.3V I2C discussion.
I just now measured the voltage to make sure and sure enough Phil was right, the Prop input pin pulled to 5V read 3.8V on my voltmeter.
Have you tried the MAX7219 with 3.3V logic? I bet it would work (as long as the amount wagered is small).
No, I haven't yet. But I plan on trying it just to see what happens. I just had the idea while I was going through the data sheet, and I didn't know what would happen. Ive already lost to many pins on the prop to my experimentation. That is why I am making a breakout board for TI's TXS0108E it will allow me to interface to 5V parts easily, and if I screw up, im not out much money.
On page 25 the datasheet "Max. DC current into an input pin with internal protection diode forward biased +/-500uA."
Since I measured the forward biased voltage of 3.8V at the pin with 5V on it (through a 10K resistor) I figured the voltage drop across the resistor should be 1.2V. I used this 1.2V to calculate the resistor value.
1.2V / 0.0005A = 2,400 ohm (using Ohm's law)
I'm not positive I did this correctly since 2.4K ohm still seems on the low side for a current limiting resistor. I generally use 10K or 4.7K resistors on inputs from 5V devices.
I think im going to have to take a better look at the PROP's data sheet. Thanks for the info.
You're welcome. I wouldn't have understood what it really meant without having read an explanation on the forum.
diode drop.
Prop pin ---- |<|
X--- 3k3---- +5V
And point X to the MAX7219 input.
The 0.6V drop across the diode adds to the Prop's output so logic levels seen at the MAX7219 are about
0.6V (low) and 3.9V (high), with 3k3 resistor the pull-up current is < 0.5mA, and about 220uA worst
case through the Prop's protection diode.
A point to note is that the worst case for the protection diode is when the Prop pin is an input (at reset),
since then the output transistors are off and the protection diode has to take the pull-up current. When
the pin is configured as an output the output transistors are going to win against the pull up resistor
strongly (Prop pin output resistance is about 40 ohms I think, so with output HIGH at 3.3v into a 3k3 pullup
to 5V you have a 40ohm/3300 resitive divider, output voltage is only 3.32V, the protection diode isn't
conducting at all at 0.02V. That's why adding an external diode is useful, the difference between 3.3
and 3.32 isn't significant.
Of course you can drive the pin open-drain, but then the protection diode has to do work, which I
personally think of as "just wrong"!
While I use 10K ohms on Prop pins with 5V on input pins, you don't want to add large resistors to Propeller output pins when communicating with 5V devices. I've had several 5V devices not work when I used 4.7K resistors on the Prop's output pins.
Still running 3 years later.
That sounds like an interesting idea. Would that protect the output pins better then just having a resistor pulled to 5V?
The TSX0108E is a bi-directional level translator that automatically changes its direction. and it will go down to 1.2V on IO-A side. That should be good for the PROP2 when it comes out.
Did you use any pulldown resistors? or did you just let it fend for its self?
Just direct connection. No resistors or translators. It just worked.
Give it a shot.
I will, Thank you
The point is that a pull-up to 5V doesn't really level shift at all unless you use open-drain output, and
with open-drain the protection diode gets to carry the pullup current. With the diode
and using push-pull output the protection diodes don't carry the current (except just
after reset) and the output voltage is definitely level shifted enough for a comfortable
noise margin. The diode drop also helps reduce the pull-up current during the reset
time (or conversely allows a stronger pull-up resistor).