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-03-14
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: LED matrix
Downloaded: 6651 times
Not followed.
License: MIT license
4Dot-Matrix R click allows you to display 4 characters of 5x7 dot size. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over I2C interface.
Do you want to subscribe in order to receive notifications regarding "4DotMatrix click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "4DotMatrix click" changes.
Do you want to report abuse regarding "4DotMatrix click".
Library Description
This library contains functionalities for initializing 4DotMatrix click and communication with it. Communication is done with an MCP23017 16 bit I/O expander via I2C interface. MCP23017 directly communicates with an SLx2016 display to show the characters. All the functions work in a similar fashion, in that they send a character, or several of them, to be displayed. It is possible to send single characters on any of the four display positions, a string of characters, or integers in any numeral system. C4DOT_BL_PIN should be either set to high or should be connected to a PWM module, in which case it would be possible to blink the display or change its intensity.
Key functions:
void c4dot_init();
- Initialize the click by setting mBUS pin to appropriate logic levels.void c4dot_writeChar(uint8_t charNum, uint8_t charValue);
- Writes charValue to the character on the position of charNum.c4dot_writeText(uint8_t *textToWrite);
- Writes up to four characters from textToWrite to the display charactersExample description
The application is composed of three sections:
void applicationTask()
{
// Slide some text in from the right.
for (i = 0; i < 21; i++)
{
c4dot_writeText(text + i);
Delay_ms(150);
}
// Clear and delay.
c4dot_clearDisplay();
Delay_ms(500);
// Write some numbers on the display.
for (i = -20; i <= 20; i++)
{
c4dot_writeIntDec(i);
Delay_ms(150);
}
// Clear and delay.
c4dot_clearDisplay();
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.