TOP Contributors

  1. MIKROE (2652 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136626 times)
  2. FAT32 Library (69829 times)
  3. Network Ethernet Library (55885 times)
  4. USB Device Library (46224 times)
  5. Network WiFi Library (41861 times)
  6. FT800 Library (41080 times)
  7. GSM click (28942 times)
  8. PID Library (26402 times)
  9. mikroSDK (26316 times)
  10. microSD click (25328 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

LCD 2x16 ADC Steps to Progress bar / Bargraph

Rating:

5

Author: Petar Timotijević

Last Updated: 2014-01-24

Package Version: 1.1.0.0

Example: 1.0.0.0

Category: Measurement

Downloaded: 2005 times

Followed by: 1 user

License: MIT license  

EasyPIC v7, PIC18F45K22 32MHz, 8MHz crystal oscillator, PLL Enabled.
Description: ADC voltage on RA0, show ADC steps in first row and progress bar / bargraph in second row.
Progress bar represents ADC steps in range from 0-1023.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "LCD 2x16 ADC Steps to Progress bar / Bargraph" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "LCD 2x16 ADC Steps to Progress bar / Bargraph" changes.

Do you want to report abuse regarding "LCD 2x16 ADC Steps to Progress bar / Bargraph".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Example Blog

LCD 2x16 Bargraph - Progress bar v1.0

EasyPIC v7 - Switch On SW4-6, J15 jumper on RA0
PIC18F45K22 32MHz, 8MHz crystal oscillator, PLL Enabled
Required Libraries: ADC, LCD, Conversions

Code example reads ADC voltage, shows ADC steps in first row of LCD and preogress bar / bargraph in second row.


Formula for progress bar/bargraph is:

Measured ADC steps / (Maximum ADC steps/16)    <<----- 16 for LCD 2x16

Measured ADC steps / (Maximum ADC steps/20)    <<----- 20 for LCD 2x20

10bit ADC have maximum 1024 ADC steps (0-1023) 


21.01.2014. Ver 1.1 - Custom character for bargraph segments, flickering removed, bargraph is refreshed only when ADC steps are changed

22.01.2014. Ver 1.2 - ADC steps as percentage from 0 to 100%

22.01.2014. Ver 1.3 - ADC steps as unique segments in range from 1 to 5

22.01.2014. Ver 1.4 - ADC steps as the same segments in range from 1 to 5

__.01.2014. Ver 1.5 - In progress...

24.01.2014. Ver 1.6 - Battery voltage level

 

Animated LCD screenshot for Ver1.0

Animated LCD screenshot for Ver1.0

Click on View full image below to see animation.

View full image
Animated LCD screenshot for Ver1.1

Animated LCD screenshot for Ver1.1

Click on View full image below to see animation.

View full image
Animated LCD screenshot for Ver1.2

Animated LCD screenshot for Ver1.2

Click on View full image below to see animation.

View full image
 Animated LCD screenshot for Ver1.3

Animated LCD screenshot for Ver1.3

Click on View full image below to see animation.

View full image
Animated LCD screenshot for Ver1.4

Animated LCD screenshot for Ver1.4

Click on View full image below to see animation.

View full image
Animated LCD screenshot for Ver1.6

Animated LCD screenshot for Ver1.6

Click on View full image below to see animation.

View full image

ALSO FROM THIS AUTHOR

Alarm System 12V Lead Acid Battery Charger (Simple Example Version)

0

Device purpose is to maintain alarm system 12V battery on float charge voltage. When battery voltage reach or go above 13,80V charger is disconnected. In : ADC 0-5V Out : LCD 0-18V RA1 is ADC input. RC0 is output to control charger. RC0 On &lt;= 13,80V &gt; RC0 Off

[Learn More]

DTMF Dialer with Holtek HT9200A (Serial Mode)

5

Package contains HT9200A library with example and code example without library. HT9200A is very cheap and small (DIP8) DTMF generator IC. IC Price is ~0,25eur. Uses only three pins from MCU. IC is ideal for alarm dialing projects,...

[Learn More]

ADC Code Examples for Various Offset Ranges

5

ADC Input: 0-5V Output 2x16 LCD: 0-5V ADC Input: 0-5V Output 2x16 LCD: 0-20V ADC Input: 0-5V Output 2x16 LCD: -25A 0 +25A ADC Input: -10V 0 +10V Output 2x16 LCD: 0-5V ADC Input: -2,5V 0 +2,5V Output 2x16 LCD: -2,5V 0 +2,5V ADC Input: -20V 0 +20V Output 2x16 LCD: 0-5V ADC Input: -5V 0 +5V Output 2x16 LCD: 0-5V

[Learn More]