Microcontroller Programming

Slides:



Advertisements
Similar presentations
Developing an AVR Microcontroller System
Advertisements

Robotics Club, Snt Council2 The 3 Schools of Robotics: Mechanical Design – Types of motors – Material selection –
Indian Institute of Technology Hyderabad ROBOTICS LINE FOLLOWER HARI KISHAN TANDEY – ES12B1008 DILIP KONDAPARTHI – ES12B1010 SAI KARTIK – CE12B1015.
MICRO-CONTROLLER: A microcontroller is the brain of the robot: These are: 1. Integrated Circuits (ICs) 2. Programmable.
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
1 Lab2: A/D Converter. 2 This circuit connects a variable voltage to an A/D port on the AVR mcu. Your software running on the AVR mcu will read the digital.
Intro to AVR ATtiny2313 CS423 Dick Steflik. AVR ATtiny2313.
AVR32 GPIO CS-423 Dick Steflik. What is a GPIO GPIO – General Purpose Input/Output  Flexible software control digital signal  Each GPIO represents a.
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
Sensors And Micro-Controllers
AVR 8-bit RISC micro controllers by Atmel Seamk / ICT / Seppo Stenberg General features of AVR family Development tools - board, compiler, simulator etc.
Essentials of motors and motor driver
Robotics Research Laboratory Louisiana State University.
SENIOR DESIGN 10/3.
ATMEL AVR 8 bit RISC MICROCONTROLLERS
You must be knowing about Digital Integrated Circuits (ICs) right ? For example 7404: Hex Inverter 7408: Quad 2-input AND gate 7410: Triple 3-input NAND.
Camera Interfacing using ARM7
CALLISTO Double - Heterodyne - Frequency Agile - Radio - Spectrometer ERAC Symposium Heppenheim Sep 5/6/7th 2003 Meyer Hansueli ETH Zürich.
Microprocessor based Design for Biomedical Applications MBE 3 – MDBA II : The ATmega8 Basic Features (1)
AVR  Modern RISC architecture: Compact and FAST.  Tuned for high level languages.  Consistent architecture across entire line.  Small AVR are subsets.
Department of Electronic & Electrical Engineering Embedded system Aims: Introduction to: Hardware. Software Ideas for projects ? Robotics/Control/Sensors.
328eForth for Arduino Uno C. H. Ting February 16, 2012 SVFIG.
AVR Microcontrollers.
2.0 EMBEDDED CONTROLLER Engr. Hj. Mohamad Fauzi bin Zakaria Department of Mechatronics and Robotics Engineering Faculty of Electrical and Electronic Engineering.
Arduino Josh Villbrandt February 4, Digital Circuits Analog versus digital – What’s the difference? – How to represent an analog signal in a computer?
1 SERIAL PORT INTERFACE FOR MICROCONTROLLER EMBEDDED INTO INTEGRATED POWER METER Mr. Borisav Jovanović, Prof.dr Predrag Petković, Prof.dr. Milunka Damnjanović,
1 AVR Session 2 Master : Dr.jafari Authors: M.H Edrisi, hadi.edrisi yyyy aaaa hhhh oooo oooo.... cccc oooo mmmm.
Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#1 Lecture #4 Outline Announcements Project Proposal AVR Processor.
Typical Microcontroller Purposes
Microprocessors A practical approach Subjects Goals for this module Results Subjects of the module Plans Questions.
بسمه تعالي AVR Microcontrollers. The ATmega8 Basic Features -1.
Designing with Components Wilmer Arellano. How to chose a Microcontroller Choose one that you are familiar with or that is easy to learn.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
ATMEL AVR 8 bit RISC MICROCONTROLLERS a general comparison.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Not So Deep Blue The original Deep Blue. LED chess board Track movements of all pieces Show possible moves Track game time Detect piece movement Magnets/Reed.
Our Project Next generation communication system for vehicles ▫Simple, real-time visual communication Multi-touch input ▫Driver’s gestures produce an.
Lecture 7: Overview Microprocessors / microcontrollers.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
Lab 1 Summary.
Components of a typical full-featured microcontroller.
AVR Architecture Prepared By: Avdhesh Soni ( ) Sarthak Patel ( ) Akshay Parekh ( ) Fenil Sachla ( ) Guided.
Introduction to AVR Name : 1) Abhishek Yadav ) Prakash Giri ) Kheni Niral ) Bhadresh Langadiya Branch.
GROUP MEMBERS: SUMEET HOODA. RAJDEEP PATRE. DHIRAJ GAONKAR. LIVE HUMAN DETECTION USING WIRELESS REMOTE CONTROLLED ROBOT.
NAM S.B MDLAB. Electronic Engineering, Kangwon National University 1.
CEng3361/18 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2007 Recitation 01.
박 유 진.  2.4-GHz IEEE Compliant RF Transceiver  Excellent Receiver Sensitivity ( -97dBm) and Robustness to Interference  6-mm × 6-mm QFN40.
INTERFACING HARDWARE WITH MICROCONTROLLER GUIDED BY: Prof. ASIF SIR 1. AKSHAY KIRAN 2. DEEP PARIKH 3. JIGAR PATEL 4. TILAK PATEL ,05,D2D06,09.
ALPHA COLLEGE OF ENGINEERING & TECHNOLOGY Introduction to AVR ATMega32 Architecture PREPARED BY SHWETA ( ) BHOOMI ( ) YOGEN ( )
Overview AvrEmbedded128_Pro RTLab. 김태현. Atmega128 Features High-performance, Low-power AVR® 8-bit Microcontroller advanced RISC Architecture – 133 Powerful.
Revision questions CENG2400 v.14b 1 CENG2400 Revision, Question 1 A system has an ARM processor with a 32-bit General Purpose Input Output (GPIO) module.
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
Microcontrollers, Basics Fundamentals of Designing with Microcontrollers 16 January 2012 Jonathan A. Titus.
C. K. Pithawalla College of Engineering and Technology, Surat
Microcontrollers & GPIO
AVR ATMEGA 8 MICRO-CONTROLLER
MCI PPT AVR MICROCONTROLLER Mayuri Patel EC-1 5th sem
BITS EDU. CAMPUS , VARNAMA
Project Title EVM IN PIC Under the Guidance of Submitted by.
The Arduino Microcontroller: Atmel AVR Atmega 328
ECET 340 Competitive Success/snaptutorial.com
ECET 340 Education for Service-- snaptutorial.com.
ECET 340 Teaching Effectively-- snaptutorial.com.
Introduction to Microprocessors and Microcontrollers
CENG2400 Revision Q1a A system has an ARM processor with a 32-bit General Purpose Input Output (GPIO) module. Two on/off switches are connected to bit-3.
میکرو کنترلر های AVR مدرس: مسعود بهمن پور
Tim Sumner, Imperial College, Rm: 1009, x47552
Architectural Overview
AVR – ATmega103(ATMEL) Architecture & Summary
Wireless Embedded Systems
Presentation transcript:

