Author Topic: Driving 320x240 LCD on arduino  (Read 13646 times)

0 Members and 2 Guests are viewing this topic.

Offline amemicTopic starter

  • Contributor
  • Posts: 31
  • Country: hr
Driving 320x240 LCD on arduino
« on: August 17, 2015, 08:58:41 pm »
Hello!

So I got my hands on one of these LCD's
It is POWERTIP PG320240WRF-CNN LCD, judging by the model number I guess it's 320x240 LCD.

By googling I got this datasheet:
http://www.scancraftdisplay.se/File/Powertip/PG320240WRF-CNNHS1.pdf

But I haven't found much about has this thing ever been connected to arduino.
Pictures are attached, it seems that it has LC79401 driver on it, I know that there are drivers for HD44780 driver, and graphic LCD drivers written for arduino, but, is there anything compatible with this thing? :-)

I would like to put it in some good use but I haven't got much experience with driving LCD's so if there is anyone who can help please do reply :-)


Thanks! :-)
 

Offline Kintekobo

  • Regular Contributor
  • *
  • Posts: 64
  • Country: gb
  • Avatar by the fabulous 'Space Coyote'
    • A Load of Old Bollox
Re: Driving 320x240 LCD on arduino
« Reply #1 on: August 17, 2015, 09:02:44 pm »
The data sheet states that it is a 4-bit interface so I think that is one of the standard libraries with the Arduino. It's one of the LCD libraries I think.
You can call me anything you like. Just don't call me late for lunch.
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Driving 320x240 LCD on arduino
« Reply #2 on: August 17, 2015, 09:04:56 pm »
You can not drive this display directly with an arduino, because this LCD has no controller and no memory. The whole image needs to be send at 70Hz to the display.
You need a LCD controller like S1D13505 or S1D13700 to connect this display to a microcontroller.
 

Offline Kintekobo

  • Regular Contributor
  • *
  • Posts: 64
  • Country: gb
  • Avatar by the fabulous 'Space Coyote'
    • A Load of Old Bollox
Re: Driving 320x240 LCD on arduino
« Reply #3 on: August 17, 2015, 09:07:08 pm »
Yep, this looks like it should work. It shows the connections for the four data lines. It does seem to be somewhat different with regard to clocking the data in so it may need tweaking. Then again I could be talking through my hat.
You can call me anything you like. Just don't call me late for lunch.
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Driving 320x240 LCD on arduino
« Reply #4 on: August 17, 2015, 09:09:39 pm »
Yep, this looks like it should work. It shows the connections for the four data lines. It does seem to be somewhat different with regard to clocking the data in so it may need tweaking. Then again I could be talking through my hat.
No, it does not work!
HD44780 = character based display controller
LC79401 = shift register
 

Offline Kintekobo

  • Regular Contributor
  • *
  • Posts: 64
  • Country: gb
  • Avatar by the fabulous 'Space Coyote'
    • A Load of Old Bollox
Re: Driving 320x240 LCD on arduino
« Reply #5 on: August 17, 2015, 09:11:51 pm »
is it not the same as the 2-Line LCD displays based on a similar chip set? Seems to be a lot of silicon on that board for it to be so dumb.
You can call me anything you like. Just don't call me late for lunch.
 

Offline amemicTopic starter

  • Contributor
  • Posts: 31
  • Country: hr
Re: Driving 320x240 LCD on arduino
« Reply #6 on: August 17, 2015, 09:16:18 pm »
@bktemp I was thinking that it might be something like that...after checking out the main controller board which contains the "brain" of the entire device, I discovered an epson D1370400A2 chip on it which seems to be driving the thing.

@Kintekobo: bktemp I was thinking the same thing, whole bunch of chip brain, but I kinda thought that 16x2 line LCD is not the same thing to drive as this graphic LCD thingy :-)

Now the question is, can it be driven in any way on arduino without additional controller or do I have to fiddle with this epson  ;D
« Last Edit: August 17, 2015, 09:18:12 pm by amemic »
 

Offline Kintekobo

  • Regular Contributor
  • *
  • Posts: 64
  • Country: gb
  • Avatar by the fabulous 'Space Coyote'
    • A Load of Old Bollox
Re: Driving 320x240 LCD on arduino
« Reply #7 on: August 17, 2015, 09:17:26 pm »
Either way it should be a fun project. :-+
You can call me anything you like. Just don't call me late for lunch.
 

Offline amemicTopic starter

  • Contributor
  • Posts: 31
  • Country: hr
Re: Driving 320x240 LCD on arduino
« Reply #8 on: August 17, 2015, 09:20:37 pm »
Yes, it should, fun and challenging :-)

