General peripheral interface question

11 posts / 0 new
Author
Message

I'm using an ARM device that has a maximum current/pin of 8mA and I want to interface to a peripheral such as a shift register or similar logic device that will run on 3.3V.

What do I need to do?

I a novice electronic tinkerer and am just starting to do ARM development so am real confused. I've worked with level shifters, from 5V AVR to 3.3V device but have never had to deal with such a low current to work with.

Happy Trails,

Mike

JaxCoder.com

TI makes an HC595 shift reg with 500ma drive per channel. I think its a TPIC595 or similar...

Imagecraft compiler user

Bob,

What I'm wondering is what do I need between the output pin on the uController that's producing the 8mA and the input to the device I want to control that's on the order of 30mA? I'm thinking maybe a transistor?

Happy Trails,

Mike

JaxCoder.com

That 8ma is the maximum that the pin can supply. It can supply anything less.

For example, with a 3.3V supply, if you were to connect a 1K resistor to ground, Ohm's Law says that the current through the resistor (at logic high out) would be 3.3V/1K = 3.3mA. That pin could handle it. If the resistor was 500 ohms, then the current would be 6.6mA and the pin could handle it. If the resistor were 250 ohms, the current would be 13.2mA and the pin could NOT handle that.

CMOS logic inputs take very, very small currents. There is a short peak of current each time it changes state (level) and the amount depends on how rapidly it changes state. Other times, CMOS inputs take nanoAmps (1 nA = .001uA, 1uA = .001mA).

So, no, you do not need to do anything at all to be able to drive a CMOS sift register.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Jim thanks for your input I understand now about using a CMOS shift register I didn't realize that they would work at such a low level.

I used the shift register as a very generic example because I thought the answer would be to use something like a transistor to be safe. What I am really trying to interface to is a Nokia5110 LCD display. I don't want to drive the backlights I know they consume around 100mA and that would be the end of my board but I want to drive the logic pins; MISO, MOSI, CLK, etc..

I believe from what you are saying that I would probably be alright but is there anything I can do just to safe. If there's a way to screw it up I will. A little gun shy just bricked my Beaglebone Black a couple of days ago.

Happy Trails,

Mike

JaxCoder.com

The nokia is 3.3V. If your cpu is also 3.3V you're golden. Look at the circuit collection at ruggedcircuits to see how to do external stuff on/off using hiside or loside mosfets.

Imagecraft compiler user

Thanks Bob I'll check it out. I guess I'm just having a brain spasm this morning.

The TM4C123G is a 3.3V device as is the Nokia so I guess I'm in like Flint!

Happy Trails,

Mike

JaxCoder.com

Last time I was in Beaufort was in about '74. They had a cook-your-own-steak place right near the Marine Air station. They rolled a cow leg out on a cart and you pointed to how much you wanted em to cut off, and you cooked it on a grill right at your table. Was pretty popular back in the day. Still there?

Imagecraft compiler user

Bob I don't get out that way much, I live close to Paris Island but I'll check it out always up for adventure.

I did some work down in Leesburg and there was a little bar/hole in the wall that had a grill set up so people could cook there steaks but I never saw anyone do it. They had the best wings there I ever ate, cooks name was bubba and I got to know him pretty well and he used to tell me "Mike you're gonna grow feathers".

Happy Trails,

Mike

JaxCoder.com

Back on the original topic -

CMOS inputs take nearly zero current. So, that is rarely something you need to worry about. What you DO need to be concerned with is logic levels. Both the sender (the pin that originates the logic level) and the listener (the pin(s) that respond to the logic level) need to recognize the same logic levels. For CMOS, that is usually governed by the power supply voltage.

It is really (really really) bad juju to drive a CMOS input with a voltage that is higher than its power supply voltage. Almost universally though there are a few notable exceptions. If you do this, you risk physical damage to the receiving chip. It rarely happens but under the worst circumstances, you can cause the whole chip to "burn out".

The next worst is to drive a CMOS chip with voltages that are too small. The common one here is to try to drive a 5V chip from a 3.3V signal. If you look at the specs, it seems "just OK". But, if the 5V logic supply is toward its high tolerance side (say, 5.1V or 5.2V) and the 3.3V logic supply is toward its low tolerance side (say 3.2V), you are usually out of spec.

Going back to your original question, the current rating of a pin is more like the gallon-per-minute rating on a pump. A 100GPM pump will pump at 10GPM or 20GPM but it would be pretty hard to get 200GPM. It is a "limit". In the case of logic, it may mean that if you try to draw more than the spec 8ma, it won't be able to pull up as close to 3.3V as it should. Or, it might even go so far as to be potentially damaging under some circumstances. THAT depends on the design of the chip and how the specs are written.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net