ATMega16 AVR AVR AVR DIP. (in-circiut programming) desktop MOSI MOSIT. AVRProg. header. (toggle)
|
|
- Rose Charles
- 6 years ago
- Views:
Transcription
1
2 ATMega16 AVR AVR ATMega16 AVR AVR AVR DIP (in-circiut programming) desktop MOSI GND SK MISO MOSIT Ω Dontronic SK MISO AVRProg AVR109 JTAGIEII STK500 AVR header AVRProg clock I/O (toggle)
3 clock GND V ATMega16 μf clock clock LED LED
4 scan pull-up D
5 ATMega16 shift PORT low D high dispbuf D (PORTD) (RAM) dispscan high void dispscan(void){ int i, j; char digsel = 0xfe; // pattern to turn on first digit for(i=0; i<4; i++){ PORTD = dispbuf[i]; // pattern for ith digit from display buffer PORT = digsel; // turn on the ith digit for(j=0; j<2000; j++); // wait for some time, for example 250μs, for 100 scans per second PORTD = 0xff; // turn off all digits digsel=(digsel<<1)+1; // point to the next digit keyscan t t char keyscan(void){ int i, j, keycode=0; char colsel = 0xfe, t; for(i=0; i<4; i++){ PORT = colsel; for(j=0; j<2; j++); // some delay to let row data become valid t = PIN; for(j=0; j<4; j++){ if(!(t & 0x80)) return(keycode);
6 keycode++; t<<=1; colsel=colsel<<=1+1; return(keycode); (look-up table) D keyto7seg char keyto7seg(char keycode){ // key code for a sample 3x4 keboard follows // key number * # nothing // key code //7segment code 0x82 0xb7 0xc1 0xa1 0xb4 0xa8 0x88 0xb3 0x80 0xa0 0xdc 0x8d 0xe9 char table[]={0x8d,0x82,0xdc,0xa0,0x80,0xb3,0x88,0xa8,0xb4,0xa1,0xc1,0xb7,0xe9; return(table[keycode]); #asm sseg_scan: ldi r19,$fe ldi YREGLOW,low(DISPBUF) ldi YREGHIGH,high(DISPBUF) nxt_7seg: ld r20,y+ out PORTD,r20 out PORT,r19 call seg_delay ser r20 out PORTD,r20 sec rol r19 brcs nxt_7seg ret seg_delay: // delay on each 7segment push r16 push r17 ldi r17,20 sdel2: ldi r16,0 sdel1: dec r16 brne sdel1 dec r17 brne sdel2 pop r17 pop r16 ret key_scan: ldi r18,0 ldi r16, $fe knxtclmn: out PORT,r16 nop nop nop
7 in r15,pind ldi r17,4 knxtrow: lsl r15 brcs nokey ret nokey: inc r18 dec r17 brne knxtrow sec rol r16 sbrs r16,4 ret rjmp knxtclmn kcode2seg: ldi YREGLOW,low(KODETAB) ldi YREGHIGH,high(KODETAB) add YREGLOW,r18 ld r18,y ret #endasm
8 RS232 0 start bit 1 stop bit parity 1 idle 1 bps D D RS232
9 0 1 start idle stop 1 framing error 0 parity error o o o USART o 55H ATMega16 level converter ATMega TXD D
10 USART USART #asm.equ PORTA = $1b.equ PINA = $19.equ PORTB = $18.equ PINB = $16.equ PORT = $15.equ PIN = $13.equ PORTD = $12.equ PIND = $10.equ DISPBUF = $800.equ KODETAB = $810 DEF EQU.def XREGLOW = r26.def XREGHIGH = r27.def YREGLOW = r28.def YREGHIGH = r29.def ZREGLOW = r30.def ZREGHIGH = r31 #endasm hbit_delay bit_delay MHz bit_delay pop hbit_delay push ( ) #asm bit_delay: push r16 //2 push r17 //2 ldi r17,1 //1 bdel2: ldi bdel1: r16,26 //1 dec r16 //1 brne bdel1 //2 on jump - 1 for next instruction // loop1 length = 3*r16-1 dec r17 //1 brne bdel2 //2 on jump - 1 for next instruction // loop2 length = (4+loop1)*r17-1 pop r17 //2 pop ret r16 //2 //4 //total delay = 13+loop2 hbit_delay: push r16 //2 push r17 //2 ldi r17,1 hbdel2: //1 ldi r16,43 //1 hbdel1:
11 dec r16 //1 brne hbdel1 //2 on jump - 1 for next instruction // loop1 length = 3*r16-1 dec r17 //1 brne hbdel2 //2 on jump - 1 for next instruction // loop2 length = (4+loop1)*r17-1 pop pop r17 r16 //2 //2 ret //4 //total delay = 13+loop2 #endasm send7 D stack Y void send7(char a){ #asm send_7bit: ldd r19,y+0 cbi PORTD,1 call bit_delay ldi r16,7 nxt_bit: in r17,portd //1 bst r19,0 //1 bld r17,1 //1 out PORTD,r17 //1 lsr r19 //1 call bit_delay //3 dec r16 //1 brne nxt_bit //2 sbi PORTD,1 call bit_delay ret #endasm D Y+0 receive7 r 30 char receive7(void){ #asm receive_7bit: ldi r18,0 till_reset: in r17,pind //1 andi r17,1 //1 brne till_reset //2-1 call hbit_delay //4 ldi r16,7 rnxt_bit: //1 clc //1 sbic PIND,0 sec //1-2 //1 ror r18 //1 call bit_delay //4 dec r16 //1 brne rnxt_bit //2 clc ror r18
12 mov #endasm r30,r18
13 0 1
14 (LED) (RS232)
15 SISO z G(z) ωs fs s G(s) Matlab fdatool FIR IIR filter coefficients ai bi n m ( ) ( ) ( ) siso z ( ) ( ) ( ) z -1 ( ) ( ( ) ( )) FIR IIR FIR a0 IIR ωs fs D AD
16 DA D d n DA D jω Direct Digital Synthesis : DDS DA ATMega DA PWM PWM MHz Top PD7:O2 DDS Hz ldi r23,3 R11 R12 R13 R14 PWM Hz 0 1 R μs μs khz DA AD a1 a2 b0 b1 b2 a1 a2 a1 a2 1/a0 gain b0 b1 b2 fdatool 1/a0 b roundoff
17 AD AVref AD V AD 80H y x r30 r31 80h PWM #include <stdio.h> #include <mega16.h> #define _a1 0x60; #define _a2 0x62; #define _b0 0x64; #define _b1 0x66; #define _b2 0x68; #define _xn 0x6a; #define _xn_1 0x6c; #define _xn_2 0x6e; #define _yn_1 0x70; #define _yn_2 0x72; #define _gain 0x74; register char register char register char register char int int int int int int
18 int int int int int #pragma savereg- #pragma warninterrupt [AD_INT] void adc_isr(void){ #asm clr r27 ;permanent zero clr r24 ;clear 24 bit result reg; msb to lsb => r31:r30:r24 clr r30 clr r31 in r20,$05 clr r21 subi r20,$80 sbc r21,r27 push r20 push r21 ;read from AD ;x(n), prepared from data input, now is in r21:r20 lds r22, _b0 ;load b0 from RAM lds r23, _b0+1 call mult_acc ; b0*x(n) lds r22, _b1 ;load b1 from RAM lds r23, _b1+1 lds r20, _xn_1 ;load x(n-1) from RAM lds r21, _xn_1+1 call mult_acc ; b1*x(n-1) lds r22, _b2 ;load b2 from RAM lds r23, _b2+1 lds r20, _xn_2 ;load x(n-2) from RAM lds r21, _xn_2+1 call mult_acc ; b2*x(n-2) lds r22, _a1 ;load -a1 from RAM lds r23, _a1+1 lds r20, _yn_1 ;load y(n-1) from RAM lds r21, _yn_1+1 call mult_acc ; -a1*y(n-1) lds r22, _a2 ;load -a2 from RAM lds r23, _a2+1 lds r20, _yn_2 ;load y(n-2) from RAM lds r21, _yn_2+1 call mult_acc ; -a2*y(n-2) ;now store newly generated data into previous ones for nest iteration lds r20, _xn_1 ;load x(n-1) from RAM lds r21, _xn_1+1 sts _xn_2, r20 ;store x(n-2) to RAM sts _xn_2+1, r21 pop r21 pop r20 ;retrieve x(n) to put in x(n-1)
19 sts _xn_1, r20 ;store x(n-1) to RAM sts _xn_1+1, r21 lds r20, _yn_1 ;load y(n-1) from RAM lds r21, _yn_1+1 sts _yn_2, r20 ;store y(n-2) to RAM sts _yn_2+1, r21 sts _yn_1, r30 ;store new output as y(n-1) to RAM sts _yn_1+1, r31 ldi r20,$80 add r20,r30 out $2a,r20 ;out to PWM timer0 dec r15 brne mm2 dec r16 brne mm2 ldi r23,$10 mov r16,r23 in r23,$16 ldi r24,$08 eor r23,r24 out $18,r23 mm2: #endasm #asm mult_acc: muls r23, r21 ; (signed)p1-high * (signed)p2-high add r31, r0 mul r22, r20 ; p1-low * p2-low add r24, r0 adc r30, r1 adc r31, r27 mulsu r23, r20 ; (signed) p1-high * p2-low add r30, r0 adc r31, r1 mulsu r21, r22 ; (signed) p2-high * p1-low add r30, r0 adc r31, r1 ret #endasm #pragma savereg+ #pragma warn+ #pragma savereg- #pragma warninterrupt [TIM2_OVF] void timer2_ovf_isr(void){ #asm dec r14 brne m2 ldi r23,3 mov r14,r23 // sinusoid has a cycle of 57 iterations mov r22,r11 mov r23,r13
20 m1: m2: muls r22,r23 lsl r0 rol r1 lsl r0 rol r1 sub r1,r12 mov r12,r11 mov r11,r1 ldi r23,$80 add r23,r1 out $23,r23 brcc m1 sbi $18,0 rjmp m2 cbi $18,0 #endasm #pragma savereg+ #pragma warn+ void main(void){ a1=455; a2=-208; b0=1; b1=3; b2=1; PORTA=0x00; DDRA=0x00; PORTB=0x00; DDRB=0x19; PORT=0x00; DDR=0x00; PORTD=0x00; DDRD=0xA0; TR0=0x0A; TNT0=0x00; OR0=0xFA; TR1A=0x81; TR1B=0x09; TNT1H=0x00; TNT1L=0x00; IR1H=0x00; IR1L=0x00; OR1AH=0x00; OR1AL=0x00; OR1BH=0x00; OR1BL=0x00; ASSR=0x00; TR2=0x69; TNT2=0x00; OR2=0x00;
21 MUR=0x00; MUSR=0x00; // Timer(s)/ounter(s) Interrupt(s) initialization TIMSK=0x42; //0x12; //0x12; //0x40; USRA=0x00; USRB=0xD8; USR=0x86; UBRRH=0x00; UBRRL=0x67; ASR=0x80; SFIOR=0x00; // AD initialization // AD lock frequency: khz // AD Voltage Reference: AREF pin // AD Auto Trigger Source: Timer0 ompare Match // Only the 8 most significant bits of // the AD conversion result are used ADMUX=0xE0; //FIRST_AD_INPUT (AD_VREF_TYPE & 0xff); ADSRA=0xAE; SFIOR&=0x1F; SFIOR =0x60; reg11=0xfb; reg12=0x06; reg13=0x7f; #asm("sei") while (1){
22 Oversampling DA Δ-Σ PM Delta Modulation (forward) ±1 Simulink DA AD (AD) AD AD (Oversampling AD)
23 dithering AD offset (offset) ATMega V V (bandgap ref voltage) ± V Vin ATMega qtzr B A (Ain1) V ± V V khz
;Compiler Options.NOLIST.INCLUDE "C:\Program Files (x86)\atmel\avr Tools\AvrAssembler2\Appnotes\m8515def.inc"
;* CharTest.asm ;* ;* Created: 28/06/2017 9:37 p.m. ;* Author: ob1 ;ST7820 128 x 64 graphics mode character display 8 lines x 21 characters ;Modification and redistribution under provisions of GNU general
More informationBy: Dr. Hamed Saghaei
By: Dr. Hamed Saghaei The AVR RISC Microcontroller supports powerful and efficient addressing modes for access to the program memory (Flash) and data memory (SRAM). This section describes the different
More informationAVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo
AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture
More informationAVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo
AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture
More informationAVR ISA & AVR Programming (I)
AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo Week 1 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation Week 1 2 1 Atmel AVR 8-bit
More information// WRITE data to be written to EEPROM
/***************************************************** This program was produced by the CodeWizardAVR V2.03.9 Evaluation Automatic Program Generator Copyright 1998-2008 Pavel Haiduc, HP InfoTech s.r.l.
More informationSet of pulse decoding algorithms for quadrature rotary and linear encoders*
version 1.2 Set of pulse decoding algorithms for quadrature rotary and linear encoders* (*) Algorithms are likely platform nonindependent in performance comparison. However results are based to the Atmel
More informationECED 3204 Microprocessor Midterm Reference Solution
ECED 3204 Microprocessor Midterm Reference Solution Date: October 26 2017 Time: 7:00pm-9:00pm Room: B225, B227, B229 Student name ID 1) Problem one has following two sub problems: a. Write an instruction
More informationAT90S Bit Microcontroller with 1K bytes Downloadable Flash AT90S1200. Features. Description. Pin Configuration
Features Utilizes the AVR Enhanced RISC Architecture 89 Powerful Instructions - Most Single Clock Cycle Execution 1K bytes of In-System Reprogrammable Downloadable Flash - SPI Serial Interface for Program
More informationLAMPIRAN. 1. Program Alat
LAMPIRAN 1. Program Alat This program was produced by the CodeWizardAVR V2.03.4 Standard Automatic Program Generator Copyright 1998-2008 Pavel Haiduc, HP InfoTech s.r.l. http://www.hpinfotech.com Project
More informationLAMPIRAN. Program Keseluruhan Sistem Pengontrolan Level Air
LAMPIRAN Program Keseluruhan Sistem Pengontrolan Level Air /***************************************************** This program was produced by the CodeWizardAVR V2.03.4 Standard Automatic Program Generator
More information8-Bit Microcontroller with 1K bytes In-System Programmable Flash AT90S1200. Features. Description. Pin Configuration
Features AVR - High Performance and Low Power RISC Architecture 89 Powerful Instructions - Most Single Clock Cycle Execution 1K bytes of In-System Reprogrammable Flash SPI Serial Interface for Program
More informationAli Karimpour Associate Professor Ferdowsi University of Mashhad
AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Reference: Microcontroller Based Applied Digital Control Dogan Ibrahim, John Wiley & Sons Ltd, 2006 Liquid Level
More informationET-BASE AVR ATmega64/128
ET-BASE AVR ATmega64/128 ET-BASE AVR ATmega64/128 which is a Board Microcontroller AVR family from ATMEL uses MCU No.ATmega64 and ATmega128 64PIN. Board ET-BASE AVR ATmega64/128 uses MCU s resources on
More informationCHW 469 : Embedded Systems
CHW 469 : Embedded Systems Instructor: Dr. Ahmed Shalaby http://bu.edu.eg/staff/ahmedshalaby4# I/O Ports in AVR The AVR microcontroller and embedded systems using assembly and c Topics AVR pin out The
More informationProgramming Microcontroller Assembly and C
Programming Microcontroller Assembly and C Course Number CLO : 2 Week : 5-7 : TTH2D3 CLO#2 Student have the knowledge to create basic programming for microcontroller [C3] Understand how to program in Assembly
More informationAPPENDIX B AVR INSTRUCTIONS EXPLAINED OVERVIEW
APPENDIX B AVR INSTRUCTIONS EXPLAINED OVERVIEW In this appendix, we describe each intruction of the ATmega328. In many cases, a simple code example is given to clarify the instruction. Instructions are
More informationReview on Lecture-1. ICT 6641: Advanced Embedded System. Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming
ICT 6641: Advanced Embedded System Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming Prof. S. M. Lutful Kabir Session: April, 2011 Review on Lecture-1 Three parts of a computer : CPU, Memory
More informationLogic Instructions and Programs READING
1 P a g e Logic Instructions and Programs READING The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 5: Arithmetic, Logic
More informationCOMP2121: Microprocessors and Interfacing
nterfacing Overview Arithmetic and Logic nstructions in AR ample AR Assembly Programs Using AL instructions Lecture 8: Arithmetic and logic nstructions http://www.cse.unsw.edu.au/~cs2121 Lecturer: ui Wu
More informationAVR Instruction Set Encoding
1 P age AVR Instruction Set Encoding READING 1. "AVR Instruction Set" document doc856 "The Program and Data Addressing Modes." 2. In this lecture I will teach you how to translate your assembly code into
More informationCOMP2121: Microprocessors and Interfacing. I/O Devices (II)
COMP2121: Microprocessors and Interfacing I/O Devices (II) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Overview Keyboard LCD (Liquid Crystal Display) 2 2 Input Switches (1/2)
More informationUNIVERSITY OF MANITOBA Final Exam
UNIVERSITY OF MANITOBA Final Exam Winter 2007 COMPUTER SCIENCE Real-time Systems Date: Fri, 20th April 2007 Time: 09:00-12:00 Room: Frank Kennedy Brown Gym (314-345) (Time allowed: 180 Minutes) NOTE: Attempt
More informationIntroduction to Assembly language
Introduction to Assembly language 1 USING THE AVR MICROPROCESSOR Outline Introduction to Assembly Code The AVR Microprocessor Binary/Hex Numbers Breaking down an example microprocessor program AVR instructions
More informationSpeed and Size-Optimized Implementations of the PRESENT Cipher for Tiny AVR Devices
Speed and Size-Optimized Implementations of the PRESENT Cipher for Tiny AVR Devices Kostas Papagiannopoulos Aram Verstegen July 11, 2013 Papagiannopoulos and Verstegen July 11, 2013 Speed and Size-Optimized
More informationRANGKAIAN LENGKAP. Universitas Sumatera Utara
RANGKAIAN LENGKAP Lampiran Program /***************************************************** This program was produced by the CodeWizardAVR V1.25.8 Professional Automatic Program Generator Copyright 1998-2007
More informationshown in Figure 3. An example where the command 0x35 is sent to system 5 is shown in Figure 4. Figure 2. RC5 Frame Format Figure 3.
AVR410: RC5 IR Remote Control Receiver Features Low-cost Compact Design, Only One External Component Requires Only One Controller Pin, Any AVR device Can Be Used Size-efficient Code Figure 1. RC5 Receiver
More informationCOMP3221: Microprocessors and Embedded Systems
Embedded ystems Overview Arithmetic and Logic nstructions in AR ample AR Assembly Programs Using AL instructions Lecture 7: Arithmetic and logic nstructions http://www.cse.unsw.edu.au/~cs3221 Lecturer:
More informationEE 308: Microcontrollers
EE 308: Microcontrollers Review Part I Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA February 15, 2018 Aly El-Osery (NMT) EE 308:
More informationGates and flip-flops: glue logic, simple FSMs, registers Two-level PLDs: FSMs, muxes, decoders. Programmable logic devices (CSE370, CSE467)
Computational hardware Digital logic (CSE370) Gates and flip-flops: glue logic, simple FSMs, registers Two-level PLDs: FSMs, muxes, decoders Programmable logic devices (CSE370, CSE467) Field-programmable
More informationIAS0430 MICROPROCESSOR SYSTEMS
IAS0430 MICROPROCESSOR SYSTEMS Fall 2018 Arduino and assembly language Martin Jaanus U02-308 martin.jaanus@ttu.ee 620 2110, 56 91 31 93 Learning environment : http://isc.ttu.ee Materials : http://isc.ttu.ee/martin
More informationEmbedded Systems and Software
Embedded Systems and Software Lecture 11 Interrupts Interrupts Slide 1 Interrupts One way to think of interrupts is that they are hardwaregenerated functions calls Internal Hardware When timer rolls over,
More informationGambar A-1 Foto alat prototype infrared thermometer
LAMPIRAN A Foto Alat Gambar A-1 Foto alat prototype infrared thermometer A-1 LAMPIRAN A A-2 LAMPIRAN A Daftar Komponen yang digunakan Komponen Aktif Nama komponen Fungsi Jumlah AVR ATMega 8535 Mikrokontroler
More informationLAMPIRAN A. Foto Alat
LAMPIRAN A Foto Alat A-1 A-2 Rangkaian Skematik PCB Sistem Monitoring Infus A-3 LAMPIRAN B Program pada Mikrokontroller AVR Atmega16...B-1 Program pada Borlan Delhpi 7.0...B-9 PROGRAM UTAMA /*****************************************************
More informationBuses and Parallel Input/Output
Buses and Parallel Input/Output Lecturer: Sri Parameswaran Notes by: Annie Guo Week7 1 Lecture Overview Buses Computer buses I/O Addressing Memory mapped I/O Separate I/O Parallel input/output AVR examples
More informationUniversity of Florida EEL 4744 Dr. Eric M. Schwartz. Page 1/11 Revision 0 20-Feb-14 Mixed C and Assembly (for Atmel XMEGA)
Page 1/11 Revision 0 20-Feb-14 KEY WORDS Compiler, Inline Assembly, GNU Assembler, GCC, AVR-GCC RESOURCES GNU Assembler Resource - http://sourceware.org/binutils/docs-2.23.1/as/index.html AVR-LibC Inline
More informationHow2Use DT-AVR ATMEGA168 BMS. By: IE Team. Picture 1 The layout of DT-AVR ATMEGA168 BMS
DT-AVR ATMEGA168 BMS Application Note By: IE Team This Application Note (AN) serves as a tutorial of how to use the DT-AVR ATMEGA168 Bootloader Micro System along with its supplementary software. The layout
More informationProgramming. A. Assembly Language Programming. A.1 Machine Code. Machine Code Example: Motorola ADD
A. Assembly Language Programming Programming of a computer system: Machine code direct execution Assembly language tool: assembler High level programming language tool: interpreter tool: compiler Programming
More informationObjectives. I/O Ports in AVR. Topics. ATmega16/mega32 pinout. AVR pin out The structure of I/O pins I/O programming Bit manipulating 22/09/2017
Objectives The AVR microcontroller and embedded systems using assembly and c I/O Ports in AVR List all the ports of the AVR microcontroller Describe the dual role of the AVR pins Code assembly language
More informationDESIGN NOTE #032. AVR Boot Loader. Introduction. Overview AUTHOR: MARIANO BARRÓN RUIZ KEYWORDS: BOOT LOADER, SPM, SELF-PROGRAMMING
DESIGN NOTE AUTHOR: #032 MARIANO BARRÓN RUIZ ISPBARUM@SB.EHU.ES KEYWORDS: BOOT LOADER, SPM, SELF-PROGRAMMING This document is originally distributed by AVRfreaks.net, and may be distributed, reproduced,
More informationLAMPIRAN A. Listing Program. Program pada Borland Delphi 7.0 A-1 Program pada CodeVisionAVR C Compiler A-6
A Listing Program Program pada Borland Delphi 7.0 A-1 Program pada CodeVisionAVR C Compiler A-6 LISTING PROGRAM BORLAND DELPHI 7.0 Inisialisasi ==========================================================
More informationAssembly AVR Boot loader
Assembly AVR Boot loader Mariano Barrón Ruiz ispbarum@sb.ehu.es Introduction This document presents a software written in assembly for self-programming all AVR microcontrollers with Boot Loader Flash Section.
More informationCOMP2121: Microprocessors and Interfacing. I/O Devices (I)
COMP2121: Microprocessors and Interfacing I/O Devices (I) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Overview I/O Ports AVR Ports 2 2 What is I/O? I/O is Input or Output (Input/Output).
More information8-bit Microcontroller with 1K Byte of In-System Programmable Flash AT90S1200
Features Utilizes the AVR RISC Architecture AVR High-performance and Low-power RISC Architecture 89 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General-purpose Working Registers Up to
More information8-bit Microcontroller. Application Note. AVR410: RC5 IR Remote Control Receiver
AVR410: RC5 IR Remote Control Receiver Features Low-cost Compact Design, Only One External Component Requires Only One Controller Pin, Any AVR Device Can be Used Size-efficient Code Introduction Most audio
More informationATmega Interrupts. Reading. The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi
1 P a g e ATmega Interrupts Reading The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 10: AVR Interrupt Programming in Assembly
More information2 Basic operations with AT90S1200 and TINY12
2 Basic operations with AT90S1200 and TINY12 The best way to learn is through example and by doing things yourself. For the rest of the book we will cover example projects, many of which will be largely
More informationToday s Menu. >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory
Today s Menu Methods >Use the Internal Register(s) >Use the Program Memory Space >Use the Stack >Use global memory Look into my See examples on web-site: ParamPassing*asm and see Methods in Software and
More informationSoftware Design Considerations, Narrative and Documentation
Software Design Considerations, Narrative and Documentation Introduction The project under consideration is an automated shopping cart designed to follow a shopper around a simulated supermarket environment.
More informationLAMPIRAN A. Universitas Sumatera Utara
63 LAMPIRAN A Rangkaian Lengkap Perangkat Keras Rangkaian ini terdiri dari Rangkaian Power Supply (PSA), Mikrokontroller atmega8535, RFID Reader ID 12, Rangkaian Infra Merah Fotodioda, driver max232 dan
More informationModule 2: Introduction to AVR ATmega 32 Architecture
Module 2: Introduction to AVR ATmega 32 Architecture Definition of computer architecture processor operation CISC vs RISC von Neumann vs Harvard architecture AVR introduction AVR architecture Architecture
More informationAN703. Micro64/128. Accessing the 36k of SRAM 12/3/04
AN703 Micro64/128 Accessing the 36k of SRAM 12/3/04 Introduction: Micro64/128 has a total of 36k of SRAM. 4 k of SRAM is built into the processor an additional 32k of SRAM is available inside the Micro64/128
More informationRobosoft Systems in association with JNCE presents. Swarm Robotics
Robosoft Systems in association with JNCE presents Swarm Robotics What is a Robot Wall-E Asimo ABB Superior Moti ABB FlexPicker What is Swarm Robotics RoboCup ~ 07 Lets Prepare for the Robotics Age The
More information8-bit Instruction Set
Instruction Set Nomenclature Status Register (SREG) SREG: Status Register C: Carry Flag Z: Zero Flag N: Negative Flag V: Two s complement overflow indicator S: N V, For signed tests H: Half Carry Flag
More informationCentral Processing Unit
Central Processing Unit Networks and Embedded Software Module.. by Wolfgang Neff Components () lock diagram Execution Unit Control Unit Registers rithmetic logic unit DD, SU etc. NOT, ND etc. us Interface
More information8-bit Instruction Set
Instruction Set Nomenclature Status Register (SREG) SREG: Status Register C: Carry Flag Z: Zero Flag N: Negative Flag V: Two s complement overflow indicator S: N V, For signed tests H: Half Carry Flag
More informationLAMPIRAN A List Program CodeVision Generato Data...A-1 List Program CodeVision Multiplexer...A-11 List Program CodeVision Demultiplexer...
LAMPIRAN A List Program CodeVision Generato Data...A-1 List Program CodeVision Multiplexer...A-11 List Program CodeVision Demultiplexer...A-14 List Program Codevision Generator Data /****************************************
More informationLecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad
Lecture 14 AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Lecture 4 The AVR Microcontroller Introduction to AVR CISC (Complex Instruction Set Computer) Put as
More informationInput/Output Devices. Lecturer: Sri Parameswaran Notes by: Annie Guo
Input/Output Devices Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview Input devices Input switches Basics of switches Keypads Output devices LCD 2 Input Switches Most basic binary input
More informationChapter 4: Atmel s AVR 8-bit Microcontroller Part 1 Assembly Programming
Chapter 4: Atmel s AVR 8-bit Microcontroller Part 1 Assembly Programming Prof. Ben Lee Oregon State University School of Electrical Engineering and Computer Science Chapter Goals Understand how to program
More informationLAMPIRAN A PROGRAM UTAMA ROBOT NOMOR 2
LAMPIRAN A PROGRAM UTAMA ROBOT NOMOR 2 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: [Bioloid Premium]-Robot 2 v 2 22: 23: 24: 25: A-1 26: 27: 28: 29: 30: 31: 32: 33: 34: 35:
More informationLAMPIRAN A FOTO ALAT
LAMPIRAN A FOTO ALAT Gambar A.1. Gambar robot mobil dilihat dari atas Gambar A.2. Gambar robot mobil dilihat dari depan Gambar A.3. Gambar robot mobil dilihat dari samping Gambar A.4. Gambar keseluruhan
More informationBuilding A RISC Microcontroller in an FPGA. Yap Zi He
Building A RISC Microcontroller in an FPGA Yap Zi He yapzihe@hotmail.com http://www.opencores.org/projects/riscmcu/ Supervisor : Muhammad Mun im Ahmad Zabidi (Assoc Prof) raden@utm.my Faculty of Electrical
More informationDesign with Microprocessors
Design with Microprocessors Lecture 6 Interfaces for serial communication Year 3 CS Academic year 2017/2018 1 st Semester Lecturer: Radu Dănescu Serial communication modules on AVR MCUs Serial Peripheral
More informationLampiran I. Rangkaian Lengkap Alat. Universitas Sumatera Utara
Lampiran I Rangkaian Lengkap Alat Lampiran II Program Pada Alat /***************************************************** This program was produced by the CodeWizardAVR V2.04.9 Evaluation Automatic Program
More informationCMPE C Programming & Embedded Systems. Discussion I (Version 2.0) August 31, 2014
CMPE 311 - C Programming & Embedded Systems Discussion I (Version 2.0) August 31, 2014 Version History Version 2.1 - (August 31, 2015) - Addition Pin Connections Section and Document Verification. Version
More information8-bit Microcontroller with 2K Bytes of Flash. ATtiny28L ATtiny28V
Features Utilizes the AVR RISC Architecture AVR High-performance and Low-power RISC Architecture 90 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General-purpose Working Registers Up to
More informationCN310 Microprocessor Systems Design
CN310 Microprocessor Systems Design Instruction Set (AVR) Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3
More informationCOMP2121: Microprocessors and Interfacing
Lecture 19: Interrupts II http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 1, 2006 Overview AVR Interrupts Interrupt Vector Table System Reset Watchdog Timer Timer/Counter0 Interrupt Service
More information8-Bit Microcontroller with 2K Bytes of In-System Programmable Flash. AT90S2323 AT90LS2323 AT90S2343 AT90LS2343 Preliminary AT90S/LS2323.
Features Utilizes the AVR Enhanced RISC Architecture AVR - High Performance and Low Power RISC Architecture 118 Powerful Instructions - Most Single Clock Cycle Execution 2K bytes of In-System Programmable
More informationAVR Assembler Examples
AVR Assembler Examples AVR specific examples Credit to Dr. Robucci for slide information SBR Set bits in reg Equivalent to an ORI REQUIRES MASKS, not bit number m169pdef.inc Include file detailing register
More informationMotion Sensing with the Pyroeletric Sensor
Motion Sensing with the Pyroeletric Sensor A large amount of time was spent, trying to provide an accurate and reliable way to detect humans. 3 Attempts were made until I finally found a working algorithm
More information8-Bit Microcontroller with 2K bytes Downloadable Flash. AT90S2313 Preliminary. Features. Description. Pin Configuration
Features Utilizes the AVR Enhanced RISC Architecture AVR - High Performance and Low Power RISC Architecture 120 Powerful Instructions - Most Single Clock Cycle Execution 2K bytes of In-System Reprogrammable
More information8-bit Microcontroller with 8K Bytes In-System Programmable Flash. ATmega8515 ATmega8515L. Features
Features High-performance, Low-power AVR 8-bit Microcontroller RISC Architecture 130 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation
More informationREADING SOURCE MATERIAL
1 P a g e General-Purpose Input/Output READING The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 4: AVR I/O Port Programming
More informationGenerating DMX-512 with Atmel Mega644P CPUs Andy Miyakawa / Director of Software Development Eclectic Electric / Dandy Solutions June 2008
Generating DMX-512 with Atmel Mega644P CPUs Andy Miyakawa / Director of Software Development Eclectic Electric / Dandy Solutions June 2008 What is DMX-512? DMX-512 is a data transmission scheme used originally
More informationGrundlagen Microcontroller Processor Core. Günther Gridling Bettina Weiss
Grundlagen Microcontroller Processor Core Günther Gridling Bettina Weiss 1 Processor Core Architecture Instruction Set Lecture Overview 2 Processor Core Architecture Computes things > ALU (Arithmetic Logic
More informationAVR MICROCONTROLLER ARCHITECTURTE
AVR MICROCONTROLLER ARCHITECTURTE AVR MICROCONTROLLER AVR- Advanced Virtual RISC. The founders are Alf Egil Bogen Vegard Wollan RISC AVR architecture was conceived by two students at Norwegian Institute
More information8-bit Microcontroller with 2K Bytes of In-System Programmable Flash. ATtiny22 ATtiny22L. Preliminary. Features. Description
Features Utilizes the AVR RISC Architecture AVR - High-performance and Low-power RISC Architecture 118 Powerful Instructions - Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers
More information!" # Today Class administration, overview of course web, and logistics What is an embedded system? What will we be doing in this class?
Course staff: Bruce Hemingway and Waylon Brunette, with Chris Grand Course web: http://www.cs.washington.edu/education/courses/csep567/5au/ My office: CSE 464 Allen Center, 26 543-6274 Today Class administration,
More informationMicroprocessors & Interfacing
Lecture Overview Microprocessors & Interfacing Input/Output Devices Input devices Input switches Basics of switches Keypads Output devices LCD Lecturer : Dr. Annie Guo S2, 2008 COMP9032 Week8 1 S2, 2008
More information8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega169V ATmega169. Features. Notice: Not recommended in new designs.
Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 130 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static
More information8-bit Microcontroller with 4K Bytes of In-System Programmable Flash AT90S4433 AT90LS4433. Features. Not Recommend for New Designs. Use ATmega8.
Features High-performance and Low-power AVR 8-bit RISC Architecture 118 Powerful Instructions Most Single Cycle Execution 32 x 8 General Purpose Working Registers Up to 8 MIPS Throughput at 8 MHz Data
More information8051 Timers and Serial Port
8051 Timers and Serial Port EE4380 Fall 2001 Class 10 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Timer: Mode 1 Operation (recap) 16 bit counter. Load the
More informationAVR Logical and Bitwise Instructions
AVR Logical and Bitwise Instructions Assembly Language Programming SDSMT Dr. Randy C. Hoover Boolean Logic An algebraic system for Boolean data Set: {false, true) Operations: and, or, not The operations
More informationCOMP2121: Microprocessors and Interfacing. AVR Assembly Programming (I) Basic AVR Instructions
COMP2121: Microprocessors and Interfacing AVR Assembly Programming (I) Basic AVR Instructions http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 1 Contents Arithmetic and Logic Instructions
More information8-bit Microcontroller with 2K Bytes of In-System Programmable Flash AT90S2323 AT90LS2323 AT90S2343 AT90S/LS2323. Features.
Features Utilizes the AVR RISC Architecture AVR - High-performance and Low-power RISC Architecture 118 Powerful Instructions - Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers
More informationHow2Use DT-AVR ATMEGA128L BMS. Oleh: IE Team. Picture 1 The layout of DT-AVR ATMEGA128L BMS
DT-AVR ATMEGA128L BMS Application Note Oleh: IE Team This Application Note (AN) serves as a tutorial of how to use the DT-AVR ATMEGA128L Bootloader Micro System along with its supplementary software. The
More information8-bit Microcontroller with 1K Byte Flash. ATtiny15L
Features High-performance, Low-power AVR 8-bit Microcontroller Advanced RISC Architecture 90 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static
More informationProject : Version : Date : 11/04/2016 Author : Freeware, for evaluation and non-commercial use only Company : Comments:
Lampiran 1 Listing program dari seluruh sistem. /***************************************************** This program was produced by the CodeWizardAVR V2.04.9 Evaluation Automatic Program Generator Copyright
More informationEmbedded Systems and Software. LCD Displays
Embedded Systems and Software LCD Displays Slide 1 Some Hardware Considerations Assume we want to drive an LED from a port. The AVRs can either source or sink current. Below is a configuration for sourcing.
More informationAVR. (AVR Assembly Language) Assembler . ก ก
AVR (AVR Assembly Language). ก ก Assembler 2 1 ก /* * AVRAssembler1.asm * * Created: 9/7/2554 9:40:18 * Author: xp */.org 0 rjmp RESET ;Reset Handle rjmp RESET rjmp RESET RESET: ldi r16, 0b11111111 ;load
More informationก AVR Microcontrollers
ก AVR Microcontrollers. ก ก AVR Microcontrollers Architecture 1 Instruction Execution Timing The Parallel Instruction Fetches and Instruction Executions Single Cycle ALU Operation AVR Microcontrollers
More informationAVR. 2. (Assembler directives ) 3. ( Instruction field) 5. (Comment field) 1. (Label field) Assembler. 4. ก (Operands field) (AVR Assembly Language)
3 AVR (AVR Assembly Language). ก ก ก /* * AVRAssembler1.asm * * Created: 9/7/2554 9:40:18 * Author: xp */.org 0 rjmp RESET ;Reset Handle rjmp RESET rjmp RESET RESET: ldi r16, 0b11111111 ;load register
More informationEE 308: Microcontrollers
EE 308: Microcontrollers Interrupts Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA March 1, 2018 Aly El-Osery (NMT) EE 308: Microcontrollers
More informationEmbedded programming, AVR intro
Applied mechatronics, Lab project Embedded programming, AVR intro Sven Gestegård Robertz Department of Computer Science, Lund University 2017 Outline 1 Low-level programming Bitwise operators Masking and
More informationAVR Subroutine Basics
1 P a g e AVR Subroutine Basics READING The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 3: Branch, Call, and Time Delay
More informationEmbedded Systems and Software
Embedded Systems and Software Timers and Counters F-35 Lightning II Electro-optical Targeting System (EOTS Lecture 1, Slide-1 Timers and Counters Very important peripherals on microcontrollers ATtiny45
More informationAVR Control Transfer -AVR Branching
1 P a g e AVR Control Transfer -AVR Branching Reading The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 3: Branch, Call,
More informationApplication Note One Wire Digital Output. 1 Introduction. 2 Electrical Parameters for One Wire Interface. 3 Start and Data Transmission
Application Note One Wire Digital Output 1 Introduction The pressure transmitter automatically outputs pressure data, and when appropriate temperature data, in a fixed interval. The host simply waits for
More information