MOD-RGB-FIRMWARE
所属分类:单片机开发
开发工具:C++
文件大小:41KB
下载次数:0
上传日期:2017-04-17 06:24:23
上 传 者:
p901777
说明: RGB led control for PIC16 Family of
microcontrollers
文件列表:
MOD-RGB (0, 2013-04-30)
MOD-RGB\MOD-RGB.X (0, 2013-07-25)
MOD-RGB\MOD-RGB.X\.dep.inc (144, 2013-04-30)
MOD-RGB\MOD-RGB.X\build (0, 2013-07-25)
MOD-RGB\MOD-RGB.X\configuration_bits.c (1349, 2013-07-03)
MOD-RGB\MOD-RGB.X\dist (0, 2013-07-25)
MOD-RGB\MOD-RGB.X\funclist (1127, 2013-07-25)
MOD-RGB\MOD-RGB.X\getting_started.txt (3159, 2013-04-30)
MOD-RGB\MOD-RGB.X\interrupts.c (4275, 2013-07-25)
MOD-RGB\MOD-RGB.X\main.c (1941, 2013-07-25)
MOD-RGB\MOD-RGB.X\Makefile (3086, 2013-04-30)
MOD-RGB\MOD-RGB.X\nbproject (0, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\.dep.inc (144, 2013-04-30)
MOD-RGB\MOD-RGB.X\nbproject\configurations.xml (9368, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\Makefile-default.mk (17381, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\Makefile-genesis.properties (414, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\Makefile-impl.mk (1941, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\Makefile-local-default.mk (2127, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\Makefile-variables.mk (423, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\Package-default.bash (1369, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\private (0, 2013-07-02)
MOD-RGB\MOD-RGB.X\nbproject\private\configurations.xml (982, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\private\private.properties (0, 2013-04-30)
MOD-RGB\MOD-RGB.X\nbproject\private\private.xml (969, 2013-07-25)
MOD-RGB\MOD-RGB.X\nbproject\private\SuppressibleMessageMemo.properties (513, 2013-07-04)
MOD-RGB\MOD-RGB.X\nbproject\project.properties (0, 2013-04-30)
MOD-RGB\MOD-RGB.X\nbproject\project.xml (688, 2013-07-25)
MOD-RGB\MOD-RGB.X\OLIMEX.h (477, 2013-07-25)
MOD-RGB\MOD-RGB.X\project_information.txt (2242, 2017-04-17)
MOD-RGB\MOD-RGB.X\system.c (581, 2013-07-03)
MOD-RGB\MOD-RGB.X\system.h (831, 2013-04-30)
MOD-RGB\MOD-RGB.X\user.c (12070, 2013-07-25)
MOD-RGB\MOD-RGB.X\user.h (3548, 2013-07-25)
MOD-RGB-FIRMWARE-V3-25-07-2013.hex (11339, 2013-07-25)
MOD-RGB\pic16f1503.h (111769, 2013-07-03)
MOD-RGB
----------
1. Discription
MOD-RGB is a completely open-source module suitable for controlling LED
strips. The LED strips might be of the same color or different colors.
The board can be controlled via I2C or DMX interfaces (led on the UEXT
connector). The board has short-circuit protection and can provide up
to 5A to each strip channel. Olimex provides also a full range of
examples for interfacing MOD-RGB via your favorite A13, iMX233, RPi,
Olimexino, etc board.
More information for how the source code was compiled might be found in
the "project_information.txt" file inside the source code folders.
Before continue reading:
* This file describe operation with the version3 of the firmware.
* MOD-RGB works only at 100kHz (or lower) I2C speed.
* Host must support clock stretching for proper work.
* When reading, after sending command, STOP-START condition must be
send, not RESTART.
* To work in DMX512 mod DMX_EN jumper must be closed. In this mode
you could use MOD-RS485-ISO to convert the signals from DMX. In
this case close both jumpers and then power the board.
* When you are already in DMX mode and you want to assign address:
# Stop all transmission from the host device
# Open DMX_EN jumper
# LED should light in white
# Start transmision on only 1 DMX channel
# Close the jumper, and this device will listen to the selected
channel for read, and the next 2 - for GREEN and BLUE.
2. I2C Commands:
When reading the I2C protocol should look like this:
START|ADDRESS|W|ACK|COMMAND|ACK|STOP|START|ADDRESS|R|ACK|DATA|NACK|STOP
And when writing:
START|ADDRESS|W|ACK|DATA1|ACK|DATA2|ACK.....|STOP
* PWM_ON(0x01):
Turn on the LED strip.
Example:
--------
StartI2C();
SendByte(ADDRESS << 1 | WRITE);
SendByte(PWM_ON);
StopI2C();
* PWM_OFF(0x02):
Turn off the LED strip.
Example:
--------
StartI2C();
SendByte(ADDRESS << 1 | WRITE);
SendByte(PWM_OFF);
StopI2C();
* SET_RGB(0x03):
Set values for red. blue and green. The value must be between
0 and 255.
Example:
--------
StartI2C();
SendByte(ADDRESS << 1 | WRITE);
SendByte(SET_RGB);
SendByte(RED);
SendByte(GREEN);
SendByte(BLUE);
StopI2C();
* AUD_ON(0x14):
Turn on color music. The ADC is configured for 150Hz.
Example:
--------
StartI2C();
SendByte(ADDRESS << 1 | WRITE);
SendByte(AUD_ON);
StopI2C();
* AUD_OFF(0x15):
Turn off color music. R,B and B are set to 0.
Example:
--------
StartI2C();
SendByte(ADDRESS << 1 | WRITE);
SendByte(AUD_OFF);
StopI2C();
* GET_ID(0x20):
Read the device ID. Must be 0x***.
Example:
--------
StartI2C();
SendByte(ADDRESS << 1 | WRITE);
SendByte(GET_ID);
StopI2C();
StartI2C();
SendByte(ADDRESS << 1 | READ);
unsigned char id = ReadByte();
StopI2C();
* SET_ADDR(0xF0):
Assign new address for the board. Before sending the command
DMX_EN jumper must be closed. After that, make sure that the
jumper is opened again, to avoid accedently changing the address.
Example:
--------
StartI2C();
SendByte(ADDRESS << 1 | WRITE);
SendByte(SET_ADDRR);
SendByte(NEW_ADDRESS);
StopI2C();
3. Release history:
25 JUL 2013 - Released version3 firmware
近期下载者:
相关文件:
收藏者: