Welcome to Workshop 88’s Tiny85 Class Please download Tiny core libs from: (for Arduino 1.0, not 1.5!) Unzip and.

Slides:



Advertisements
Similar presentations
Lecture 1 – Arduino Basics
Advertisements

Lab7: Introduction to Arduino
How to use Arduino By: Andrew Hoffmaster.
ARM development environment Modified Content Philips LPC2106 ARM chip ARM target board PSPad customised development environment Troubleshooting.
B.RAMAMURTHY Arduino and Automotive Embedded Systems July 27, 2014 CSE651C, B. Ramamurthy 1.
Introduction CS212 Dick Steflik. What is CS-212 Primarily an introduction to linear and non-linear data structures  arrays  stacks and queues  lists.
Fuses and Lock Bits The ATMega128 has several special memory areas -Six lock bits which determine program memory features. -Three fuse bytes which determine.
AVR 8-bit RISC micro controllers by Atmel Seamk / ICT / Seppo Stenberg General features of AVR family Development tools - board, compiler, simulator etc.
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
Intel Do-It-Yourself Challenge Hello World with the Arduino IDE Nicolas Vailliet Intel.
Intel Do-It-Yourself Challenge Lab 1: Intel Galileo’s Arduino side Nicolas Vailliet
Embedded Programming and Robotics
Robotics Research Laboratory Louisiana State University.
Arduino Part 1 Topics: Microcontrollers Programming Basics: structure and variables Digital Output Analog to Digital Conversion.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
AVR  Modern RISC architecture: Compact and FAST.  Tuned for high level languages.  Consistent architecture across entire line.  Small AVR are subsets.
Little arduino microcontrollers Meghan Jimenez 12 February 2014.
328eForth for Arduino Uno C. H. Ting February 16, 2012 SVFIG.
AVR Microcontrollers.
Programming ATtinys Paul MacDougal 7/8/13.
LVTech / / IRC #makelv on freenode.net Jared Steckel AN INTRODUCTION.
1 AVR Session 2 Master : Dr.jafari Authors: M.H Edrisi, hadi.edrisi yyyy aaaa hhhh oooo oooo.... cccc oooo mmmm.
Clock Options and Sleep Modes. Clock Sources Flash Fuse bits can be programmed to choose one of the following Clock sources: 1. External RC Osc. f = 1/(3RC).
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Introduction to the Arduino
Arduino 101 Instructors: Ted Markson / Jim Sweeney.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Getting Started With the Arduino Uno
智慧電子應用設計導論(1/3) Arduino MEGA 2560
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
ATtiny Programming Shield for Arduino TYWu. Reference Programming-Shield-for-Arduino-1/
Lab 1 Summary.
ARDUINO OVERVIEW Bob Wilton – KF5TPQ. ARDUINO UNO.
Components of a typical full-featured microcontroller.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
Arduino.
Arduino Part 1 Topics: Microcontrollers
Welcome to Arduino A Microcontroller.
By Rick Darby Sponsors: Geekspace Gwinnett The WorkSpot
Obstacle avoiding robot { pixel }
Scrolling LCD using Arduino.
Government Engg College Bhuj E. C. Engg. Department
ATMEL AVR 8 bit RISC MICROCONTROLLERS
Home automation using Arduino & ‘PIR sensor’
Automatic human detector garbage can.
Arduino and Automotive Embedded Systems
UTA010 : Engineering Design – II
An Arduino Workshop A Microcontroller.
Welcome to Arduino A Microcontroller.
Topics: ArduinoIO package Simulink with arduinoIO
Arduino Part 1 Topics: Microcontrollers Programming Basics
‘SONAR’ using Arduino & ultrasonic distance sensor
The Arduino Microcontroller: Atmel AVR Atmega 328
Arduino and Design of Embedded Applications
مقدمة في الاردنيو د فضل الاكوع.
Introduction to Microprocessors and Microcontrollers
میکرو کنترلر های AVR مدرس: مسعود بهمن پور
ریز پردازنده. ریز پردازنده مراجع درس میکروکنترلرهای AVR برنامه نویسی اسمبلی و C محمدعلی مزیدی، سپهر نعیمی و سرمد نعیمی مرجع کامل میکروکنترلرهای AVR.
Lecturer: Reza Arjmandi Autumn 2015
Snowman pcb design workshop – Breadboarding / Programming ATTiny85
Introduction to Arduino
Lab #1: Getting Started.
Arduino Board.
Arduino म्हणजे काय?.
Introduction to arduino
Introduction to Arduino IDE and Software
Presented By,  Mamata Yadav (BE Elex & Comm.) Vice R&D Coordinator(HW), PCRT  Payal Shah (BE Elex & Comm.)  Ananta Das (BE Elex & Comm.) R&D Team,PCRT.
Presentation transcript:

Welcome to Workshop 88’s Tiny85 Class Please download Tiny core libs from: (for Arduino 1.0, not 1.5!) Unzip and stash the ‘tiny’ folder for later. ver 1.1 2/1/14

Objective of class You walk out with a Tiny85 with code that you wrote and that you burned into the chip.

What we’ll cover Why use a Tiny85 (or friends)? Why not? How Arduino IDE works with Tinys Putting new core libs on your IDE Put a Tiny blinkie on your breadboard Write your own blinkie Porting code to Tiny85 Mapping Tiny85 pins to Arduino pins How to burn code to a Tiny: programming, programmers, programs… Burn your blinkie! Fuses and avrdude Using RESET as a 6 th I/O pin Commercial Tiny85s Other Tinys: 84, 4313

