电子工程世界电子工程世界电子工程世界

关键词

搜索

型号

搜索

MIKROE-2153

产品描述EVAL BOARD FOR 74HC595
产品类别开发板/开发套件/开发工具   
文件大小169KB,共2页
制造商MikroElektronika
官网地址https://www.mikroe.com
标准
下载文档 详细参数 全文预览

MIKROE-2153在线购买

供应商 器件名称 价格 最低购买 库存  
MIKROE-2153 - - 点击查看 点击购买

MIKROE-2153概述

EVAL BOARD FOR 74HC595

MIKROE-2153规格参数

参数名称属性值
平台mikroBUS™ Click™
类型Opto
功能圆形 LED 阵列
使用的 IC/零件74HC595
内容

文档预览

下载PDF文档
Page 1 of 2
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.
The end result is a smaller, more cost effective
design.
LED Ring R click
IC/Module
Led ring, 74HC595 serial in parallel out shift
registers x4
Interface
Power
supply
Website
www.mikroe.com/click/led-ring-r
(http://www.mikroe.com/click/led-ring-r)
SPI
3.3V, 5V
Schematic also available in PDF (http://cdn-
docs.mikroe.com/images/9/94/LED_ring_R_click_sch
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
sbit
sbit
#include
#include
LRR_LAT at
GPIOD_ODR.B13;
LRR_RST at
GPIOC_ODR.B2;
<stdint.h>
"led_ring_hw.h"
void
main()
{
uint8_t
test_bfr[4];
uint8_t
i
= 0;
uint16_t
var_time
= 500;
uint32_t
led
= 0x00000001;
// 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]
test_bfr[1]
test_bfr[2]
test_bfr[3]
=
=
=
=
0xAA;
0xAA;
0xAA;
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);
led_ring_send_8
led_ring_send_8
led_ring_send_8
led_ring_send_8
(
(
(
(
test_bfr[0]
test_bfr[0]
test_bfr[0]
test_bfr[0]
);
// writing one byte at a time
);
);
);
while
(1)
{
led_ring_send_32 ( led );
vDelay_ms(var_time);
led
=
led
<< 1;
if
(led
== 0)
{
led
= 1;
i++;
// dot circling faster and faster

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

 
机器人开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 大学堂 TI培训 Datasheet 电子工程 索引文件: 1629  2890  137  173  1714  20  35  9  57  5 

器件索引   0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2026 EEWORLD.com.cn, Inc. All rights reserved