Programming Micro Controllers

Slides:



Advertisements
Similar presentations
AnaSonde Assembly. What is the AnaSonde? *Reads temperature, pressure, and humidity data from the atmosphere *After it is sent into the atmosphere, it.
Advertisements

Lab7: Introduction to Arduino
Living with the Lab Using Your Arduino, Breadboard and Multimeter EAS 199A Fall 2011 Work in teams of two!
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Embedded Programming and Robotics
1 DC ELECTRICAL CIRCUITS ELECTRONIC TRAINER AND BREADBOARDING.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
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.
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Programming ATtinys Paul MacDougal 7/8/13.
Objectives How Microcontroller works
Microprocessors Tutorial 1: Arduino Basics
Arduino. What is it? A open-source software suite and single-board microcontroller. Allows easy and affordable prototyping of microcontroller applications.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis and Linz Craig.
Tweaking Your Simon Adding a photoresistor and changing code Instruction by Pete Lewis.
Jim Ng 15/1/2014 CENG4480 TUTORIAL 1. ABOUT ME Current MPhil Student supervised by Prof. Mak You can find me at Rm116 in SHB
SUPER TOASTER Wes Brown Eastern Kentucky University Computer Electronic Networking.
Microprocessors Tutorial 1: Arduino Basics
Programming the Geiger Counter Board 1. Arduino Files Go to and download the latest Arduino.
1 - Remove LED from 13 and GND - Bring out your breadboard from HW#4 Arduino Overview:
Microcontroller basics Embedded systems for mortals.
Prepared By: H.D.Shukla. ULN2803 Each of the digital i/o pins on the Arduino can only source or sink 40mA, and pushing the Arduino past these limits may.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Prototyping with Microcontrollers and Sensors. Overview Objective Background Information Problem Statement Materials Procedure Assignment Closing.
Arduino.
ARDUINO BASED UNDERGROUND CABLE FAULT DETECTION
Arduino Part 1 Topics: Microcontrollers
The Breadboard The Breadboard Digital Electronics TM
Build on a Breadboard Simulator
By Rick Darby Sponsors: Geekspace Gwinnett The WorkSpot
RASPBERRY PI WORKSHOP.
Overview What is Arduino? What is it used for? How to get started
Prototyping with Microcontrollers and Sensors
Downloading Arduino FOR WINDOWS.
Arduino is an open-source platform for building electronics projects
Why Won’t My Arduino Work?
Microprocessors Tutorial 1: Arduino Basics
An Arduino Workshop A Microcontroller.
Overview What is Arduino? What is it used for? How to get started
Welcome to Arduino A Microcontroller.
Arduino Development for Beginners
UCD ElecSoc Robotics Club 2017/2018
Arduino Part 1 Topics: Microcontrollers Programming Basics
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
مقدمة في الاردنيو د فضل الاكوع.
The Breadboard The Breadboard Digital Electronics TM
What is Arduino? By James Tedder.
How a 555 Timer Works Objectives:
Arduino 101 Credit(s):
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
Welcome to Digital Electronics using the Arduino Board
Introducing the Arduino Uno
Arduino Part 4 Let there be more light.
Intro to Micro Controllers
All About Serial.
Prototyping with Micro-controllers, Sensors, and Materials
Snowman pcb design workshop – Breadboarding / Programming ATTiny85
Having fun with Arduino
Prototyping with Micro-controllers, Sensors, and Materials
Aeroponic Engineering and Vertical Farming
The Breadboard The Breadboard Digital Electronics TM
Arduino Leonardo Setup
Lab #1: Getting Started.
Arduino Uno circuit basics
Prototyping with Micro-controllers, Sensors, and Materials
Intro to Arduino Part 2 The Breadboard
Prototyping with Micro-controllers, Sensors, and Materials
2019 Investing Now Summer Program
Presentation transcript:

Programming Micro Controllers ATMEGA328

Overview Why? Arduinos are great prototyping tools but are very expensive ($20 to $50). Stand alone microcontrollers are vastly cheaper ($0.99 to $5). Stand alone microcontrollers are also more compact We are going to introduce standalone microcontrollers and show you the basics of programming and using one We will be using the ATMEGA328 as an example This is the same microcontroller that most Arduinos are built around

Steps 1: Set up the microcontroller on the bread board There are several components needed for the microcontroller to run reliably and communicate with the programmer 2: Boot load the microcontroller ship Think of this like downloading the operating system for the chip 3: Program the microchip Adding code to change the functionality of the chip 4: Add additional hardware with the help of pinouts

Step 1 First we need to set up our microcontroller on the breadboard You will need a following components to set up an ATMEGA328 Two 22pF capacitors One 10KΩ resistor One 16MHz Crystal 6 to 10 jumper cables Obviously one ATMEGA328 microcontroller On the next page is a schematic showing you how to set up the ATMEGA on a breadboard

Wiring diagram of set up Schematic of set up

Picture of set up

Talking to the Chip Before we can move on to step 2 we need to discuss how to get information off your computer and onto your microcontroller There are several options Use an Arduino Duemilanove Board Use a dedicated microcontroller programmer In this tutorial we will use another Arduino Board to program our ATMEGA328 If you want to read more about different options here is a link going more in depth on the issue.

Step 2 : The Wiring Step 2 is boot loading the ATMEGA328 Boot loading is essentially the same as installing the operating system that the chip will use First connect your Arduino to the breadboard according to the schematic on the next page Disconnect any external power sources attached to the board Use the 5V and GND pins of the Arduino to power the board as shown in the schematic

Boot Loading Schematic

Step 2: The Software After you have verified everything is correctly wired it’s time to move to the software First upload the Arduino ISP code from examples Secondly Set the programmer to the correct setting

Step 2: The Software Finally boot load the chip! This could take some time expect between thirty seconds and two minutes of time If it gives you an “out of synch” error do not worry this is common and 99% of the time can be fixed just by trying again

Testing Your Boot Load All chips will automatically have the example program “Blink” on the chip after you boot load it Attach a 560Ω resistor and an LED to PIN13 If it blinks your boot load was successful! If not don’t panic your LED might be burnt out or wiring wrong troubleshoot and reboot if necessary

Step 3: The Wiring Now that the chip is boot loaded it is ready to receive code Unfortunately this requires a different wiring set up This set up does not require any additional hardware other than a few jumpers First remove the Arduino’s microcontroller from it’s perch (this is fairly tough and will require some prying) Secondly wire according to schematic on the next page

Programming Schematic

Programming Set Up

Step 3: The Software This is where things get familiar Select the Duemilanove w/ ATmega328 from the Board menu Now you can upload code the exact same way that you would on an Arduino!

Step 4 At this point you can add hardware and upload sketches as you normally would any Arduino Below is the Pin Map for the ATMEGA328 Red lettering indicates Arduino equivalent

Words of Caution Most microcontroller chips can only handle 5V. You will very likely short circuit your chip if you give feed it more than 5V! Do not forget to remove the microcontroller on the Arduino board when programming or your program WILL NOT upload to the chip on the bread board. If you want to learn more check out the links below http://arduino.cc/en/Tutorial/ArduinoToBreadboard http://arduino.cc/en/Main/Standalone https://learn.sparkfun.com/tutorials/tiny-avr-programmer-hookup-guide