Maybe I could try to send some data to it, but not quite sure how to approach  ???
 

Offline Kintekobo

  • Regular Contributor
  • *
  • Posts: 64
  • Country: gb
  • Avatar by the fabulous 'Space Coyote'
    • A Load of Old Bollox
Re: Driving 320x240 LCD on arduino
« Reply #9 on: August 17, 2015, 09:25:01 pm »
Maybe bktemp can help? He seemed to be up to speed on the chip-set.
You can call me anything you like. Just don't call me late for lunch.
 

Offline amemicTopic starter

  • Contributor
  • Posts: 31
  • Country: hr
Re: Driving 320x240 LCD on arduino
« Reply #10 on: August 17, 2015, 09:35:23 pm »
Hopefully, He is, afterall, coming from the same country as the device that this thing was salvaged from ;D

Maybe there is standalone controller board with EPSON D13700's to buy for cases like this, it would made life a lots easier :-)
I'm presuming that the lack of controller requires constant refreshing of the screen, and i suspect taht would cut off quite a large bit of processing power from the arduino   ???

But it would be quite cool to make use of this thing, honestly I just want to spit out huge amount of text data on this sucker for a PC status monitoring ;D


EDIT:
Now, I'm thinking, maybe, just, maybe an idea...long time ago I remembered making a PC status LCD from HD44780 16x2 screen connected to parallel port of my pc...maybe it is possible to do similar thing and let the pc do the processing  :o
« Last Edit: August 17, 2015, 09:48:24 pm by amemic »
 

Offline Kintekobo

  • Regular Contributor
  • *
  • Posts: 64
  • Country: gb
  • Avatar by the fabulous 'Space Coyote'
    • A Load of Old Bollox
Re: Driving 320x240 LCD on arduino
« Reply #11 on: August 17, 2015, 09:47:57 pm »
Ah, now you say that it would take a lot of processing power from the Arduino as if that was a bad thing. Considering just how cheap ATMega chips are you can afford to have one dedicated to driving the display. A basic home-brew Arduino can be put together for about $5 but then again you can get an Arduino Mini from China for $2 postage included!  :-+
You can call me anything you like. Just don't call me late for lunch.
 

Offline amemicTopic starter

  • Contributor
  • Posts: 31
  • Country: hr
Re: Driving 320x240 LCD on arduino
« Reply #12 on: August 17, 2015, 09:51:27 pm »
Hmm, when You put it that way...it might not be a bad idea...but there is still one thing to consider...well, I haven't had any experience at all with developing an LCD driver :-D
 

Offline Maxlor

  • Frequent Contributor
  • **
  • Posts: 565
  • Country: ch
Re: Driving 320x240 LCD on arduino
« Reply #13 on: August 18, 2015, 12:15:27 am »
To make good use of that display, you'll need an MCU that can output parallel data at 5MHz continuously while offering some way to change that data, and that has 9600 Bytes of RAM for a frame buffer. An Arduino UNO doesn't. Even an Arduino Mega doesn't have enough RAM (granted, you could procedurally generate things and thus save RAM... but you'd be limiting yourself.)

I'd see it as an opportunity to leave Arduino-land, and maybe try using one of the higher range AVR chips directly. Actually checking the range, there seems to be only one suitable AVR chip, the ATMEGA1284, and you'd be really pushing its capabilities. I don't know, maybe just use a display driver chip suited for that display? Or use a much faster MCU. Doing it in software on an 8-bit MCU seems like masochism to me.
 

Offline amemicTopic starter

  • Contributor
  • Posts: 31
  • Country: hr
Re: Driving 320x240 LCD on arduino
« Reply #14 on: August 18, 2015, 12:34:07 am »
Yeah, I took some extra googling and reading and came to a similar conclusion...I need a device that will send data to screen at fairly high rate so it could work properly without noticeable lag in refresh...
I just didn't know how much power I'd need...

It crossed my mind to get some epson controllers off ebay and make separate controller board because salvaging the memory and chip from the original electronics would be fairly fiddly considering the package and the amount of some kind of protective red goo which makes desoldering fairly difficult....
So I tried to find anything on ebay without success...what I did found is that you can get 320x240 color lcd for a few bux...which is tempting...but still...i like the size of this screen...it's almost 3" and I can put nice large font on it...

Maybe I can get the complete epson controller board for this thing somewhere else besides ebay?
 

Offline dadler

  • Supporter
  • ****
  • Posts: 851
  • Country: us
Re: Driving 320x240 LCD on arduino
« Reply #15 on: August 18, 2015, 01:16:19 am »
An arduino due or teensy 3.1/LC can easily drive this display. They are 32bit ARM uCs though.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8334
Re: Driving 320x240 LCD on arduino
« Reply #16 on: August 18, 2015, 04:40:13 am »
It depends what exactly you want to display on the LCD, but 5MHz monochrome data is easy compared to this...

