Re: [beagleboard] Interfacing a 7400 series with the BeagleBone Black

183 views
Skip to first unread message

Rick Mann

unread,
Mar 10, 2015, 3:02:46 PM3/10/15
to beagl...@googlegroups.com, hdeco...@gmail.com
You'll have to take steps to scale the voltage down to the BBB's 3.3 V I/O level. The best way to do this is with dedicated voltage-level translator ICs. But depending on your application, you might be able to get away with current-limiting resistors in series from the 74xx output to the GPIO (you'll have to do some work to find the right value), and with the right 74xx selection, you won't need to put anything between BBB outputs and 74xx inputs (that will depend on what the 74xx Vhi threshold is).

Or maybe you can use 3.3 V 74xx variants.

> On Mar 10, 2015, at 10:50 , hdeco...@gmail.com wrote:
>
> Hi,
>
> I come from the world of sotware engineering and I am a newcomer (nearly) to the world of electronic. I would like to know if it was possible to interface a 74LS02 to the BeagleBone Black.
>
> I plan to connect Vcc and Vss of the 74LS02 to the 5V Vdd output and Gnd of the Beagle and use the GPIO pins to command the logic inputs. My problem is that I don't know if I can plug the 74LS02 without components such as resistors, in order to limit the current flowing through components. I don't want to damage the board.
>
> The result of all the logic operations should be gathered by some GPIO pins configured as inputs.
>
> Is it possible to proceed that way ?
>
> Thanks in advance for your answers
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Rick Mann
rm...@latencyzero.com


Harvey White

unread,
Mar 10, 2015, 3:18:13 PM3/10/15
to beagl...@googlegroups.com
On Tue, 10 Mar 2015 12:02:35 -0700, you wrote:

>You'll have to take steps to scale the voltage down to the BBB's 3.3 V I/O level. The best way to do this is with dedicated voltage-level translator ICs. But depending on your application, you might be able to get away with current-limiting resistors in series from the 74xx output to the GPIO (you'll have to do some work to find the right value), and with the right 74xx selection, you won't need to put anything between BBB outputs and 74xx inputs (that will depend on what the 74xx Vhi threshold is).

It's reasonable to do that when you have a 5 volt system with a number
of lines, and can't substitute the part (a 5 volt display, for
instance).

I would NOT use current limiting resistors, I don't thing that they
solve the problem.

As I remember it, and they could have changed things and this is not
as much of a problem now, the way that the pin is internally
constructed involves back biased diodes which connect to the power
supply rails. These back biased diodes, if forward biased, make an
SCR, which once turned on, stays on until the power is interrupted.

The voltage causes these SCR's to become functional, then fire. The
SCR then uses the internal power supply to provide enough energy to
destroy the I/O structure in the chip.

Current limiting resistors do not help, because it's not the current
coming in that does the damage, it's the relative voltage level.

This is called a "parasitic SCR" and has destroyed chips in the past.
Whether or not it is a problem still, I do not know.

You'd want to have chips (to connect the 5 volts to) that have 5 volt
tolerant inputs. These processors do not.

Better to use 3.3 volt logic everywhere possible, and level translate
only when talking to a 5 volt system that cannot be redesigned.

Talking, in this case, means signals going either direction.

>
>Or maybe you can use 3.3 V 74xx variants.

This would be my preferred solution, yes.

Harvey

Eric Fort

unread,
Mar 11, 2015, 6:02:27 AM3/11/15
to beagleboard
first off, to properly answer your question we need to start by referencing the datasheet for the part you wish to use found here:  http://www.ti.com/lit/ds/symlink/sn74s02.pdf

something missed by many is that 3.3v OUTPUTS on a device such as the beagle will drive standard 5v TTL logic just fine!  just make sure to limit your fan out (number of logic loads) appropriately.  The reason for this becomes clear if one actually reads the datasheet referenced above for the part you wish to use.  If you look at the 74LS02 VIHmin (the minimum voltage which the input sees as high) it's listed as 2v.  since 3v3 > 2v0 it works fine.  the problem you have is that the output of the 74LS02 swings from 0-5v so when the output of the 74LS02 goes high it will measure 5v.  since 5v > 3v3 it will cook a 3v3 INPUT.  So depending what you want to do you may or may not need voltage translation andin most cases (i2c buses being the major place where you find an exception and do need bidirectional) they need only be unidirectional and one may use simpler circuitry such as a transistor or resistance ladder/voltage divider. So I'll end by posing a question.  What doyou want to accomplish with this and can you post a basic schematic for review for us tolookat and constructively comment on?

Eric

Harvey White

unread,
Mar 11, 2015, 9:16:53 AM3/11/15
to beagl...@googlegroups.com
On Wed, 11 Mar 2015 10:19:21 +0100, you wrote:

>Thank you for all your advices.
>
>There shouldn't be any problem if i use a bidirectionnal voltage shifter ?

I use such a thing to go from 3.3 to 5.0 volt systems any time I need
to deal with that kind of thing. I typically use the 74LVCH8T245PWR
for 8 bits of data, and the 74LVC1T45 for single bit shifting. These
packages are surface mount, though, and you may not be able to handle
them easily, although there are surface mount to dip package adaptors.
Harvey
>> You received this message because you are subscribed to a topic in the
>> Google Groups "BeagleBoard" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/beagleboard/hTzOjUNwFZE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to

Harvey White

unread,
Mar 11, 2015, 9:25:19 AM3/11/15
to beagl...@googlegroups.com
On Wed, 11 Mar 2015 12:41:40 +0100, you wrote:

>Hi,
>
>Thank you for you response.
>
>I have a lot of 74xx components which may be dead. As my first project with
>the Beagle, I would like to simply test the logic behind these chips
>(monitor the logic to detect wrong values).
>
>I first planed to wire the 74LS02 like this :
>
>
>But you mentioned that an output high ranges from 0 to 5v which could
>damage Beagle GPIOs (not 5v tolerant).
>
>If someone could give me more advises please ...

If you're going to build an IC checker, then you need to think of
several things.

1) power and ground are in different places on several chip types
(7490 vs 7476). There are typically 14, 16, 18, 20, and so on logic
chips, look into ZIF sockets.

