Contains an all-in-one function which allows to create parameterized bargraph(s) on an HD44780 compliant LCD.
. Scalable, configurable via predefined mode constants.
. Any width can be used, it's limited by the LCD line lenght only !!
. 8 different mode (variants): 3-5-7 segments and 35 pixels, all twice.
. No any init function since the used custom char is on the fly defined
. Max. 8 independent (even 1..4 char vertical) bargraph can be used
. on the same LCD (because there are only 8 custom chars).
Separated libraries for the three families (pic12/16, pic12/16_Enh and pic18).
Published in precompiled (MCL) form but with description and a lot of working examples:
http://www.libstock.com/projects/view/9 ... ph-library
Animation shows how to operate the different modes:
And one of my demo projects (a 8ch PIC voltmeter, program: ADC_9.c):
My complete LCD Bargraph library
My complete LCD Bargraph library
- Attachments
-
- ADC_9-full.gif (56.32 KiB) Viewed 2582 times
Re: My complete LCD Bargraph library
Very nice work
P.Erasmus
Saratov,Russia
--------------------------------------------------------------
Saratov,Russia
--------------------------------------------------------------
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: My complete LCD Bargraph library
Hi,
Thank you very much for sharing your project with our users on forum and LibStock Website.
Indeed it is very useful and good project.
Best regards,
Marina
Thank you very much for sharing your project with our users on forum and LibStock Website.
Indeed it is very useful and good project.
Best regards,
Marina
Enhanced, more accurate 8-channel PIC voltmeter
Upon request, I created an improved variant (add to my BarGraph library DEMO programs):
- SW filtering: four measurings/channel then average value will be calculated but only
when it detects a difference compared to the previous (stored) average value, else the
fast scanning (appr 9 ms for the 8 channels) will be continued.
- an improved 50 Hz noise suppression also can be used (with appropriate delays)
- on the fly switchable high-res pixel bargraphs (3-char), now with rounded voltages
and channel-number displaying (it's not the best but the space is limited)
- no floating arithmetics (fast)
- small code (my all-in-one BarGraph function is only 213 bytes long on a P16)
- full scale value = Vref (VCC, now 4.9 V): see the docs.
- resolution = 0.001 V (0.01 V after rounding, if bargraph is ON)
- accuracy = +-0.1% (max 5 mV), plus the PIC's own ADC error, of course
The entire mikroC project is attached, with the C source (detailed comments) and the DSN file.
- SW filtering: four measurings/channel then average value will be calculated but only
when it detects a difference compared to the previous (stored) average value, else the
fast scanning (appr 9 ms for the 8 channels) will be continued.
- an improved 50 Hz noise suppression also can be used (with appropriate delays)
- on the fly switchable high-res pixel bargraphs (3-char), now with rounded voltages
and channel-number displaying (it's not the best but the space is limited)
- no floating arithmetics (fast)
- small code (my all-in-one BarGraph function is only 213 bytes long on a P16)
- full scale value = Vref (VCC, now 4.9 V): see the docs.
- resolution = 0.001 V (0.01 V after rounding, if bargraph is ON)
- accuracy = +-0.1% (max 5 mV), plus the PIC's own ADC error, of course
The entire mikroC project is attached, with the C source (detailed comments) and the DSN file.
- Attachments
-
- 8chVoltmeter.rar
- (67.76 KiB) Downloaded 172 times
-
- bargr_on.gif (2.73 KiB) Viewed 2482 times
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: My complete LCD Bargraph library
Hi,
Once again, thank you very much for sharing your project with our users, we really appreciate it.
Best regards,
Marina
Once again, thank you very much for sharing your project with our users, we really appreciate it.
Best regards,
Marina
LCD chr 255 problem
Please take a look at this (maybe I posted the wrong place?):
http://www.mikroe.com/forum/viewtopic.p ... 87#p241487
http://www.mikroe.com/forum/viewtopic.p ... 87#p241487