Discuss What is the best signal interface for PC ? in the UK Electrical Forum area at ElectriciansForums.net

Exceptionally (for me) is to make it how you make it, only from logic chips like you are making it right now. And is terrible challenging for me to do it like you. But it is remained in my mind to do it like that as well. Not sure when exactly....
 
I will respond more completely when I have the time and energy and done some research on the 23017 and 23S17 ics.

For now, the period of a repetitive waveform is the inverse of its frequency. So a 100kHz waveform has a period of

1/100000 = 0.00001s or 10 microseconds. A micro second is 0.000001s - one millionth of a second.
 
- If it helps, for mister @marconi, here is the datasheet for my MCP23017 that I have.
On the very first page you have a summary of what it can do.
Very good math explanation. I like it. I dont do it every day so I tend to forget things. Shame of me. Im mixing colors more often than mixing numbers, haha. Get it? because im a poor artist.
- I start to contemplate the idea of using some faster IC's, like 74HC165 shift registers that @timhoward mentioned already, and most probably more hard to wire in hardware and also much harder to code. Just to have a secondary board. But not 100 I/O pads, just a few, maybe 20 or something. I also remember Teensy board had 40 IO's already and the best one with 58 IO's , which is VERY appealing and also using I2C protocol. Mister @timhoward can confirm it, if is still around.
- Is so disappointing that my Arduino Uno can Not go down under 1ms !!! Ahhhh what a stick in the hearth.
- Also yesterday I received my Arduino Nano board, the replacement for Arduino Uno, and the upgrade for this MCP board I built. I will show some pictures and movie later after I mount everything.
 
To mister @timhoward if you are still around, can you do a test for me? check your maximum fv that you can get from 1 of your I/O from your Teensy board? And dont read it from its datasheet, but do it in reality and tell me if it stops to 1ms like my arduino uno does, or is actually capable to go down to μs(microseconds) ? Thank you !
 
q12 Good morning. To aid help me understand your programming could you slow the scan rate so far that I can see how you select an LED for illumination and post a short video. You can see from my video that I scan the LEDs column by column. In the video I have set the data word for each row as (1111111) so that all 7 LEDs in a column are lit when each of the 5 columns is selected. The data word for the columns follows the sequence (10000), (01000), (00100), (00010), (00001), (10000)......
Thus a sequence of 5 pairs of row and column data words, 10 data words in total, allows me to display any arrangement of LEDs on the display. I want to see what you do.
 
Last edited:
Good morning , where are my manners, right? Hehe.
Remember, this what I do is software programming, but you do it much harder, in hardware !!! Keep this in mind all the time.
Hmmm.... hehe, here is a quick and dirty way of obtaining 1 single led on the matrix, following my already made example.
Just put 5V on pin 3 (with gray) - also dont forget to put resistors !!!! because you will burn the led !!!
and put 0V/ground on pin 11(with gray). Ive also marked with 3red arrows the positions where to put the voltages on which pins.
I will make a more comprehensive explanation for you, but it will take some time, also to make most probably a new drawing, and then the movie and edit it and upload it to yourtube. So until then, at least do this very quick and dirty example here and you will get a procentage of an idea.
1660896916127.png
 
So do you select in software one LED at a time by setting one of the line bits and one of the column bits? And then send this data to the MCP23017? Thus to illuminate say all 35 LEDs you have to sequence through 35 pairs of line and column bits (Column, Line). Each data transfer to the MCP23017 has a cycle time Tc - I have yet to find out what this time is. Thus to refresh completely the 35 LEDs will take a time of 35 x Tc - this is the time necessary to send 35 pairs of (Line, Column) messages. This is a slow way to control the 7 x5 display. You could use the 16 bits data outputs in the format ( C1, C2, C3, C4, C5, X, X, X, L1, L2, L3, L4, L5, L6, L7, X) to illuminate a combination of 7 LEDs in one column using one data transfer, and thus the whole display in 5 data transfers - a considerable reduction in data transfer time from 35 Tc to 5 Tc. (The X means not used).

To do this you would have to add some simple hardware to the 7 x 5 display - some transistors and resistors to interpret the 16 bit data word into switches to control the application of 5V and 0V to the LED array. The scanning has to be done column by column to take advantage of the common cathode arrangement inside the array.
 
So do you select in software one LED at a time by setting one of the line bits and one of the column bits? And then send this data to the MCP23017? Thus to illuminate say all 35 LEDs you have to sequence through 35 pairs of line and column bits (Column, Line). Each data transfer to the MCP23017 has a cycle time Tc - I have yet to find out what this time is. Thus to refresh completely the 35 LEDs will take a time of 35 x Tc - this is the time necessary to send 35 pairs of (Line, Column) messages. This is a slow way to control the 7 x5 display. You could use the 16 bits data outputs in the format ( C1, C2, C3, C4, C5, X, X, X, L1, L2, L3, L4, L5, L6, L7, X) to illuminate a combination of 7 LEDs in one column using one data transfer, and thus the whole display in 5 data transfers - a considerable reduction in data transfer time from 35 Tc to 5 Tc. (The X means not used).

