![]() | ![]() | ![]() |
| | #1 |
|
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. Last edited by Pommie; 6th July 2008 at 05:13 PM. | |
| |
| | #2 |
|
It looks fantastic Mike. Well done and the leaf looks great. Did you try the scope software I attached to an earlier thread. | |
| |
| | #3 |
|
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. | |
| |
| | #4 |
|
The leaf looks like it has devil horns | |
| |
| | #5 |
|
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/ Last edited by blueroomelectronics; 21st June 2007 at 06:12 AM. | |
| |
| | #6 |
|
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. | |
| |
| | #7 |
|
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. Last edited by Pommie; 6th July 2008 at 04:31 PM. | |
| |
| | #8 |
|
Wow it looks very nice to me.Does it take much current/Voltage to the GLCD?
| |
| |
| | #9 |
|
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. | |
| |
| | #10 | |
| Quote:
__________________ Regards, Sarma. | ||
| |
| | #11 |
|
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 | |
| |
| | #12 |
|
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. | |
| |
| | #13 |
|
Same to you Pommie - nice graphics! | |
| |
| | #14 |
|
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.
| |
| |
| | #15 | |
| Quote:
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/ | ||
| |
|
| 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 |