Arduino Tiny

I've followed your suggestions and now it works. Thanks.

But without any help I wouldn't be able to make my code running. Tiny core is good but the documentation lacks a little bit :sweat_smile:

You are welcome. I'm glad you have it working.

PS:
I'm working on a multi-micro library. The library will be widely available soon.

Sorry, one question. What about Arduino IDE 1.0 and Tiny core?
I mean, when the Arduino IDE 1.0 will be released, will the actual Tiny core be compatible with it or should we wait for a Tiny core 1.0?

I'm using Tiny85 and Tiny84 and I would like to know about Tiny core upgrades :wink:

Sorry, one question.

No need to apologize. The point of the forum is to ask questions.

What about Arduino IDE 1.0 and Tiny core?

I've been tracking, reviewing, and testing against the changes to the Arduino IDE. As far as I can tell, there is just one change required. Basically, an "Arduino.h" file has to be added to the core directory that includes "WProgram.h"...
http://code.google.com/p/arduino-tiny/issues/detail?id=21

In general, I will always wait until after the next IDE has been released before releasing a compatible Tiny Core.

I'm using Tiny85 and Tiny84 and I would like to know about Tiny core upgrades

I have lots of goodies planned for the next release. The work is progressing nicely. Unfortunately, it may be a few weeks before its ready.

? Variation of the digital*Fast functions designed to minimize the Flash consumed
? Inlined versions of the other core functions (tone, analogWrite, analogRead, etcetera) also designed to minimize the Flash consumed
? Dramatically improved Tiny Tuner
? Improvements the the Arduino ISP (aka Mega ISP) sketch
? Nice support for the ATtiny13
? Portability improvements

I mean, when the Arduino IDE 1.0 will be released, will the actual Tiny core be compatible with it or should we wait for a Tiny core 1.0?

No reason to wait. The one change is enough that you can start using the 1.0 IDE.

Thanks for your replay.

Hi everyone.

I have a question in regards to programming capabilities of the ATtiny45/85.

Hopefully this question will be simple enough.

So like many others I have created a simple project for my Arduino Uno.
It works flawlessly and all is well, except I am exploring the idea of simplification.

Here is what it does:
User input - 10k POT on Analog 0
Output - PWM output Pin 9, duty cycle is controlled by the POT
All it does is drive a single solenoid position. (a control circuit handles the current)

Requirement: I have set a fixed 50Hz for the output using Timer.1, it must operate at this Hz.
PWM output then must be used through Timer.1, not Analogwrite.

Can this be reproduced using Attiny 45 or 85?
I have no experience using AVL(Assembler).
More importantly, using your Arduino Tiny release, can the 45 or 85 be programmed through the Arduino retaining the same functions?

Thanks for any help you can provide.

By default, on the ATtiny85 family processors, timer 1 is used for the time functions (like millis). Timer 0 is free for you to use. You should be able to switch the roles so that timer 1 is available but that does not work correctly.

On ATtiny85 processors, timer 1 is a difficult beast because it is different than the ATmega timers. Your application will probably not work on the ATtiny85 timer 1 without modification.

Timer 0 on the ATtiny85 processors is identical to timer 0 and timer 2 on the Uno processor. If you can, I suggest getting your application to use timer 2. If you can get that working, porting to the ATtiny85 is trivial (search-and-replace with some testing).

Hi everyone,

I think I'm going to jump out of my place through the window ! I can't make the High low tech MIT tutorial to work properly. I have an attiny 85 20-PU, I guess it should be somewhat compatible with arduinoisp. Well, I connected my 3 leds to see what ArduinoIsp is doing, and the only thing I can get is that the heartbeat led is blinking properly. When I upload the blink sketch after having selected "Attiny 85 /w ArduinoISP", this 'heartbeat' led is just not heartbeating anymore, it's 'HIGH' only. And the other two leds are not blinking at all (the tree leds are correcly pinned, I see them blinking two time each when I reset the Arduino Uno).

Here is the error message I get:

Binary sketch size: 658 bytes (of a 8192 byte maximum)
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

FYI, since I'm using an UNO, I connected a 100uF capacitor between Reset and Ground.

2nd part: I tried to use the Arduino Tiny latest files in place of the one found in the High-low tech page and It's doing the same thing. Please help :slight_smile: Thanks !!!