To do this you would have to add some simple hardware to the 7 x 5 display - some transistors and resistors to interpret the 16 bit data word into switches to control the application of 5V and 0V to the LED array. The scanning has to be done column by column to take advantage of the common cathode arrangement inside the array.

Multiplexing in that way is definitely the best way to do it I would say.
 
So do you select in software one LED at a time by setting one of the line bits and one of the column bits? And then send this data to the MCP23017?
Exactly.
Here is the actual program for 'letter A' that I made and presented in the movie.
You may not understand everything but read the entire program anyway and you will get something out of it. I've also put notes what is line and what is column.
(it was imperative to switch to Input everything after each step, with my custom Reset(); method, otherwise it was liting up the entire next line or column)
Remember a line is HIGH because is +5V and a column is LOW because is 0V. So we lit a single line putting +5V on line01(for ex) and 0v on each desired column.
Code:
#include "Arduino.h"                    //core library that contains all of the Arduino’s built-in functions (from 2022)
#include <Adafruit_MCP23X17.h>          //this is Adafruit-MCP23017-Arduino-Library version 2.1.0
 
Adafruit_MCP23X17 mcp1; //Instantiate mcp1 object
 
void setup()
{
  Serial.begin(19200);
  mcp1.begin_I2C(0x20);
  for(int i = 0; i <= 15; i++)
  {
    mcp1.pinMode(i, INPUT);
  }
  for(int i = 0; i <=15; i++)
  {
    mcp1.digitalWrite(i, LOW);
  }


//LED MATRIX DISPLAY - Single LED - one by one
/*  LOGIC:
//Columns----------------------------------------
//  mcp1.digitalWrite(1, LOW); //A1=1=column A
//  mcp1.digitalWrite(10, LOW);//B1=10=column B

//  mcp1.digitalWrite(3, LOW); //A3=3=column C middle
//  mcp1.digitalWrite(11, LOW);//B2=11=column C middle

//  mcp1.digitalWrite(4, LOW); //A4=4=column D
//  mcp1.digitalWrite(13, LOW);//B6=13=column E

//Lines----------------------------------------
//  mcp1.digitalWrite(5, HIGH);//Line1
//  mcp1.digitalWrite(0, HIGH);//Line2
//  mcp1.digitalWrite(6, HIGH);//Line3

//  mcp1.digitalWrite(2, HIGH);//Line4
//  mcp1.digitalWrite(12, HIGH);//Line4

// mcp1.digitalWrite(8, HIGH);//Line5
//  mcp1.digitalWrite(14, HIGH);//Line6
//  mcp1.digitalWrite(9, HIGH);//Line7
*/

}

void Reset()
{
 for(int i = 0; i <=15; i++)
 {
   mcp1.pinMode(i, INPUT);
   mcp1.digitalWrite(i, LOW);
 }
}


