Menu

How to program the ATtiny88 using "Arduino as ISP" and AVRdude

Rikki
2022-08-15
2023-04-18
  • Rikki

    Rikki - 2022-08-15

    So I ended up buying some ATtiny88 breakout boards online. They are advertised as Nano equivalents but are inferior to the Nano in having low RAM (512 bytes vs 2048) and missing some other features. Specifically the lack of a comport for programming.

    The ATtiny88 USB interface only works in Arduino IDE with some tweaking and I'm not in the mood for learning how to write sketches after being in the GCB environment for years.

    I have looked around online and cannot find a complete all-in-one tutorial for programming the ATtiny88 via AVRdude. NB: the only baud rate that works is 19200. Every other baud rate failed in testing

    Here is how I figured it out and made a new programmer entry in Synwrite to fully automate the compile & program progress.

    1. Obtain an arduino UNO or mega. Upload the attached hex file to convert the UNO into an ISP programmer or follow steps 2 -5 here.

    2. Download the arduino IDE software. This is used to upload a sketch to the UNO that converts it into an ISP programmer.

    3. Connect the UNO to your PC via USB. In Arduino IDE goto Tools -> Set board and select "Arduino UNO". Select the correct com port for the Arduino Uno as show in device manager.

    4. Goto file -> examples -> ArduinoISP to select the sketch that will convert the UNO to an ISP programmer. I found a better(?) working version at adafruit. Simply copy all the text from this link into a new sketch https://raw.githubusercontent.com/adafruit/ArduinoISP/master/ArduinoISP.ino (or download the ino file attached and open it in Arduino IDE) and goto step 5

    5. click upload and confirm the sketch uploaded correctly by checking the status window at the bottom of the Arduino IDE

    6. Build a cable to connect the ISP headers on the UNO and target (ATtiny88) board as described below. Search online for the UNO ISP header pinout, the ISP header happens to be labelled underneath the ATtiny88 breakout board.

    7. Connect pin 10 of the UNO to the reset pin on target ISP header

    8. Connect VCC to VCC, MOSI to MOSI, MISO to MISO, GND to GND, SCK to SCK.

    9. Open Synwrite -> IDE tools -> GCB tools -> Edit programmer preferences

    10. Click "add" and a program editor window opens

    11. Enter name Arduino as ISP or similar

    12. In the "Use if" box paste DEF(AVR)

    13. In the "File" box paste %instdir%..\avrdude\avrdude.exe

    14. In the "command line parameters" paste -c avrisp -p t88 -P %Port% -b 19200 -U flash:w:"%FileName%":a

    15. Select the com port that corresponds to the connected UNO port

    16. click ok

    17. Enter the sample code here into sywrite:

      ` #chip tiny88, 12

    dir portd.0 out

    main:

    set portd.0 on
    wait 500 ms
    set portd.0 off
    wait 500 ms

    goto main`

    Hit "Hex/Flash" to upload the code to the Attiny88. If all goes well the LED should blink on and off every second

     

    Last edit: Rikki 2022-08-15
  • Anobium

    Anobium - 2022-08-15

    Great job. If you attach the HEX for the UNO... then, folks do not need the Arduino IDE - can they just use Avrdude to load this hex into the UNO?

     
  • Rikki

    Rikki - 2022-08-15

    That is a great idea and that hex file is now attached to the original post. (I wrote the tutorial to help anyone with limited knowledge of programming to get going)

     

    Last edit: Rikki 2022-08-15
  • Anobium

    Anobium - 2022-08-15

    Rikki - this is too good a page to loose within the Forum - here is my five minute hack at your great document.

    This doc is in ASCII and will be part of the Help once you have had an review of the words... I did change the start.. a little.

     

    Last edit: Anobium 2022-08-15
  • Rikki

    Rikki - 2022-08-16

    Anobium- I'd be delighted if this write-up could be of use to the community. I'm not seeing the ASCII doc, had you meant to attach it?

     
  • Hank Carr

    Hank Carr - 2023-04-18

    Good afternoon,

    I'm sorry...this is my first day...I'm moving over from BascomAVR.

    I am struggling with programming my first chip. I have an Arduino UNO that I've programmed as an ISP and I know is working. I've setup the programmer in GC Code. When I try to program the ATTINY85 I get the message:

    avrdude.exe: Device signature = 0x1e950f (probably m328p)
    avrdude.exe: Expected signature for ATtiny85 is 1E 93 0B
    Double check chip, or use -F to override this check.

    Any help you can provide would be greatly appreciated.

    Hank.

     
  • Anobium

    Anobium - 2023-04-18

    Welcome.

    Question: If you create a HEX you can program using AVRDUDE ? I guess using ATMEL STK500 version1 programmer. Or, how do you program using ADVRUDE with the UNO programmer?

    Because, this is important. Once your share how AVRDUDE then you create a new entry on Programmer Preferences using the paramters you use AVRDUDE.

    Hope this makes sense.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.