Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 20th June 2007, 03:54 PM   #1
Default Unicorn GLCD demo.

Here is a simple demo using a graphic LCD on Bill's Unicorn.

My C is a little rusty and the C18 compiler with the Harvard architecture makes it a little more challenging. I did however manage a few routines that should get people started.

This is what it looks like when it's working,



As you can see, I'm not an artist and my version of the Canadian Maple leaf leaves a lot to be desired.

This should work with any pic18 and a GLCD with two KS0108 controllers. It is however a lot simpler with the Unicorn.

The attached zip file contains the c files. Comments and constructive criticism welcome. Thinking about it, the lack of comments in the code will probably be most commented on.

Mike.
Attached Thumbnails
Unicorn GLCD demo.-unicorn.jpg  
Attached Files
File Type: zip GLCD.zip (3.3 KB, 87 views)

Last edited by Pommie; 6th July 2008 at 05:13 PM.
Pommie is offline  
Old 20th June 2007, 06:56 PM   #2
Default

It looks fantastic Mike. Well done and the leaf looks great.

Did you try the scope software I attached to an earlier thread.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 21st June 2007, 02:34 AM   #3
Default

Yes, I tried the oscilloscope and it looks good.

One thing I forgot to mention earlier which may cause people problems is that the data sheet you link to (topway) doesn't mention the fact that, when reading from the display data, you need to do a dummy read before you get valid data. If you look at the plot routine you'll see what I mean. Don't you just hate it when data sheets are wrong.

Mike.
Pommie is offline  
Old 21st June 2007, 02:40 AM   #4
Souper man
Default

The leaf looks like it has devil horns
 
Old 21st June 2007, 06:06 AM   #5
Default

Mike have you ever heard of Conways Life? This is what I'd like the demo to do. I figured on using only half a display for a 64x64 board. I wonder what a maple leaf does in life?

PS can I use the photo with the leafs on my site? Will give credit to you of course.

http://math.dartmouth.edu/~leejstem/mathematrix/life.html
http://www.bitstorm.org/gameoflife/
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/

Last edited by blueroomelectronics; 21st June 2007 at 06:12 AM.
blueroomelectronics is offline  
Old 21st June 2007, 09:15 AM   #6
Default

I thought about implementing "life" and the biggest problem is buffering the display. You have to buffer it or you get weird things happening. Just using half the display would mean you need 512 bytes for a buffer, not really feasible. You could just buffer 2 rows (8 pixels deep) at a time with 2 64 byte buffers and treat them as a cache.

If I get time I may have a go at doing this at the weekend.

Sure, use the photo. If you have a better bitmap that you want converting into a usable form (c string) just let me know. Have you had a play with the code yet? It's not been tested much and so has probably got a few bugetes in it.

Mike.
Pommie is offline  
Old 21st June 2007, 10:12 AM   #7
Default

It was a lot easier than I thought. Only took half an hour - I'm starting to like C18.

Here is Life on the Unicorn. There is just a glider and a small exploder on there at the moment.

Mike.
Attached Files
File Type: zip Life.zip (7.3 KB, 40 views)

Last edited by Pommie; 6th July 2008 at 04:31 PM.
Pommie is offline  
Old 22nd June 2007, 06:40 AM   #8
Default

Wow it looks very nice to me.Does it take much current/Voltage to the GLCD?
__________________
Gayan

My Website
http://gsmicro.blogspot.com/
Gayan Soyza is offline  
Old 22nd June 2007, 07:23 AM   #9
Default

The max operating current is 15mA - typically 6mA. The backlight takes up to 120mA, in the photo above I have it at about 20mA.

Data sheet here.

Mike.
Pommie is offline  
Old 22nd December 2007, 10:38 AM   #10
Default

Quote:
Originally Posted by Pommie
The max operating current is 15mA - typically 6mA. The backlight takes up to 120mA, in the photo above I have it at about 20mA.

Data sheet here.

Mike.
Your Demo is really nice sir and should encourage many other enthusiasts to start experimenting.Once Bill, being a canadian, has acknowledged the Maple leaf what more.
__________________
Regards,
Sarma.
mvs sarma is offline  
Old 22nd December 2007, 12:46 PM   #11
Default

Mike (Pommie),

I'm expecting a 128x64 Blue/White KS0108 GLCD from Warren's company to show up in the post any day now and I'm very excited to see your example.

Thank you Sir.

Happy Holidays. Mike
Mike, K8LH is offline  
Old 22nd December 2007, 02:11 PM   #12
Default

Mike,

It was my first time using the C18 compiler and so the code is not very well written. I have since written a serial LCD driver that allows me to do things like this.


I'm probably going to make the code and circuit available on the web when I get it finished.

Mike.
Pommie is offline  
Old 22nd December 2007, 02:20 PM   #13
Default

Same to you Pommie - nice graphics!
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is online now  
Old 22nd December 2007, 08:50 PM   #14
Default

My display just came in the post. Can't believe I've been sitting here over an hour agonizing over wether to install a female or male connector on it.
Mike, K8LH is offline  
Old 23rd December 2007, 09:49 AM   #15
Default

Quote:
Originally Posted by Mike, K8LH
My display just came in the post. Can't believe I've been sitting here over an hour agonizing over wether to install a female or male connector on it.
hi Mike,
As its 0.1inch pin pitch I would use a male/pin connector.
This will match up with your project board and also give it the 'stand off' height above any pcb/project board socket... Have a relaxing xmas break...
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Reply

Tags
demo, glcd, unicorn

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Unicorn Oscilloscope running GLCD 128x64 & Photo blueroomelectronics Micro Controllers 8 18th June 2007 03:06 PM
Help understanding the Unicorn Kyle-s4h Micro Controllers 2 5th June 2007 07:09 PM
Open MultiSim DEMO Files mayo General Electronics Chat 1 3rd May 2007 04:52 PM
mcuStudio an Eclipse based IDE for PIC: flash demo available octal Micro Controllers 0 23rd August 2006 06:44 AM
Honeywell HMR3000 DEMO KIT shermaine General Electronics Chat 5 26th May 2005 09:35 AM



All times are GMT. The time now is 11:21 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker