Using the Propeller's ROM Character Definitions with a graphical LCD display
JohnR2010
Posts: 431
I'm trying use the bit Fonts encoded into the Propeller's ROM starting at 0x8000. Is there an easy way to pull out these encoded characters? From my understating each character is intermingled with the next charter on every other bit. ARRRGGG
What I'm trying to do is pull out each letter's pixels so I can send that to my LCD display. Before I go down this road of sorting out every other bit I thought I would ask if anyone knows of a trick or an object that does this already? I have got to be missing something!!
UPDATE to Post:
Here is a pic using the SHARP low power Memory LCD with the ROM Fonts. Thanks again for everyone who responded and special thanks to @ChrisGadd and @Duane Degn!
By the way when the Prop is running with the internal crystal (RCSLOW ) this whole PCB (mLCD and Propeller) is using 41uA.
What I'm trying to do is pull out each letter's pixels so I can send that to my LCD display. Before I go down this road of sorting out every other bit I thought I would ask if anyone knows of a trick or an object that does this already? I have got to be missing something!!
UPDATE to Post:
Here is a pic using the SHARP low power Memory LCD with the ROM Fonts. Thanks again for everyone who responded and special thanks to @ChrisGadd and @Duane Degn!
By the way when the Prop is running with the internal crystal (RCSLOW ) this whole PCB (mLCD and Propeller) is using 41uA.
Comments
I know I've done this and I thought it was pretty difficult. After doing this to display the ROM font on LED arrays, I've since found several sources of pulling the data from the ROM which are much cleaner than what I came up with.
There's an SPI OLED driver in the OBEX which has a routine for doing this. I'll see if I can find a link.
http://forums.parallax.com/showthread.php/101194
I've got assembly code somewhere that spits it out fast...
This can be very useful in certain cases.
You might try to dig up my old PSM code examples if you need it...
I have used this in my 1pinTV driver (obex). Its also used in a thread of mine driving the 1.44" color LCD.
"localPtr" is the memory address were the bitmap is to be placed. The variable "ramWidth" indicates how many bytes wide the bitmap is. The minimum value for "ramWidth" is 2 (16-bits).
I'm pretty sure I can find another example of extracting the ROM font.
Tom sure makes it look easy compared to the way I did it.
As I said Tom's object is in the OBEX (I don't recall the name). I attached my version of the OLED driver to this post (there's a link to the OBEX driver there as well). I sped up the PASM SPI code.
Edit: I hadn't seen Chris' post prior to making this one. His looks good too.
The 8x8 RGB array Parallax sells has several different fonts in its code. I've manually entered (as ones and zeros) a "Free Design" font. I'm pretty sure I've posted these fonts to the forum in different forms. If anyone is interested in these and wants help finding them let me know.
OBC packaged up a lot of other 8x8 fonts. I think those are in AIGeneric.
I have an archive and links to many other fonts. If somebody needs one, let me know.
I found the 16x32 ROM font too big for most small LCD applications. And, simply showing every other pixel to scale down doesn't look very nice.