Atmel 8 bit AVR familes Mega family – AtMega328P (Arduino!) – AtMega2560 (Mega) – more Tiny family – AtTiny25/45/85 – AtTiny24/44/84 – AtTiny2313/4313 – more AVR stands for Alf (Egil Bogen) and Vegard (Wollan)'s RISC processor (There’s also an Xmega family, as well as a 32 bit family.)

What’s inside Mega328P 32K program flash 2K RAM 1K EEPROM Two 8-bit counters One 16-bit counter Six PWM channels Serial USART I2C/TWI interface 8 channel A/D converter 23 I/O lines SPI interface Analog comparator Watchdog timer

What’s inside Mega328P Tiny85 32K 8K program flash 2K 512B RAM 1K 512 B EEPROM Two 8-bit counters One 16-bit counter Six Two PWM channels Serial USART I2C/TWI USI interface 8 4 channel A/D converter 23 6 I/O lines SPI interface Analog comparator Watchdog timer

From code to flash

compiler /linker libraries Binary executable Usually as a Hex File

From code to flash: ascii hex file

From code to flash Hex File on host Chip ?

From code to flash Hex File Chip Hardware programmer

From code to flash Hex File Chip programming software (avrdude) Hardware programmer usually serial

From code to flash Hex File Chip programming software (avrdude) Hardware programmer usually serial programming interface

From code to flash Hex File Chip programming software (avrdude) Hardware programmer usually serial programming interface wires!

From code to flash Hex File Chip programming software (avrdude) Hardware programmer usually serial programming interface wires! We’ll do it this way for Tiny85!

From code to flash Hex File Chip programming software (avrdude) USB serial! programming interface wires! Hardware programmer We’ll do it this way for Tiny85!

From code to flash Hex File Chip programming software (avrdude) USB serial! programming interface wires! running “ArduinoISP” sketch We’ll do it this way for Tiny85!

From code to flash: Arduino Hex File Chip programming software (avrdude) serial! programming interface programmer emulator program

From code to flash: Arduino Hex File Chip programming software (avrdude) serial! programming interface Arduino bootloader! programmer emulator program

From code to flash: Arduino Hex File Chip programming software (avrdude) serial programming interface Arduino bootloader! programmer emulator program USB serial driver USB-serial chip on Arduino USB

Arduino bootloader burner

From code to flash

Get your Tiny on! Refer to pinout and connect +5V and ground The Tiny is preprogrammed with a blink sketch on pin 5 Put an LED on pin 5 and verify that it works!

Installing Tiny core libs Unzip if needed Copy “tiny” directory to the “hardware” directory either: In main Arduino installation Win: Program Files/arduino-1.0.5/hardware linux: /usr/share/arduino/hardware In your Arduino directory (make dir “hardware” if needed) Win: My Documents/Arduino/hardware linux: $HOME/sketchbook/hardware

boards.txt Contains definitions for all available boards In top “tiny” directory, copy “Prospective Boards.txt” to “boards.txt” I suggest cleaning up your new “boards.txt”, leaving only stanzas for – 8 MHz – 1 MHz

Write your blinkie! Recognizable pattern 1-3 LEDs (5 max) Use variables or #defines for pins

Porting Tiny has: Digital pins 0-5 Analog pins A0-A3 Change your pin numbers to ones Tiny has Find the mapping in the Tiny core libs at hardware/tiny/cores/tiny/pins_arduino.c Figure out which physical pins you’re using!

Connecting Arduino as ISP to your Tiny85 You need 6 wires: Power and ground SPI lines MISO, MOSI, SCK Reset Line names are marked on the mini-shield

Using Arduino as ISP Plug in your Arduino Select the board type of your Arduino Load ArduinoISP from Examples Upload to your Arduino Plug in mini-shield (must be AFTER loading ArduinoISP!) Select Tiny85 board Select Arduino as ISP as Programmer Load your code Click Upload!

avrdude: path Windows: try \Program Files\arduino1.0.x\hardware \tools\avr\bin Linux: try /hardware/tools (mine was /usr/share/arduino/hardware/tools)

avrdude: command line $ avrdude – P /dev/ttyUSB0 (/dev/ttyACM0) – P COM4 (or whatever) – b – p t85 – c – t

avrdude: stop complaining! part id = "t85"; desc = "ATtiny85"; has_debugwire = yes; flash_instr = 0xB4, 0x02, 0x12; eeprom_instr = 0xBB, 0xFF, 0xBB, 0xEE, 0xBB, 0xCC, 0xB2, 0x0D, 0xBC, 0x02, 0xB4, 0x02, 0xBA, 0x0D, 0xBB, 0xBC, 0x99, 0xE1, 0xBB, 0xAC; ## next 2 are fakes so avrdude won't complain pagel = 1; bs2 = 1; ## no STK500 devcode in XML file, use the ATtiny45 one stk500_devcode = 0x14;

Fuses (Not what it sounds like) Nonvolatile configuration bits There are 3: – FUSE LOW BYTE – FUSE HIGH BYTE – FUSE EXTENDED BYTE Logic values confusing: 1 (not programmed) = FALSE

FUSE LOW BYTE

FUSE HIGH BYTE

FUSE EXTENDED BYTE

HV programmer/fuse resetter

Other Tiny85s: Babygnusbuino

Other Tiny85s: DigiSpark

Other Tiny85s: Gemma

Other Tiny85s: Trinket

Other Tiny85s: EezeeTiny

Other Tiny85s: PicoDuino

Other Tiny85s: my dollhouse nodes

Other Tinys PinsUSARTPWM chans A/D inputs Flash/RAM /EEPROM Tiny858No248K/512/512 Tiny8414No488K/512/512 Tiny431320Yes404K/256/256 Tiny13(a)8No241K/64/64 There are lots more, but these are a fine starting place.

Architectures