Shop OBEX P1 Docs P2 Docs Learn Events
Custom LCD Driver — Parallax Forums

Custom LCD Driver

Chad GeorgeChad George Posts: 138
edited 2007-02-14 20:23 in Propeller 1
I'm trying to write an LCD driver for a small graphical (128 x 64) LCD. I have all of the interface
stuff worked out, but I'm having alot of problems using graphics.spin. I've looked in the demo files
and can't seem to figure out the data format that graphics.spin packs its bitmap into. I thought I read that
it uses 16 + 1 longs for each 16 x 16 pixel tile, but I tried various ways to access this data with no
success.

Basically, I need a formula for getting the color value at pixel (not tile) location x,y using only the
base_address given to the graphics driver.

Also if anyone has some good ideas on how to change the font (and possible tile size) to 8x8 that would
work alot better for this small of a screen.

Thanks.

Post Edited (Chad George) : 2/14/2007 7:57:31 PM GMT

Comments

  • Chad GeorgeChad George Posts: 138
    edited 2007-02-14 19:58
    Does anybody have any ideas on this topic?
  • cgraceycgracey Posts: 14,133
    edited 2007-02-14 20:23
    If you look at vga.spin or tv.spin, there is explanation about how pixel data is mapped. It's not that complicated, at all. Pixels are stored in 16x16 groups which use 16-long segments.·The first long's lowest bit·pair·defines the color code for the upper left-most pixel within the 16x16 pixel array. There is an associated 4-color definition for each array, or cell, defined by a separate word-based cell map, which you could probably bypass for your LCD purposes.

    What might work best·is to make a static image that·you can display on a tv or vga monitor. Then, map it to your LCD and see what's wrong. You will at first see that·pixels are transpositioned, but the pattern will clue you into what needs to change.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
Sign In or Register to comment.