Simple ATTINY85 / ATMEGA328 + daisy chained LED modules MAX7219 based LED banner / LED ticker with scrolling text
There is also ATTINY13 version working with only 1024 bytes of FLASH and 64 bytes of RAM !
The source code file "main2.c" supports :
- text even 5000 characters long (limited by ATTINY FLASH program memory capacity, the program takes up to 2,7KB )
- Daisy chained LED 8x8 matrix up to 30 modules (limited by ATTINY85 only 512 bytes of SRAM memory).
- customizable font by replacement of predefined cp437 8x8 dots font definition in fontdef[] array ( see here : http://dotmatrixtool.com/ and here https://www.instructables.com/LED-Scolling-Dot-Matrix-Font-Graphics-Generator-/ )
The "main.c" was a prototype code used for YT video, please do not use it... Use "main2.c" for ATTINY85 or "main328.c" for ATMEGA328P
The "main13.c" is ultra hardcore version of code fitting into 1KB FLASH and 64 bytes of RAM (masterpiece !). It supports only 4 letter LED matrix and 100 characters of text message. It was just to prove that it is possible to use such small chip for this development.
The "main328.c" and "compileatmega" are experimental ATMEGA 328P version of LED ticker that can receive text message to be displayed on LED with serial port connection (9600bps, 8N1). Serial connection is made from the PC with FTDI232 chip and pins 2 & 3. Putty is used to send message over serial to ATMEGA.
Upload the code to ATTINY85 chip by "compileattinyXXX" script, connect all MAX7219 modules in "daisy chain".
Connections to be made :
connect first module to ATTINY85, next connect in daisy chain
MAX7219 DIN_PIN to ATTINY85 PB0 pin
MAX7219 CLK_PIN to ATTINY85 PB1 pin
MAX7219 CS_PIN to ATTINY85 PB2 pin
Connect 5V, GND to both ATTINY85 & all MAX7219 modules
The 5V power source may be from USB powerbak or DC-DC Buck converter LM2596 based (recommended). In the schematic there is LM7805 voltage stabilizer but I do not recommend it due to high heat generated by this chip.
In the Source Code "main2.c" / "main.c" please set following numbers according to your setup:
// declare number of letters in scrolled text here
#define NUMCHARS 26
// declare number of daisy chained MAX7219 modules here
#define MODULESNUMBER 4
Link to video showing this LED ticker working : https://www.youtube.com/watch?v=mL6LaHe1yhY
Link to video how to program the ATTINY85 chip with USBASP programmer AVRDUDE app and AVR-GCC environment : https://www.youtube.com/watch?v=7klgyNzZ2TI
compileattiny / compileattiny2 scripts are used for Linux AVR-GCC code compilation & flashing the chip by AVRDUDE
compileattiny.bat / compileattiny2.bat scripts are used for Windows AVR-GCC code compilation & flashing the chip by AVRDUDE
Some portion of source code was borrowed & modified from Łukasz Podkalicki sources: https://github.com/lpodkalicki/blog/tree/master/avr/attiny13/040_random_flickering_pixels_on_max7219_8x8_led_display