Maker Pro
Maker Pro

refresh rate for dot matrix

Jigar Patel

Sep 16, 2014
7
Joined
Sep 16, 2014
Messages
7
Hi,

I'm working on a project of 16x128 Dot matrix display using PIC18f4520,74HC595.
I'm using proteus and mikro c for simulation and coding.

My question is how to calculate refresh rate,frame rate and all other calculation for an efficient display.

Thank you.
 

Fish4Fun

So long, and Thanks for all the Fish!
Aug 27, 2013
481
Joined
Aug 27, 2013
Messages
481
Jigar Patel,

Welcome to EP!

Graphics is certainly not my strong suit, but I have a grasp on some of the basics....First question involves the uC.....does it have other tasks, or is it dedicated solely to the display? Next, is this display a "per-fabricated Display"....if so, link to a data-sheet....what type of interface does it have?.... or are these "regular" 10mA to 30mA LEDs that can be driven from a logic level output, or are they "high power" LEDs that will require a power switch or driver? Are you attempting to display a relatively static pattern, or are you looking to have a dynamic display (ie video)? There are numerous "Display Driver" modules available that provide a UI via serial, parallel, I2C, TWI etc comm...is there a reason you would not use one of them?

So, I guess I need a bit more information before I can even begin to be of any help.....but wrt "refresh rates", typically "more faster is more better".....if the uC doesn't have any other tasks and has plenty of free resources I would think using 2 * 8-bit ports for the "row selection" and then some number of your 74HC595's for "Column selection" might be one approach....but there are lots and lots of approaches depending on what you are trying to achieve....And for less than $20 there are all kinds of displays available from EBAY-China with easy to use User Interfaces.....

Fish
 

Jigar Patel

Sep 16, 2014
7
Joined
Sep 16, 2014
Messages
7
I'm working on mono clour dot matrix display thats why i used 74hc595 and also completed my code but it flickering.
i want to work same code but with interrupt method.
Here i uploaded my code with simulation file please check it.

Thank you
 

Attachments

  • 32x64 finale.zip
    123.3 KB · Views: 110

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
If you are driving the display as a "run of 16" you are going to get very poor brightness.
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
Firstly, it is not a refresh rate, but a scan rate.
The only thing you can so is break up the display into 8x 128 and 8x128.
But you can already buy modules with this sort of display capability for a few dollars. Why re-invent the wheel?
 

Jigar Patel

Sep 16, 2014
7
Joined
Sep 16, 2014
Messages
7
Yes you are right but told me to complete this without any ready made material.
And i'm going to use 8x8 dot matrix display.

I also want to know how to calculate scan rate and work with interrupt method to make this efficient.
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
The 'normal' lower limit for a frame rate is >50Hz, preferable higher. For a small matrix like 8x8 you may choose 100Hz. This mean that all diodes are scanned 100 times/ second.

For a display of 8 lines by 8 columns, each column has 1/100*8 or 1.25ms of display time. This is not very fast and I think you should use a timer interrupt to get each display time equal, without any delay routines involved. Each diode will be lit 1/8 of the time, and the energy will be reduced accordingly.
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
You are talking to a beginner. Why make things complex with interrupt timing when all he needs to do is produce a scan routine.
"For a display of 8 lines by 8 columns, each column has 1/100*8 or 1.25ms of display time."
This is completely WRONG.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
At a frame rate of 100 Hz, each frame takes 1/100Hz=10ms.
If the display is made up of "n" columns, each column is on for 10ms/n.
For n=8 this translates into 1.25ms/column. Here we have n=16 (number of columns), therefore 625µs/column.

I can't see what's wrong with this calculation.

From the use of 74HC595s (serial-in, parallel-out) shift registers, one can assume (no schematic is given) that the op transfers the row data serially into the shift register and latches the serial data in parallel to the output of the 16*74HC595s (16*8=128 rows). He may select the respective column (1 out of 16) by the same method using another set of 2*74HC595.
With a scan rate (Colin pointed this out) of 625µs/column this means that the 128 bit shift register for the rows has to be reloaded for the next row at a rate of 625µs/128bit=4.88µs/bit -> ~205000bit/s
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
rows, columns, doesn't matter these are just names gven to the two axes that are perpendicular to each other...
You can scan by row or by column, even by both (not recommended here).
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
You are talking to a beginner. Why make things complex with interrupt timing when all he needs to do is produce a scan routine.
"For a display of 8 lines by 8 columns, each column has 1/100*8 or 1.25ms of display time."
This is completely WRONG.

Why don't you explain what is completely wrong about this?
I was answering the 8x8 matrix described in post #10, so this is not an answer for a 16x128 matrix.

@OP
Regarding the 16x128 matrix. this is a big matrx for a first time designer, and the requirement for the high speed SPI or serial data driver is the big issue.
You should really think about using the SPI module to drive the 595 registers, if you want to use your micro for anything else but pushing data, You should also consider both a timer interrupt and an interrupt driven SPI system, to push all the matrix drive action into the background. This will release time for more functionality in your program.

I know Colin will protest and call this rubish, but with 35+ years in R&D I do have a slight background in design.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
I agree that an interrupt based display control is the beast way to go about this. It will leave whatever computing time is left on the micro for other purposes (e.g. rendering the data to be displayed) without having to bother about timing issues.
 

Jigar Patel

Sep 16, 2014
7
Joined
Sep 16, 2014
Messages
7
Here i've attached my code/Simulation file.
I've resized it with 32x80 for larger display.
I've tried working with interrupt but it doesn't work.
Help me if you can solve this.

Thank you,
 

Attachments

  • 32x64 finale.zip
    133.4 KB · Views: 89

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
Firstly you have break your requirement into a "run-of-8" as this is the maximum number you can scan.
So, 32 x 64 becomes 8 x 64 plus 8 x 64 plus 8 x 64 plus 8 x 64
so you are loading 64 bits into the first quarter of the display and 64 bits into the second quarter and 64 bits into the third quarter and 64 bits into the fourth quarter.
Work out how many microseconds this takes and this is the exposure for the first column.
While you are loading all the shift registers for the second column, you are displaying the first column.
It only takes a few microseconds to go around all the display chips and output the value from the registers.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
Look at my post #11. Also it would really help if you posted a schematic so we can see how things are connected to your µC.
 

gorgon

Jun 6, 2011
603
Joined
Jun 6, 2011
Messages
603
You should also include the clock speed you are running the pic on.
A schematic would be the first step for us to see what you are working with, the next would be a listing of your code.
 
Top