2) if you don't know the chip type, you can connect an output to a
chip's output. In that case, you'd like to have a passive (resistor)
pullup to the supply voltage, and an open collector output driving
that, and perhaps with a series resistor to limit current, since you
may be trying to pull an active output (that is high) low. Inputs
won't matter.

3) your pin driver also wants to be able to read the pin as well, so
the BBB needs the level translation back to the chip, the 8T245 would
work well there.

4) each driver needs to be individually controllable for both level
and direction. You need to be able to turn it off, set it high (10 k
pullup is ok, or set it low. In any of the above cases, you need to
be able to read the voltage at the pin. An analog multiplexer driving
an op amp running from 1.8 volts (or resistive divider in this case to
limit the a/d inputs to 1.8 volts max) would do well. That way you
can also identify a good or bad output, or just plain read the
voltages at the pins.

more than you asked for, and more complicated, but the level shifting
is something to think about.

it would be a nice project.

Harvey


>
>Thanks
>> You received this message because you are subscribed to a topic in the
>> Google Groups "BeagleBoard" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/beagleboard/hTzOjUNwFZE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to

Harvey White

unread,
Mar 11, 2015, 4:55:46 PM3/11/15
to beagl...@googlegroups.com
On Wed, 11 Mar 2015 17:21:09 +0100, you wrote:

>Hi,
>
>The circuit should look like something like this :
>

Which is OK if you want to run the input of a 5 volt TTL chip directly
from the BBB.

I'd advise against it simply because of paranoid engineering.



>
>?
>You also mentioned that I need to monitor voltages :
>
>*"An analog multiplexer driving an op amp running from 1.8 volts" *
>
>You mean that I need to use the onboard ADC ? But I have a problem, I don't
>know how to use such a system (mux + opamp). Could you explain me a little
>bit more please ?

(If this isn't BBB related (as in a project), then someone say so
please....

Ok, look at testing an IC, any IC, any pin can be the following:

1) input
2) output
3) bidirectional
4) ground
5) supply.

things not to do:

1) connect any pin on the processor to a source of voltage greater
than the processor's VCC

2) connect as output two pins (processor to chip) together (if in
opposite states, with active pullups, excessive current will flow,
letalone pulling up a pin on the processor too high.

3) try to supply the IC through a processor pin. Also trying to
ground the chip through the processor pin.

Kinds of faults you may see in the IC under test (assuming vcc and gnd
are connected elsewhere).

1) pin is open
2) pin is stuck at ground
3) pin is stuck at VCC
4) pin as output does not go to logic 1 (bad level)
5) pin as output does not go to logic 0 (bad level).

