atmel chip as GLCD controller ?

since very few GLCD I2C libraries are out there for arduino I was thinking why don’t people use an AVR MCU e.g atmel328P as a GLCD controller? wouldn’t it be so easy to just connect the display parallel data bus to this AVR and then send the display commands from the main board using I2C ?

I use the 328-based Arduinos all the time with the Nokia 5110 graphic display:

I was thinking why don't people use an AVR MCU e.g atmel328P as a GLCD controller?

My belief is that by the time one gets the text fonts, graphic library, and display buffer in the 328, there is little room to implement a 2nd buffer for performance or the logic for pixel-change updates.

With only 2K of total SRAM, the Atmeha328 simply is ill-suited for the larger color displays.

Ray

why don't people use an AVR MCU e.g atmel328P as a GLCD controller?

Because that chip is not really up to the job, it's memory resources are too limiting. Not to mention that it has no high-speed parallel access to the outside world.


Rob

Rob,
I was assuming that aliyesami meant as part of an intelligent backpack, rather than
to directly control the raw glass.
And for that purpose, at least for monochrome displays, it would work pretty good.

— bill

I was assuming that aliyesami meant as part of an intelligent backpack, rather than
to directly control the raw glass.
And for that purpose, at least for monochrome displays, it would work pretty good.

I use the cheap $3 Ardino Mini from Hong Kong not only for a “backpack” but for a serious amount of the application, too. 5 Arduinos for $14.38 delivered U.S.

Just use industrial Velcro to affix.

Ray

edit - resized pix

IMG395.jpg

IMG424.jpg

Thanks for sharing those photos Ray - and the eBay link.

In the 2nd shot, how do you handle the voltage level shifting or is that Nokia display somehow 5V tollerant?

Thanks
Geoff

In the 2nd shot, how do you handle the voltage level shifting or is that Nokia display somehow 5V tollerant?

The mini board has Vcc which bypasses the LDO regulator onboard. The board runs perfectly at 3.3V or two AA batteries, so no level conversion is necessary. Yes, it is out-of-spec but I have never had one fail to work but Atmel (noir I) will guarantee otherwise.

Adafruit sells the Nokia and level shifting buffer together if you are doing commercial/contract work and must work within spec:

Sometimes, it is just as easy to use a naked 328 @8MHz:
http://www.hackster.io/rayburne/magic-morse-on-arduino

Ray

It depends on what you mean by GLCD.

The Nokia 6100 display is a nice GLCD which has several Arduino libraries and works quite well. There is also a 3" display that can be interfaced through simple serial commands (it has all the display driving built in).

If you are talking about an LCD panel you might find in a smart phone or laptop, its simply not possible to drive these from an Arduino no matter how hard you try - Even a 480x320x16bit LCD requires a pixel clock of somewhere in the region of 9MHz - on top of that they have no brain, no memory, so you have to constantly refresh them usually at a minimum of around 10FPS otherwise they will not work. That gives you one single instruction cycle to write each pixel and generate the Vsync/Hsync/DE/Pclk/Data lines - that is simply impossible. I did try once see if I could make an Arduino generate a 480x272 display signal, but after many hours of crazy optimisation and writing everything in assembler, the best I could get was 2FPS at 8bit colour and that wouldn't have been fast enough so I dropped the idea.

mrburnette:
Yes, it is out-of-spec but I have never had one fail to work but Atmel (noir I) will guarantee otherwise.

Thanks Ray - I'd never actually tried that so appreciate the benefit of your experience.

mrburnette:
Adafruit sells the Nokia and level shifting buffer together if you are doing commercial/contract work and must work within spec:

I've got a smattering of both Adafruit and other 5110 modules. The difference in the pinout on the Adafruit flavour to every other source is interesting. The ones from Seeed Studio claim to be 5V tollerent out of the box I see but I have a stack of 5110's in the cupboard that are not so was just being cautious. No commercial work, contract nor puppies at risk of injury here :slight_smile:

I'll start with a bare ATMega or ATTiny myself normally, but for a buck-and-a-half more a full mini board is very attractive as an embedded display controller for these particular displays.

Cheers!
Geoff

but for a buck-and-a-half more a full mini board is very attractive as an embedded display controller for these particular displays.

Yes, agreed. I buy 'em in 10x qty w/free ship...

  • Vin is for the regulator input
  • Vcc is the output of the regulator. 3.3V to 5.5V here!!!

http://www.ebay.com/itm/10PCS-Pro-Mini-atmega328-5V-16M-Replace-ATmega128-Arduino-Compatible-Nano-/400389882462

What about a 320x240 monochrome panel? Is that more practical?

I am going to back peddle a bit here and say that I spent a few hours yesterday with a
2.2" Serial TFT SPI LCD Module Display 240x320 Chip ILI9340C PCB Adapter SD Card that I got from China for $5.61 delivered. I purchased two back in December but just got around to playing with them yesterday.

These are nice little color TFT displays, with 0xFFFF colors. I used the Adafruit libraries:

Using a <$3 Nano clone, I found the demo program ran more than adequately fast and that the SRAM usage was much less than I had anticipated. The Adafruit libs allow strings of text to be stored in PROGMEM, so there is efficiency there too.

What about a 320x240 monochrome panel? Is that more practical?

Based upon my testing, I see no particular reason that the 240x320 ILI9340 SPI panels cannot be used with ease. Please note that I used the atmega328 hardware SPI and did not try bit-banging the display.

Ray

Added (This is the compile stats for the video):
// Binary sketch size: 18,542 bytes (of a 30,720 byte maximum) (.text + .data + .bootloader)
// Data: 302 bytes (.data + .bss + .noinit)
Added video:

More info after a "real" use scenario:
I recently posted in the Gallery a GPS clock build around a 2*16 2-line LCD. I ran this from a naked 328P-PU @8MHz.
I reworked the main program and added in the Adafruit libraries discussed in the previous post. Here are the results:

What I learned... Text updating is a bitch, slow even @16MHz. Clearly, this display requires careful screen layout so that you can rectangular "fill" with the background color text areas before update. Even this causes an obvious flicker as the screen gets updated. But, for a clock, the effect works great... The seconds digits blink like the old metal-shutter "flip" clocks.

For this project, I (initially) logically divided the screen into thirds so I could erase top, mid, lower independently. But after watching the effect, I decided to drop that and just updated the time every second and refresh the whole screen at seconds == 0.

Do not even think about printing the old values in the background color, selecting the desired font color and writing new values onto the current values... Terrible mess, even if it does actually do the job,

I have not tried any other graphic libraries, so this issue may be Adafruit GFX-centric.

Ray

I will post everything in the Gallery soon, but if you must have access to the complete code it can be downloaded here: http://www.hackster.io/rayburne/5-billion-arduino-gps-clock-for-25