Go Down

Topic: LumiNet (based on attiny84) (Read 62 times) previous topic - next topic


It's nice to see that the Attiny84 gets attention.
It's a mCU that is suitable in many projects, and quite full-futured too.

I am currently having problems with mine.

For starters, I downloaded the Bohne-moded Arduino IDE... and it does not run!
Yea, double-clicking on "arduino.exe" yields a hourglass cursor for 3-4 secs, and then nothing.
Any ideas???

The idea is to use the modified IDE to "port" my 00018 standard-IDE sketch.
I intend to take the compiled .hex file outputted by the modified IDE and use avrdude
to flash it directly yo the attiny84 chip as shown here: http://jimsmindtank.com/using-the-arduinoisp-sketch-part-2/

By the way, I am using an arduino with the ISP sketch in it.
It's supposed to function as an avrisp programmer.

Hardware-wise, only the MOSI, MISO, SCK, RESET and Vcc/GND pins are connected to the Attiny84, is that OK?
I'd like to use the internal 8MHz clock.

Will that work? What fuses will need changing? And how do I do it???

Also it would be nice to also burn an Arduino compatible bootloader to the 84
so all future sketch uploads can be done via USB (and FTDI chip or cable).
Is such a bootloader available? I only see LumiNet bootloaders for the 84
in the modified IDE subdirectories.

I guess the first thing to be addressed is the modified-IDE-not-running issue.

Sorry for the long an newbie post, and thank you in advance for your help.


try running the attiny84 core files in the regular ide.


Jun 02, 2010, 05:51 pm Last Edit: Jun 02, 2010, 08:21 pm by BillGeo Reason: 1
Will do that and report back.

Meanwhile I tried just reading the fuses from a "factory new" ATtiny84,
using an Arduino (with the ISP sketch), and avrdude (that was in the WINavr package),
but to no avail. No luck.

Other details include:
+VCC = 5V from the Arduino board
MOSI, MISO, RESET, SCK to pins 7, 8, 4, 9 of the t84 (DIP14 package), through 10K resistors.
12Mhz Crystal at pins 2 and 3, an then two 22pF capacitors to ground.

avrdude command is as follows:
avrdude -c arduino -p t84 -P COM9 -U hfuse:r:high.txt -U lfuse:r:low.txt

(also tried using other programmers for the -c option, like avrisp, STK500 etc.)

What is wrong with the above setup?!
WTF?!?! :o

Anyway, I am at a dead end with the avrdude approach,
so I'm going to try using the t84 core with the original 000018 IDE.


No luck either.

I followed the instructions found HERE but NO-GO!!!

But even if I can compile a valid attiny84 .hex file, how am I supposed to
upload it to the mCU if I cant get the Arduino-ISP to work with it?


Billgeo, im am updating my attiny84 core to the 0018 version.

I will have it soon ready, the old one will not work in 0018


Thank you SuperCow, I'll be waiting for that.
But, nonetheless, this new 0018 core will just produce valid attiny84 .hex files.
How will i get them in the chip after that?

Will I have to get an AVR programmer (USBtinyISP looks good) and dish the Arduino-ISP (a waste), or am I missing something here?



Jun 03, 2010, 12:54 am Last Edit: Jun 03, 2010, 02:17 am by SuperCow Reason: 1
Well i got it fast ready here is the updated attiny84 core file

The attiny84 does not have a uart/serial port, so making a bootloader is much harder, But i will try this.

I also tested with the arduinoISP for you, and i got it working.
So you dont need a bootloader, and you can upload with the arduino IDE

But there are some step's you need to do (copy/past from the readme)

If you dont have a ISP programmer you can use the arduino Examples ArduinoISP
Upload that sketch to a normal arduino, see http://arduino.cc/en/Tutorial/ArduinoISP
And Connect arduinopin 13 to CLK, 12 to MISO, 11 to MOSI and 10 to RESET
Also hook up the 5V+ and GND. For those line on a attiny, check the datasheet @ atmel.com
for the 14pdip it's:
pin 1 5V
pin 4 RESET (Needs a 10K resistor in parrallel with 5V+)
pin 7 MOSI
pin 8 MISO
pin 9 CLK
pin 14 GND

