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?
Well i got it fast ready here is the updated attiny84 core file Attiny84
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
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
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.
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
attiny84.bootloader.low_fuses=0xff
attiny84.bootloader.high_fuses=0xdd
attiny84.bootloader.extended_fuses=0xff
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.
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)
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 ...
;D
maybe I just need to get better at programming lol
You dont have to set the pinmode for analogread.
To read pin 12 (pa1) you have to use analogRead(1);
PA1 = 1
PA7 = 7
PA0 pin 13 is the aref, don't use this pin, it doesn't have internal pull-up enabled, and can destroy stuff. And i know, i have killed 4-5 leds on this pin when i was making the core, trail and error ;D
I havent had the chance to sit down and play with your new revision, is there anything different aside from 18 compatibility?
asking cause I have it all setup and working great from your last version, and wondering if I would benefit by upgrading (in mid project, been using your older version for a few weeks now)
S.C. Thanks again for a greatly needed attiny core. Not quite working for me yet though.
I did a fresh arduino-018 install and downloaded the attiny84-03 core. did not make any other changes - correct?
when I try to do a sketch download (or burn the "bootloader") I get a message saying the device signature is incorrect(shows as 0's).
Binary sketch size: 818 bytes (of a 8192 byte maximum)
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
Looking at the verbose output below it seems to me that the arduinoisp code is responding but the attiny84 is not. I've double checked all the connections and they look right. disconnecting sck, miso, or mosi all give the same error. disconnecting reset gives a different error. Any thoughts?
BillGeo On the analog is a small error that will be fixed on the next release.
You can do this: analogReference(0); in setup.
This will use the internal aref. Now its indeed on external.
bill2009, do you use a 10K resistor parallel on the reset?
As you can see on the breadbord, the reset line (pin 1 on a atmega168) is hook on a resistor and the other side of the resistor has 5V. The green line is the reset to the arduinoISP.
bill2009, do you use a 10K resistor parallel on the reset?
yes sir, brown-black-ORANGE from pin 4 of the attiny84 to ground and pin 4 goes to 10 of the driver. i'll see if i have another chip i can try to program.
Damn!
I seem to be geting the same error as Bill2009 does.
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
BTW, pin4 (RESETpin) on the ATtiny84, is supposed to be kept high (via the 10k resistor).
OK, so if it's set low the program should reset... right?
I manually tie it to ground... and there is no reset of the program!
BTW, pin4 (RESETpin) on the ATtiny84, is supposed to be kept high (via the 10k resistor).
OK, so if it's set low the program should reset... right?
I manually tie it to ground... and there is no reset of the program!
that would reset the program running in the attiny84 - but there isn't one is there?