Pages: 1 ... 4 5 [6] 7 8 ... 18   Go Down
Author Topic: Library for TLC5940 16-channel PWM chip  (Read 25559 times)
0 Members and 1 Guest are viewing this topic.
Seattle, WA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 81
Arduino rocks my socks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Very cool!  Are you just using serial to send data to the Arduino now?

As for dmx, you can use the Atmega168's USART (serial) module in receive mode.  It supports the start/8 data bits/2 stop bits protocol of dmx, you just have to set the baud rate.  (see the atmel datasheet).  I don't know of an ic off the top of my head that converts from 2.5/-2.5V into a digital 0/5V signal, but I'm sure you can find one.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep all done over serial, infact is stupidly simple, im just pumping #[0]-[100]; for the signal level.

I belive the SP485 (http://www.datasheetcatalog.org/datasheet/sipex/SP481CN.pdf) can do the conversion, these are used in the Open DMX Usb along with FTDI's FT232 to provide a crude dongle.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31487
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In case you haven't seen it here is what I did with an early version of the library. Acleone - big thanks to you.
To do:-
I have to hack into "Arduino serial" to add extra OSC commands to handle colour and implement them in the Arduino.
I have to finish the web site with all the construction details.

But in the mean time have a look at the video



Half way through you get to see the colours.
« Last Edit: November 19, 2008, 07:18:18 am by Grumpy_Mike » Logged

Eindhoven, the Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does this last update make it possible to use more than 10 TLC's daisy-chained (due to the uint8 var) ?
Logged

Seattle, WA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 81
Arduino rocks my socks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, the limit is now 16.  If you still need more, I can make a custom version of the library.
Logged

Eindhoven, the Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Cool! Thanks! 16 is sufficient for my next project.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This library is fantastic.  I've slowly been daisy-chaining chips together (as I'm something of a newbie) , and this explains why I can't get past 16 chips.  If you're honestly interesting in making a custom version of the library, a version that supports 20 TLCs would be great...
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have to finish the web site with all the construction details.

I saw that you did. I really enjoy the way you explain your works. Nice, clear and clean!


Logged

Seattle, WA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 81
Arduino rocks my socks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Happy Thanksgiving!  Have an update: Tlc5940_latest.zip

2008-11-26
  • Tlc.init() sets all channels to zero and updates.
  • Added TLC_PWM_PERIOD and TLC_GSCLK_PERIOD to tlc_config.h
  • Added TLC_CHANNEL_TYPE to tlc_config.h - Now the library supports 4096 TLCs!  (if TLC_CHANNEL_TYPE is uint16_t)
  • Changed the examples to use TLC_CHANNEL_TYPE
  • set DATA_TRANSFER_MODE default to TLC_SPI
  • [/b]
Since the DATA_TRANSFER_MODE is now TLC_SPI, be sure to change your hardware setup (or just set it back to TLC_BITBANG in tlc_config.h, then delete Tlc5940.o):
  • Arduino Digital Pin 11 (used to be pin smiley-cool -> TLC pin 26
  • Arduino Digital Pin 13 (used to be pin 7) -> TLC pin 25
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thnx acleone for many updates!

Anybody tried the lastest version of library?   'cause mine doesn't work.  only the first TLC5940 chip works (and it gets hot) but others brink pseudo-randomly.   It worked fine with the previous versions.

for checking : The library is for arduino-0012, isn't it?
for checking : What I have to change is just reordering pin settings?
« Last Edit: November 28, 2008, 01:50:29 am by reflect9 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 15
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sorry.  I forgot to delete tlc5940.o file.    it seems work fine until now!
thnx!
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

does this only work on the arduino with a atmega168 ? or will it work on my older atmega8 board ?
Logged

Seattle, WA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 81
Arduino rocks my socks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's an Atmega8 version:  Tlc5940__Atmega8_latest.zip

(I should have probably used preprocessor directives, but then I would have had to change all my horrible pin-out diagrams).  Tell me if it works!  The BasicUse example has hardware setup.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

cool, thanks for that. I'll give it a shot over the weekend. I'll give you feedback.

Thanks again  smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wanted to give a big thank you for the library, i look forward to using it soon.
Logged

Pages: 1 ... 4 5 [6] 7 8 ... 18   Go Up
Jump to: