USBTinyISP + ATTiny85 + Adafruit 12-Channel 16-bit PWM LED D

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
abcd_ca
 
Posts: 44
Joined: Wed Oct 02, 2013 1:23 pm

USBTinyISP + ATTiny85 + Adafruit 12-Channel 16-bit PWM LED D

Post by abcd_ca »

Hi, I have gotten the basic LED blink sketch to work with the ATTiny85 via the Arduino IDE and the USBTinyISP. Now I'm trying to add the 12 Channel LED driver. I would like to drive 12 separate LEDs and am starting with one single bulb on R0.

Here's what I've got so far:
-I've connected the anode to the bottom hole of R0 where it shows V+ on the silkscreen, cathode on the top hole.
-All the other LED holes are unconnected, just unsoldered holes.
-I've checked the current for the LED without adding any additional resistors (15mA) and voltage (5V) as is written in the description.
-I quickly tested the voltage across a superbright 3mm white LED when on before it burned out and I'm reading about 5V if that's any help.
-My USBTinyISP is still connected, i'm powering the ATTiny85 via the programmer's USB cable to my laptop.

I've got two problems:
1. Burning out LEDs
2. SPI error for ATTiny85

For #1, regardless of what my LED's forward voltage is, if it's rated for 20mA, I assume the default 15mA (and 3.3k resistor) that the driver provides is just fine eh? So far the blink sketch is still on the ATTiny85 chip so there's nothing talking to the LED driver yet.

For #2 I have commented out Serial references (any simple way to get Serial to work?). The error I am getting is in the SPI library, what do you recommend?

Code: Select all

In file included from tlc59711test.ino:19:
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h: In static member function 'static byte SPIClass::transfer(byte)':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h:56: error: 'SPDR' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h:57: error: 'SPSR' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h:57: error: 'SPIF' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h: In static member function 'static void SPIClass::attachInterrupt()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h:63: error: 'SPCR' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h:63: error: 'SPIE' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h: In static member function 'static void SPIClass::detachInterrupt()':
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h:67: error: 'SPCR' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h:67: error: 'SPIE' was not declared in this scope

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: USBTinyISP + ATTiny85 + Adafruit 12-Channel 16-bit PWM L

Post by adafruit_support_rick »

#1: Are you sure the LED is burned out? Did you solder it to the holes, or is it simply inserted through them?
#2: The ATtiny85 does not have a dedicated SPI unit. Instead, you can configure the USI (Universal Serial Interface) module for SPI. You'll need a different SPI driver than the standard Arduino SPI. You can also write a bit-bang driver using normal digitalWrite calls to send data to the PWM breakout.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”