7-Seg RGB Click Board
7-Seg RGB Click Board
The 7-Seg RGB Click Board™ carries a full-colour single 7-segment digit display. The click is designed to run on a 3.3V or 5V power supply. It communicates with the target microcontroller over the CS, and PWM pin on the mikroBUS™ line.
The 7-Seg RGB Click Board™ can be connected in a chain, in order to display a larger number of characters. Unlike conventional 7-segment displays, you will be able to use multiple colours on the display.
Software Support
Code examples for the 7-SEG RGB Click Board™, written for MikroElektronika hardware and compilers are available on Libstock.
Code Snippet
The following code snippet writes the numbers 1, 2 and 3 in green, red and blue colours on the 7-SEG RGB Click Board™.
01 #define ONE 0x06 02 #define TWO 0x5B 03 #define THREE 0x4F 04 sbit CS_BIT at GPIOD_ODR.B13; 05 sbit RGB_CONTROL_BIT at GPIOA_ODR.B0; 06 void systemInit() 07 { 08 GPIO_Digital_Output( &GPIOD_BASE, _GPIO_PINMASK_13 ); 09 GPIO_Digital_Output( &GPIOA_BASE, _GPIO_PINMASK_0 ); 10 } 11 void RGB_7_SEG_Init() 12 { 13 RGB_CONTROL_BIT = 0; 14 CS_BIT = 0; 15 } 16 void RGB_7_SEG_Task() 17 { 18 setSevenSegment(ONE,40,0,0); 19 Delay_ms(1000); 20 setSevenSegment(TWO,0,40,0); 21 Delay_ms(1000); 22 setSevenSegment(THREE,0,0,40); 23 Delay_ms(1000); 24 } 25 void main() 26 { 27 systemInit(); 28 RGB_7_SEG_Init(); 29 while( 1 ) 30 { 31 RGB_7_SEG_Task(); 32 }
7-Seg RGB Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.