Microcontroller Programming (주)한백전자

Atmega128

AVR – Atmega128L High-performance, Low-power AVR® 8-bit Microcontroller Advanced RISC Architecture Up to 16 MIPS Throughput at 16 MHz 128K Bytes of In-System Reprogrammable Flash 4K Bytes Internal SRAM 4K Bytes EEPROM Peripheral Features 4 Timer 10bit – ADC 8 channel SPI, I2C, UART Interface Six Sleep Modes

GPIO General Purpose Input/Output It can act as input to read digital signal from other devices Or it can act as output to control 0 or 1 to outside Important Registers for GPIO in Atmega128 DDx: setting input or output direction PORTx: Input: pull-up resistor on/off Output: signal 0 or 1 PINx: read input signal

Atmega 128’ GPIO

ZigbeX MCU Circuit

LED Circuit

Programming 3 LED On Make new c file Search GPIO registers Setting register Compile with avr-gcc avr-gcc -o output -Os -mmcu=atmega128 main.c xxx.c avr-objcopy -O ihex output main.hex

Implement 3 LED on

Timer ZigbeX utilizes two Clocks 7,372,800 Hz: Main clock 32,768 Hz: Timer 0 clock

Timer Interrupt 1 Overflow Interrupt

Timer Interrupt 2 Compare Interrupt

Atmega 128 interrupt #define SIG_INTERRUPT0 _VECTOR(1) #define SIG_OUTPUT_COMPARE2 _VECTOR(9) #define SIG_OVERFLOW2 _VECTOR(10) #define SIG_INPUT_CAPTURE1 _VECTOR(11) #define SIG_OUTPUT_COMPARE1A _VECTOR(12) #define SIG_OUTPUT_COMPARE1B _VECTOR(13) #define SIG_OVERFLOW1 _VECTOR(14) #define SIG_OUTPUT_COMPARE0 _VECTOR(15) #define SIG_OVERFLOW0 _VECTOR(16) #define SIG_SPI _VECTOR(17) #define SIG_UART0_RECV _VECTOR(18) #define SIG_UART0_DATA _VECTOR(19) #define SIG_UART0_TRANS _VECTOR(20) #define SIG_ADC _VECTOR(21) …

Example Timer 0 interrupt Timer0 Compare interrupt char status = 0; INTERRUPT(SIG_OUTPUT_COMPARE0) { if(status == 0){ TOSH_CLR_YELLOW_LED_PIN(); status = 1; }else{ TOSH_SET_YELLOW_LED_PIN(); status = 0; }

Implement Timer 0 Limitation Operation Utilize 32,768 Khz Utilize compare register Operation When turn on power, on Red LED After setting timer registers, on Green LED Whenever expire 200ms, toggle LED

Programming Timer 0 (200ms) Make new c file Includes: #include <avr/io.h>, #include <avr/signal.h>, #include <avr/interrupt.h> Search Timer registers Setting register Descript “interrupt hander” Compile with avr-gcc avr-gcc -o output -Os -mmcu=atmega128 main.c xxx.c avr-objcopy -O ihex output main.hex

Q & A

HomeWorks until 1/15 until 1/19 Implement Timer 0 example until 1/19 Implement Timer Component having 3 interfaces Use timer0 only Timer unit is ms Max timer setting value is 30000 Use C language only. Hits: refer to TimerM component in TinyOS-1.x