Technical challenge!

Brietech

Senior Member
Okay, so now that I have my 24x8 character LCD working, I have a challenge for the crowd here: Is there any way to semi-reasonably display a 128x128 pixel image on a 24x8 character display? The "character" cells are 5x8 pixel groups, and they're unfortunately slightly separated. I can define a large number of my own "characters" (~128, i think). The LCD is from here: http://www.pjrc.com/tech/mp3/lcd_protocol.html

I will be trying to drive it all from a 28X-1 at 16mhz and reading the image from a ROM (I have a lot of space available in ROM, so don't feel space-constrained). If this isn't possible, I might just have to get a 128x128 lcd, but I'm trying to avoid that, as they're kind of expensive!
 
im sure as you can make your own characters by using a character map thing found on th net easily, you can 'draw' lines in the single letter bnox which when layed out in the screen could look like a basic image, if you cant see what im saying i will edit this post again

nat
:D tc
 

Brietech

Senior Member
I'm actually hoping to display 128x128 images from a camera, not just like simple shapes. I was hoping someone might have some suggestions, maybe for things like dithering (or probably scaling the image to 64x64 or something) . . . i think I will have 8 bits of data for each pixel, but can only display 1 bit, so I'll need to do some kind of conversion. Like i said earlier, this may prove too daunting for for a text display and a picaxe, but I thought it was worth a shot.
 

Dippy

Moderator
I don't know if there are any special commands on that LCD, but my first impression (based on what I THINK you're trying to do) is go to Plan B or C. I'll never say 'impossible' but...

Assuming you are talking about a digital camera as opposed to video/composite camera then there is a helluva lot of converting to do.

Many graphic processing ics (e.g. GLIC) require the image to be pre-processed on the PC before downloading to an EEPROM. A bitmap file has a lot of header data which needs to be read and stripped out to get the actual bitmap image data. Then each pixel (or pixel block) is addressed (e.g. by GLIC) to set the image. The limited dithering is done on the PC when you convert your image to 1-bit bitmap.

For composite imaging you would need a very fast D/A where you would need a specialist hardware and/or pre-programmed chip or at least a dsPIC to convert.

Well, that's my guess.

Edited by - dippy on 03/06/2007 12:03:16
 

Brietech

Senior Member
The camera i'm hoping to use is pulled out of a gameboy (like $5 on ebay). It has a 128x128 element, and (i think, after reading the datasheet) you can "sample" the image, and then clock out an analog voltage for each pixel, which you are responsible for converting. I should be left with 16,384 8-bit values (assuming I read each pixel with an 8-bit adc read command).
 

Dippy

Moderator
That's novel and sounds useful. I've never seen that before.
If it's as easy as described then getting the image and storing it sounds very feasible - good luck with the display.
 

Bloody-orc

Senior Member
Is that 24x8 char LCD a color one? If not, then you have to do a LOT of converting again to get those colors to the 2 colored LCD. not an easy task IMHO.
 

hippy

Technical Support
Staff member
I've got a Gameboy Camera but never did anything with it. That it does edge detect and other tricks means it's potentially very useful without needing a lot of processing power. From the datasheet it should be possible to set it up, then just clock pixels out.

The way I'd start is with just reading the pixels and churning them out to a PC via serial so you can draw a slow-scan bitmap there; you could limit the image to just space and "*", 80 x 24, and get that working with something white-on-black to begin with.
 

Brietech

Senior Member
Yeah, my first concern will just be making sure i'm reading it properly, and then storing it and outputting it to a computer so I can display it. Hippy, was your interpretation the same, in that there was no minimum clock speed for reading the data out? The LCD IS monochrome, and just generally ill-suited to displaying pictures, so I might just have to break down and buy a graphic lcd. It will be kind of neat to be able to take pics on a picaxe though =)
 

hippy

Technical Support
Staff member
Yes, I'd intended to do something similar just for the fun of it, but it's another project sitting on the sidelines. I'd hoped to use the Gameboy itself as a PICAXE display, but never got anywhere with that.

I think there's a minimum sample rate of one frame per second, but what that means is hard to quantify ( could just cause loss of contrast etc ), and it looks like the clock should be continuous, but the data sheet has no max on high or low times. I'm sure some of the PC-based projects have quoted frame rates less than 1fps so I wouldn't overly worry about that.

The GB Camera includes the photo RAM and software for the GB, and even on their 4-level LCD the quality isn't brilliant, especially not when compared to the screen shots people have got through a PC interface, and a monochrome LCD is probably quite poor.

You could always consider a Nokia 3210 display. Not sure of resolution or levels.
 

benryves

Senior Member
You could probably get away with Floyd-Steinberg error diffusion dithering (<A href='http://www.visgraf.impa.br/Courses/ip00/proj/Dithering1/floyd_steinberg_dithering.html' Target=_Blank>External Web Link</a>). The problem is, of course, to disperse the error you need to keep track of a large number of pixels - if the image is 128 pixels wide you'd need a buffer of 128-129 pixels which is a bit tight (use a circular buffer?)

An interesting project, nonetheless!

 
 
Top