Hi,

I connected a 100uF capacitor between Reset and Ground.

At what point?

I'm sorry, if you mean why, it's because the Uno needs this capacitor to disable the auto reset. (while the other boards should have a resistance between Reset and +5v I think)

Edit: here is the long version of the output.

Binary sketch size: 748 bytes (of a 8192 byte maximum)
D:\arduino-0022\hardware/tools/avr/bin/avrdude -CD:\arduino-0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny85 -cstk500v1 -P\\.\COM6 -b19200 -Uflash:w:C:\Users\henri\AppData\Local\Temp\build149233312836482128.tmp\Blink2.cpp.hex:i 

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "D:\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM6
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 19200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: Recv: 
         AVR Part              : ATtiny85
         Chip Erase delay      : 4500 us
         PAGEL                 : P00
         BS2                   : P00
         RESET disposition     : possible i/o
         RETRY pulse           : SCK
         serial program mode   : yes
         parallel program mode : yes
         Timeout               : 200
         StabDelay             : 100
         CmdexeDelay           : 25
         SyncLoops             : 32
         ByteDelay             : 0
         PollIndex             : 3
         PollValue             : 0x53
         Memory Detail         :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     6     4    0 no        512    4      0  4000  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: A [41] . [98]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
avrdude: Send: A [41] . [84]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: A [41] . [85]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: A [41] . [86]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: A [41] . [87]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: A [41] . [89]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Recv: 
avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00]   [20] . [00]   [20] 
avrdude: Recv: 
avrdude: Recv: 
avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85
avrdude: Send: P [50]   [20] 
avrdude: Recv: 
avrdude: stk500_program_enable(): protocol error, expect=0x14, resp=0x50
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: Send: Q [51]   [20] 
avrdude: Recv: 
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.

Hmm, ok.
I will see if I can utilize timer.2 instead.
Then move forward from there.
Thanks

enjoyaol:
I'm sorry, if you mean why...

I had wanted to know why then that would have been the question.

You start with an Uno that does not have a capacitor connected. At some point in time, you connect the capacitor. The question is, what did you do before you connected the capacitor?

Sorry, my english is not my first language. Before connecting the capacitor, I programmes the Uno with the ArduinoISP sketch and it seems to work since the heartbeat led is blinking high/low/high/low.

After that, I connect the attiny to the breadboard accordingly to the schema over the MIT website. Then I connect the capacitor, and etc etc... Do I need also to use the resistor ?

enjoyaol:
Sorry, my english is not my first language.

No need to apologize. None of us are born being able to read English. If there is something you do not understand, just say so.

Before connecting the capacitor, I programmes the Uno with the ArduinoISP sketch and it seems to work since the heartbeat led is blinking high/low/high/low.

Perfect. That's exactly what you should do.

After that, I connect the attiny to the breadboard accordingly to the schema over the MIT website. Then I connect the capacitor,

Perfect. That's exactly what you should do.

Do I need also to use the resistor ?

As far as I know, no one has needed the 120 ohm resistor in addition to a capacitor.

Is the capacitor an electrolytic? Does it have a plus or minus on the case?

How long ago did you purchase the Arduino?

Do you have a second Arduino?

Yes the capacitor has a minus that I connect to Ground. The UNO is pretty new (2 months old).
I'm going to try to get an ISP programmer in some brick and mortar shop today to see if that works..

Can the Timer.1 library be modified for use with Timer.2?
http://code.google.com/p/arduino-timerone/
Since this is the sole reason I use the Timer.1 library:
"The development of this library began with the need for a way to quickly and easily set the PWM period or frequency"

I understand Timer1 is 16bit and Timer2 is 8 bit.

Well, I got it to work with another breadboard. Sorry for that ! Happy ! :slight_smile:

I'm glad you have it working. No need to apologize.

In Reply #28 and #29, I reported success with BHogan TinyWireS I2C library on an ATtiny85. I can now report that, following similar steps I have an ATtiny84 I2C slave talking to an Uno. Code is the same for master and slave. TinyWireS did have to get tweaked to add ATtiny84 # defines in usiTwiSlave.c. Using Arduino Tiny core and Pololu AVR USB Programmer.

Interesting, in this case it is working fine without any external pull-ups.

George