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]
Rating:
Author: MIKROE
Last Updated: 2018-04-04
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: LED segment
Downloaded: 8131 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.
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".
Front and back view of BarGraph click board designed in mikroBUS form factor.
View full imageLibrary 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 chipvoid bargraph_display( uint8_t input )
- Display functionsvoid bargraph_enable( uint8_t input )
- Functions for enable the chipExample description
The application is composed of three sections:
void applicationTask()
{
for (cnt = 0; cnt <= 10; cnt++)
{
bargraph_display( cnt );
Delay_ms( 500 );
}
}
Other MikroElektronika libraries used in the example:
Depending on the development board you are using, you may need USB UART click, USB 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.