The LCD code I promised is here
There are three user functions in there.
initGRLCD: This sets a few things up and turns the display on
clearLCD: Clears the display to all OFF (light) pixels.
linedraw: This draws a line between (x1,y1) and (x2,y2). x1,y1,x2,y2 are declared as GLOBAL. A 64 byte cache is used to hold modified pixels from the current LCD page. The line is always drawn from left to right and while the pixels to be plotted remain in the same page , each step to the right only requires the next byte to read from the LCD, the appropriate bit to be set and the modified value written into the cache. When a vertical step (up or down) crosses a page boundary the used part of the cache is flushed back to the LCD.
I have also put a bit of demo code here. The first file is a sin/cosine lookup table with values scaled to draw circles on the LCD.
The second file is a little demo that draws a series of lines from vertical to horizontal, then draws a rotating clock hand.
Just assemble and link the three files together. Note there is no fuses definition included. +
file: /Techref/member/peter_Oonion-bt-/index.htm, 2KB, , updated: 2011/8/2 07:21, local time: 2024/12/22 06:12,
owner: peter_Oonion-bt-,
3.129.195.82:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/member/peter_Oonion-bt-/index.htm"> PIC KS0108 LCD Drawing Routines</A> |
Did you find what you needed? |