Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[8051] Matrix Moving Message Display.

Status
Not open for further replies.

Okada

Banned
Joined
Jun 16, 2016
Messages
1,159
Helped
129
Reputation
252
Reaction score
128
Trophy points
63
Activity points
0
This is the circuit I have been given for reverse engineering.

It has a 4 feet matrix display.

It has other features like RS232 input, PS2 Keyboard input, HT1380 RTC, 24C64 EEPROM not shown in circuit.

Now the issue is only with matrix display code writing. How should I approach ?

The original board uses P89V51RD2 which is obsolete and the chip on board is defective. I am going to replace it by At89S52 as the code seems to fit in it (checked by creating 16x16 matrix font data for 100 charcaters, uses 1% of ROM)

As rows are less, should I use row scanning ?

That is place colums Data on columns and then turn on row 1 for a few ms and then turn off row 1
then turn on row 2 for a few ms and turn it off
continue like this till all 16 rows are scanned.

Is there any better and efficient approach ?

There are 12 HC595s. They are divided into 2 groups (6 + 6)

How is data transferred to it ?

Data to each 6x HC595 blocks gets transferred at the same time using same SH_CP and ST_CP ? I guess, yes.
Data for the two HC595 bloacks are placed on A4 and A5 (bit by bit) of LS245 and A7 and A6 of LS245 are used for SH_CP and ST_CP clocks. Right ?

What about Rows ?

They are just turned ON and OFF that is 2 rows (like row 1 and row 9) at the same time ? So, with 8 different selections of HC138 all 16 rows gets scanned ?


What about scrolling ? Data is divided into 2 blocks in column. How should I write code for scrolling message. How does data of column block 2 changes to column 1 block data ?

Looking at the HC138 outputs, cathodes of the displays are connected to rows ?
 

Attachments

  • MMD.PDF
    33.2 KB · Views: 130
Last edited:

There was some mistake. The owner of the display has shipped it. I will receive it in 1 or 2 days.

For now my calculations are like this.

There are 16 rows and 12x 74hc595.

So, there should be 12x8/2 = 48 columns

So, how should I proceed with the code ?

I was told that display width is 4 feet and so there should be 16x12 leds in 1 foot. So, there are 48 columns in 4 feet display.

Total

16x48 = 768 leds.
 
Last edited:

Hi,

I neither think the schematic is correct, nor is it complete.

****
both row selectors are in parallel. So row 1 and 9 (2 and 10, 3 and 11...) are ON at the same time. Why two selectors?

One row drives at least 48 LEDs so it needs a driver.

***
If your controller has hadware SPI, then I recommend to use it. It is faster and simpler than the bit banging.
(but you need to connect all 12 HC595 in series, or use time multiplex)

Klaus
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
I don't know about the actual circuit. I was just given the attached files. He has not provided display board schematic. I am waiting for it. He said the board belongs to someone and he has bricked the microcontroller and hence needs a firmware for new chip but as P89V51RD2 is not available he needs code for At89S52.
 

Attachments

  • 1 001.jpg
    1 001.jpg
    505.1 KB · Views: 129
  • 1 002.jpg
    1 002.jpg
    501.1 KB · Views: 109

It's a standard monochrome LED-board design. There are loads of microcontroller projects showing how to drive similar display boards.

Presuming the latest decoder circuit is correct, it's a 1:16 mux scheme. Respectively I would expect either 16 rows x 96 columns or 32 rows x 48 columns LED matrix. The difference only matters for data generation, not for scan scheme.

Using two 6x8 shift registers and two data outputs has the advantage of faster scan speed with bit-banging output. This is useful if the processor has no hardware SPI unit. A processor with one hardware SPI unit would better connect all shift registers in line and run the SPI interface at 8 MHz. The scan line is short enough to achieve useful scan speeds even with a slow processor.

In case you have a ready-made 32 row module, you can usually expect 2 separate data inputs. Then using two outputs is a must.

The basic scan algorithm is like this

Code:
activate one row select, displays the previously shifted out data
shift out all bits for the next row
deactivate current row select
latch shifted data
activate next row select

repeat over 16 rows forever
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
I can't use hardware SPI because hardware SPI pins are not used for connecting to 74HC245. Also HC245 is used for 2 channel serial data transfer. I can only use bit banging spi.

Right now this is the circuit I have designed by guessing the matrix connections.
 

Attachments

  • MMD.rar
    96.2 KB · Views: 118

Hi,

the row decoder of post#4 seems to be correct for 1:16 MUX.

But still in MMD.PDF it is wrong. Check E1, E2, E3 connections.


Klaus
 
  • Like
Reactions: Okada

    Okada

    Points: 2
    Helpful Answer Positive Rating
@FvM

In my case as two rows are enabled at the same time.

Code:
activate two rows (ex: rows 1 and 9), displays the previously shifted out data
shift out all bits for the next row
deactivate current rows select
latch shifted data
activate next rows select

repeat over 8 rows forever
 

Hi,

if your column driver is for 16 rows (like in PDF), then you can not enable two rows at the same time.

--> either you need to correct row driver circuit in a way that it enables only one row at a time (1: 16 MUX)
--> or you need to correct column driver circuit in a way that there are just 8 LEDs in one column. (1:8 MUX)

Your PDF is definitely wrong and can not work properly.

Klaus
 

Fixed the PDF circuit. JPEG file circuit are correct.

Why 1:16 ? Explain with an example if possible.

Edit: Ok. I got it. I can only place 1 row data using 74HC595 at a time and hence I have to use 1:16 that is scan one column at a time.


Edit2:

If I have to scan 16 rows then what should be the scan frequency ?
 

Attachments

  • MMD.PDF
    85.5 KB · Views: 155
Last edited:

Hi,

you can not simply choose 1:8 or 1:16. You need to use it how the circuit is wired.

If it is wired for 1:16 then you have to use 1:16.
If it is wired 1:8 then you have to choose 1:8

Klaus
 

Ok. I will post the display connections by tomorrow.

If 1:8 then what should be the scan frequency ?
If 1:16 then what should be the scan frequency ?

I will be using timer inturrupts for the complete display code.

Open collector/drain BJT/FETs are used between 74LS138 and display cathode connections ?

Can you explain more about how will be the 1:8 and 1:16 wirings ?

- - - Updated - - -

If I:8 scheme is used then there will be 96 columns and if 1:16 scheme is used then there will be 48 columns ?
 
Last edited:

I assumed 1:16 because the given circuit has 16 mutual exclusive select outputs. It makes no sense to have 8 outputs that can't be separately controlled.

But everything depends on the actual hardware multiplex scheme. I'm not motivated to guess about it.

Regarding scan frequencies, I suggest to make your own calculations. You need to scan through all rows at least 30, better 50 or 100 times per second, scan frequencies depend respectively.
 

625 us per row is the scan frequency I got.
 

Hello Okada..

Did you know about the code of this circuit?

Thank you
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top