http://www.linusakesson.net/scene/craft/

...colour VGA signal and sound demo in 8KB of flash and 1KB of RAM on an AVR at 20MHz.

Maybe you could make a game, start with something simple like Pong or Tetris...
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Driving 320x240 LCD on arduino
« Reply #17 on: August 18, 2015, 05:48:35 am »
To make good use of that display, you'll need an MCU that can output parallel data at 5MHz continuously while offering some way to change that data, and that has 9600 Bytes of RAM for a frame buffer. An Arduino UNO doesn't. Even an Arduino Mega doesn't have enough RAM (granted, you could procedurally generate things and thus save RAM... but you'd be limiting yourself.)
It has be done using a ATmega8515 with external SRAM, but modern microcontrollers have enough RAM internally. Using DMA it is easy to implement a LCD controller, because DMA does all the high speed data transfers in the background. Using a PIC32 it is really easy because the parallel master port generates the clock signals for shifting out the data into the LCD. DMA transfers the data from SRAM to the PMP. All you have to do is setup the DMA each line and generate a few timing signals. Microchip has an application note and software driving 320x240 TFT LCDs using PIC32 + DMA.

 

Offline amemicTopic starter

  • Contributor
  • Posts: 31
  • Country: hr
Re: Driving 320x240 LCD on arduino
« Reply #18 on: August 18, 2015, 09:16:49 am »
@amyk: wel that is fairly cool stuff. but I was thinkin ond displaing just some text info, like temperatures, humidity, maybe some wind speed, stuff like that :-)

@bktemp: Interestingly, I do have one ATMega8515 in my stock, I bought it for a project which I scrapped later and this thing is standing in my drawer for a few years now ;D
 

Offline Rolo

  • Regular Contributor
  • *
  • Posts: 206
  • Country: nl
Re: Driving 320x240 LCD on arduino
« Reply #19 on: August 18, 2015, 10:51:19 am »
An Uno can address flash as ram using progmem and clock SPI up to 8 Mhz so should be possible. I used similair approach in controlling a led matrix board.
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Driving 320x240 LCD on arduino
« Reply #20 on: August 18, 2015, 11:17:22 am »
SPI is only 1bit, but this LCD needs 4bits in parallel.
It works with ATmega8515, because it has a 8bit bus interface similar to the PMP found on PIC32.

Here you can find the project (it is in German, but you can use the google translator):
https://www.mikrocontroller.net/articles/Grafikf%C3%A4higer_LCD_Controller_f%C3%BCr_320x240_LCD_mit_8_Graustufen
 

Offline amemicTopic starter

  • Contributor
  • Posts: 31
  • Country: hr
Re: Driving 320x240 LCD on arduino
« Reply #21 on: August 18, 2015, 01:11:13 pm »
@bktemp: that is a really interesting project, I kinda like it ;D

In conclusion, I think that I need quite a big rfresh of my internal RAM, seeing how much I have forgotten about these things...and then I can start thinking about hooking up something good ;D

This really looks like a challenge to do, and I do like challenges, but I'll have to get some literature for research first ;D
 

Offline eilize

  • Contributor
  • Posts: 25
  • Country: be
Re: Driving 320x240 LCD on arduino
« Reply #22 on: August 19, 2015, 03:05:04 pm »
how do you find the "5Mhz"?

i mean

CL1 =59.5µs
CL2=CL1/80

on each falling edge of CL2, D0,D1,D2,D3 must be valid(D0..D3 on the same port)

so you need 1.34Mhz


i forget something?
 

Offline Maxlor

  • Frequent Contributor
  • **
  • Posts: 565
  • Country: ch
Re: Driving 320x240 LCD on arduino
« Reply #23 on: August 19, 2015, 04:50:27 pm »
You are correct, seems I forgot to factor in the fact that 4 bits are transmitted per clock cycle.
 

Offline eilize

  • Contributor
  • Posts: 25
  • Country: be
Re: Driving 320x240 LCD on arduino
« Reply #24 on: August 19, 2015, 11:10:44 pm »
but you need always lot of ram

let's say you take 4x4 pixel per character, you can encode it on 2 byte (and usind a mosfet to reduce the number of instruction...don't want to rotate the byte 4 time)
let's say 32char->64bytes
you need (320*240)/16 = 4800byte to describe the value of the character on this 4x4square

total 4864byte

if you use 8x8pixel per char,you need 8byte per character
32char->256byte
(320*240)/(16*4) =1200

total 1456 byte

lot of work when you know there are lcd with controller ^^
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf