TOP Contributors

  1. MIKROE (2653 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 (136668 times)
  2. FAT32 Library (69903 times)
  3. Network Ethernet Library (55920 times)
  4. USB Device Library (46248 times)
  5. Network WiFi Library (41882 times)
  6. FT800 Library (41128 times)
  7. GSM click (28973 times)
  8. PID Library (26406 times)
  9. mikroSDK (26344 times)
  10. microSD click (25350 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: 7520 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

2x30W Amp click

0

2x30W Amp click is a class-D audio amplifier with a tremendous output power, considering its size and lack of huge heatsinks, usually associated with the audio amplifiers.

[Learn More]

EEPROM click

0

EEPROM Click is an accessory board in mikroBUS form factor. It features 24C08WP - a highly reliable, high performance CMOS technology serial 8K EEPROM in DIP packaging.

[Learn More]

DIGI POT 9 click

0

DIGI POT 9 Click is a compact add-on board used as a digitally controlled potentiometer. This board features the AD5235, a dual-channel, nonvolatile memory, digitally controlled potentiometer from Analog Devices. The AD5235's versatile programming via an SPI-compatible serial interface allows multiple modes of operation and adjustment. The resistor wiper position is determined by the RDAC register contents, which act as a scratchpad register, allowing unlimited changes of resistance settings. The nominal resistance of the RDAC between terminal A and terminal B (RAB) is 250 kΩ with 1024 positions (10-bit resolution).

[Learn More]