please dont rip this site

PIC KS0108 LCD Drawing Routines

By Peter Onion

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/11/23 04:29, owner: peter_Oonion-bt-,
TOP NEW HELP FIND: 
3.15.211.71: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?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/techref/member/peter_Oonion-bt-/index.htm"> PIC KS0108 LCD Drawing Routines</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?