My complete LCD Bargraph library

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

My complete LCD Bargraph library

#1 Post by IstvanK » 09 Mar 2014 12:50

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:
Bargr0test-Anim.gif
Bargr0test-Anim.gif (62.38 KiB) Viewed 2590 times
And one of my demo projects (a 8ch PIC voltmeter, program: ADC_9.c):
Attachments
ADC_9-full.gif
ADC_9-full.gif (56.32 KiB) Viewed 2582 times

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: My complete LCD Bargraph library

#2 Post by p.erasmus » 09 Mar 2014 14:14

Very nice work :)
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: My complete LCD Bargraph library

#3 Post by marina.petrovic » 10 Mar 2014 14:24

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

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

Enhanced, more accurate 8-channel PIC voltmeter

#4 Post by IstvanK » 22 Mar 2014 12:26

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.
Attachments
8chVoltmeter.rar
(67.76 KiB) Downloaded 172 times
bargr_on.gif
bargr_on.gif (2.73 KiB) Viewed 2482 times

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: My complete LCD Bargraph library

#5 Post by marina.petrovic » 24 Mar 2014 14:23

Hi,

Once again, thank you very much for sharing your project with our users, we really appreciate it.

Best regards,
Marina

IstvanK
Posts: 166
Joined: 22 Feb 2013 12:28

LCD chr 255 problem

#6 Post by IstvanK » 09 Jul 2014 12:23

Please take a look at this (maybe I posted the wrong place?):
http://www.mikroe.com/forum/viewtopic.p ... 87#p241487

Post Reply

Return to “mikroC PRO for PIC General”