Go Down

Topic: sizing down my arduino (Read 16464 times) previous topic - next topic

Coding Badly

#45
Dec 24, 2010, 02:58 am Last Edit: Dec 24, 2010, 02:59 am by bcook Reason: 1

Using the Tiny Core with the Arduino ISP...

1. Open boards.txt

2. Locate the processor / clock speed you'll be using.

3. Remove the "upload.speed" line.  It will be similar to the following...

attiny85at8.upload.speed=19200

4. Each board definition contains programmer entries like this...

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

# The following DO work (pick one)...
[glow]attiny85at8.upload.protocol=avrispv2[/glow]
# attiny85at8.upload.using=pololu


Comment out (using #) all of the entries ("attiny85at8.upload.protocol=avrispv2" in the example above) or remove all of the entries.

5. Add a line like this...

[glow]attiny85at8[/glow].upload.using=arduino:arduinoisp

6. Ensure the section name ("attiny85at8" in the example above) is correct.

7. Save boards.txt

8. (Re)start the Arduino IDE


Does that help?

Frozen_One

Back in the saddle.

@ Coding Badlly: Feedback (I'm using v21 of Arduino and ArduinoISP)
- I made the changes to the boards.txt file,
- opened the adruino IDE,
- chose 'ATtiny85 @ 8 MHz' under Tools -> Board
- loaded the 'blink' example under Examples -> 1.Basics
- changed pin # 13 to 0
- compiled
- uploaded

It works!  :D  BUT its really slow; it takes ~8 seconds instead of 1 to change the blink.   :(

I changed the RGB PWM code I am using to use pin 4 (PB4) and uploaded it.  It works but the PWM is so slow, the pulses are visible.

Am I missing any obvious items that would affect the speed?


PS- I get this for the error message:
Binary sketch size: 770 bytes (of a 8192 byte maximum)
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

Coding Badly

Quote
Back in the saddle.

Good place to be!

Quote
@ Coding Badlly: Feedback

Thanks!

Quote
It works!    BUT its really slow; it takes ~8 seconds instead of 1 to change the blink.
Am I missing any obvious items that would affect the speed?

From the factory, processors are configured to use the internal oscillator divided by 8 so they run at 1 MHz.

You have two choices (well, there are more choices but two simple choices)...

Quote
- chose 'ATtiny85 @ 8 MHz' under Tools -> Board

1. Select the 1 MHz option and re-upload.

2. Execute the menu item Tools / Burn Bootloader / Arduino as ISP.  Essentially, this changes the fuses so the processor runs at 8 MHz.  You will have to re-upload your Sketch.

Quote
PS- I get this for the error message:
Binary sketch size: 770 bytes (of a 8192 byte maximum)
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85

The AVRDUDE configuration file has a few problems with the ATtiny84 and ATtiny85 sections.  For those particular errors, I don't think it matters.

There are four things you can do...

1. Ignore the errors until the problem stops you from doing something important.

2. Manually edit the avrdude.conf.  Essentially, you copy-and-paste from other working sections.

3. Replace avrdude.conf with a newer / correct version.

4. Use the latest GCC AVR compiler.  I have been for a few months.


Frozen_One

You the man!

I took the easiest option of the two of course :
Quote
1. Select the 1 MHz option and re-upload.

I edited the boards.txt and repeated the 2 changes to the ATmega85 @ 1MHz section
[size=9][I am being extra descriptive for those following this to learn, as to 'not assume' as much as possible][/size]

The 2nd option will be good to keep in my toolbox, should I need more performance in the future.


Quote
3. Replace avrdude.conf with a newer / correct version.

4. Use the latest GCC AVR compiler.  I have been for a few months.

Would re-downloading the main Arduino v21 file from http://www.arduino.cc/ deliver the freshest versions of these?

Coding Badly

Quote
Would re-downloading the main Arduino v21 file from www.arduino.cc/ deliver the freshest versions of these?

Not yet.  I think the tool-chain through Arduino 0022 is the same.  I believe the Arduino developers are taking the necessary steps to use a newer tool-chain.  Probably the next release.

For #4, I downloaded the latest WinAVR to get the latest tool-chain.  "Installing" amounted to renaming the "{ArduinoRoot}\hardware\tools\avr" directory and moving all of WinAVR to "{ArduinoRoot}\hardware\tools\avr".

Frozen_One

I followed the steps and it said it couldn't find the avrdude.conf file in the etc folder

I added the folder and file to the new avr folder and get the same error.  
Nothing to worry about- other than that, it works great.   I just thought I'd post my findings should others be trying the same thing.

Thanks again!

Coding Badly


Dang it!  Stupid memory!  I did have to move the configuration file (I actually copied it).

Assuming WinAVR is in the {ArduinoRoot}\hardware\tools\avr directory, locate "avrdude.conf" in...

 {ArduinoRoot}\hardware\tools\avr\bin

...and copy it to...

 {ArduinoRoot}\hardware\tools\avr\etc


But, you've already done that so there's probably something else I can't remember.

Go Up