MIKROE-2153

MIKROE-2153 Datasheet


From MikroElektonika Documentation

Part Datasheet
MIKROE-2153 MIKROE-2153 MIKROE-2153 (pdf)
PDF Datasheet Preview
LED ring R click

From MikroElektonika Documentation

LED ring R click carries a ring of 32 red LEDs driven by four 8-bit 74HC595 serial-in, parallel-out shift registers. The ring is 25 mm in diameter. The click communicates with the target MCU through the mikroBUS SPI interface, with RST, CS, SCK, MISO and MOSI pins marked MR#, LAT, CLK, DSOUT, DSIN, respectively. Other LED colors will also be available. The board is designed to use either a 3.3V or 5V power supply only.

LED ring R click

Features and usage notes

LED ring click is one of several click boards that employ 74HCP595 shift registers to drive LEDs. Rotary click use the same, as well as Bargraph click, 7-Seg click and 7x10 click.

Using 8-bit shift registers to drive an array of LEDs is simply good practice, because it leaves more available pins on the target MCU, allowing you to either use a cheaper, lower pin count main MCU, or use the leftover pins for other purposes.

Schematic also available in PDF

The end result is a smaller, more cost effective design.

Programming

The following code snippet demonstrates different ways to communicate with the click and initializes a clockwork pattern with a single LED at a time.
1 sbit

LRR_LAT at GPIOD_ODR.B13;
2 sbit

LRR_RST at GPIOC_ODR.B2;
3 #include <stdint.h>
4 #include "led_ring_hw.h"
6 void main
uint8_t test_bfr[4];
uint8_t i = 0;
uint16_t var_time = 500;
uint32_t led =
// set latch and reset pins as output

GPIO_Digital_Output &GPIOD_BASE, _GPIO_PINMASK_13 ;

GPIO_Digital_Output &GPIOC_BASE, _GPIO_PINMASK_2 ;
// initalize SPI

SPI3_Init_Advanced _SPI_FPCLK_DIV16, _SPI_MASTER | _SPI_8_BIT |
_SPI_CLK_IDLE_LOW | _SPI_FIRST_CLK_EDGE_TRANSITION |
_SPI_MSB_FIRST | _SPI_SS_DISABLE | _SPI_SSM_ENABLE |
_SPI_SSI_1, &_GPIO_MODULE_SPI3_PC10_11_12 ;
led_ring_hal_init ;
led_ring_start ;
test_bfr[0] = 0xAA;
test_bfr[1] = 0xAA;
test_bfr[2] = 0xAA;
test_bfr[3] = 0xAA;
led_ring_hal_write &test_bfr, 4 // demonstration of HAL write function
led_ring_latch ;

Delay_ms 1000 ;
led_ring_send_32 0xFAFAFAFA // demonstration of writing 4 bytes

Delay_ms 2000 ;
More datasheets: 67916-181LF | DBA-5W5P-K87-F0 | 39830-0103 | SPS01N60C3 | APT2X101D30J | APT2X100D30J | BTS500601EGAAUMA1 | MA320021 | DDMV-24X7S-N-A197 | TP10R3E02Y


Notice: we do not provide any warranties that information, datasheets, application notes, circuit diagrams, or software stored on this website are up-to-date or error free. The archived MIKROE-2153 Datasheet file may be downloaded here without warranties.

Datasheet ID: MIKROE-2153 649271