Digispark Tiny85 Programing Tutorial

Required items list:

 
You can compare the size with intel stiker. it's 8mm by 9mm
Tiny85 from ebay - http://www.ebay.com/itm/191899183295

Specification:
  • 8K Flash memory
  • 6x Digital pins P0 - P5 (two shared for USB communication)
  • 4x ADC pins (shared with digital pins)
  • SPI interface (shared with digital pins)
  • I2C interface (shared with digital pins)
  • 3x PWM outputs (shared with digital pins)
  • Can be powered via USB, 5V, or VIN (7-12V) inputs
  • On board 5V 0.5A regulator for external supply
  • Power LED and user controlled LED
More info on ATtiny85 on Atmel - http://www.atmel.com/devices/attiny85.aspx?tab=parameters
Datasheets of ATtiny25-ATtiny45-ATtiny85 -Download or Mirror

1.First of all download the relevant driver to program Tiny85 board.
https://github.com/digistump/DigistumpArduino/releases/download/1.6.7/Digistump.Drivers.zip



1.1. If driver installation success, Go to Computer Management - > Device Manager window will show the Libusb-win32 Usb Device (I installed in windows 7 - 32bit PC)

 
2.Setup Arduino IDE to program Tiny85
      2.1 Install Arduino IDE if you doesn't have it from https://www.arduino.cc/en/Main/Software
      2.2 Install Additional programing board.
            2.2.1.Go to File -> Preference.
 
          2.2.2  Put this URL in Additional Boards Manager URLs text box.
                    http://digistump.com/package_digistump_index.json



      2.2.3 Go to Tools - > Boards - > Board Manager. From Board Manager dialog select Type as Contributed. From the board list Select Digistump AVR Boards By Digistump and click Install Button.



      Tiny85 Pin Layout
  • All pins can be used as Digital I/O
  • Pin 0 → I2C SDA, PWM (LED on Model B)
  • Pin 1 → PWM (LED on Model A)
  • Pin 2 → I2C SCK, Analog In
  • Pin 3 → Analog In (also used for USB+ when USB is in use)
  • Pin 4 → PWM, Analog (also used for USB- when USB is in use)
  • Pin 5 → Analog In

    NOTE:
    Pins 2, 3, and 4 are capable of analog input, but, when using them as such, they should be referenced as A1, A3, or A2 respectively.

    int analogInPin = A1;
    pinMode(analogInPin, INPUT);
    int analogIn = analogRead(analogInPin); 



    3. Plug ATiny85 Board into computer using micro usb cable.
    4. Select the board type as Digispark (Default 16.5mhz) from Arduino IDE.

    Select Digispark Board for programing ATiny85

    5. In Arduino IDE select File -> Examples -> Digispark_Examples - > Start

    Arduino IDE  Menu to get sample code
     
    Arduino IDE with sample code for ATiny85
    6. Press Upload Button. (Sketch -> Upload)
    Then it's start to upload the code in to Tiny85.In console window (Red color text) they will ask to plug the device.If you already plug the device please unplug and plug again.Please check the console output image.

Comments

Post a Comment

Popular posts from this blog

Brother printer password reset using telnet

How to adjust the brightness in Samsung 19" SyncMaster SA100 LED monitor?

Samsung SA100 Monitor Brightness Adjustment Tool