Electronics > Projects, Designs, and Technical Stuff
16 bit to 4 digit 7 segment decoder
<< < (3/16) > >>
obiwanjacobi:

--- Quote from: Peabody on December 19, 2019, 04:32:41 pm ---So you're going to display the bus states in hex, and they will change state slowly enough that you can make sense of the display in real time?  You must have a very slow clock.

There are BCD to 7-segment decoders, but I don't know of one that does binary to 7-segment.  And even if you find one, you still have the multiplexing issue to deal with.

In the Arduino world, I think you would need something like a Mega to get that many I/O pins. But perhaps you could use shift registers to reduce the pin count.

This looks to be a pretty challenging project unless you use some kind of programmable logic for it.  I wonder if it might make more sense to use two 8-bit buffers to directly drive 16 LEDs divided into groups of 4, one group for each nibble.

--- End quote ---

Yes it will be a slow clock - its for debugging only. I also want an extra latch pin on there so I can use it to capture values based on specific conditions (which I can program into a GAL if needed).

The registers with leds are useful, sure. But for address- and data buses I think in hex values. I will make that a module as well with the same pinout so I can swap them out if needed. I have led-bars and a couple of hundred 3mm leds in several colors. That is not the problem.  ;D
obiwanjacobi:

--- Quote from: SiliconWizard on December 19, 2019, 05:02:16 pm ---This would be a simple job for a CPLD/small FPGA, or even for an MCU.

If you want a ready-made integrated solution, you can consider the very famous TIL311 displays, hard to find these days, awfully expensive.
You also have the MC14495 which can still be found in some shops - awfully expensive as well.

If you have access to EEPROMs/Flash chips and would prefer to use them instead of CPLDs or FPGAs, you can always write the conversion tables inside. For instance, you could use one per 8 bit of data (thus controlling 2 hex digits): this would only require a 512x8 memory (the address would be your 8 bits of data, plus a digit index bit, the data would be driving your segments, and it would be a multiplexing display.) Will require an extra multiplexing clock signal. Doing the same with only one chip for 16 bits would require 18 bits of address - thus a 256Kx8 memory, and a small counter (for the 4 digits, whereas for only 2 digits, all you need is a clock). Still doable though, as 256Kx8 flash chips can be had for relatively cheap these days, and a 2-bit counter would be dead easy to implement with one simple logic IC.

--- End quote ---

Yes, CPLD and MCU seem the most feasible options at this time.

TIL311's are too expensive indeed - I have a few but they're in use. I really wanted to used these NSB3881 displays I had laying around as a cheap alternative.

I know about using an EPROM to do a lookup table but with all the support logic to multiplex 4 digits (and perhaps an internal clock / NE555) it gets pretty big. I was looking for a way to shrink that down.
obiwanjacobi:

--- Quote from: GeorgeOfTheJungle on December 19, 2019, 04:53:08 pm ---
--- Quote from: obiwanjacobi on December 19, 2019, 08:27:08 am ---My other thought was to use a cheap micro (preferably Atmel/AVR - don't know PIC and don't have the programmer for it) to read the bus signals and output the 7seg data for each digit. It would need 16 (bus data) + 8 (a-g/dp) + 4 (digit common cathodes) = 28 IO pins. (would like a reset and an optional latch too => 30 IO pins).

--- End quote ---

Use a MCP23017 to read the bus?

--- End quote ---

(had to look up the part - so I may not understand how it operates...)
As a shift register and read it with a (small) MCU to do the I2C and drive the 7seg leds?

Yes, could work. 2 chips would not be ideal but it does bring down the width of the module...
The small MCU could be an ATtiny with at least 8+4 outputs (in addition to the I2C interface)....
GeorgeOfTheJungle:

--- Quote from: obiwanjacobi on December 19, 2019, 05:17:31 pm ---(had to look up the part - so I may not understand how it operates...)
As a shift register and read it with a (small) MCU to do the I2C and drive the 7seg leds?

Yes, could work. 2 chips would not be ideal but it does bring down the width of the module...
The small MCU could be an ATtiny with at least 8+4 outputs (in addition to the I2C interface)....

--- End quote ---

Exactly, that's the idea.  :-+
David Hess:
Requiring 16 bits of binary input on the microcontroller really hurts the pin count.  What I would at least consider is using a pair of external 8 bit parallel-in serial-out shift registers so the 16 bits of binary data can be latched and then read in serially which will only require 3 pins instead of 16 pins.  The 74165, in whatever logic family you need, is commonly used for this function.

This also allows the input latches to be remotely located and the word width is easily expandable.  One strobe simultaneously latches every input even with multiple 8 bit latches so discontinuity is less of a problem.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod