Programming attiny88?

Has anyone tried to program the attiny88 using an arduino? This chip has the same number of I/Os as an atmega328 at only a third of the cost, it's even cheaper than the attiny85. The attiny88 also has an I2C interface which means that I could probably do with using attiny88s instead of atmega328 for a majority of my projects.

Cores:

https://github.com/TCWORLD/ATTinyCore 1.0.6

GitHub - SpenceKonde/ATTinyCore: Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8 1.6.x (otherwise same as above)

Supports the attiny x4, x5, x7, x61, x8, x313.

What's really lame about the '88 is that it doesn't have hardware serial (none of those do except the x7 and x313, neither of which I've tried). I got a few (so cheap!) but I never got around to powering them up. I suspect the cores work, though :stuck_out_tongue:

In terms of attractive tinies that aren't the 84/85/13, I'm rather a fan of the '841 (like an '84, only with dual hardware serial, spi, and 6 pwm channels, plus ADC on every pin - priced only pennies above the 84) and the '1634 (SOIC-20 with a dozen ADC channels, 2 hardware serials, 16k of flash, but only 4 PWM channels). Since they have hardware serial, you can fit a bootloader in without losing much memory (640 bytes) - core (incl optiboot) from my github:

None of those links seems to work.

What do you mean by the attiny88 doesn't have hardware serial? Do you mean an USART? I'll have a look at those chips you mentioned, using atmega328 in every application is often overkill so it would be nice to have some cheaper chips to choose from.

Attiny841 looks amazing by the way, it could replace my atmega328s in just about every application (I never need 32MB of flash). What is the difference between the tinies and megas exactly? Is there a fundemental difference between the two series other than memory size?

I linkified all those links. Every other forum autolinks URLs. The URLs all work for me.

Hardware serial = UART/USART

I think the difference between tiny and mega is just a marketing distinction - the tiny's are targeted at lower cost applictions so they have fewer on-chip peripherals, smaller packages, etc.

Yeah - that was my thought on the Tiny841 as well. They can replace the '328p for a lot of small projects, and in some ways they're better (dual uart!) - the biggest bummer is that the hardware I2C is slave only (ie, mostly useless). It does have real SPI though.

Okay, so I'm now trying to program an attiny88 using the attiny core linked above. I get this error message:

Arduino: 1.6.3 (Windows 7), Board: "ATtiny88 @ 8 MHz (internal oscillator; BOD disabled)"

Build options changed, rebuilding all

Sketch uses 334 bytes (4%) of program storage space. Maximum is 8,192 bytes.

Global variables use 9 bytes of dynamic memory.

Error while uploading: missing 'upload.tool' configuration parameter

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Dumb of me to not check my arduino version properly, using 1.6.0 made it work :slight_smile:

One last thing though, how do I set the fuses? The Tiny chips are running at 8Mhz with a prescaler of 8 making the clock run at 1Mhz which is a bit too slow for me. I've read that I can simply press "burn bootloader" to set the fuses, assuming that the correct fuses are set in the board.txt file, but pressing "burn bootloader" gives me this error:

Arduino: 1.6.0 (Windows 7), Board: "ATtiny88 @ 8 MHz (internal oscillator; BOD disabled)"

avrdude: invalid byte value (bootloader.unlock_bits) specified for immediate mode
avrdude: read from file 'bootloader.unlock_bits' failed
Error while burning bootloader.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

The leds on the arduino is flashing and it does successfully erase the attiny88 so there's at least some communication happening, but it does not change the fuses :frowning:

Finally I found ATTinyCore library. I have tested it with a blink sketch. Just download the zip file. Unzip and copy Attinycore-master directory into "program files/Arduino/hardware/arduino/avr" directory. Restart the IDEA. Select ATTiny x8 Series from the boards menu, and select the specific chip (48 or 88), clock speed, and BOD level from the appropriate menus that will appear in the tools menu after selecting ATTiny x8 series as the board.

I am also attempting to program an ATTiny88-PU using Arduino UNO board. However when I click on "Burn bootloader" on Arduino IDE, I get the followed (dreaded) error:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Error while burning bootloader.

My connections are as follows:

Arduino Pin Physical Pin on ATTiny88-PU
10 (SS) 16 (SS)
11 (MOSI) 17 (MOSI)
12 (MISO) 18 (MISO)
13 (SCK) 19 (SCK)
3.3V 20 (VACC) and 7 (VCC)
GND 22 (GND)

I have tested that the connection between the UNO board and computer is OK (I uploaded the Blink example to UNO and that works fine). So not sure what's wrong.

EDITED: I also tried connecting UNO Pin10 (SS) --> ATT88 Pin1 (RESET). That did not change anything (gives the same error).

Any ideas?

I was able to solve my problem. Just for completeness, following are the details of what I did:

Connections:

Arduino UNO Pin labels Physical Pin on ATTiny88-PU
10 (SS) 1 (RESET)
11 (MOSI) 17 (MOSI)
12 (MISO) 18 (MISO)
13 (SCK) 19 (SCK)
3.3V 20 (VACC) and 7 (VCC)
GND 22 (GND)

Procedure:

  1. Install ATTinyCore

  2. Select Tools->Board->Arduino/Genuino UNO (or whatever board you are using)

  3. Load ArduinoISP sketch from Files->examples->ArduinoISP

  4. Select Tools->Board->Attiny48/88. After this, the "Tools" menus should show the following for the board. Make clock, "B.O.D." and other selections as appropriate:

Board: "ATtiny48/88"
Chip: ATtiny88
Clock: "8MHz (internal)"
Save EEPRO: "EEPROM retained"
LTO: "Disabled"
B.O.D. Level: "B.O.D. Disabled"

  1. Select Tools->Programmer->"Arduino as ISP". The "Tools" menu should then show the following:

Programmer: "Arduino as ISP"

  1. Now upload your sketch for ATT88 as usual.
2 Likes