TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (347 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 (136220 times)
  2. FAT32 Library (69487 times)
  3. Network Ethernet Library (55706 times)
  4. USB Device Library (45992 times)
  5. Network WiFi Library (41639 times)
  6. FT800 Library (40782 times)
  7. GSM click (28788 times)
  8. PID Library (26331 times)
  9. mikroSDK (26053 times)
  10. microSD click (25140 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
mikroSDK Library

BarGraph click

Rating:

0

Author: MIKROE

Last Updated: 2018-04-04

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: LED segment

Downloaded: 7497 times

Followed by: 1 user

License: MIT license  

This is a demonstration example for BarGraph click.
Bar Graph is representing ADC value measured on Poetntiometer P1.
On Potentiometer P2 user can adjust PWM for LCD backlight.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "BarGraph click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "BarGraph click" changes.

Do you want to report abuse regarding "BarGraph click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

BarGraph click

BarGraph click

Native view of the BarGraph click board.

View full image
BarGraph click

BarGraph click

Front and back view of BarGraph click board designed in mikroBUS form factor.

View full image

Library Description

The library initializes and defines SPI bus driver and drivers that offer a choice for writing data in registers and reading data from registers. The library includes functions for logging values on the BarGraph display. A user can enable and disable the chip with the function bargraph_enable(), which is supported in the library.

Key functions:

  • void bargraph_driverInit() - Functions for initializes chip
  • void bargraph_display( uint8_t input ) - Display functions
  • void bargraph_enable( uint8_t input ) - Functions for enable the chip

Example description

The application is composed of three sections:

  • System Initialization -   Initializes SPI module and sets PWM pin, CS pin and RST pin as OUTPUT
  • Application Initialization - Initializes driver init and BarGraph init
  • Application Task - (code snippet) - Counter passes through the loop and logs the value of the counter on the bargraph display
void applicationTask()
{
 for (cnt = 0; cnt <= 10; cnt++)
 {
 bargraph_display( cnt );
 Delay_ms( 500 );
 }
}


Other MikroElektronika libraries used in the example:

  • SPI

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

CAP Wheel 2 click

5

CAP Wheel 2 Click is a capacitive touch sensor with round-shaped electrodes integrated on a Click boardâ„¢. This click can sense touch even through plastic, wood, or other dielectric materials, which can be used to protect the surface of the PCB and the sensor pad trace itself.

[Learn More]

Diff Press 3 click

0

Diff Press 3 Click is a compact add-on board that can measure differential pressure. It features the 2513130810401, a WSEN-PDUS differential pressure sensor from Würth Elektronik. The sensor is MEMS based and uses a piezo-resistive sensing principle. It is a fully calibrated pressure sensor with 15-bit digital and 11-bit analog outputs. In addition to pressure measurement, the 2513130810401 WSEN-PDUS sensor also has an embedded temperature sensor.

[Learn More]

Load Cell 3 click

0

Load Cell 3 Click is a compact add-on board that represents a weigh scale solution. This board features the PGA302, a low-drift, low-noise, programmable signal-conditioner device designed for various resistive bridge-sensing applications from Texas Instruments. It creates 2.5V of bridge excitation and a current output source with programmable current output up to 1mA. Two identical analog front-end (AFE) channels followed by a 16-bit Sigma-Delta ADC are available at the input, where each AFE channel has a dedicated programmable gain amplifier with gain up to 200V/V. It also comes with an on-chip temperature sensor and integrated EEPROM memory for device configuration, calibration, and user data.

[Learn More]