Applefamily
Posts: 13
Joined: Sat Nov 16, 2013 11:54 pm

Proformance of PI with TLC5940 and Gertboard using the Atmeg

Fri Jan 17, 2014 4:39 am

I started over at Element14 forums with this but have not recived any feedback yet. It looks as if this forum might prove more helpfull.

I have not had much time to dive into what is happening and though maybe someone could help shed some light on what might be happening. I set up my Gertboard Atmega chip using the instructions in the book that pointed me to https://projects.drogon.net/raspberry-pi/gertboard/ I then connected the single TLC5940 (LED Driver IC) using the diagram found here https://code.google.com/p/tlc5940arduino/. Downloaded and installed the libraries. One thing I am doing is using a second 5vdc USB power source to run the TLC5940 and LED's. I did tie the 0vcd of the TLC5940 and LED's to the Gerdboard 0VDC. Now the problem I experienced. I sent the BasicUse sketch to the Atmega (Night Rider Effect) all the LED's lit up and randomly dimmed. I though Oh no what did I do wrong? Checked all wiring and look good. So I disconnected the download jumpers from the Ras-Pi to the Atmega "J23" on the Gertboard and the LED animated correctly. WHY? also it seems that with the animation running and Download jumper installed the Ras-Pi is unresponsive or unbearably slow.

Applefamily
Posts: 13
Joined: Sat Nov 16, 2013 11:54 pm

Re: Proformance of PI with TLC5940 and Gertboard using the A

Mon Jan 20, 2014 1:42 am

I understand a few things that is happening.
1. I separated Vcc and Vled. Before I had Vcc at 5vdc with the LED's I now have 3v3 to one side of my TLC5940 board and 5v to the other with GND's all tied together.
2. Wired mouse seemed to help with Pi Proformance
3. Pi to Atmega PB5(MC_SK) is same as Atmega (PB5) to TLC5940 SCLK. im think when i plug the pi into the atmega they are interfering. how do i isolate this?.

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Proformance of PI with TLC5940 and Gertboard using the A

Mon Jan 20, 2014 9:05 pm

3. Pi to Atmega PB5(MC_SK) is same as Atmega (PB5) to TLC5940 SCLK. im think when i plug the pi into the atmega they are interfering. how do i isolate this?.
There is little you can do. You have pin which during programming is an input but after programming immediately becomes an output.
A series resistor (e.g. 1K) will help at least reduce the current when both of them are driving and protect both I/O ports.

Applefamily
Posts: 13
Joined: Sat Nov 16, 2013 11:54 pm

Re: Proformance of PI with TLC5940 and Gertboard using the A

Tue Jan 21, 2014 4:34 am

Thank you Gert van Loo. I have seen this out on the WWW. where should I place that Resistor. Between Pi and ATmega or ATmega to TLC5940's. Is this a common problem even with the "Arduino" standalone cards with USB programmers? My aim here is to build a 8x8x8 LED cube. I have watched videos of persons programing their cubes using the ATmega on a bread board and a USB programmer interface. Maybe the USB interfaces differently that the Pi.

How about a diode? I suspect that even then to allow the pin to preform as a input during programing the diode direction would not prevent interference.

Thanks again and for your great boards. It has really opened up the ability of my Pi. although my wife see less of me now. She not as big as a fan. :lol:

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Proformance of PI with TLC5940 and Gertboard using the A

Tue Jan 21, 2014 11:32 am

Is this a common problem even with the "Arduino" standalone cards with USB programmers?
The UNO does not use the SPI bus for programming.
It uses a resident program in the Bootrom which loads the code from the UART pins (which are connected to a USB controller).
The boot program can then write the code to the remainder of the Flash memory.
You can use the same system on the Gertboard but then you have to first program the boot loader using the SPI interface
and then somehow upload the program to the UART port of the Atmega.

I think that has been done but I don't know the details.

Note that on the UNO you STILL have the same problem but then with the UART pins instead of the SPI pins.
And guess what.... They use 1K series resistors!
Attachments
uno_uart.png
uno_uart.png (35.21 KiB) Viewed 3607 times

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: Proformance of PI with TLC5940 and Gertboard using the A

Tue Jan 21, 2014 2:45 pm

Could it be something to do with the clock speed of the gertboard's atmega being 8mhz rather than the 16mhz most tutorials assume?
note: I may or may not know what I'm talking about...

Applefamily
Posts: 13
Joined: Sat Nov 16, 2013 11:54 pm

Re: Proformance of PI with TLC5940 and Gertboard using the A

Wed Jan 22, 2014 2:09 am

Thank you for the further explanation. Would it be wise/helpful to put the resistors on all four lines?

Return to “HATs and other add-ons”