PDA

View Full Version : Brought LCD from eBay & want to program it using 16F628A, should I kill myself ?



GirLovesWaffles
- 1st October 2011, 04:34
Hi,

The LCD that I just brought from eBay:
http://www.ebay.com/itm/200424248713?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

Had arrived.

I have a lot of spare 16F628A's around and I would like to use it to program the LCD.
The schematic [in Chinese....They might as well be Alien language to me] states that it should be connected to an 89C5X chip.

I don't want to learn another chip and get another programmer for it.
Would prefer to stick with my PIC Chips.

Could anyone provide me with any way of interfacing the LCD with my 16F628A or should I kill myself because this is impossible ?

Gir

Demon
- 1st October 2011, 06:08
PDF can be found here:
http://www.displayfuture.com/engineering/specs/controller/HX8347.pdf

You have to understand that this is a graphic LCD with touch screen, this is not a rinky-dink 20 character LCD.

The interface is going to be more complicated but it should not be unsurmountable. I don't have one so I can't comment on this particular model, but I've used graphic LCDs and I started as a PIC novice.

This one has a touch screen, just ignore those connections to start, get the LCD working first. TherE's lots of information on touch screen interfaces on google.

(reading a bit)

Robert

EDIT: This is a very flexible LCD. Look at page 35, it explains how to use an 8-bit parallel bus interface. I'd start there.


5.2.1 MCU to Memory Write/Read Direction on p. 44 shows how the LCD outputs the pixels.

Demon
- 1st October 2011, 06:24
I can tell you that it is doable:
http://hackaday.com/2010/07/19/pic-based-picture-frame/#more-26245

Unfortunately the link to the source code is dead.


EDIT: Check out this thread:
http://www.mypic32.com/web/guest/forums/message_boards/message/34606

Someone in there has a video:
http://www.youtube.com/watch?v=9Yt0pPDe2No

And here is that person's blog with TONS of stuff:
http://sites.google.com/site/pic32site/



Oh nevermind, turns out he's using C... I hope you might find something useful in all that anyways.

Demon
- 1st October 2011, 06:46
I'm sure you could interface with this LCD using the more basic parallel interfaces. I read that memory is an issue when you get into graphic mode, stick with generating simple characters if you want to use the 16F628A.

Example C code using 16-bit bus here:
http://www.newhavendisplay.com/app_notes/2-4TFT_HX8347.txt

One last thing, before jumping off a bridge, mail me your LCD please. :D

Nyacuma
- 1st October 2011, 11:55
Hi suicidal guy! Have you tried looking at Mikroelektronika's compiler yet? Just download their trial MikroBasic pro for PIC or MikroC Pro for Pic. Limited to 2k of code but will do for your LCD. I thought with Mikroe it's dead simple for your LCD.

GirLovesWaffles
- 1st October 2011, 19:12
You state that "I should stick with generating simple characters if you want to use the 16F628A", I am fine with that.
I really am.
I just want to know how to wire up the 16F628A with this LCD.

Any idea ?

Demon
- 1st October 2011, 21:01
...I just want to know how to wire up the 16F628A with this LCD...


Look at the schematic on your eBay auction, then look at fig 5.13 on p.36 of the PDF I linked in post #2 at the top.

Then look at LCDOUT in your PBP manual for some basics.

And after all that start experimenting and post your results back here.

rmteo
- 2nd October 2011, 02:39
PDF can be found here:
http://www.displayfuture.com/engineering/specs/controller/HX8347.pdf

Wrong data sheet. The LCD in question uses the HX8347A controller and the PCB is set up for 16-bit operation only.

rmteo
- 2nd October 2011, 04:25
Sorry, what I meant to say is that the PCB lacks the BS0:BS1:BS2:P68 pinouts (to select the other 8/18-bit options) and is hardwired for 16-bit operation only. The data sheet is correct but is an older 2007 version. You will need a minimum of 20 I/O pins to operate it - without backlight and/or touchpanel control.

c_moore
- 2nd October 2011, 11:28
Hi GLW,

Why not go to to a 16F877a it is as easy to use as a 16F628a. I understand you have a bunch of 628a pics. From what rmteo says a 18 pin pic won't do.

Demon
- 2nd October 2011, 15:25
HX8347A datasheet available here:
http://www.datasheetarchive.com/HX8347A%2A-datasheet.html#contextual

Click on PDF icon, the datasheet will appear right under.

Robert

GirLovesWaffles
- 3rd October 2011, 18:10
c_moore, you brought up 16F887 and say that it was easy to program like 16F628A, I start google it.
I was just about to spread the floor with chocolate and roll over it because I realize it needs two power source [two VCC, I know they could be connected to the same source but I don't want to get myself involve with this whole two power supply thingy.]
And it doesn't have an internal oscillator which I use for 16F628A.

After rolling on the ground, I stand clicking the net again with chocolate dripping from my face and I saw this chip "16F887", so I shall start checking it out.
Hope it will be easy to activate internal clock like 16F628A.

c_moore
- 4th October 2011, 00:59
Hi GLW,

I mentioned the 16f877a,but the 887 is a better option. It does have a internal osc. The 887 is easy to use. It does not need 2 power sources. So go and roll in some chocolate. Take a lick for me. ;)