[RESOLVED] Need affirmation on changing settings to IDE for programming ATtiny85

i am playing around with the ATtiny85 and there's plenty resources out there to guide one along.
(it was such a breeze - so much easier than an Arduino Standalone on a breadboard even !!)

anyway, so i have uploaded a Blink sketch to the ATtiny85 using ArduinoISP and ICSP connections - it's really so simple - i don't know why people want an even easier way with the TX/RX method using SoftwareSerial ... (n00b getting ahead of himself !!).

problem being, the timing is off - i used the internal crystal and have since read on the definitive thread (of using the ATtiny85)
Arduino Tiny - Microcontrollers - Arduino Forum (Page 3) that it's recommended to use an external crystal - no problem, i will comply duly.

EDIT:
wrong thread linked above - that is infact for the Arduino Tiny CODE.
this one here is for the ATtiny CHIP; (Page 3)
and here's the comment on problems with external crystals;

thing is, i'm using IDE 1.0.5 and that meant i downloaded the "old" version (from github = attiny-ide-1.0.x.zip) which uses boards.txt instead of the latest one kept at GoogleCode ( =arduino-tiny-0100-0018.zip)

that means, the "Boards" available in the IDE are only (internal 1 MHz), (internal 8 MHz) and (external 20 MHz).

i have downloaded both 'masters' though - and saw that there is a "Prospective Boards.txt" file in the newer one.

so; i figure i should just EDIT the boards.txt and add my own entry following the "code" in that "Prospective Boards.txt" file for external 16 MHz

###########################################################################

attiny85at16e.name=ATtiny85 @ 16 MHz  (external crystal; 4.3 V BOD)

# The following do NOT work...
# attiny85at16e.upload.using=avrispv2
# attiny85at16e.upload.using=Pololu USB AVR Programmer

# The following DO work (pick one)...
attiny85at16e.upload.using=arduino:arduinoisp
# attiny85at16e.upload.protocol=avrispv2
# attiny85at16e.upload.using=pololu

attiny85at16e.upload.maximum_size=8192

# Ext. Crystal Osc.; Frequency 8.0- MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65 ms; [CKSEL=1111 SUT=11]
# Brown-out detection level at VCC=4.3 V; [BODLEVEL=100]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]
# Serial program downloading (SPI) enabled; [SPIEN=0]

attiny85at16e.bootloader.low_fuses=0xFF
attiny85at16e.bootloader.high_fuses=0xD4
attiny85at16e.bootloader.extended_fuses=0xFF
attiny85at16e.bootloader.path=empty
attiny85at16e.bootloader.file=empty85at16.hex

attiny85at16e.build.mcu=attiny85
attiny85at16e.build.f_cpu=16000000L
attiny85at16e.build.core=tiny
 
###########################################################################

am i on the right track ?

i just wanted confirmation that this is the right way to do it and i don't end up burning wrong fuses and bricking the chip.

Thanks ! :slight_smile:

P.S
just glancing through that; i noticed - attiny85at16e.upload.maximum_size=8192
i think i've also read there are bugs when using the older IDE regarding sketches above 4KB - should i drop that '8192' to '4096' ?

i'm using IDE 1.0.5

Why? Aren't there newer, better, easier-to-install cores for the tiny85 in newer versions?

There are internal oscillator calibration programs around, somewhere, that you can use to tune the internal oscillators, probably (I'm not sure that the Arduino cores will USE the resulting calibration, unless you add code manually.) Depending on how accurate you need the clock to be. Using up a third of your pins just to get a somewhat better clock seems painful.

westfw:
Why? Aren't there newer, better, easier-to-install cores for the tiny85 in newer versions?

yes, that newer "TinyCore" on GoogleCode looks like it's well used - but i want to stick with the devil (IDE) i know, on this old finicky (Windows XP) laptop - i have another newer" computer which has a different set of problems, which i did try to install 1.6.2, 1.6.7 and even 1.8.5 - that's running a very unstable Vista, i am considering switching to Linux for that - then i will definitely install IDE 1.8.5.

westfw:
There are internal oscillator calibration programs around, somewhere, that you can use to tune the internal oscillators, probably (I'm not sure that the Arduino cores will USE the resulting calibration, unless you add code manually.) Depending on how accurate you need the clock to be. Using up a third of your pins just to get a somewhat better clock seems painful.

ahh, i hadn't thought of that - okay, i will look up "oscillator calibration" then to see what other alternatives i can try.

when i mentioned "timing off" - i think it might have been a factor of 2 - the blink for 1 second, seemed to last 2 seconds instead - that would happen if a 16 MHz sketch(?) met with an actual clock of 8 MHz, right ?
EDIT:
duh - i timed it, it lasted 8 seconds !

maybe there's another solution for this timing mismatch ?

ahh - mea culpa !

i forgot to "Burn Bootloader" to set the fuse for 8 MHz.

the earlier uploading to "8 MHz (internal clock)" Board was still on the default internal 1 MHz clock.

so;
after "Burn Bootloader" - choosing "8 MHz (internal clock)" - and THEN, uploading the sketch, the timing was the proper 1 second Blink !

ALL IS WELL then :slight_smile:

time to try analogRead & "write" (ie. PWM) now.

It sounds like you're set with your Arduino IDE 1.0.5 but just because the topic came up you should know there is a more actively maintained and more commonly used Arduino hardware package than TinyCore (hint it's a bad sign when you find something on Google Code since it's been shut down for years) for ATtiny now. It's called ATTinyCore:

You might keep it in mind just in case you ever decide to see what the Arduino IDE developers have been doing over the 4 years since the 1.0.5 release.

pert:
It sounds like you're set with your Arduino IDE 1.0.5 but just because the topic came up you should know there is a more actively maintained and more commonly used Arduino hardware package than TinyCore (hint it's a bad sign when you find something on Google Code since it's been shut down for years) for ATtiny now. It's called ATTinyCore:
https://github.com/SpenceKonde/ATTinyCore
You might keep it in mind just in case you ever decide to see what the Arduino IDE developers have been doing over the 4 years since the 1.0.5 release.

had a quick browse of that page, it looks like it's based on the code from "arduino-tiny" (on GoogleCode) which was developed by CodingBadly who was very active on those threads i referenced earlier, that's why i latched on to that and was confident with sticking with it.

anyway, thanks for that newer link - it's certainly good to know and that page is also a lot more comprehensive as an ATtiny starting point for easy reference.