Led Matrix Display and switching EPROM address problem

Thread Starter

q12x

Joined Sep 25, 2015
1,410
On that red led matrix display, I am creating some letters. So far I made letter 'A' !!! Heh. I plan to make the entire alphabet. BUT.... problems.
I have this circuit and I really dont understand how to switch the addresses of the RAM to display other 'letters'.
This circuit is working as follows: I count the LINES from top to down 7 times(with 7493 IC), and I set(inside 0.bin file) the column bits per each count.
I am giving you this proteus save file to test it yourself. I also provide the 0.bin file that is loaded into the RAM chip.
(you can load this *.bin file into any Hex editor and it will decrypt it from it's encrypted form it is right now if you check it with your win notepad)

Here I provide a hirez render of the circuit:
led matrix display with logic gates v6b.jpg

Here is how I write the contents of my 0.bin file:
On the first address 00000000 is letter 'A' then a 00
On the sec address 00000008 is letter 'B' then a 00
And this is it. (notice is set to 8bits hex)
1662054086612.png

Thank you.
 

Attachments

Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,410
Hard stuff, right?
BTW, I figure out (an) answer -- a possible answer. Im not very sure if it's THE answer. But I have --a-- answer.
I really want to see what you will come with.
 

dl324

Joined Mar 30, 2015
15,098
Before I take the time to understand what you're trying to do.
  1. A 2732 is an EPROM, not a RAM.
  2. Why are you using CD4009 to drive the enables of the tri-state buffers? 74HC04 (or CD4069) would be more appropriate.
  3. Why don't you simplify the logic and drive a column at a time in the LED matrix?
  4. HC logic can't source or sink much current, so the row/column drive won't work.
  5. When you multiplex LEDs, you need to drive them at higher currents so the average brightness will be sufficient.
  6. When you correct the drive and sink circuits, you'll need current limiting resistors. If the matrix is common cathode, you should put the resistors on the anodes so all LEDs will have the same brightness regardless of how many are on.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,410
The circuit is working, here in simulator.
Of course it needs resistors to protect the leds, but I didnt include them bcause...its a simulator and I was concentrated on the bigger picture.
So how to switch the address and also switch the display shape?
Should I count something else than those 3 pins - A0,A1,A2 pins?
 

dl324

Joined Mar 30, 2015
15,098
Here is how I write the contents of my 0.bin file:
On the first address 00000000 is letter 'A' then a 00
On the sec address 00000008 is letter 'B' then a 00
So how to switch the address and also switch the display shape?
Should I count something else than those 3 pins - A0,A1,A2 pins?
I don't understand how you're storing digit data in the EPROM. You say that the first address in your bin file contains the letter A, but you only have 8 bits, 3 of which are 1's. A 5x7 matrix has 35 LEDs and it would be typical for 16 LEDs to be on in a typical font.

Since the EPROM is 8 bits wide, it would make sense for you to use the EPROM data to drive rows. That will still require you to use 5 address to store a character.
 

dl324

Joined Mar 30, 2015
15,098
This is an example of a commercial character generator (Signetics 2516) that was designed for column strobing:
1662083373271.png
To display a character, you selected the character address and strobed the 5 columns.


Signetics 2513 designed for row strobing:
1662083341955.png
To display a character, you selected the character address and strobed the 7 rows.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,410
...Since the EPROM is 8 bits wide, it would make sense for you to use the EPROM data to drive rows. That will still require you to use 5 address to store a character...
Thank you mister @dl324 for understanding perfectly what I want and giving me such a straight answer !!!
I will concentrate on exactly what you just said here. I believe I understand your explanation.
So a character is not inside 1 single address as I imagined and wished, but is spread on 5 addresses that I have to strobe them. Damn, this is hard. But I am very happy I get what I have to do. Many-many thanks mister @dl324 !!! I get it now.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,410
I am appealing again to your wisdom (if you are not going to sleep already)
I am looking like an idiot to the circuit and still have no clue how to proceed. Although I understand now that I have to somehow count each 7 lines for 1 character, I still need probably another counter to travel to the next 7 pack of addresses that contain the next character symbol in the memory. What should I add to 1-aquire the last address of the character and then 2-switch to the next pack of 7 addr ? Very complicated, especially for me that I am not that good with logic gates and analog IC's in general.
Thank you !
 

boostbuck

Joined Oct 5, 2017
239
I suggest you require a three line counter from 0 to 5 on the low order bits A0..A2 of the EPROM driven by a fast clock, as you have in your circuit. This will scan the five bytes of row data to read out the character.

The remaining bits of the EPROM address will select which character you are going to display. So EPROM lines A3...A11 will be the address of a character, fed perhaps by a second binary counter with its own clock (to step through all the characters) or more appropriately a latch which is loaded with the address of a particular character.

Three bytes of each character address will be wasted, as A0..A2 can address eight bytes but you need only 5 addresses for the rows.

A3..A11 is 2**9 = 512 different characters
 

dl324

Joined Mar 30, 2015
15,098
I am looking like an idiot to the circuit and still have no clue how to proceed. Although I understand now that I have to somehow count each 7 lines for 1 character, I still need probably another counter to travel to the next 7 pack of addresses that contain the next character symbol in the memory.
Since the EPROM output is 8 bits, you could simply drive all 7 rows at the same time. If you want to drive them one at a time for the purpose of minimizing power, you could do that, but, as you've surmised, it's more complicated.

If you'll eventually be using this to drive a "sign", it would make sense to use the ASCII codes for letters and numbers as the index into the EPROM data.

Since it will be tedious to program the EPROM table manually, I'd suggest using a text editor to define your characters and then write a program/script to read the characters and convert it to binary.

This is what I did for my scrolling LED clock (that only has a single digit):
Code:
    { { 0, 1, 1, 1, 0 },
      { 1, 0, 0, 0, 1 },
      { 1, 0, 0, 0, 0 },
      { 0, 1, 1, 1, 0 },
      { 0, 0, 0, 0, 1 },
      { 1, 0, 0, 0, 1 },
      { 0, 1, 1, 1, 0 },},      //83
This is from an include file that I used to initialize the array used to hold characters. I defined the characters in a text editor, then used a Perl script to generate the array initialization command. I don't have either the data file or the Perl script handy.

If you focus on the 1's, you can make out the letter it defines.

EDIT: So you don't get confused, we call the horizontal lines of LEDs rows and the vertical lines columns. As illustrated in the Signetics data.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,410
Thank you mister @boostbuck and @dl324 !
---
The clarification:
This particular 2732 EPROM memory chip has 12 address pins, (A0-A11) this means 2^12 = 4096 addresses available
And 1 character is requiring 7 addreses to be displayed, by rapid strobe from that 74LS93 counter.
for example letter A = 70 89 8A FB 8C 8D 8E
This means 4096/7 = 585 characters to completly full up the entire memory.
There are 26 letters in the alphabet and 10 numerals from 0 to 9.
In total 36 characters to be displayed.
36*7 = 252 addreses in total for the entire set.
where 2^8 = 256, this means 8 addr pins to be used.
---
One of my good ideas is to add a BIG counter. One that is counting to 256 (or 252) and then it is resetting back to 0 and starts again. I need it NOT to count by itself, but somehow stop from 7 to 7. And when I press a button, it will enable to get to the next 7 pack and stop there as well. In this time, it will get to 0 and count to 7, whatever the address sector it is. For example, if it is at addr 21 it will count up to 28 and then reset to 21 again (by itself), count up to 28 and reset again to 21, and so on,repeatedly and very fast, so it will strobe the character at that particular sector, until I press the button again and it will jump to the next 7 address pack ranging from 28 to 35, strobe the leds here as well, waiting the next push button. All these details, I didnt figure out, I only imagine them.
Mister @boostbuck is on the right horse with:
... fed perhaps by a second binary counter with its own clock (to step through all the characters) or more appropriately a latch which is loaded with the address of a particular character...
The key question is how do I count 7 by 7 ? (in my case) Like @boostbuck said, a secondary 7493 counter also clocked. Hmmm. Very interesting !
This is reminding me the iteration you have to make in a 2 level array in programming , for example arrayBig[a[1],a[2],a[3]...a[36]]. The easiest example I could think of, haha.
Mister @dl324 , I didnt arrive at the characters yet. Im still stuck in this stepping through the addresses problem. Dont jump the horse too quick. Haha.
 
Last edited:

dl324

Joined Mar 30, 2015
15,098
And 1 character is requiring 7 addreses to be displayed
The LED matrix you're using has 7 rows and 5 columns. Since the EPROM has 8 data bits, it would be more economical of memory to use 7 data lines to drive the rows and that would require 5 addresses for column data.
This means 4096/7 = 585 characters to completly full up the entire memory.
There are going to be some bits that can't be used, so you can't fill up the entire EPROM. Each character could require up to 35 bits, but you have to allocate 64 bits.

When I implemented my scrolling LED display, I found that I needed to turn off a column of LEDs before switching to the next to avoid issues with ghosting.

I didnt arrive at the characters yet. Im still stuck in this stepping through the addresses problem.
Do you want to work this out yourself? Or do you want someone to give you a circuit?
 

Thread Starter

q12x

Joined Sep 25, 2015
1,410
Oooh, thank you mister @dl324 ! Great answers!
Do you want to work this out yourself? Or do you want someone to give you a circuit?
Im 50-50. I also need help and also I want to make it myself. Some good chunks of the circuit I already thought by myself as you observed already , that I am a bit off from the standards. But I did it!!!! you know that feeling, right? Haha. Again, some parts. Other harder parts I get from various sources. From my english UK friend and from you my very trusty american friends(multiple).
I was seeing black for a couple of nights, thinking hard how to make it. It was crazy hard. And I couldnt resolve it so I switch to my professional friends here. Hehe. So...not yet the circuit, but when Im finished, I will want the standard circuit to actually build it with the real components. So prepare it and have it on hand when I will ask for it.
Some context:
- I am receiving from my UK friend an atmel (my first one!) AT28C16 memory IC. It is on the road. I also expect to arrive, actually sooner, some new memory chips Im guiding myself from a tutorial on youtube, I thought it is most interesting to do it - the 23LC1024 memory chip.

When I implemented my scrolling LED display, I found that I needed to turn off a column of LEDs before switching to the next to avoid issues with ghosting.
I can see it now and I understand it. Very cool that you mention it !!!

The LED matrix you're using has 7 rows and 5 columns. Since the EPROM has 8 data bits, it would be more economical of memory to use 7 data lines to drive the rows and that would require 5 addresses for column data.
I know, I know but I did it like this already and as I mentioned, this was partially thought by myself. Some parts. Thats why is looking in a strange configuration. I will do it the correct way when I will build it from real components.

There are going to be some bits that can't be used, so you can't fill up the entire EPROM. Each character could require up to 35 bits, but you have to allocate 64 bits.
I dont need to fill up the entire memory. I only need the sequence to be right.
Which I already did a part of it with the help of my other friend from UK.

Here is the address counter and the matrix character display counter, so 2x 7493counters "cascaded". Named A and B.
I still have problems with the number of address pins !
Now I need 8 address pins to cover, for all 36 characters.
I will need another demultiplexer I guess..... right? Between counter B and 2732 memory ?
1662139889187.png
 

dl324

Joined Mar 30, 2015
15,098
I will do it the correct way when I will build it from real components.
There isn't any way that would be considered the only way. What matters is if it works.

Have you decided if you're going to strobe column or rows? That will make a big difference in how you arrange the data in the character generator.

Are you planning to use the EEPROM as a character generator? Or to hold whatever message you want to display?

Since you only show one character in your circuit, do you plan to flash the characters? Or scroll them?

When I wired a 5x7 matrix from discrete LEDs, I regretted not doing at least 2 characters as soon as I finished. For my first implementation, I flashed the characters with a pause between each. That wasn't very satisfying, so I switch to scrolling. Initially, I scrolled horizontally until I noticed the odometer display in one of our cars scrolling up. Then I implemented an option to scroll up.

For scrolling horizontally, I introduce a blank column between characters. Since you'll have spare columns in your memory array, you could include the blank column (which would make the characters 6x8).
 

Thread Starter

q12x

Joined Sep 25, 2015
1,410
do you plan to flash the characters? Or scroll them?
Very hard question ! And very nice idea. I would like that but at the moment I will be very happy just to make it work, in the simpler way possible. I want to understand the logic, which is more complicated than expected. Holymacaroni.
Are you planning to use the EEPROM as a character generator? Or to hold whatever message you want to display?
I will load the memory chip here on my PC with a bin file that will hold all the characters, but in reality... really is my first time, I have no idea...most probably I will have to wire all the characters to be able to program ...both memories. We'll see when we are getting there. Right now, I will edit and load the bin file.
Have you decided if you're going to strobe column or rows? That will make a big difference in how you arrange the data in the character generator.
I already decided and made it as 7 line strobe. But... if is too inconvenient, I will switch to 5 columns strobe as I get many hints about it. I have no idea how to make this big change since I barely made this version I have now. Give me the circuit then for the 5 columns and I will remake it.
For scrolling horizontally, I introduce a blank column between characters.
Very good idea ! I like it.
 
Top