Try the following:

Running the processor to an open collector inverter allows the pin to
be grounded without harm, all that you are doing is grounding the
pullup resistor.

Using the level converter allows you to see a logic 1 or a logic 0 at
the chip pin.

However, sections 4 and 5 do not get covered.

What you'd like to do is measure the voltage at any pin with the
chip's A/D converter. The following scheme is used a lot to do just
that, with the operational amplifier protecting the far more expensive
processor.

The first thing is to realize that you want to measure more than one
pin. You could have a circuit for each pin, but that would limit you
to the 8 A/D channels.

You can use an analog multiplexer, it works like a digital multiplexer
(8 inputs selectable to 1 output), except that analog voltages go
through, rather than digital levels. Google "analog multiplexer".
This will run at the voltage levels of the IC (chip you're testing).
So for a single chip, you'd have 3 lines (binary selection) picking
which input gets selected.

This voltage appears at the output of the multiplexer. It's still (at
the worst) 5 volts or 0 volts. Too much for the processor.

You need a non-inverting opamp circuit (again, look it up) with a gain
of 1. This gives you a bit of margin. 5.0 volts at the input of the
opamp will give you 5 volts at the output. Run this through a
resistive divider with the ratio of 1.5/5.0. This gives you some
safety margin. In this case, it's ok to use a resistive divider since
you're not dealing with digital levels and it's one way only. This
goes to the A/D input. (chip is safe). Run the opamp from the 5 volt
supply going to the chip. (the opamp works as a buffer and minimizes
the load on the circuit)

Draw a block diagram, look at the voltages, then see what goes inside
each block.

You'll want one multiplexer input for each pin on the chip.

This is *if* you want to check the voltage levels on the chip. If
not, then what you've written (with an output driver I'd put in) would
be the reasonable thing to do.

Checking the voltage levels on the chip can help identify the chip,
and can also determine if you've got bad pins on the chip (that still
read 1 or 0, but not always a good 1 or 0).

More complicated than you were asking, but this is a direction the
design can go.

To simply take the design to the point where the chip can be directly
connected to the processor, use 3.3 volt capable logic. (back to the
simplest design).

Harvey

>
>Thanks

Stephan Mulacz

unread,
Mar 12, 2015, 5:28:47 AM3/12/15
to beagl...@googlegroups.com, ma...@dragonworks.info
Hello,

What I'm missing is if the 74LS02 is a fixed requirement, or if there is an option to use the 3.3V sibling. Thus shifting the problem to the xx74xx02 inputs. Because if you kill the 74LS02 with your experiments it might hurt less than if you kill the BBB.


I would NOT use current limiting resistors, I don't thing that they
solve the problem.
This has been done for decades. I don't see why  it should not work for the Sitara.
If the I/O voltage is 3.3V and we assume the clamping voltage 0.3V the overvoltage is 5V-3.6V = 1.4V. As an indication of  clamping diode capability can we take the pin current capability. Eg. 4mA (varies over pins). Than we would only need a 350Ohm series resistor. -> Take 10k and you cover all the wrong assumptions ;-).
You can take even higher resistors (eg. 100k). But you will limit your maximum frequency because somewhere you will not charge the capacity of the Sitara input buffers fast enough. High resistors values can also increase EMC susceptibility.

Further more pins USB0_VBUS and USB1_VBUS should withstand 5V. But I assume you need USB and you need 4 inputs.

Chilli


evilwulfie

unread,
Mar 12, 2015, 9:43:27 AM3/12/15
to beagl...@googlegroups.com
he said he wants to test ttl ics.

I would get a low cost TTL chip tester off of ebay. cheaper then replacing a few BBB boards

Stephan Mulacz

unread,
Mar 13, 2015, 3:08:43 PM3/13/15
to beagl...@googlegroups.com


Am Donnerstag, 12. März 2015 14:43:27 UTC+1 schrieb Wulf Man:
he said he wants to test ttl ics.

I would get a low cost TTL chip tester off of ebay. cheaper then replacing a few BBB boards
 I overlooked Hadriens intermediate post. And you are absolutely right. Not only regarding killed beagles but also regarding the time needed to set up a simplified TTL tester.
On the other hand it seems Hadrien ist just looking for a 'project' to make the first steps. I think if he connects all GPIO with 100k resitors to a bread board and the supply with a 50mA fast blow fuse he can't do too much wrong.

Chilli
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages