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 (69909 times)
  3. Network Ethernet Library (55923 times)
  4. USB Device Library (46251 times)
  5. Network WiFi Library (41882 times)
  6. FT800 Library (41129 times)
  7. GSM click (28973 times)
  8. PID Library (26406 times)
  9. mikroSDK (26345 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

AN to PWM 2 click

0

AN to PWM 2 Click is a compact add-on board that contains an easy-to-use component that converts the value of the input analog signal to a fixed frequency PWM voltage output, with a duty cycle proportional to the input voltage. This board features the LTC6992CS6, a silicon oscillator with an easy-to-use analog voltage-controlled pulse width modulation (PWM) capability from Analog Devices. It features the PWM signal controlled by analog input in range of -2.5V to 2.5V, frequency range up to 1 MHz, frequency error less than 1.7%, and it has good temperature stability. It has many features that make it well suited for heater control, PWM servo loops, LED dimming, signal isolation, and other duty cycle control applications.

[Learn More]

mikromedia for dsPIC33EP - Examples

0

Set of examples for mikromedia for dsPIC33EP.. Provided examples demonstrate working with mikromedia's various features and modules:

- Accelerometer
- MMC SD card
- MP3
- Serial Flash
- TFT
- Touch Panel
- USB

[Learn More]

MAGNETO 4 click

0

Magneto 4 click is a high-resolution magnetic encoder Click board™ which allows contactless motion sensing down to 0.5µm.

[Learn More]