Intro to Micro Controllers

Slides:



Advertisements
Similar presentations
Lab7: Introduction to Arduino
Advertisements

How to use Arduino By: Andrew Hoffmaster.
Embedded Sumo 1T4 – 1T5 UTRA.
Getting your Arduino to Work: Microsoft Windows 1.Install Arduino programming environment 2.Install Arduino Uno driver 3.Make sure you can download a program.
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
 Main Components:  Sensors  Micro controller  Motor drivers  Chasis.
Dr. Hoganson CSIS HC11 Demo Program This is our first lab using the 68HC11 microcontroller. We will “talk” to the microcontroller from a PC, run.
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Vex 1.0 © 2005 Carnegie Mellon Robotics Academy Inc. Touch Sensor This lesson will explain how to hook a standard micro switch into the Vex system to function.
Intel Do-It-Yourself Challenge Hello World with the Arduino IDE Nicolas Vailliet Intel.
Embedded Programming and Robotics
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Project Futura.
Advanced Digital Circuits ECET 146 Week 4 Professor Iskandar Hack ET 221G,
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.
Engineering H193 - Team Project Gateway Engineering Education Coalition Lab 1P. 1Spring Quarter Introduction to Sensors Lab 1.
Programming the Geiger Counter Board 1. Arduino Files Go to and download the latest Arduino.
Getting Started With the Arduino Uno
ATtiny Programming Shield for Arduino TYWu. Reference Programming-Shield-for-Arduino-1/
Introduction to Arduino A very basic intro to Arduino, the IDE and the Servos class.
Atmega328p Introduction for Digital and PWM Output Brion L Fuller II Robotics Club.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
1 Introduction to Coding. 2 Example Codes A lot of example codes are given with Arduino IDE A code can often be based on a previous example rather than.
Jeremy Sandoval University of Washington May 14, 2013
Using a SparkFun™ serial LCD with an Arduino
Having fun with code, using Arduino in a middle school CS classroom
Arduino.
After Construction Name: Per #:.
Embedded Systems Intro to the Arduino
Getting Started: Building & Programming
Introduction of Embedded C and demo programs
European Robotic LABoratory
DE2-115 Control Panel - Part I
By Rick Darby Sponsors: Geekspace Gwinnett The WorkSpot
Overview What is Arduino? What is it used for? How to get started
Implementation of Embedded OS
If you want to swing an robot arm or …
Fundamentals of Computer Engineering
Computer System Laboratory
Downloading Arduino FOR WINDOWS.
Introduction to the Arduino
Why Won’t My Arduino Work?
UTA010 : Engineering Design – II
Overview What is Arduino? What is it used for? How to get started
Welcome to Arduino A Microcontroller.
Arduino Development for Beginners
Arduino Part 1 Topics: Microcontrollers Programming Basics
Introduction to Arduino Microcontrollers
Introduction to Arduino Microcontrollers
Roller Coaster Design Project
مقدمة في الاردنيو د فضل الاكوع.
Schedule 8:00-11:00 Workshop: Arduino Fundamentals
Arduino 101 Credit(s):
Working with Arduino: Lesson #1: Getting Acquainted with the Kit
3.4 Mi-com upload if necessary
How to Run a Java Program
Welcome to Digital Electronics using the Arduino Board
Programming Micro Controllers
All About Serial.
Using screens and adding two numbers - addda.cbl
Having fun with Arduino
Aeroponic Engineering and Vertical Farming
Arduino Leonardo Setup
Lab #1: Getting Started.
Arduino Uno circuit basics
Downloading to the NXT requires the correct hardware setup
ECE 3567 Microcontrollers Lab
Presentation transcript:

Intro to Micro Controllers AVR Butterfly

Overview For this section of the course, we are going to turn to our good friend Smiley (smileymicros.com) to teach us the fundamentals of Micro Controllers. We are going to start by working through the PDF entitled Smiley’s AVR Butterfly Introduction Step 1 is to simply read over the entire file to get an idea of the end goal. In the next slides we will highlight important sections and the actual labs we will perform

Step 1 First we need to get our Butterfly to talk to our computer To create a serial cable to hook up our Butterfly follow the instructions here: http://www.youtube.com/watch?v=48RH68mYk24 The video assumes you have a stock DB9 serial cable with a female end Once you have identified the wires for the rx, tx, and ground lines, solder wires to the ends as shown here: http://www.youtube.com/watch?v=94lJMXngBWU

Step 2 Now we need to prepare the actual Butterfly by adding headers so we can attach the serial, power, and output wires. Follow the video here: http://www.youtube.com/watch?v=esD8RrohLG8 Once your headers are installed, attach your serial cable to the Butterfly as depicted in Smiley page 18. Power your Butterfly using the 5v and gnd lines from your Arduino as shown on Smiley 19 (the LED indicator is not necessary)

Step 3 Before trying to control an LED, it is necessary to ensure that we have communication between the AVR Butterfly and our computer. It is necessary to use serial port for communication. If your computer does not have one, it is also possible to use a USB to RS232 adapter, depicted on the next slide

USB – RS232 Adapters

Step 4 After plugging your adapter into your computer and installing the drivers, setup may continue as if your computer has an internal serial port. Follow the directions in Smiley’s Butterfly FAQ document starting on page 8 to set the com port number of your serial port to a value between 1 and 4 Remember this number!

Step 5 Download the putty terminal program from Course Site Launch it and configure it as follows: Select Serial for connection type For Serial line replace COM1 with your COM port from step 4 (type the phrase COM#) Set the speed to 19200 Click open and a terminal window will appear

Step 6 You should have the female end of your modified serial cable attached to the male end of the serial port on your computer The loose wires attached to RX, TX, and GND should be attached to the Butterfly as specified in step 2 Follow the directions half way down on page 20 of Smiley’s Butterfly intro to test your connection. It is imperative that you see the question marks upon boot-up of the Butterfly in order for later steps to work To reset your Butterfly simply pull out the 5v line and plug it back in

Step 7 Once we know our Butterfly can talk to our computer we need to install the development environment so we can write code Download AVR Tools and AVR Studio from Course Site Follow the instructions starting on page 21 of Smiley’s intro to install the tool chain and studio (the order is important)

Step 8 Now it is time to write our first program – to blink a LED Follow the directions starting on page 22 of the intro, but instead name your project Blink At page 25 of the document we will supplement the code on the next slide rather than the supplied code (since we are writing Blink.c not CyclonicEyes.c)

Code for Blink.c // Blink.c #include <avr/io.h> #define F_CPU 1000000UL #include <util/delay.h> int main (void) { // set PORTD for output DDRD = 0xFF; while(1) { PORTD = 2; _delay_loop_2(30000); PORTD = 0; } return 1;

Step 9 It is necessary to compile and upload Blink.c to the AVR Butterfly Follow pages 26 and 27 of Smiley’s intro to complete this. Once you have uploaded the code (AVR Program says successful) then power cycle your Butterfly and turn it on by pressing the joystick up a few times If you did everything correctly you should see a gibberish character displayed on the LCD

Step 10 The hardware needed to blink the LED is quite simple Wire a LED as shown in lesson 1 Rather than attaching the anode to a 5 volt source attach it to port D1 on your Butterfly (a pin out is available in the Smiley intro on page 28) Your LED should be Blinking! A picture showing the actual circuit is on the next slide Again remember that the Arduino is being used simply as a power supply

Blinking LED Circuit