View previous topic :: View next topic |
Author |
Message |
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Wed Dec 14, 2016 2:41 am Post subject: Making use of EEprom as a character ROM |
|
|
With many AVR projects the EEprom sees very little use a large percentage
is unused.
When I built the dot matrix clock I used it as a character ROM to free up flash.
Here I am building on that using a Arduino Nano as a test device with MAX7219
dot matrix displays.
This first program puts characters 32 through to 122 into EEprom.
You will notice a comment at character 95 up till this character the first byte is zero
I intend to compress the rom by using only 7 bytes this I will do in the next version
and then I will take it to 5 bytes as the last two are also zero.
Regards Paul |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Wed Dec 14, 2016 7:47 am Post subject: |
|
|
Now I have reduced the fonts to 5 bytes as the first , seventh & eight byte was zero
This allows us to put all the most used characters into less than 1K of eeprom
Regards Paul |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Wed Dec 14, 2016 3:24 pm Post subject: |
|
|
Good idea. Thank you for sharing _________________ Mark |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Fri Dec 16, 2016 2:51 am Post subject: |
|
|
Now a program using 5 bytes for the rom
It is set up for 8 characters using 8 MAX7219s
by increasing the text variable and setting Numdis variable
to the number of MAX7219s many more can be used
Later I will mix a MAX7219 seven segment display with the dot matrix ones
Note this can be used with the free version of Bascom as it only compiles to 3608 bytes
Regards Paul |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Sat Dec 17, 2016 12:07 pm Post subject: |
|
|
Now a program that asks for how many characters in your display
and sets the variable.
This is sent to a prompt on the terminal screen of your computer
after this you can type a message then hit enter and it will be
displayed on the dot matrix display.
Note this can not be used with the free version
but if you comment out the marked section
and set the Numdis variable in the code it can be.
Regards Paul |
|
Back to top |
|
|
pratik
Joined: 13 Oct 2005 Posts: 55
|
Posted: Mon Jan 09, 2017 6:52 pm Post subject: |
|
|
Thanks for sharing the codes
I was testing it on max7219 8x8 led matrix 4 in 1 module with UNO 328p board
Tested both codes but nothing is working
Checked all the wiring many time as specified in program.
As you specified I burn the eeprom program first then I check the eeprom contains & verified it after burning the main program
On serial terminal program it showing
How many Characters in display ?
But after entering any key nothing is displayed on the 8x8 led matrix display
I also merge eeprom program & main program but no luck.
I know I am doing something wrong but not able to find out what |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Mon Jan 09, 2017 11:45 pm Post subject: |
|
|
Hello Pratik
When it asks "How many Characters in display" you then enter the number of them
for example if you use one 4 character module press 4 then hit the enter key
4 will then be displayed on the module
After this you can enter text then press enter for it to be displayed.
Regards Paul |
|
Back to top |
|
|
|