LED Matrix

m6cac

New Member
Hi all
I'm doing an led matrix.
using 4 74**595's
I have 1st 595 for 8 anode and the 4th is for 8 cathode. This giving a 8x8 matrix.
only lighting 1 led at a time the following program was to give me the letter A.
All that I am getting is all outputs for the 595's are on.
Could anyone please tell me what I'm doing wrong.
thank you Craig
View attachment led matrix2.pdf
 

cachomachine

Senior Member
There is a chip that does all the job for you, the MAX7219.
Just make a search in the forum and you will finf a lot of dot matrix examples.
 

hippy

Technical Support
Staff member
Welcome to the PICAXE forum.

There is too much code to take in to tell what is going wrong and it might be something other than the code, it could be the hardware, even the wiring.

Start with some very simple code which writes to a single 595 and get that working first, then build up to what you want in steps.
 

m6cac

New Member
All is well it was hardware problem. I now have my RED A working. only another 51 letters to go.
Thanks for sugestoins. and i will be trying the max7219 later just wanted to use what i had in stock first before buying others..
thanks again Craig
 

m6cac

New Member
I've managed to do the program as the one above. It takes up to much memory. Can any one show me how i can change it.
thanks in advance for any help.
Craig.
 

m6cac

New Member
Is thisa place where you help and teach the newbies or is this a place where you just help your friends.
 

AllyCat

Senior Member
Hi Craig,

Youn haven't made it very easy for us to help. It would be more useful to paste (within
Code:
 tags) the actual .bas file (or attach the file if too large) so that we can paste it into our own PE and check syntax, size, etc..  Personally, I couldn't find a declaration for MSBFirst_L , there are few comments, and no schematic diagram to show the detail of what you're trying to do.

Your code seems extremely repetitive, which suggests that you should be using program loops (and perhaps subroutines) to reduce the size dramatically.  But....

[QUOTE="m6cac, post: 277061"]only another 51 letters to go.[/QUOTE]

... it may be that your application just requires too much data for a PICaxe to handle.  

If you can give us an idea of how many bytes your current code uses and what is required for the final application, then we may be able to suggest to what extent the code might be "compacted", whether you can use multiple "slots", or if you would need (for example) an external I2C EEPROM to hold all the character data.

Cheers,  Alan.
 

hippy

Technical Support
Staff member
I've managed to do the program as the one above. It takes up to much memory. Can any one show me how i can change it.
Your code seems to be a long series of SPIOUT commands with hard-coded data. This will eat-up program memory space. You may be able to reduce memory requirements by moving your hard-coded data into data or table memory and reading it from there. For example -

spiout clk, dataout, MSBFirst_L,(%00000000,%00000000,%00000000,%11111111)

could be replaced by -

Eeprom 0, (%00000000,%00000000,%00000000,%11111111)

for b0 = 0 to 3
read b0, b1
spiout clk, dataout, MSBFirst_L,(b1)
next

The advantage there is, even as the amount of data increases, the actual program doesn't change much at all.

As with program memory there is limited data memory so you may need to start using data packing schemes to squeeze more data into memory or even revert to using external memory.
 
Top