Code: [Select]
              VCC  1|    |14  GND
         (D0) PB0  2|    |13  AREF
         (D1) PB1  3|    |12  PA1 (D9)
            RESET  4|    |11  PA2 (D8)
INT0  PWM (D2) PB2  5|    |10  PA3 (D7)
     PWM (D3) PA7  6|    |9   PA4 (D6)
     PWM (D4) PA6  7|    |8   PA5 (D5) PWM

I just found out that you can set this parameter in boards.txt, so when you selected the attiny84, it will use automatic the arduinoIsp
So you don't have to change your preference file.
This is updated in the latest 03 version

Next you have to edit your preference file, and change the upload.using=bootloader to upload.using=arduinoisp
see http://arduino.cc/en/Hacking/Programmer for more info

Now you can upload to the atting84 without bootloader :)
remember when you want to upload to a normal arduino, you have to change the preference file again to bootloader


S.C. - wow, thanks - I'll be trying this too.


Jun 03, 2010, 01:50 am Last Edit: Jun 03, 2010, 01:51 am by SuperCow Reason: 1
I just found out, the fuses has to be set too.
I found a workaround for this as well.
Burn the bootloader first, this will set the fuses correct.
There is no bootloader, but its uploading a fake bootloader.
blink sketch on pin 2 (arduino pin 0)
For this you have to download the core again, a update in it
new attiny84-03 core




SuperCow, you are awesome!
Your mod for the 0018 worked just fine!

Uploading sketches on the tiny84 on the breadboard via the ArduinoISP... is just a click away!

THANK YOU VERY MUCH for your time and effort!

Just a small question though, what if we want to use pins 2,3 as the XTAL inputs for the attiny84 clock?
Will it be possible for you to come with another "fake" bootloader that
sets the fuses for the tiny84 to work with an external crystal?
An maybe, as a confirmation, it will flash a LED at pin4 instead.

Will making this "fakeXTAL.hex" be easy?  ::)


That is not problem at all.
But for this to work you need 8 MHz or 16MHz.
Arduino doesn't support other MHZ.
It will work, but your timing will be off for the delay functions etc.

For an external crystal between 8-16mhz use these fuses:
Edit the boards.txt in the attiny84 folder

Then just burn the bootloader again.
Your right about the blink led, its on port 3 (d1)
But you lose the 2 ports for digitalwrite, so arduino pin 0 and 1 you cant use then.

But in most cases 8mhz if fast enough, so i designed it around 8mhz to save 2 pins.


by the time you hook up the isp, tiptoe around the 1 int and aref yea there is not a whole bunch left


Osgeld, you can use the MOSI, MISO, SCK pins for I/O as well as programming.

SuperCow, you are right, 8MHz is fast enough for most projects.

But, I run into my first problem with the ATtiny84.
My analogRead commands don't seem to work at all!
I am defining pinMode on pin9 (actual pin12 on the chip) to be INPUT.
Then I use the analogRead command to quantify a voltage range.
But nothing seems to work. I have tried other pins as well.

I see that both the ATtiny84 and the ATmega328 (used in the Arduino) use 10bit ADCs, so my quantification should be the same.
(I used the arduino to test-drive my sketch-code first)

Any ideas on that? :-/


Jun 04, 2010, 12:35 am Last Edit: Jun 04, 2010, 12:35 am by Osgeld Reason: 1
Osgeld, you can use the MOSI, MISO, SCK pins for I/O as well as programming.

I know you can but I would imagine it would be a major PITA during development to hook up the progammer, program, unhook and reconnect the circuit, OH crap my timing is wrong let me fix that real quick ...


maybe I just need to get better at programming lol

Go Up