int dly = 1;
void chr_A()
{
  //line1
 mcp1.pinMode(5, OUTPUT);   //line
 mcp1.digitalWrite(5, HIGH);
 mcp1.pinMode(10, OUTPUT);   //column
 mcp1.digitalWrite(10, LOW);
 mcp1.pinMode(3, OUTPUT);   //column
 mcp1.digitalWrite(3, LOW);
 mcp1.pinMode(4, OUTPUT);   //column
 mcp1.digitalWrite(4, LOW);
 delay(dly);
 Reset();
 
  //line2
 mcp1.pinMode(0, OUTPUT);   //line
 mcp1.digitalWrite(0, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line3
 mcp1.pinMode(6, OUTPUT);   //line
 mcp1.digitalWrite(6, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line4-midle
 mcp1.pinMode(2, OUTPUT);   //line
 mcp1.digitalWrite(2, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(10, OUTPUT);   //column
 mcp1.digitalWrite(10, LOW);
 mcp1.pinMode(3, OUTPUT);   //column
 mcp1.digitalWrite(3, LOW);
 mcp1.pinMode(4, OUTPUT);   //column
 mcp1.digitalWrite(4, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line5
 mcp1.pinMode(8, OUTPUT);   //line
 mcp1.digitalWrite(8, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line6
 mcp1.pinMode(14, OUTPUT);   //line
 mcp1.digitalWrite(14, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line7
 mcp1.pinMode(9, OUTPUT);   //line
 mcp1.digitalWrite(9, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();
 
}



void loop()
{
 chr_A();
}
 
Last edited:
Not read yet what you posted recently but this is the transistor and resistor hardware to interpret the 16 bit data word I mentioned earlier. The pnp transistor is a BC557B.
 

Attachments

  • B8549068-84EC-42EA-9092-338B1EF8AD20.jpeg
    290.7 KB · Views: 15
You can use NPN as well. Depends what you have more.
Also dont forget each resistor to each matrix board pin !!! You should include resistors for each pin, in your circuit. 1k is good enough.
Also very important, make your circuit as logical and simple to follow as possible, as much intuitive you can make it. You really have to put your neurons to work for this part. I know for sure. It will pay up for you in the near future and for others that are reading your circuit.
 
This led matrix pin number assignment is pretty much like a code.
All that I did was to 'decode' it into a human easy to understand and intuitive way of dialing.
If you remember in WW2 - the german made 'Enigma Machine' ? Pretty cool device. This was pretty similar to that. In my mind at least.
You basically have to link 7 positive (+5V) pins that will represent your lines and 5 negative (0V) pins that will represent your columns. All passing through transistors (whatever they are, doesn't matter) to be able to command each pin separately from your future hardware code.
You know what is interesting and relatively fast? to put buttons and press them all at once to get ...well, only 1 line at a time. pretty much like I did in my code at very low fv. Or simple mechanical switches !!! So --12-- in total.
 
You have it. The column Cn and line Ln (my row Rn) bits in the 16 bit data word at the output of the MCP2017 select the column and line transistor switches as on or off. This is done column by column as you see in my earlier video with all Ln set to logic O so all 7 LEDs in a column light up as a test.
 
q12x good afternoon to Romania. I have attached a short video of the eeprom programmer I made today which demonstrates the first five memory locations loaded with different test patterns for the 8 bit Line (my Row) data words - only 7 bits actually used. The top set of dip switches sets the data word to be stored and the lower set selects the address to store the data word. The small black button generates a pulse to tell the eeprom to store the data as detailed on the dip switches. I will build next some sequential logic counters to address the eeprom to retrieve a particular group of 5 L/R data words to drive the 7 x 5 LED display and produce the image I want. In my case the 16 letters a through to n for the earlier Gray Code project so there will be 16 groups of L/R data words.

The test patterns would display the third attachment - note drawn for 8 lines/rows.
 

Attachments

  • IMG_0820.mp4
    16 MB
  • C3A3CE21-99C3-404C-BB95-CD6DB3195678.jpeg
    429.7 KB · Views: 14
  • 9C2BDDC4-DB66-4C14-B81E-F0F994BF0955.jpeg
    181.8 KB · Views: 14
Last edited:
Hi there,

Looks like you're using a single ATMEGA328 for each 16 LEDs? This is completely unnecessary. If the only requirement is to drive multiple LEDs in a sequence, then you could do this using a shift register, like in this example:


You can get multiple shift registers, or shift registers with more parallel output pins to drive the number of LEDs which you need.

I believe you can even chain them to get more output.

This will be a) cheaper and b) more energy efficient than powering multiple 328p's.
 
I reinstalled back my arduino Uno and everything is working as before.
But in my latest program that I made, I can obtain a diagonal line on a Led Dot Matrix as a test program, but its refresh rate can not be lower than 1ms as arduino is restricting. MCP chip is minimum 100kHz (actually has higher values specified) which means 10μs per cycle.
- Do anyone know how to lower arduino fv to μs instead of ms ?
In the movie here I present using it's internal fuction
delay(dly);
which is a ms function, I read about it and I get that. I tried also its other function as well, named
delayMicroseconds(dly);
and the result is exactly as the delay(dly); in ms and not under 1ms, to it's promoted μs.
This is a 2min video where I explain the entire problem, please watch it.
Thank you.
 
5x7 DOT Matrix - https://fontstruct.com/fontstructions/show/847768/5x7_dot_matrix

Today, I programmed the eeprom with the 7 x 5 fonts for the capital letters A to P. Now I will look at your latest video.

My initial reaction to the word 'delay' is that you may be using the wrong command. A delay is just that - it does something later than demanded. This may be your problem because the delay is slowing things down such as data transfers.. eg: The data transfers occur every 10 microseconds (say) and then you delay each transfer by 10milli seconds. The delay will dominate. But as I say I am not at all versed in the arduino you are using.

For most people a refresh rate of 50 to 100Hz fools the eye and brain to see a flicker free image as in a conventional TV picture - but modern TV's may do something different these days.

You could average over time the output in software to remove the flicker to make the output virtually constant until there is a change in output. Write a new sub-routine which takes your current sub-routines output as its input and produces an output which is flicker-free.
 
Last edited:
For most people a refresh rate of 50 to 100Hz fools the eye and brain to see a flicker free image as in a conventional TV picture - but modern TV's may do something different these days.
100Hz not 100kHz! - VERY Interesting that you mention this! This is helpful. So my 1ms delay in code might not be a real 1ms at all. The speed in reality is probably somewhere at 20Hz now that I think about it. Hmmmm... very intriguing. They definitely have some issues on their I2C pins on that arduino board.
I just google a bit and I find and confirm with: "most humans can't easily distinguish individual frames at 30 hz."
The visible fast flickering is under 30Hz !
So the SCL pin from arduino is simply under 30Hz and not even close to 1ms which is 1000Hz. Hmmm, very interesting.
 
Last edited:
Exactly.
Here is the actual program for 'letter A' that I made and presented in the movie.
You may not understand everything but read the entire program anyway and you will get something out of it. I've also put notes what is line and what is column.
(it was imperative to switch to Input everything after each step, with my custom Reset(); method, otherwise it was liting up the entire next line or column)
Remember a line is HIGH because is +5V and a column is LOW because is 0V. So we lit a single line putting +5V on line01(for ex) and 0v on each desired column.
Code:
#include "Arduino.h"                    //core library that contains all of the Arduino’s built-in functions (from 2022)
#include <Adafruit_MCP23X17.h>          //this is Adafruit-MCP23017-Arduino-Library version 2.1.0
 
Adafruit_MCP23X17 mcp1; //Instantiate mcp1 object
 
void setup()
{
  Serial.begin(19200);
  mcp1.begin_I2C(0x20);
  for(int i = 0; i <= 15; i++)
  {
    mcp1.pinMode(i, INPUT);
  }
  for(int i = 0; i <=15; i++)
  {
    mcp1.digitalWrite(i, LOW);
  }


//LED MATRIX DISPLAY - Single LED - one by one
/*  LOGIC:
//Columns----------------------------------------
//  mcp1.digitalWrite(1, LOW); //A1=1=column A
//  mcp1.digitalWrite(10, LOW);//B1=10=column B

//  mcp1.digitalWrite(3, LOW); //A3=3=column C middle
//  mcp1.digitalWrite(11, LOW);//B2=11=column C middle

//  mcp1.digitalWrite(4, LOW); //A4=4=column D
//  mcp1.digitalWrite(13, LOW);//B6=13=column E

//Lines----------------------------------------
//  mcp1.digitalWrite(5, HIGH);//Line1
//  mcp1.digitalWrite(0, HIGH);//Line2
//  mcp1.digitalWrite(6, HIGH);//Line3

//  mcp1.digitalWrite(2, HIGH);//Line4
//  mcp1.digitalWrite(12, HIGH);//Line4

// mcp1.digitalWrite(8, HIGH);//Line5
//  mcp1.digitalWrite(14, HIGH);//Line6
//  mcp1.digitalWrite(9, HIGH);//Line7
*/

}

void Reset()
{
 for(int i = 0; i <=15; i++)
 {
   mcp1.pinMode(i, INPUT);
   mcp1.digitalWrite(i, LOW);
 }
}


int dly = 1;
void chr_A()
{
  //line1
 mcp1.pinMode(5, OUTPUT);   //line
 mcp1.digitalWrite(5, HIGH);
 mcp1.pinMode(10, OUTPUT);   //column
 mcp1.digitalWrite(10, LOW);
 mcp1.pinMode(3, OUTPUT);   //column
 mcp1.digitalWrite(3, LOW);
 mcp1.pinMode(4, OUTPUT);   //column
 mcp1.digitalWrite(4, LOW);
 delay(dly);
 Reset();
 
  //line2
 mcp1.pinMode(0, OUTPUT);   //line
 mcp1.digitalWrite(0, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line3
 mcp1.pinMode(6, OUTPUT);   //line
 mcp1.digitalWrite(6, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line4-midle
 mcp1.pinMode(2, OUTPUT);   //line
 mcp1.digitalWrite(2, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(10, OUTPUT);   //column
 mcp1.digitalWrite(10, LOW);
 mcp1.pinMode(3, OUTPUT);   //column
 mcp1.digitalWrite(3, LOW);
 mcp1.pinMode(4, OUTPUT);   //column
 mcp1.digitalWrite(4, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line5
 mcp1.pinMode(8, OUTPUT);   //line
 mcp1.digitalWrite(8, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line6
 mcp1.pinMode(14, OUTPUT);   //line
 mcp1.digitalWrite(14, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();

  //line7
 mcp1.pinMode(9, OUTPUT);   //line
 mcp1.digitalWrite(9, HIGH);
 mcp1.pinMode(1, OUTPUT);   //column
 mcp1.digitalWrite(1, LOW);
 mcp1.pinMode(13, OUTPUT);   //column
 mcp1.digitalWrite(13, LOW);
 delay(dly);
 Reset();
 
}



void loop()
{
 chr_A();
}
I counted 7 one millisecond delays, one after the other in this sub-routine. I suppose for now that from the start to end of this sub-routine takes of the order 7mS. I cannot quickly work out if 7mS is to generate a single column of 7 LEDs, a single line of 5 LEDs or all 35 LEDs. Please check my analysis because I am pretty sure I have not completely understood your code. You understand how you have written the code so ought to be able to arrive at figure of about 30Hz or lower which you mentioned earlier.

If 7mS is for all 35 LEDs then the refresh rate is 1/0.007 = 140Hz.
If 7mS is for a column of 7 LEDs, and there are 5 columns the refresh rate is 140/5 = 28Hz.
If 7mS is for a line of 5 LEDs and their are 7 lines the refresh rate is 140/7 = 20Hz

Why do have delay command at all in this sub routine?
 
Last edited:
My progress so far. The eeprom addressed by sequential logic to find the five 7 bit data words to form the font for N. Refresh rate is about 200Hz ie A complete N two hundred times every second. Clock is 1kHz and 1000/5 = 200Hz where 5 is number of columns. And letter B too. 😀
 

Attachments

  • A3583F2E-C0FB-4A9A-BD08-0A5449771EC4.jpeg
    566.9 KB · Views: 12
  • D665625C-DA1F-480C-A5C3-A5E7357386BD.jpeg
    523.5 KB · Views: 10
Last edited:
Congratulations mister @marconi
Now put a movie with it and your comments !
I managed to optimize my code and now is less flicker that original. Its still a vibration but really almost not visible at all. I also installed a second mcp23017 library and all last night and until now today, I stay on it, but it has some very-very weird logic inside that I could only partially descypher. So no complete descypher at the moment of this second library that is promising greater potential, since is more close to a PIC program and also closer to our simplified schematic diagram. I literally hammer it last night, im very tired from it. But I learned some interesting stuff doing it, very technical and very in the programming domain. Just putting on the table what I did.
 
Good morning mister @marconi ,
Here is something interesting... Im not sure how much may have been influenced my program testing so far, I will have to make a more extensive research on this particular detail, but in time. For the momment, with the programs I run already, I didnt really observed much of a difference to be honest. But it crossed my mind that this little bugger might be important in some special cases, special programs. Time will tell.
So here it is - full view:
20220823_010134.jpg

The blue lines represent the Ground or 0V. I marked with a square the 0V marking next to the metalic pad from which the wire is going beneath the cardboard to that long track on which, each negative pin for all the LEDs are connected. So what I have there is a pull down connection through each 12k resistor put in series to each LED to ground.
Screenshot_1.jpg

This problem I realize it yesterday, when I was programming and was meditating to the fact those pins from the IC are not really floating or inAir. I then realized they are actually pulled to ground through each led. And today, I mounted that little switch only between this rail for all the leds and 0V. I tested a couple of normal programs but no visible difference. Ill have to test some in depth programs that I have 'somewhere' that really needs some floating pins. I really hope it will be a difference this time. If not, then, daaaaeeem.
 
q12x. You asked for a video. The letters A to O represent the 16 states of the 4 bit Gray code. The 4 white leds top right are the 4 bit Gray Code. The two 7 segments are numbered representation for the first 12 states of the Gray Code - last 4 states are not decoded because I ran out of space on my home made ROM on the brown veroboard. The eeprom is on the bottom right board on the far right. Enjoy 😊
 

Attachments

  • FullSizeRender 26.mp4
    25.7 MB
May I suggest a way ahead? It is a seven step approach.

1. Design a way to repetitively scan the 7 x 5 column by column. I showed this in my first video.

2. Now introduce a way to display one pattern of column data say 1010101 which scrolls from left to write on the 7 x 5.

3. Now form a 7 x 5 data table in software.

4. Now write a sub routine to read the data table column by column . Load the data into a 7 bit register.

5. Now add some code to indicate the column number and write this into a register.

6. In hardware make a circuit as I showed you earlier which takes as its input the data in the column and column number at paras 4 and 5.

7. Now load table with chequerboard pattern of bits and check 7 x 5 displays it correctly.

You now have way of displaying anything you write into data table. And this table can change over time if you wish.
 
Good morning mister @marconi ,
Here is something interesting... Im not sure how much may have been influenced my program testing so far, I will have to make a more extensive research on this particular detail, but in time. For the momment, with the programs I run already, I didnt really observed much of a difference to be honest. But it crossed my mind that this little bugger might be important in some special cases, special programs. Time will tell.
So here it is - full view:
View attachment 100791
The blue lines represent the Ground or 0V. I marked with a square the 0V marking next to the metalic pad from which the wire is going beneath the cardboard to that long track on which, each negative pin for all the LEDs are connected. So what I have there is a pull down connection through each 12k resistor put in series to each LED to ground.
View attachment 100792
This problem I realize it yesterday, when I was programming and was meditating to the fact those pins from the IC are not really floating or inAir. I then realized they are actually pulled to ground through each led. And today, I mounted that little switch only between this rail for all the leds and 0V. I tested a couple of normal programs but no visible difference. Ill have to test some in depth programs that I have 'somewhere' that really needs some floating pins. I really hope it will be a difference this time. If not, then, daaaaeeem.
I do not immediately see the connection between the potential of the outputs and its impact on your time problem.
 
I do not immediately see the connection between the potential of the outputs and its impact on your time problem.
First off all, congratulation on the movie and showing the full working project. Very fascinating !!!
I still have to try it your way someday, in the future.
-to your question now: - Well, when a pin of the IC is floating , it is not 0V nor 5V. Right? But by having all those leds and resistors to 0V, I efectively put to 0V every IO pin of the chip. THus, not leaving anything really floating. This is important in code, when I am switching from Outputs to Inputs. By switching to Inputs is the programming way of 'floating' the Output. By inversing it. Its a trick learned when I was programming PIC's MCU's. But... having all these pins to 0V ---anyway--- , it doesnt matter if I was switching to Input or to Output in code, because the state was 0V anyway. So the speed was not affected but the entire logic of the code was affected, which is more important and more drastic. I hope is more clear now what I did there.
 
First off all, congratulation on the movie and showing the full working project. Very fascinating !!!
I still have to try it your way someday, in the future.
-to your question now: - Well, when a pin of the IC is floating , it is not 0V nor 5V. Right? But by having all those leds and resistors to 0V, I efectively put to 0V every IO pin of the chip. THus, not leaving anything really floating. This is important in code, when I am switching from Outputs to Inputs. By switching to Inputs is the programming way of 'floating' the Output. By inversing it. Its a trick learned when I was programming PIC's MCU's. But... having all these pins to 0V ---anyway--- , it doesnt matter if I was switching to Input or to Output in code, because the state was 0V anyway. So the speed was not affected but the entire logic of the code was affected, which is more important and more drastic. I hope is more clear now what I did there.
Thank you. I see what you mean. The same applies to the eeprom I used but in its case it did not do anything with the data at its input/output pins until they were selected as such and there was a 'read' signal pulse. I suppose the same applies to the MCP23017. I have not had the time nor inclination to fully understand how the 23017 operates and is used to offer any immediate advice. I remain sceptical though.
 
Last edited:
I have not had the time nor inclination to fully understand how the 23017 operates
Dont worry about that. That is my concern.
Some good news. I went to arduino forums and put this entire project we discussed here in their hands to help me make the speed of the led matrix to be faster from the code perspective ofcourse. And the good news is, that I really made it faster than in the very beginning. Its not as fast as yours, it is still flickering but the fv is visible much higher than before. I have tested 2 libraries for coding this MCP through arduino IDE and this eat me some time to concentrate, evaluate, mostly guess and test hundreds of permutations. But it worked, now is considerably faster, because some special functions I learned to use.
I am asking you to make me a circuit drawing of what you just made there. But make it clear enough for me, not a scribbled wire of lines. Make it look good. Like made for me. Thank you. Because I want to try your way as well.
- Oh, and I just changed all the 1.1k resistors with 300R resistors now. Is not full brightness of the led but is a bit more visible than with 1.1k which in daylight was almost invisible, and only in shadow was starting to show its led light. Speaking from the speed of the last program I made last. The leds are dimming as long as the fv/speed is increasing. Especially much more lower visibility on a single full line or full column..
 
Last edited:
deleted post..........................................................................................................................................................etc
 
One of the reasons I like working with you is that you are motivated by and enjoy learning from you own experience and trials. And I think you should by now realise that these days my practical work records ‘work in progress’ accompanied by scraps of paper with electrical art on it. I will not therefore and alas and to your disappointment perhaps be producing blueprints to your exquisite standard to follow. We plough our own furrows. At 61 I simply cannot be bothered with the formality after a lifetime of it.
 
Last edited:
At least enumerate all the IC's you used and for what purpose if possible and I will do the circuit myself if I will be able to. At least I will give it a try using Proteus simulator.
 
Make a 555 clock running at 1Hz
Connect this clock to a 4 bit counter such as a 7493. The 7493 is ideal because as you know it has integral reset logic.
Wire the 7493 to its reset pins so that it counts in binary 0000 to 0100 - these are the five states to control the scanning of the columns.
Connect the Q outputs of the 7493 to a 74138 to turn the binary sequence into a one-of-five word sequence ie 00001, 00010, 00100.....

Working of 74138 decoder IC - https://www.tutorialspoint.com/working-of-74138-decoder-ic

Use the five bit word to turn on in turn the column transistors Cn I showed in my earlier electrical art. The five Cn transistors must be able to pass a collector current of 7 x one LED current. Base resistor of say 22kR - but I will check this later.

Connect 7 transistors as in my earlier electrical art to the 7 row/lines of the 7 x 5 display with suitable collector and base resistors. I used 1kR and 22kR respectively - but will check later. These transistors only carry the current of one LED.

Connect seven fly leads to the base resistors of the row/line transistors so that you can set up a column pattern by connecting to 5V or 0V 0000000 to turn all column LEDs on and 1111111 to turn all off. The row line transistors switches are negative logic ie active low.
 
I have a slight bad luck that was giving signs for some time but last night I felt it very easy to bent and this is sign it's the last bent will have. If I try to straighten it back again, like I did it a couple times before, in time, it will break for good. So I am taking measures now to make a new one from the scraps I have. That new pointer is actually a brand new one (from ebay) that I cut it into my lathe to try fitting it into this iron body I have. But... its a failure and I could not fit it as the original was. SO now I have to build from ground a new head, using this already busted copper head, but brand new and unused. Whish me luck because I want to finish it at least in 1 day.
20220824_143121.jpg
20220824_143126.jpg
 
Just remembered that you will need to invert the 74138 outputs because they are active low. Its output sequence is of the form 11110, 11101, 11011, 10111, 01111.
 
Luckily it took me about ~2h to make a new modality of contact for my new heat Iron tip. A new press fitting head that is full iron instead of copper. Only the tip is copper. I test it already and I have to dial to maximum for it to heat up quickly enough. But it works. Yay.... very happy, is stable and working.
I will soon start building the simulation for your circuit.
 
London calling - what news from Romania please? I would like to see you spell out 'Romania' or your name or moniker on the 7x5.
 
Last edited:
I was quite busy actually, I had to repair the tip of my iron soldering, I had to make a movie with all the progress I did so far on the led matrix code speed, in arduino and its library functions, and only from this point forward I can concentrate on the simulation. I did some research to figure out how to simulate RAM chips in proteus, because is not simple, and I did find a solution and I have to test it out. I will update you soon. Remember that for you is easy because you have experience with these things, but for me is the first time (for some part of it) thats why it takes awhile.
And I already buy your 74LS138 Decoder/Demultiplexer IC..from aliexpres. It will arrive in maximum 2 months (if im lucky).
 
Last edited:
Brilliant work! Your earlier hesitancy was unfounded. As I suspected, you pick things up quickly.

Next step is to use the ROM to store the five 7 bit words which describe the fonts of the alphanumerics you want to use.

I used this as my font reference but you could design your own perhaps:

5x7 DOT Matrix - https://fontstruct.com/fontstructions/show/847768/5x7_dot_matrix

I have two eeproms left - would you like me to send you one?

http://cva.stanford.edu/classes/cs99s/datasheets/at28c16.pdf

PS1: LED current limiting resistors?
PS2: Base resistors for 7 x Row transistors?
PS3: Base resistors for 5 x Column transistors?
 
Last edited:
q12X My next project is the modernise and make more reliable the remotely controlled door lock my wife uses to let her nurses and cleaning ladies in each day. I bought over a year ago(! - I lack your motivation) some RF Solutions radio frequency key fobs and receivers boards which I need to turn into a working system. I think it was these items - need too search them out.

BRAVO-T 8 CHANNEL TRANSCEIVER TELEMETRY MODULE 1000M - https://www.rfsolutions.co.uk/radio-modules-c10/bravo-t-8-channel-transceiver-telemetry-module-1000m-p378

FOBBER 1 CHANNEL ON/OFF BUTTON, UP TO 200M, 868MHz KEY FOB TRANSMITTER - https://www.rfsolutions.co.uk/remote-control-systems-c9/fobber-key-fobs-transmitter-c204/fobber-868mhz-key-fob-c206/fobber-1-channel-on-off-button-up-to-200m-868mhz-key-fob-transmitter-p760

:)
 
Last edited:
hello mister @marconi,
I still can not see a way to create any shape/character on this matrix display.
Can you detail more from here? I really dont see it. As I mentioned in the movie as well.
Brilliant work! Your earlier hesitancy was unfounded. As I suspected, you pick things up quickly.
Im still hesitant at this moment as well. I pick things if I can follow a logic. But right now is 0 in my mind.
I have two eeproms left - would you like me to send you one?
Yes. But please dont make a BIG box for it, since these mail monkeys here in my town, are looking directly to the size of the package, and then to it's weight. And they tax plentifully if is over-sized or over-weight. My suggestion and please do exactly as Im telling you, put this IC into a simple envelope, the smaller the better. Like this is perfect : (trust me)
1661517752120.png

Don't even think to put into a colored envelope because that is also "too fancy" and the monkeys here, also tax the hell out of me. Also from your perspective you will pay something like 1 pound or close to it. I didnt check out how UK are taxing small envelope mail delivery. It might be free for you. Who knows. But I guarantee it will be very cheap. It will be as you are sending me an old fashion card in an envelope.
You most probably will have to bent OUTSIDE the legs of the IC , to be in line with the IC and not to poke the envelope paper if left unbent. You can also put some cardboard on the pins , poke the pointy legs into a small, cut to size cardboard, for a small increased protection.
1661518266195.png

I will resend you my mail address in private.
And thank you for it ! You are very cool.

I bought over a year ago(! - I lack your motivation) some RF Solutions radio frequency key fobs and receivers boards which I need to turn into a working system. I think it was these items - need too search them out.
Well, look on them and BE SURE are these devices from your links. And not some other brand or #id.
Do it now.
On the link page you give me, I find a video presentation on youtube:
They are describing this RF board very well, in a clear UK accent, haha, and they seem exceptionally easy to implement. They show the pin diagram connections to +3V and 0V for both MODES of this board that can be a receiver OR a transmitter depends how you wire those pins. VERY easy and straight forward. It appears that has a LEARNING button on the receiver side. So you might be very much in luck to press that learning button, press your remote button, and wait for it to learn the signal, and thats it, that simple. After that will 'recognise' your specific RF from that little remote. You can play with other RF transmitting devices. Your TV remote is transmitting in infrared so it will not work(unless this board has an IR receiver as well), and it is directional anyway and limited range. So it might be RF only what you have there.
I find this board datasheet >>> https://docs.rs-online.com/6486/0900766b813bbdc3.pdf
- Read it -
And I made for you it's pin connections more clear to follow
Screenshot_4.jpg
Screenshot_5.jpg

This board works at 3V, designed to be supplied from a 2x1.5V batteries (as a transmitter) but also as a receiver, same power supply.
Screenshot_6.jpg

Screenshot_7.jpg

So, in your case, I will use a transformer, even a mobile charger will be fine at 12V, 9V, 5V, whatever. Also >500mA. Like this one:
1661521231438.png

then a variable voltage regulator like LM317 or AMS1117(smd), and wire it for 3V output and power your Receiver board (in your case).
This is how I would do it. VERY SIMPLE project !!! You can make it in 1 day, top to bottom.
Also I want pictures and movie with it installed and working until tomorrow morning !
 
Last edited:
Ive just made a test right now and you may have to put some sewing thread/string on top because these small cardboards may fly on vibration. If you secure them with a piece of sewing string it should be more than fine. Here are my test pictures:
20220826_170801.jpg
20220826_170829.jpg
20220826_170843.jpg
20220826_170856.jpg
 
We both have a 555 clock. I thought you might like to see my 7x5 when I reduce my clock to 1 Hz for a while and then return it to 1kHz. You can see how the column leds change to construct the letter A and what the eye and brain observed when the clock rate is increased.
 

Attachments

  • IMG_0827.mp4
    14 MB
I still can not see a way to create any shape/character on this matrix display with the circuit I have so far.
Can you detail more from here? I really dont see it. As I mentioned in the movie as well.
 
If you had five 7 bit memory locations which you could address/read using the 3 bit code the 7493 generates as it counts in binary from 0000 to 0100 then you can use this scheme to select a 7 bit memory location which contains the data to turn on the required leds in a column, column by column as my video shows. Then you speed it up.

What I would like you to see for yourself is how much in the design of digital electronics is about stringing/sequencing many very simple elemental actions/processes very quickly to generate what is wanted.
 
Last edited:

Reply to What is the best signal interface for PC ? in the UK Electrical Forum area at ElectriciansForums.net

Similar Threads

Hello ! I am building for some time a cct to drive a 3digit multiplexed LCD. (from aliexpress) From the sellers on aliexpress I managed to find...
Replies
7
Views
1K
Hi there, I'm currently working on a project where I'd like to slowly fade the brightness of a series of high brightness RGBW LEDs. Basically...
Replies
3
Views
946
My view on life, in any field, is not to produce more but to consume less. Everybody told me this is a very eccentric weird mentality. Perhaps...
Replies
12
Views
2K
Hello there! To start, I have to say that I'm a very beginner with electrical stuff, I'm working in IT and today I face a challenge that I can...
Replies
2
Views
4K
I hear many views of people who believe that DPF's and CDPF's fitted to their vehicles are a problem and many people resort to removing them, or...
Replies
0
Views
8K

OFFICIAL SPONSORS

Electrical Goods - Electrical Tools - Brand Names Electrician Courses Green Electrical Goods PCB Way Electrical Goods - Electrical Tools - Brand Names Pushfit Wire Connectors Electric Underfloor Heating Electrician Courses
These Official Forum Sponsors May Provide Discounts to Regular Forum Members - If you would like to sponsor us then CLICK HERE and post a thread with who you are, and we'll send you some stats etc

YOUR Unread Posts

This website was designed, optimised and is hosted by untold.media Operating under the name Untold Media since 2001.
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock