> Dale Botkin wrote: > > > On Sun, 3 Mar 2002, cflat@ev1.net wrote: > > > > > Hi all, > > > I am reading a value (0-5volts) from the A/D on a PIC16F877 and I > > > want to display it as sort of a bar graph along the 2nd line of the > > > 2X16 LCD display to show a relative strength indication. Does > > > anyone know of any code out there already? I just thought I'd ask > > > before I reinvent the wheel. > > > > I don't have any code per se, but it's a very, very small wheel... > > > > Your ADC output will be 10 bits, from 0 to 1023. Shift it to the right > > six times (divide by 64) and you have the number of block characters or > > whatever to print on your LCD. Of course if you're using the ADC in > 8-bit > > mode, just use the upper 4 bits for the number of blocks to print. > Heck, > > I could even do that in assembly! 8-) > > > > Dale > > > -----Original Message----- From: David P. Harris [SMTP:dpharris@TELUS.NET] Sent: Sunday, March 03, 2002 9:26 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: Bar graph code? Also remember that you can define 8 characters in the LCD, so you could increase the resolution to 2^7 = 128. David The characters are only 5 pixels wide (on standard LCD's), so that gives a maximum resolution of 5*16=80 in the horizontal posistion. Mike -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics