Mike Cochrane

LCD12864 128x64 LCD and Arduino 1.x on ATmega328

Recently I've had a few people contact me about my previous post MindKits 128x64 Graphic LCD and Arduino and that the code doesn't compile in Arduino 1.x nor does it work on a normal Arduino, only a Mega

So here's the updated version. It compiles for me in Arduino IDE 1.0.1. That was easy.

Slightly trickier was the ATmega328 on most Arduino doesn't have enough SRAM to run the code as I had written it. I needed to free up a lot more memory for the code to work. Then I realised the biggest user of SRAM was the static character map, so I moved it into PROGMEM to free this memory. Now it works happily on my little Arduino Pro Mini

Updated code

Download the code here: LCDDemo2.zip.

All my code is licensed under a Creative Commons Attribution 3.0 New Zealand License, just leave my name in the code.

If you want improve this code, feel free. If possible, please make those improvements available to others. There's no github or similar repository for this but I'm happy to create one if there's interest in forking it.