mirror of
https://github.com/caperren/school_archives.git
synced 2025-11-09 21:51:15 +00:00
Added missing classes from final year at OSU
This commit is contained in:
@@ -0,0 +1,235 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* BasicBumpBot.asm - V2.0
|
||||
;*
|
||||
;* This program contains the neccessary code to enable the
|
||||
;* the TekBot to behave in the traditional BumpBot fashion.
|
||||
;* It is written to work with the latest TekBots platform.
|
||||
;* If you have an earlier version you may need to modify
|
||||
;* your code appropriately.
|
||||
;*
|
||||
;* The behavior is very simple. Get the TekBot moving
|
||||
;* forward and poll for whisker inputs. If the right
|
||||
;* whisker is activated, the TekBot backs up for a second,
|
||||
;* turns left for a second, and then moves forward again.
|
||||
;* If the left whisker is activated, the TekBot backs up
|
||||
;* for a second, turns right for a second, and then
|
||||
;* continues forward.
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: David Zier and Mohammed Sinky (modification Jan 8, 2009)
|
||||
;* Date: January 8, 2009
|
||||
;* Company: TekBots(TM), Oregon State University - EECS
|
||||
;* Version: 2.0
|
||||
;*
|
||||
;***********************************************************
|
||||
;* Rev Date Name Description
|
||||
;*----------------------------------------------------------
|
||||
;* - 3/29/02 Zier Initial Creation of Version 1.0
|
||||
;* - 1/08/09 Sinky Version 2.0 modifictions
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
.include "m128def.inc" ; Include definition file
|
||||
|
||||
;************************************************************
|
||||
;* Variable and Constant Declarations
|
||||
;************************************************************
|
||||
.def mpr = r16 ; Multi-Purpose Register
|
||||
.def waitcnt = r17 ; Wait Loop Counter
|
||||
.def ilcnt = r18 ; Inner Loop Counter
|
||||
.def olcnt = r19 ; Outer Loop Counter
|
||||
|
||||
.equ WTime = 100 ; Time to wait in wait loop, used to be 100
|
||||
.equ RWTime = 200 ; Time to wait in wait loop, used to be 100
|
||||
|
||||
.equ WskrR = 0 ; Right Whisker Input Bit
|
||||
.equ WskrL = 1 ; Left Whisker Input Bit
|
||||
.equ EngEnR = 4 ; Right Engine Enable Bit
|
||||
.equ EngEnL = 7 ; Left Engine Enable Bit
|
||||
.equ EngDirR = 5 ; Right Engine Direction Bit
|
||||
.equ EngDirL = 6 ; Left Engine Direction Bit
|
||||
|
||||
;/////////////////////////////////////////////////////////////
|
||||
;These macros are the values to make the TekBot Move.
|
||||
;/////////////////////////////////////////////////////////////
|
||||
|
||||
.equ MovFwd = (1<<EngDirR|1<<EngDirL) ; Move Forward Command
|
||||
.equ MovBck = $00 ; Move Backward Command
|
||||
.equ TurnR = (1<<EngDirL) ; Turn Right Command
|
||||
.equ TurnL = (1<<EngDirR) ; Turn Left Command
|
||||
.equ Halt = (1<<EngEnR|1<<EngEnL) ; Halt Command
|
||||
|
||||
;============================================================
|
||||
; NOTE: Let me explain what the macros above are doing.
|
||||
; Every macro is executing in the pre-compiler stage before
|
||||
; the rest of the code is compiled. The macros used are
|
||||
; left shift bits (<<) and logical or (|). Here is how it
|
||||
; works:
|
||||
; Step 1. .equ MovFwd = (1<<EngDirR|1<<EngDirL)
|
||||
; Step 2. substitute constants
|
||||
; .equ MovFwd = (1<<5|1<<6)
|
||||
; Step 3. calculate shifts
|
||||
; .equ MovFwd = (b00100000|b01000000)
|
||||
; Step 4. calculate logical or
|
||||
; .equ MovFwd = b01100000
|
||||
; Thus MovFwd has a constant value of b01100000 or $60 and any
|
||||
; instance of MovFwd within the code will be replaced with $60
|
||||
; before the code is compiled. So why did I do it this way
|
||||
; instead of explicitly specifying MovFwd = $60? Because, if
|
||||
; I wanted to put the Left and Right Direction Bits on different
|
||||
; pin allocations, all I have to do is change thier individual
|
||||
; constants, instead of recalculating the new command and
|
||||
; everything else just falls in place.
|
||||
;==============================================================
|
||||
|
||||
;**************************************************************
|
||||
;* Beginning of code segment
|
||||
;**************************************************************
|
||||
.cseg
|
||||
|
||||
;--------------------------------------------------------------
|
||||
; Interrupt Vectors
|
||||
;--------------------------------------------------------------
|
||||
.org $0000 ; Reset and Power On Interrupt
|
||||
rjmp INIT ; Jump to program initialization
|
||||
|
||||
.org $0046 ; End of Interrupt Vectors
|
||||
;--------------------------------------------------------------
|
||||
; Program Initialization
|
||||
;--------------------------------------------------------------
|
||||
INIT:
|
||||
; Initialize the Stack Pointer (VERY IMPORTANT!!!!)
|
||||
ldi mpr, low(RAMEND)
|
||||
out SPL, mpr ; Load SPL with low byte of RAMEND
|
||||
ldi mpr, high(RAMEND)
|
||||
out SPH, mpr ; Load SPH with high byte of RAMEND
|
||||
|
||||
; Initialize Port B for output
|
||||
ldi mpr, $FF ; Set Port B Data Direction Register
|
||||
out DDRB, mpr ; for output
|
||||
ldi mpr, $00 ; Initialize Port B Data Register
|
||||
out PORTB, mpr ; so all Port B outputs are low
|
||||
|
||||
; Initialize Port D for input
|
||||
ldi mpr, $00 ; Set Port D Data Direction Register
|
||||
out DDRD, mpr ; for input
|
||||
ldi mpr, $FF ; Initialize Port D Data Register
|
||||
out PORTD, mpr ; so all Port D inputs are Tri-State
|
||||
|
||||
; Initialize TekBot Forward Movement
|
||||
ldi mpr, MovFwd ; Load Move Forward Command
|
||||
out PORTB, mpr ; Send command to motors
|
||||
|
||||
;---------------------------------------------------------------
|
||||
; Main Program
|
||||
;---------------------------------------------------------------
|
||||
MAIN:
|
||||
in mpr, PIND ; Get whisker input from Port D
|
||||
andi mpr, (1<<WskrR|1<<WskrL)
|
||||
cpi mpr, (1<<WskrL) ; Check for Right Whisker input (Recall Active Low)
|
||||
brne NEXT ; Continue with next check
|
||||
rcall HitRight ; Call the subroutine HitRight
|
||||
rjmp MAIN ; Continue with program
|
||||
NEXT: cpi mpr, (1<<WskrR) ; Check for Left Whisker input (Recall Active)
|
||||
brne MAIN ; No Whisker input, continue program
|
||||
rcall HitLeft ; Call subroutine HitLeft
|
||||
rjmp MAIN ; Continue through main
|
||||
|
||||
;****************************************************************
|
||||
;* Subroutines and Functions
|
||||
;****************************************************************
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: HitRight
|
||||
; Desc: Handles functionality of the TekBot when the right whisker
|
||||
; is triggered.
|
||||
;----------------------------------------------------------------
|
||||
HitRight:
|
||||
push mpr ; Save mpr register
|
||||
push waitcnt ; Save wait register
|
||||
in mpr, SREG ; Save program state
|
||||
push mpr ;
|
||||
|
||||
; Move Backwards for a second
|
||||
ldi mpr, MovBck ; Load Move Backward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, RWTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Turn left for a second
|
||||
ldi mpr, TurnL ; Load Turn Left Command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Move Forward again
|
||||
ldi mpr, MovFwd ; Load Move Forward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
|
||||
pop mpr ; Restore program state
|
||||
out SREG, mpr ;
|
||||
pop waitcnt ; Restore wait register
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from subroutine
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: HitLeft
|
||||
; Desc: Handles functionality of the TekBot when the left whisker
|
||||
; is triggered.
|
||||
;----------------------------------------------------------------
|
||||
HitLeft:
|
||||
push mpr ; Save mpr register
|
||||
push waitcnt ; Save wait register
|
||||
in mpr, SREG ; Save program state
|
||||
push mpr ;
|
||||
|
||||
; Move Backwards for a second
|
||||
ldi mpr, MovBck ; Load Move Backward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, RWTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Turn right for a second
|
||||
ldi mpr, TurnR ; Load Turn Left Command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Move Forward again
|
||||
ldi mpr, MovFwd ; Load Move Forward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
|
||||
pop mpr ; Restore program state
|
||||
out SREG, mpr ;
|
||||
pop waitcnt ; Restore wait register
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from subroutine
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: Wait
|
||||
; Desc: A wait loop that is 16 + 159975*waitcnt cycles or roughly
|
||||
; waitcnt*10ms. Just initialize wait for the specific amount
|
||||
; of time in 10ms intervals. Here is the general eqaution
|
||||
; for the number of clock cycles in the wait loop:
|
||||
; ((3 * ilcnt + 3) * olcnt + 3) * waitcnt + 13 + call
|
||||
;----------------------------------------------------------------
|
||||
Wait:
|
||||
push waitcnt ; Save wait register
|
||||
push ilcnt ; Save ilcnt register
|
||||
push olcnt ; Save olcnt register
|
||||
|
||||
Loop: ldi olcnt, 224 ; load olcnt register
|
||||
OLoop: ldi ilcnt, 237 ; load ilcnt register
|
||||
ILoop: dec ilcnt ; decrement ilcnt
|
||||
brne ILoop ; Continue Inner Loop
|
||||
dec olcnt ; decrement olcnt
|
||||
brne OLoop ; Continue Outer Loop
|
||||
dec waitcnt ; Decrement wait
|
||||
brne Loop ; Continue Wait loop
|
||||
|
||||
pop olcnt ; Restore olcnt register
|
||||
pop ilcnt ; Restore ilcnt register
|
||||
pop waitcnt ; Restore wait register
|
||||
ret ; Return from subroutine
|
||||
@@ -0,0 +1,13 @@
|
||||
:020000020000FC
|
||||
:0200000045C0F9
|
||||
:10008C000FEF0DBF00E10EBF0FEF07BB00E008BB89
|
||||
:10009C0000E001BB0FEF02BB00E608BB00B303702E
|
||||
:1000AC00023011F405D0FACF0130C1F714D0F6CFDD
|
||||
:1000BC000F931F930FB70F9300E008BB18EC1ED0E3
|
||||
:1000CC0000E208BB14E61AD000E608BB0F910FBF84
|
||||
:1000DC001F910F9108950F931F930FB70F9300E08B
|
||||
:1000EC0008BB18EC0BD000E408BB14E607D000E604
|
||||
:1000FC0008BB0F910FBF1F910F9108951F932F9362
|
||||
:10010C003F9330EE2DEE2A95F1F73A95D9F71A95E3
|
||||
:0A011C00C1F73F912F911F91089544
|
||||
:00000001FF
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# alternate avra BasicBumpBot.asm
|
||||
/opt/gavrasm/gavrasm -X BasicBumpBot.asm
|
||||
avrdude -c usbasp -p m128 -U flash:w:BasicBumpBot.hex
|
||||
rm BasicBumpBot.lst
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
|
||||
/*
|
||||
This code will cause a TekBot connected to a mega128 board to 'dance' in a cool
|
||||
pattern. No pins are used as input, and four Port B pins are used for output.
|
||||
|
||||
PORT MAP
|
||||
Port B, Pin 4 -> Output -> Right Motor Enable
|
||||
Port B, Pin 5 -> Output -> Right Motor Direction
|
||||
Port B, Pin 7 -> Output -> Left Motor Enable
|
||||
Port B, Pin 6 -> Output -> Left Motor Direction
|
||||
*/
|
||||
#define F_CPU 16000000
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
DDRB = 0b11110000; // configure Port B pins for input/output
|
||||
PORTB = 0b11110000; // set initial value for Port B outputs
|
||||
// (initially, disable both motors)
|
||||
|
||||
while (1) { // loop forever
|
||||
|
||||
PORTB = 0b01100000; // make TekBot move forward
|
||||
_delay_ms(500); // wait for 500 ms
|
||||
PORTB = 0b00000000; // move backward
|
||||
_delay_ms(500); // wait for 500 ms
|
||||
PORTB = 0b00100000; // turn left
|
||||
_delay_ms(1000); // wait for 1 s
|
||||
PORTB = 0b01000000; // turn right
|
||||
_delay_ms(2000); // wait for 2 s
|
||||
PORTB = 0b00100000; // turn left
|
||||
_delay_ms(1000); // wait for 1 s
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
:100000000C9446000C9450000C9450000C9450003A
|
||||
:100010000C9450000C9450000C9450000C94500020
|
||||
:100020000C9450000C9450000C9450000C94500010
|
||||
:100030000C9450000C9450000C9450000C94500000
|
||||
:100040000C9450000C9450000C9450000C945000F0
|
||||
:100050000C9450000C9450000C9450000C945000E0
|
||||
:100060000C9450000C9450000C9450000C945000D0
|
||||
:100070000C9450000C9450000C9450000C945000C0
|
||||
:100080000C9450000C9450000C94500011241FBE8E
|
||||
:10009000CFEFD0E1DEBFCDBF0E9452000C948B00A9
|
||||
:1000A0000C94000080EF87BB88BB20E680E290E4E0
|
||||
:1000B00028BB3FEF49E658E1315040405040E1F75E
|
||||
:1000C00000C0000018BA3FEF49E658E13150404007
|
||||
:1000D0005040E1F700C0000088BB3FEF43ED50E324
|
||||
:1000E000315040405040E1F700C0000098BB3FEF66
|
||||
:1000F00047EA51E6315040405040E1F700C000006F
|
||||
:1001000088BB3FEF43ED50E3315040405040E1F7B2
|
||||
:0A01100000C00000CDCFF894FFCF2F
|
||||
:00000001FF
|
||||
@@ -0,0 +1,16 @@
|
||||
MCU=atmega128
|
||||
CC=avr-gcc
|
||||
OBJCOPY=avr-objcopy
|
||||
CFLAGS=-std=c99 -Wall -g -Os -mmcu=${MCU} -DF_CPU=${F_CPU} -I.
|
||||
TARGET=main
|
||||
SRCS=DanceBot.c
|
||||
|
||||
all:
|
||||
${CC} ${CFLAGS} -o ${TARGET}.bin ${SRCS}
|
||||
${OBJCOPY} -j .text -j .data -O ihex ${TARGET}.bin ${TARGET}.hex
|
||||
|
||||
flash:
|
||||
avrdude -p ${MCU} -c usbasp -U flash:w:${TARGET}.hex:i -F -P usb
|
||||
|
||||
clean:
|
||||
rm -f *.bin *.hex
|
||||
@@ -0,0 +1,136 @@
|
||||
#define F_CPU 16000000
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// Generic register bitwise operators
|
||||
#define REG_SET(reg, pin) (reg |= _BV(pin))
|
||||
#define REG_CLR(reg, pin) (reg &= ~(_BV(pin)))
|
||||
#define REG_WRITE(reg, pin, value) ((value == 1) ? REG_SET(reg, pin) : REG_CLR(reg, pin))
|
||||
#define REG_CHECK(reg, pin) ((reg &= (_BV(pin))) > 0)
|
||||
|
||||
// Right motor enable
|
||||
#define RME_DDR DDRB
|
||||
#define RME_OUT PORTB
|
||||
#define RME_IN PINB
|
||||
#define RME_PIN 4
|
||||
#define RME_IO_OUT() (REG_SET(RME_DDR, RME_PIN))
|
||||
#define RME_IO_IN() (REG_CLR(RME_DDR, RME_PIN))
|
||||
#define RME_SET() (REG_SET(RME_OUT, RME_PIN))
|
||||
#define RME_CLR() (REG_CLR(RME_OUT, RME_PIN))
|
||||
#define RME_WRITE(value) (REG_WRITE(RME_OUT, RME_PIN, value))
|
||||
#define RME_STATE() (REG_CHECK(RME_IN, RME_PIN))
|
||||
|
||||
// Right motor drive
|
||||
#define RMD_DDR DDRB
|
||||
#define RMD_OUT PORTB
|
||||
#define RMD_IN PINB
|
||||
#define RMD_PIN 5
|
||||
#define RMD_IO_OUT() (REG_SET(RMD_DDR, RMD_PIN))
|
||||
#define RMD_IO_IN() (REG_CLR(RMD_DDR, RMD_PIN))
|
||||
#define RMD_SET() (REG_SET(RMD_OUT, RMD_PIN))
|
||||
#define RMD_CLR() (REG_CLR(RMD_OUT, RMD_PIN))
|
||||
#define RMD_WRITE(value) (REG_WRITE(RMD_OUT, RMD_PIN, value))
|
||||
#define RMD_STATE() (REG_CHECK(RMD_IN, RMD_PIN))
|
||||
|
||||
// Left motor enable
|
||||
#define LME_DDR DDRB
|
||||
#define LME_OUT PORTB
|
||||
#define LME_IN PINB
|
||||
#define LME_PIN 7
|
||||
#define LME_IO_OUT() (REG_SET(LME_DDR, LME_PIN))
|
||||
#define LME_IO_IN() (REG_CLR(LME_DDR, LME_PIN))
|
||||
#define LME_SET() (REG_SET(LME_OUT, LME_PIN))
|
||||
#define LME_CLR() (REG_CLR(LME_OUT, LME_PIN))
|
||||
#define LME_WRITE(value) (REG_WRITE(LME_OUT, LME_PIN, value))
|
||||
#define LME_STATE() (REG_CHECK(LME_IN, LME_PIN))
|
||||
|
||||
// Left motor drive
|
||||
#define LMD_DDR DDRB
|
||||
#define LMD_OUT PORTB
|
||||
#define LMD_IN PINB
|
||||
#define LMD_PIN 6
|
||||
#define LMD_IO_OUT() (REG_SET(LMD_DDR, LMD_PIN))
|
||||
#define LMD_IO_IN() (REG_CLR(LMD_DDR, LMD_PIN))
|
||||
#define LMD_SET() (REG_SET(LMD_OUT, LMD_PIN))
|
||||
#define LMD_CLR() (REG_CLR(LMD_OUT, LMD_PIN))
|
||||
#define LMD_WRITE(value) (REG_WRITE(LMD_OUT, LMD_PIN, value))
|
||||
#define LMD_STATE() (REG_CHECK(LMD_IN, LMD_PIN))
|
||||
|
||||
// Left whisker
|
||||
#define LW_DDR DDRD
|
||||
#define LW_OUT PORTD
|
||||
#define LW_IN PIND
|
||||
#define LW_PIN 1
|
||||
#define LW_IO_OUT() (REG_SET(LW_DDR, LW_PIN))
|
||||
#define LW_IO_IN() (REG_CLR(LW_DDR, LW_PIN))
|
||||
#define LW_SET() (REG_SET(LW_OUT, LW_PIN))
|
||||
#define LW_CLR() (REG_CLR(LW_OUT, LW_PIN))
|
||||
#define LW_WRITE(value) (REG_WRITE(LW_OUT, LW_PIN, value))
|
||||
#define LW_STATE() (REG_CHECK(LW_IN, LW_PIN))
|
||||
|
||||
// Right whisker
|
||||
#define RW_DDR DDRD
|
||||
#define RW_OUT PORTD
|
||||
#define RW_IN PIND
|
||||
#define RW_PIN 0
|
||||
#define RW_IO_OUT() (REG_SET(RW_DDR, RW_PIN))
|
||||
#define RW_IO_IN() (REG_CLR(RW_DDR, RW_PIN))
|
||||
#define RW_SET() (REG_SET(RW_OUT, RW_PIN))
|
||||
#define RW_CLR() (REG_CLR(RW_OUT, RW_PIN))
|
||||
#define RW_WRITE(value) (REG_WRITE(RW_OUT, RW_PIN, value))
|
||||
#define RW_STATE() (REG_CHECK(RW_IN, RW_PIN))
|
||||
|
||||
const unsigned int backup_time = 1000; //ms
|
||||
const unsigned int debounce_time = 200; //ms
|
||||
|
||||
int main(void){
|
||||
// Set motor enable and direction to outputs
|
||||
RME_IO_OUT();
|
||||
RMD_IO_OUT();
|
||||
LME_IO_OUT();
|
||||
LMD_IO_OUT();
|
||||
|
||||
// Set whiskers to inputs and enable pullup resistors
|
||||
LW_IO_IN();
|
||||
LW_SET();
|
||||
|
||||
RW_IO_IN();
|
||||
RW_SET();
|
||||
|
||||
// Enables motors and sets bot to move forward
|
||||
RMD_SET();
|
||||
LMD_SET();
|
||||
RME_CLR(); // Setting to zero enables motors
|
||||
LME_CLR(); // Setting to zero enables motors
|
||||
|
||||
|
||||
// Main program loop
|
||||
while (1){
|
||||
// Get states of whiskers
|
||||
unsigned char lw_pressed = !LW_STATE();
|
||||
unsigned char rw_pressed = !RW_STATE();
|
||||
|
||||
// Handle noise from button press
|
||||
_delay_ms(debounce_time);
|
||||
|
||||
// Logic if the right whisker is pressed
|
||||
if(rw_pressed){
|
||||
RMD_CLR();
|
||||
LMD_CLR();
|
||||
_delay_ms(backup_time);
|
||||
RMD_SET();
|
||||
_delay_ms(backup_time);
|
||||
LMD_SET();
|
||||
|
||||
// Logic if the right whisker is pressed
|
||||
}else if(lw_pressed){
|
||||
RMD_CLR();
|
||||
LMD_CLR();
|
||||
_delay_ms(backup_time);
|
||||
LMD_SET();
|
||||
_delay_ms(backup_time);
|
||||
RMD_SET();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
:100000000C9446000C945D000C945D000C945D0013
|
||||
:100010000C945D000C945D000C945D000C945D00EC
|
||||
:100020000C945D000C945D000C945D000C945D00DC
|
||||
:100030000C945D000C945D000C945D000C945D00CC
|
||||
:100040000C945D000C945D000C945D000C945D00BC
|
||||
:100050000C945D000C945D000C945D000C945D00AC
|
||||
:100060000C945D000C945D000C945D000C945D009C
|
||||
:100070000C945D000C945D000C945D000C945D008C
|
||||
:100080000C945D000C945D000C945D0011241FBE67
|
||||
:10009000CFEFD0E1DEBFCDBF11E0A0E0B1E0ECE5F5
|
||||
:1000A000F1E000E00BBF02C007900D92A430B10751
|
||||
:1000B000D9F70E945F000C94AC000C940000BC9A2D
|
||||
:1000C000BD9ABF9ABE9A8998919A8898909AC59A33
|
||||
:1000D000C69AC498C79880B3827080BB90B3917061
|
||||
:1000E00090BB2FEF33EC49E0215030404040E1F726
|
||||
:1000F00000C00000911117C0C598C6988FEF93ED0E
|
||||
:1001000020E3815090402040E1F700C00000C59AF4
|
||||
:100110003FEF43ED80E3315040408040E1F700C0C5
|
||||
:100120000000C69AD8CF8111D6CFC598C6989FEF48
|
||||
:1001300023ED30E3915020403040E1F700C0000053
|
||||
:10014000C69A4FEF83ED90E3415080409040E1F735
|
||||
:0C01500000C00000C59ABFCFF894FFCF9C
|
||||
:04015C00C800E803EC
|
||||
:00000001FF
|
||||
@@ -0,0 +1,16 @@
|
||||
MCU=atmega128
|
||||
CC=avr-gcc
|
||||
OBJCOPY=avr-objcopy
|
||||
CFLAGS=-std=c99 -Wall -g -Os -mmcu=${MCU} -DF_CPU=${F_CPU} -I.
|
||||
TARGET=main
|
||||
SRCS=Corwin_Perren_Lab2_sourcecode.c
|
||||
|
||||
all:
|
||||
${CC} ${CFLAGS} -o ${TARGET}.bin ${SRCS}
|
||||
${OBJCOPY} -j .text -j .data -O ihex ${TARGET}.bin ${TARGET}.hex
|
||||
|
||||
flash:
|
||||
avrdude -p ${MCU} -c usbasp -U flash:w:${TARGET}.hex:i -F -P usb
|
||||
|
||||
clean:
|
||||
rm -f *.bin *.hex
|
||||
@@ -0,0 +1,148 @@
|
||||
#define F_CPU 16000000
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// Generic register bitwise operators
|
||||
#define REG_SET(reg, pin) (reg |= _BV(pin))
|
||||
#define REG_CLR(reg, pin) (reg &= ~(_BV(pin)))
|
||||
#define REG_WRITE(reg, pin, value) ((value == 1) ? REG_SET(reg, pin) : REG_CLR(reg, pin))
|
||||
#define REG_CHECK(reg, pin) ((reg &= (_BV(pin))) > 0)
|
||||
|
||||
// Right motor enable
|
||||
#define RME_DDR DDRB
|
||||
#define RME_OUT PORTB
|
||||
#define RME_IN PINB
|
||||
#define RME_PIN 4
|
||||
#define RME_IO_OUT() (REG_SET(RME_DDR, RME_PIN))
|
||||
#define RME_IO_IN() (REG_CLR(RME_DDR, RME_PIN))
|
||||
#define RME_SET() (REG_SET(RME_OUT, RME_PIN))
|
||||
#define RME_CLR() (REG_CLR(RME_OUT, RME_PIN))
|
||||
#define RME_WRITE(value) (REG_WRITE(RME_OUT, RME_PIN, value))
|
||||
#define RME_STATE() (REG_CHECK(RME_IN, RME_PIN))
|
||||
|
||||
// Right motor drive
|
||||
#define RMD_DDR DDRB
|
||||
#define RMD_OUT PORTB
|
||||
#define RMD_IN PINB
|
||||
#define RMD_PIN 5
|
||||
#define RMD_IO_OUT() (REG_SET(RMD_DDR, RMD_PIN))
|
||||
#define RMD_IO_IN() (REG_CLR(RMD_DDR, RMD_PIN))
|
||||
#define RMD_SET() (REG_SET(RMD_OUT, RMD_PIN))
|
||||
#define RMD_CLR() (REG_CLR(RMD_OUT, RMD_PIN))
|
||||
#define RMD_WRITE(value) (REG_WRITE(RMD_OUT, RMD_PIN, value))
|
||||
#define RMD_STATE() (REG_CHECK(RMD_IN, RMD_PIN))
|
||||
|
||||
// Left motor enable
|
||||
#define LME_DDR DDRB
|
||||
#define LME_OUT PORTB
|
||||
#define LME_IN PINB
|
||||
#define LME_PIN 7
|
||||
#define LME_IO_OUT() (REG_SET(LME_DDR, LME_PIN))
|
||||
#define LME_IO_IN() (REG_CLR(LME_DDR, LME_PIN))
|
||||
#define LME_SET() (REG_SET(LME_OUT, LME_PIN))
|
||||
#define LME_CLR() (REG_CLR(LME_OUT, LME_PIN))
|
||||
#define LME_WRITE(value) (REG_WRITE(LME_OUT, LME_PIN, value))
|
||||
#define LME_STATE() (REG_CHECK(LME_IN, LME_PIN))
|
||||
|
||||
// Left motor drive
|
||||
#define LMD_DDR DDRB
|
||||
#define LMD_OUT PORTB
|
||||
#define LMD_IN PINB
|
||||
#define LMD_PIN 6
|
||||
#define LMD_IO_OUT() (REG_SET(LMD_DDR, LMD_PIN))
|
||||
#define LMD_IO_IN() (REG_CLR(LMD_DDR, LMD_PIN))
|
||||
#define LMD_SET() (REG_SET(LMD_OUT, LMD_PIN))
|
||||
#define LMD_CLR() (REG_CLR(LMD_OUT, LMD_PIN))
|
||||
#define LMD_WRITE(value) (REG_WRITE(LMD_OUT, LMD_PIN, value))
|
||||
#define LMD_STATE() (REG_CHECK(LMD_IN, LMD_PIN))
|
||||
|
||||
// Left whisker
|
||||
#define LW_DDR DDRD
|
||||
#define LW_OUT PORTD
|
||||
#define LW_IN PIND
|
||||
#define LW_PIN 1
|
||||
#define LW_IO_OUT() (REG_SET(LW_DDR, LW_PIN))
|
||||
#define LW_IO_IN() (REG_CLR(LW_DDR, LW_PIN))
|
||||
#define LW_SET() (REG_SET(LW_OUT, LW_PIN))
|
||||
#define LW_CLR() (REG_CLR(LW_OUT, LW_PIN))
|
||||
#define LW_WRITE(value) (REG_WRITE(LW_OUT, LW_PIN, value))
|
||||
#define LW_STATE() (REG_CHECK(LW_IN, LW_PIN))
|
||||
|
||||
// Right whisker
|
||||
#define RW_DDR DDRD
|
||||
#define RW_OUT PORTD
|
||||
#define RW_IN PIND
|
||||
#define RW_PIN 0
|
||||
#define RW_IO_OUT() (REG_SET(RW_DDR, RW_PIN))
|
||||
#define RW_IO_IN() (REG_CLR(RW_DDR, RW_PIN))
|
||||
#define RW_SET() (REG_SET(RW_OUT, RW_PIN))
|
||||
#define RW_CLR() (REG_CLR(RW_OUT, RW_PIN))
|
||||
#define RW_WRITE(value) (REG_WRITE(RW_OUT, RW_PIN, value))
|
||||
#define RW_STATE() (REG_CHECK(RW_IN, RW_PIN))
|
||||
|
||||
const unsigned int drive_forward_time = 500;
|
||||
const unsigned int backup_time = 250; //ms
|
||||
const unsigned int debounce_time = 20; //ms
|
||||
|
||||
int main(void){
|
||||
// Set motor enable and direction to outputs
|
||||
RME_IO_OUT();
|
||||
RMD_IO_OUT();
|
||||
LME_IO_OUT();
|
||||
LMD_IO_OUT();
|
||||
|
||||
// Set whiskers to inputs and enable pullup resistors
|
||||
LW_IO_IN();
|
||||
LW_SET();
|
||||
|
||||
RW_IO_IN();
|
||||
RW_SET();
|
||||
|
||||
// Enables motors and sets bot to move forward
|
||||
RMD_SET();
|
||||
LMD_SET();
|
||||
RME_CLR(); // Setting to zero enables motors
|
||||
LME_CLR(); // Setting to zero enables motors
|
||||
|
||||
|
||||
// Main program loop
|
||||
while (1){
|
||||
// Get states of whiskers
|
||||
unsigned char lw_pressed = !LW_STATE();
|
||||
unsigned char rw_pressed = !RW_STATE();
|
||||
|
||||
// Handle noise from button press
|
||||
_delay_ms(debounce_time);
|
||||
|
||||
// Logic if the both whiskers are pressed
|
||||
if(rw_pressed && lw_pressed){
|
||||
_delay_ms(drive_forward_time);
|
||||
RMD_CLR();
|
||||
LMD_CLR();
|
||||
_delay_ms(backup_time);
|
||||
LMD_SET();
|
||||
RMD_SET();
|
||||
|
||||
// Logic if the right whisker is pressed
|
||||
}else if(rw_pressed){
|
||||
_delay_ms(drive_forward_time);
|
||||
RMD_CLR();
|
||||
LMD_CLR();
|
||||
_delay_ms(backup_time);
|
||||
LMD_SET();
|
||||
_delay_ms(backup_time);
|
||||
RMD_SET();
|
||||
|
||||
// Logic if the left whisker is pressed
|
||||
}else if(lw_pressed){
|
||||
_delay_ms(drive_forward_time);
|
||||
RMD_CLR();
|
||||
LMD_CLR();
|
||||
_delay_ms(backup_time);
|
||||
RMD_SET();
|
||||
_delay_ms(backup_time);
|
||||
LMD_SET();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
:100000000C9446000C945D000C945D000C945D0013
|
||||
:100010000C945D000C945D000C945D000C945D00EC
|
||||
:100020000C945D000C945D000C945D000C945D00DC
|
||||
:100030000C945D000C945D000C945D000C945D00CC
|
||||
:100040000C945D000C945D000C945D000C945D00BC
|
||||
:100050000C945D000C945D000C945D000C945D00AC
|
||||
:100060000C945D000C945D000C945D000C945D009C
|
||||
:100070000C945D000C945D000C945D000C945D008C
|
||||
:100080000C945D000C945D000C945D0011241FBE67
|
||||
:10009000CFEFD0E1DEBFCDBF11E0A0E0B1E0E0EBFB
|
||||
:1000A000F1E000E00BBF02C007900D92A630B1074F
|
||||
:1000B000D9F70E945F000C94D6000C940000BC9A03
|
||||
:1000C000BD9ABF9ABE9A8998919A8898909AC59A33
|
||||
:1000D000C69AC498C79880B3827080BB90B3917061
|
||||
:1000E00090BB2FEF39EF40E0215030404040E1F726
|
||||
:1000F00000C00000911138C0811116C08FEF99E641
|
||||
:1001000028E1815090402040E1F700C00000C598F0
|
||||
:10011000C6983FEF44E38CE0315040408040E1F727
|
||||
:1001200000C00000C69A1EC09FEF29E638E191503A
|
||||
:1001300020403040E1F700C00000C598C6984FEF5E
|
||||
:1001400084E39CE0415080409040E1F700C0000013
|
||||
:10015000C69A2FEF34E34CE0215030404040E1F7A5
|
||||
:1001600000C00000C59AB7CF8111B5CF8FEF99E6D7
|
||||
:1001700028E1815090402040E1F700C00000C59880
|
||||
:10018000C6983FEF44E38CE0315040408040E1F7B7
|
||||
:1001900000C00000C59A9FEF24E33CE0915020404E
|
||||
:1001A0003040E1F700C00000C69A95CFF894FFCF29
|
||||
:0601B0001400FA00F40146
|
||||
:00000001FF
|
||||
@@ -0,0 +1,16 @@
|
||||
MCU=atmega128
|
||||
CC=avr-gcc
|
||||
OBJCOPY=avr-objcopy
|
||||
CFLAGS=-std=c99 -Wall -g -Os -mmcu=${MCU} -DF_CPU=${F_CPU} -I.
|
||||
TARGET=main
|
||||
SRCS=Corwin_Perren_Lab2_challenge_sourcecode.c
|
||||
|
||||
all:
|
||||
${CC} ${CFLAGS} -o ${TARGET}.bin ${SRCS}
|
||||
${OBJCOPY} -j .text -j .data -O ihex ${TARGET}.bin ${TARGET}.hex
|
||||
|
||||
flash:
|
||||
avrdude -p ${MCU} -c usbasp -U flash:w:${TARGET}.hex:i -F -P usb
|
||||
|
||||
clean:
|
||||
rm -f *.bin *.hex
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{18226A42-8477-4023-8AD2-40C49DA407C9}") = "Corwin_Perren_Lab4_challengecode", "Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asmproj", "{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
Release|AVR = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,193 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Corwin_Perren_Lab4_challengecode.asm
|
||||
;*
|
||||
;* This program loads a two line string from program memory,
|
||||
;* then cycles it around the lines of the display.
|
||||
;*
|
||||
;* This is the skeleton file for Lab 4 of ECE 375
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: Corwin Perren
|
||||
;* Date: 10/17/2018
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
.include "m128def.inc" ; Include definition file
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;***********************************************************
|
||||
.def mpr = r16 ; Multipurpose register is
|
||||
.def mpr2 = r10
|
||||
|
||||
.def dataloopcountreg = r23
|
||||
|
||||
.equ WTime = 25 ; Time to wait in wait loop
|
||||
|
||||
.equ datamemstart = 0x0100
|
||||
|
||||
.equ stringlen = 32
|
||||
|
||||
;***********************************************************
|
||||
;* Start of Code Segment
|
||||
;***********************************************************
|
||||
.cseg ; Beginning of code segment
|
||||
|
||||
;***********************************************************
|
||||
;* Interrupt Vectors
|
||||
;***********************************************************
|
||||
.org $0000 ; Beginning of IVs
|
||||
rjmp INIT ; Reset interrupt
|
||||
|
||||
.org $0046 ; End of Interrupt Vectors
|
||||
|
||||
;***********************************************************
|
||||
;* Program Initialization
|
||||
;***********************************************************
|
||||
INIT: ; The initialization routine
|
||||
; Initialize Stack Pointer
|
||||
ldi mpr, low(RAMEND) ; Load the low and high bytes of ram end to the stack pointer
|
||||
out SPL, mpr
|
||||
ldi mpr, high(RAMEND)
|
||||
out SPH, mpr
|
||||
|
||||
; Initialize LCD Display
|
||||
rcall LCDInit ; Call the lcd init function
|
||||
|
||||
; Move strings from Program Memory to Data Memory
|
||||
ldi ZL, low(STRING_BEG << 1) ; Low byte of first byte in string into ZL
|
||||
ldi ZH, high(STRING_BEG << 1) ; High byte of first byte in string into ZH
|
||||
|
||||
ldi YL, low(datamemstart) ; Low byte of data memory start into YL
|
||||
ldi YH, high(datamemstart)
|
||||
|
||||
ldi dataloopcountreg, stringlen ; Initialize count for loop to string length
|
||||
|
||||
INIT_MEMCOPYLOOP: ; Loop to read data from progmem to datamem
|
||||
lpm mpr, Z+ ; Get byte from address pointed to be Z,
|
||||
; store in reg, move to next byte
|
||||
|
||||
st Y+, mpr ; Store byte from reg into data mem address
|
||||
; pointed to by Y, then move Y to next open spot
|
||||
dec dataloopcountreg ; Decrement count as we're done with byte
|
||||
brne INIT_MEMCOPYLOOP ; If we haven't read in the whole string, loop again
|
||||
|
||||
|
||||
; NOTE that there is no RET or RJMP from INIT, this
|
||||
; is because the next instruction executed is the
|
||||
; first instruction of the main program
|
||||
|
||||
;***********************************************************
|
||||
;* Main Program
|
||||
;***********************************************************
|
||||
MAIN: ; The Main program
|
||||
; Display the strings on the LCD Display
|
||||
|
||||
rcall LCDWrite ; This writes the data mem to the display,
|
||||
; based on fixed mem addresses in LCDDriver.asm
|
||||
|
||||
ldi mpr, WTime ; Copied from lab 1, copy time into general reg
|
||||
mov wait, mpr ; Copy into wait reg
|
||||
|
||||
rcall AVRWait ; Call wait subroutine
|
||||
rcall ROTATE_TEXT ; Call subroutine to rotate text by one char
|
||||
|
||||
rjmp MAIN ; jump back to main and create an infinite
|
||||
; while loop. Generally, every main program is an
|
||||
; infinite while loop, never let the main program
|
||||
; just run off
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: ROTATE_TEXT
|
||||
; Desc: This rotates a text string by one character, looping around the end
|
||||
;-----------------------------------------------------------
|
||||
ROTATE_TEXT: ; Begin a function with a label
|
||||
; Save variables by pushing them to the stack
|
||||
push mpr
|
||||
push mpr2
|
||||
push dataloopcountreg
|
||||
push XL
|
||||
push XH
|
||||
|
||||
; Get pointer to start of data memory for the lcd
|
||||
ldi XL, low(datamemstart)
|
||||
ldi XH, high(datamemstart)
|
||||
|
||||
ld mpr, X+ ; Get the first element, point to next
|
||||
|
||||
; Initialize counter
|
||||
ldi dataloopcountreg, stringlen ; Initialize count for loop to string length
|
||||
dec dataloopcountreg ; The last one we want to take care of
|
||||
; specifically, so dec to skip the first char
|
||||
|
||||
ROTATE_TEXT_LOOP:
|
||||
ld mpr2, X ; Save value in current text mem location
|
||||
st X, mpr ; Overwrite current text mem with char from prev location
|
||||
inc XL ; Move to next byte location
|
||||
mov mpr, mpr2 ; Move stored prev char value into main mpr for overwrite
|
||||
dec dataloopcountreg ; Dec loop counter
|
||||
brne ROTATE_TEXT_LOOP ; If not done with all chars, loop
|
||||
|
||||
; Go back to start
|
||||
ldi XL, low(datamemstart) ; Repoint to beginning of string array
|
||||
ldi XH, high(datamemstart)
|
||||
|
||||
; Store last element as first
|
||||
st X, mpr ; Overwrite first char with previous last character
|
||||
|
||||
; Restore variables by popping them from the stack,
|
||||
; in reverse order
|
||||
pop XH
|
||||
pop XL
|
||||
pop dataloopcountreg
|
||||
pop mpr2
|
||||
pop mpr
|
||||
|
||||
ret ; End a function with RET
|
||||
|
||||
; This was copied and modified from lab 1
|
||||
;----------------------------------------------------------------
|
||||
; Sub: AVRWait
|
||||
; Desc: A wait loop that is 16 + 159975*waitcnt cycles or roughly
|
||||
; waitcnt*10ms. Just initialize wait for the specific amount
|
||||
; of time in 10ms intervals. Here is the general eqaution
|
||||
; for the number of clock cycles in the wait loop:
|
||||
; ((3 * ilcnt + 3) * olcnt + 3) * waitcnt + 13 + call
|
||||
;----------------------------------------------------------------
|
||||
AVRWait:
|
||||
push wait ; Save wait register
|
||||
push count ; Save ilcnt register
|
||||
push line ; Save olcnt register
|
||||
|
||||
Loop: ldi line, 224 ; load olcnt register
|
||||
OLoop: ldi count, 237 ; load ilcnt register
|
||||
ILoop: dec count ; decrement ilcnt
|
||||
brne ILoop ; Continue Inner Loop
|
||||
dec line ; decrement olcnt
|
||||
brne OLoop ; Continue Outer Loop
|
||||
dec wait ; Decrement wait
|
||||
brne Loop ; Continue Wait loop
|
||||
|
||||
pop line ; Restore olcnt register
|
||||
pop count ; Restore ilcnt register
|
||||
pop wait ; Restore wait register
|
||||
ret ; Return from subroutine
|
||||
|
||||
;***********************************************************
|
||||
;* Stored Program Data
|
||||
;***********************************************************
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; An example of storing a string. Note the labels before and
|
||||
; after the .DB directive; these can help to access the data
|
||||
;-----------------------------------------------------------
|
||||
STRING_BEG:
|
||||
.DB " Corwin Perren Hello World! " ; Declaring data in ProgMem
|
||||
STRING_END:
|
||||
|
||||
;***********************************************************
|
||||
;* Additional Program Includes
|
||||
;***********************************************************
|
||||
.include "LCDDriver.asm" ; Include the LCD Driver
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRAssembler</ToolchainName>
|
||||
<ProjectGuid>59B1D629-9DCC-43ed-A0FD-8AB0E4D622AB</ProjectGuid>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.obj</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<Language>ASSEMBLY</Language>
|
||||
<AssemblyName>Corwin_Perren_Lab4_challengecode</AssemblyName>
|
||||
<Name>Corwin_Perren_Lab4_challengecode</Name>
|
||||
<RootNamespace>Corwin_Perren_Lab4_challengecode</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<EntryFile>$(MSBuildProjectDirectory)\Corwin_Perren_Lab4_challengecode.asm</EntryFile>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Corwin_Perren_Lab4_challengecode.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LCDDriver.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Assembler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.2.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>bd3TUV9UtxpdYQkn+6MWPA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc/m128def.inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\templates\main.asm</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>5CfmTmZmR6PbQJ065mg2IQ==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/templates/main.asm</Name>
|
||||
<SelectString>Main file (.asm)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.2.209</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -0,0 +1,48 @@
|
||||
:020000020000FC
|
||||
:0200000045C0F9
|
||||
:10008C000FEF0DBF00E10EBF47D0E4E0F1E0C0E0A0
|
||||
:10009C00D1E070E2059109937A95E1F77CD009E102
|
||||
:1000AC00102F1BD001D0FACF0F93AF927F93AF9349
|
||||
:1000BC00BF93A0E0B1E00D9170E27A95AC900C93F7
|
||||
:1000CC00A3950A2D7A95D1F7A0E0B1E00C93BF91DE
|
||||
:1000DC00AF917F91AF900F9108951F932F933F9302
|
||||
:1000EC0030EE2DEE2A95F1F73A95D9F71A95C1F71E
|
||||
:1000FC003F912F911F91089520436F7277696E2065
|
||||
:10010C0050657272656E2020202048656C6C6F20E3
|
||||
:10011C00576F726C642120200F930FB70F931F93AE
|
||||
:10012C0000E008BB0FEF07BB00E002BB00E001BB27
|
||||
:10013C0000E00093620008E00093610000E50DB957
|
||||
:10014C0001E00EB900E805BF02E400936D0000E881
|
||||
:10015C0000936C0000E00BB908E10AB906E00093CB
|
||||
:10016C00950000E00093900007E609B906E01AEF4D
|
||||
:10017C00BFD00A95E1F708E397D008E095D001E0ED
|
||||
:10018C0093D006E091D00CE08FD028D01F910F9126
|
||||
:10019C000FBF0F91089502D011D008950F93EF93D4
|
||||
:1001AC00FF932F933F93E0E0F1E030E86BD076D0F3
|
||||
:1001BC003F912F91FF91EF910F9108950F93EF9332
|
||||
:1001CC00FF932F933F93E0E1F1E030EC5BD066D0EE
|
||||
:1001DC003F912F91FF91EF910F91089502D011D083
|
||||
:1001EC0008950F933F932F93EF93FF9330E84AD0EA
|
||||
:1001FC00E0E0F1E04CD0FF91EF912F913F910F9106
|
||||
:10020C0008950F933F932F93EF93FF9330EC3AD0D5
|
||||
:10021C00E0E1F1E03CD0FF91EF912F913F910F91F4
|
||||
:10022C0008950F933F932F93283250F4313011F4EB
|
||||
:10023C0030E803C0323021F430EC320F23D042D0FE
|
||||
:10024C002F913F910F9108950F936F935F93BF93ED
|
||||
:10025C00AF93043618F023E0139607C00A3018F059
|
||||
:10026C0022E0129602C0119621E04AD000E3060F5C
|
||||
:10027C000E93052F0030C9F7AF91BF915F916F912D
|
||||
:10028C000F9108950F93032F0FD00F91089500E253
|
||||
:10029C0020E1019317D02A95E1F7089520E101910F
|
||||
:1002AC0011D02A95E1F708954F931F9340E013D096
|
||||
:1002BC000F9302E01DEC1CD00A95E1F70F911F91F2
|
||||
:1002CC004F9108954F931F9341E005D010E110D04A
|
||||
:1002DC001F914F9108954FB912E00AD00FB912E057
|
||||
:1002EC0007D018E01093620010E01093620008959C
|
||||
:1002FC000F9309E40A95F1F71A95D9F70F91089520
|
||||
:10030C000F92502F56955695500F5695500F569557
|
||||
:10031C0056955695500F5695500F56955695569591
|
||||
:10032C00500F5695500F5695569556955695652FD8
|
||||
:10033C00660F660F650F660F062E602F60196A3008
|
||||
:0C034C0018F053956A50FBCF0F900895F5
|
||||
:00000001FF
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,933 @@
|
||||
|
||||
AVRASM ver. 2.2.7 C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm Tue Oct 23 20:38:27 2018
|
||||
|
||||
|
||||
EQU SIGNATURE_000 0000001e
|
||||
EQU SIGNATURE_001 00000097
|
||||
EQU SIGNATURE_002 00000002
|
||||
EQU UCSR1C 0000009d
|
||||
EQU UDR1 0000009c
|
||||
EQU UCSR1A 0000009b
|
||||
EQU UCSR1B 0000009a
|
||||
EQU UBRR1H 00000098
|
||||
EQU UBRR1L 00000099
|
||||
EQU UCSR0C 00000095
|
||||
EQU UBRR0H 00000090
|
||||
EQU TCCR3C 0000008c
|
||||
EQU TCCR3A 0000008b
|
||||
EQU TCCR3B 0000008a
|
||||
EQU TCNT3L 00000088
|
||||
EQU TCNT3H 00000089
|
||||
EQU OCR3AL 00000086
|
||||
EQU OCR3AH 00000087
|
||||
EQU OCR3BL 00000084
|
||||
EQU OCR3BH 00000085
|
||||
EQU OCR3CL 00000082
|
||||
EQU OCR3CH 00000083
|
||||
EQU ICR3L 00000080
|
||||
EQU ICR3H 00000081
|
||||
EQU ETIMSK 0000007d
|
||||
EQU ETIFR 0000007c
|
||||
EQU TCCR1C 0000007a
|
||||
EQU OCR1CL 00000078
|
||||
EQU OCR1CH 00000079
|
||||
EQU TWCR 00000074
|
||||
EQU TWDR 00000073
|
||||
EQU TWAR 00000072
|
||||
EQU TWSR 00000071
|
||||
EQU TWBR 00000070
|
||||
EQU OSCCAL 0000006f
|
||||
EQU XMCRA 0000006d
|
||||
EQU XMCRB 0000006c
|
||||
EQU EICRA 0000006a
|
||||
EQU SPMCSR 00000068
|
||||
EQU PORTG 00000065
|
||||
EQU DDRG 00000064
|
||||
EQU PING 00000063
|
||||
EQU PORTF 00000062
|
||||
EQU DDRF 00000061
|
||||
EQU SREG 0000003f
|
||||
EQU SPL 0000003d
|
||||
EQU SPH 0000003e
|
||||
EQU XDIV 0000003c
|
||||
EQU RAMPZ 0000003b
|
||||
EQU EICRB 0000003a
|
||||
EQU EIMSK 00000039
|
||||
EQU EIFR 00000038
|
||||
EQU TIMSK 00000037
|
||||
EQU TIFR 00000036
|
||||
EQU MCUCR 00000035
|
||||
EQU MCUCSR 00000034
|
||||
EQU TCCR0 00000033
|
||||
EQU TCNT0 00000032
|
||||
EQU OCR0 00000031
|
||||
EQU ASSR 00000030
|
||||
EQU TCCR1A 0000002f
|
||||
EQU TCCR1B 0000002e
|
||||
EQU TCNT1L 0000002c
|
||||
EQU TCNT1H 0000002d
|
||||
EQU OCR1AL 0000002a
|
||||
EQU OCR1AH 0000002b
|
||||
EQU OCR1BL 00000028
|
||||
EQU OCR1BH 00000029
|
||||
EQU ICR1L 00000026
|
||||
EQU ICR1H 00000027
|
||||
EQU TCCR2 00000025
|
||||
EQU TCNT2 00000024
|
||||
EQU OCR2 00000023
|
||||
EQU OCDR 00000022
|
||||
EQU WDTCR 00000021
|
||||
EQU SFIOR 00000020
|
||||
EQU EEARL 0000001e
|
||||
EQU EEARH 0000001f
|
||||
EQU EEDR 0000001d
|
||||
EQU EECR 0000001c
|
||||
EQU PORTA 0000001b
|
||||
EQU DDRA 0000001a
|
||||
EQU PINA 00000019
|
||||
EQU PORTB 00000018
|
||||
EQU DDRB 00000017
|
||||
EQU PINB 00000016
|
||||
EQU PORTC 00000015
|
||||
EQU DDRC 00000014
|
||||
EQU PINC 00000013
|
||||
EQU PORTD 00000012
|
||||
EQU DDRD 00000011
|
||||
EQU PIND 00000010
|
||||
EQU SPDR 0000000f
|
||||
EQU SPSR 0000000e
|
||||
EQU SPCR 0000000d
|
||||
EQU UDR0 0000000c
|
||||
EQU UCSR0A 0000000b
|
||||
EQU UCSR0B 0000000a
|
||||
EQU UBRR0L 00000009
|
||||
EQU ACSR 00000008
|
||||
EQU ADMUX 00000007
|
||||
EQU ADCSRA 00000006
|
||||
EQU ADCH 00000005
|
||||
EQU ADCL 00000004
|
||||
EQU PORTE 00000003
|
||||
EQU DDRE 00000002
|
||||
EQU PINE 00000001
|
||||
EQU PINF 00000000
|
||||
EQU ACME 00000003
|
||||
EQU ACIS0 00000000
|
||||
EQU ACIS1 00000001
|
||||
EQU ACIC 00000002
|
||||
EQU ACIE 00000003
|
||||
EQU ACI 00000004
|
||||
EQU ACO 00000005
|
||||
EQU ACBG 00000006
|
||||
EQU ACD 00000007
|
||||
EQU SPDR0 00000000
|
||||
EQU SPDR1 00000001
|
||||
EQU SPDR2 00000002
|
||||
EQU SPDR3 00000003
|
||||
EQU SPDR4 00000004
|
||||
EQU SPDR5 00000005
|
||||
EQU SPDR6 00000006
|
||||
EQU SPDR7 00000007
|
||||
EQU SPI2X 00000000
|
||||
EQU WCOL 00000006
|
||||
EQU SPIF 00000007
|
||||
EQU SPR0 00000000
|
||||
EQU SPR1 00000001
|
||||
EQU CPHA 00000002
|
||||
EQU CPOL 00000003
|
||||
EQU MSTR 00000004
|
||||
EQU DORD 00000005
|
||||
EQU SPE 00000006
|
||||
EQU SPIE 00000007
|
||||
EQU I2BR 00000070
|
||||
EQU TWBR0 00000000
|
||||
EQU TWBR1 00000001
|
||||
EQU TWBR2 00000002
|
||||
EQU TWBR3 00000003
|
||||
EQU TWBR4 00000004
|
||||
EQU TWBR5 00000005
|
||||
EQU TWBR6 00000006
|
||||
EQU TWBR7 00000007
|
||||
EQU I2CR 00000074
|
||||
EQU TWIE 00000000
|
||||
EQU I2IE 00000000
|
||||
EQU TWEN 00000002
|
||||
EQU I2EN 00000002
|
||||
EQU ENI2C 00000002
|
||||
EQU TWWC 00000003
|
||||
EQU I2WC 00000003
|
||||
EQU TWSTO 00000004
|
||||
EQU I2STO 00000004
|
||||
EQU TWSTA 00000005
|
||||
EQU I2STA 00000005
|
||||
EQU TWEA 00000006
|
||||
EQU I2EA 00000006
|
||||
EQU TWINT 00000007
|
||||
EQU I2INT 00000007
|
||||
EQU I2SR 00000071
|
||||
EQU TWPS0 00000000
|
||||
EQU TWS0 00000000
|
||||
EQU I2GCE 00000000
|
||||
EQU TWPS1 00000001
|
||||
EQU TWS1 00000001
|
||||
EQU TWS3 00000003
|
||||
EQU I2S3 00000003
|
||||
EQU TWS4 00000004
|
||||
EQU I2S4 00000004
|
||||
EQU TWS5 00000005
|
||||
EQU I2S5 00000005
|
||||
EQU TWS6 00000006
|
||||
EQU I2S6 00000006
|
||||
EQU TWS7 00000007
|
||||
EQU I2S7 00000007
|
||||
EQU I2DR 00000073
|
||||
EQU TWD0 00000000
|
||||
EQU TWD1 00000001
|
||||
EQU TWD2 00000002
|
||||
EQU TWD3 00000003
|
||||
EQU TWD4 00000004
|
||||
EQU TWD5 00000005
|
||||
EQU TWD6 00000006
|
||||
EQU TWD7 00000007
|
||||
EQU I2AR 00000072
|
||||
EQU TWGCE 00000000
|
||||
EQU TWA0 00000001
|
||||
EQU TWA1 00000002
|
||||
EQU TWA2 00000003
|
||||
EQU TWA3 00000004
|
||||
EQU TWA4 00000005
|
||||
EQU TWA5 00000006
|
||||
EQU TWA6 00000007
|
||||
EQU UDR00 00000000
|
||||
EQU UDR01 00000001
|
||||
EQU UDR02 00000002
|
||||
EQU UDR03 00000003
|
||||
EQU UDR04 00000004
|
||||
EQU UDR05 00000005
|
||||
EQU UDR06 00000006
|
||||
EQU UDR07 00000007
|
||||
EQU MPCM0 00000000
|
||||
EQU U2X0 00000001
|
||||
EQU UPE0 00000002
|
||||
EQU DOR0 00000003
|
||||
EQU FE0 00000004
|
||||
EQU UDRE0 00000005
|
||||
EQU TXC0 00000006
|
||||
EQU RXC0 00000007
|
||||
EQU TXB80 00000000
|
||||
EQU RXB80 00000001
|
||||
EQU UCSZ02 00000002
|
||||
EQU UCSZ2 00000002
|
||||
EQU TXEN0 00000003
|
||||
EQU RXEN0 00000004
|
||||
EQU UDRIE0 00000005
|
||||
EQU TXCIE0 00000006
|
||||
EQU RXCIE0 00000007
|
||||
EQU UCPOL0 00000000
|
||||
EQU UCSZ00 00000001
|
||||
EQU UCSZ01 00000002
|
||||
EQU USBS0 00000003
|
||||
EQU UPM00 00000004
|
||||
EQU UPM01 00000005
|
||||
EQU UMSEL0 00000006
|
||||
EQU UBRR8 00000000
|
||||
EQU UBRR9 00000001
|
||||
EQU UBRR10 00000002
|
||||
EQU UBRR11 00000003
|
||||
EQU UBRR0 00000000
|
||||
EQU UBRR1 00000001
|
||||
EQU UBRR2 00000002
|
||||
EQU UBRR3 00000003
|
||||
EQU UBRR4 00000004
|
||||
EQU UBRR5 00000005
|
||||
EQU UBRR6 00000006
|
||||
EQU UBRR7 00000007
|
||||
EQU UDR10 00000000
|
||||
EQU UDR11 00000001
|
||||
EQU UDR12 00000002
|
||||
EQU UDR13 00000003
|
||||
EQU UDR14 00000004
|
||||
EQU UDR15 00000005
|
||||
EQU UDR16 00000006
|
||||
EQU UDR17 00000007
|
||||
EQU MPCM1 00000000
|
||||
EQU U2X1 00000001
|
||||
EQU UPE1 00000002
|
||||
EQU DOR1 00000003
|
||||
EQU FE1 00000004
|
||||
EQU UDRE1 00000005
|
||||
EQU TXC1 00000006
|
||||
EQU RXC1 00000007
|
||||
EQU TXB81 00000000
|
||||
EQU RXB81 00000001
|
||||
EQU UCSZ12 00000002
|
||||
EQU TXEN1 00000003
|
||||
EQU RXEN1 00000004
|
||||
EQU UDRIE1 00000005
|
||||
EQU TXCIE1 00000006
|
||||
EQU RXCIE1 00000007
|
||||
EQU UCPOL1 00000000
|
||||
EQU UCSZ10 00000001
|
||||
EQU UCSZ11 00000002
|
||||
EQU USBS1 00000003
|
||||
EQU UPM10 00000004
|
||||
EQU UPM11 00000005
|
||||
EQU UMSEL1 00000006
|
||||
EQU SREG_C 00000000
|
||||
EQU SREG_Z 00000001
|
||||
EQU SREG_N 00000002
|
||||
EQU SREG_V 00000003
|
||||
EQU SREG_S 00000004
|
||||
EQU SREG_H 00000005
|
||||
EQU SREG_T 00000006
|
||||
EQU SREG_I 00000007
|
||||
EQU IVCE 00000000
|
||||
EQU IVSEL 00000001
|
||||
EQU SM2 00000002
|
||||
EQU SM0 00000003
|
||||
EQU SM1 00000004
|
||||
EQU SE 00000005
|
||||
EQU SRW10 00000006
|
||||
EQU SRE 00000007
|
||||
EQU SRW11 00000001
|
||||
EQU SRW00 00000002
|
||||
EQU SRW01 00000003
|
||||
EQU SRL0 00000004
|
||||
EQU SRL1 00000005
|
||||
EQU SRL2 00000006
|
||||
EQU XMM0 00000000
|
||||
EQU XMM1 00000001
|
||||
EQU XMM2 00000002
|
||||
EQU XMBK 00000007
|
||||
EQU CAL0 00000000
|
||||
EQU CAL1 00000001
|
||||
EQU CAL2 00000002
|
||||
EQU CAL3 00000003
|
||||
EQU CAL4 00000004
|
||||
EQU CAL5 00000005
|
||||
EQU CAL6 00000006
|
||||
EQU CAL7 00000007
|
||||
EQU XDIV0 00000000
|
||||
EQU XDIV1 00000001
|
||||
EQU XDIV2 00000002
|
||||
EQU XDIV3 00000003
|
||||
EQU XDIV4 00000004
|
||||
EQU XDIV5 00000005
|
||||
EQU XDIV6 00000006
|
||||
EQU XDIVEN 00000007
|
||||
EQU PORF 00000000
|
||||
EQU EXTRF 00000001
|
||||
EQU BORF 00000002
|
||||
EQU WDRF 00000003
|
||||
EQU JTRF 00000004
|
||||
EQU JTD 00000007
|
||||
EQU RAMPZ0 00000000
|
||||
EQU SPMCR 00000068
|
||||
EQU SPMEN 00000000
|
||||
EQU PGERS 00000001
|
||||
EQU PGWRT 00000002
|
||||
EQU BLBSET 00000003
|
||||
EQU RWWSRE 00000004
|
||||
EQU ASRE 00000004
|
||||
EQU RWWSB 00000006
|
||||
EQU ASB 00000006
|
||||
EQU SPMIE 00000007
|
||||
EQU OCDR0 00000000
|
||||
EQU OCDR1 00000001
|
||||
EQU OCDR2 00000002
|
||||
EQU OCDR3 00000003
|
||||
EQU OCDR4 00000004
|
||||
EQU OCDR5 00000005
|
||||
EQU OCDR6 00000006
|
||||
EQU OCDR7 00000007
|
||||
EQU IDRD 00000007
|
||||
EQU PSR321 00000000
|
||||
EQU PSR1 00000000
|
||||
EQU PSR2 00000000
|
||||
EQU PSR3 00000000
|
||||
EQU PSR0 00000001
|
||||
EQU PUD 00000002
|
||||
EQU TSM 00000007
|
||||
EQU ISC00 00000000
|
||||
EQU ISC01 00000001
|
||||
EQU ISC10 00000002
|
||||
EQU ISC11 00000003
|
||||
EQU ISC20 00000004
|
||||
EQU ISC21 00000005
|
||||
EQU ISC30 00000006
|
||||
EQU ISC31 00000007
|
||||
EQU ISC40 00000000
|
||||
EQU ISC41 00000001
|
||||
EQU ISC50 00000002
|
||||
EQU ISC51 00000003
|
||||
EQU ISC60 00000004
|
||||
EQU ISC61 00000005
|
||||
EQU ISC70 00000006
|
||||
EQU ISC71 00000007
|
||||
EQU GICR 00000039
|
||||
EQU GIMSK 00000039
|
||||
EQU INT0 00000000
|
||||
EQU INT1 00000001
|
||||
EQU INT2 00000002
|
||||
EQU INT3 00000003
|
||||
EQU INT4 00000004
|
||||
EQU INT5 00000005
|
||||
EQU INT6 00000006
|
||||
EQU INT7 00000007
|
||||
EQU GIFR 00000038
|
||||
EQU INTF0 00000000
|
||||
EQU INTF1 00000001
|
||||
EQU INTF2 00000002
|
||||
EQU INTF3 00000003
|
||||
EQU INTF4 00000004
|
||||
EQU INTF5 00000005
|
||||
EQU INTF6 00000006
|
||||
EQU INTF7 00000007
|
||||
EQU EEDR0 00000000
|
||||
EQU EEDR1 00000001
|
||||
EQU EEDR2 00000002
|
||||
EQU EEDR3 00000003
|
||||
EQU EEDR4 00000004
|
||||
EQU EEDR5 00000005
|
||||
EQU EEDR6 00000006
|
||||
EQU EEDR7 00000007
|
||||
EQU EERE 00000000
|
||||
EQU EEWE 00000001
|
||||
EQU EEMWE 00000002
|
||||
EQU EERIE 00000003
|
||||
EQU PORTA0 00000000
|
||||
EQU PA0 00000000
|
||||
EQU PORTA1 00000001
|
||||
EQU PA1 00000001
|
||||
EQU PORTA2 00000002
|
||||
EQU PA2 00000002
|
||||
EQU PORTA3 00000003
|
||||
EQU PA3 00000003
|
||||
EQU PORTA4 00000004
|
||||
EQU PA4 00000004
|
||||
EQU PORTA5 00000005
|
||||
EQU PA5 00000005
|
||||
EQU PORTA6 00000006
|
||||
EQU PA6 00000006
|
||||
EQU PORTA7 00000007
|
||||
EQU PA7 00000007
|
||||
EQU DDA0 00000000
|
||||
EQU DDA1 00000001
|
||||
EQU DDA2 00000002
|
||||
EQU DDA3 00000003
|
||||
EQU DDA4 00000004
|
||||
EQU DDA5 00000005
|
||||
EQU DDA6 00000006
|
||||
EQU DDA7 00000007
|
||||
EQU PINA0 00000000
|
||||
EQU PINA1 00000001
|
||||
EQU PINA2 00000002
|
||||
EQU PINA3 00000003
|
||||
EQU PINA4 00000004
|
||||
EQU PINA5 00000005
|
||||
EQU PINA6 00000006
|
||||
EQU PINA7 00000007
|
||||
EQU PORTB0 00000000
|
||||
EQU PB0 00000000
|
||||
EQU PORTB1 00000001
|
||||
EQU PB1 00000001
|
||||
EQU PORTB2 00000002
|
||||
EQU PB2 00000002
|
||||
EQU PORTB3 00000003
|
||||
EQU PB3 00000003
|
||||
EQU PORTB4 00000004
|
||||
EQU PB4 00000004
|
||||
EQU PORTB5 00000005
|
||||
EQU PB5 00000005
|
||||
EQU PORTB6 00000006
|
||||
EQU PB6 00000006
|
||||
EQU PORTB7 00000007
|
||||
EQU PB7 00000007
|
||||
EQU DDB0 00000000
|
||||
EQU DDB1 00000001
|
||||
EQU DDB2 00000002
|
||||
EQU DDB3 00000003
|
||||
EQU DDB4 00000004
|
||||
EQU DDB5 00000005
|
||||
EQU DDB6 00000006
|
||||
EQU DDB7 00000007
|
||||
EQU PINB0 00000000
|
||||
EQU PINB1 00000001
|
||||
EQU PINB2 00000002
|
||||
EQU PINB3 00000003
|
||||
EQU PINB4 00000004
|
||||
EQU PINB5 00000005
|
||||
EQU PINB6 00000006
|
||||
EQU PINB7 00000007
|
||||
EQU PORTC0 00000000
|
||||
EQU PC0 00000000
|
||||
EQU PORTC1 00000001
|
||||
EQU PC1 00000001
|
||||
EQU PORTC2 00000002
|
||||
EQU PC2 00000002
|
||||
EQU PORTC3 00000003
|
||||
EQU PC3 00000003
|
||||
EQU PORTC4 00000004
|
||||
EQU PC4 00000004
|
||||
EQU PORTC5 00000005
|
||||
EQU PC5 00000005
|
||||
EQU PORTC6 00000006
|
||||
EQU PC6 00000006
|
||||
EQU PORTC7 00000007
|
||||
EQU PC7 00000007
|
||||
EQU DDC0 00000000
|
||||
EQU DDC1 00000001
|
||||
EQU DDC2 00000002
|
||||
EQU DDC3 00000003
|
||||
EQU DDC4 00000004
|
||||
EQU DDC5 00000005
|
||||
EQU DDC6 00000006
|
||||
EQU DDC7 00000007
|
||||
EQU PINC0 00000000
|
||||
EQU PINC1 00000001
|
||||
EQU PINC2 00000002
|
||||
EQU PINC3 00000003
|
||||
EQU PINC4 00000004
|
||||
EQU PINC5 00000005
|
||||
EQU PINC6 00000006
|
||||
EQU PINC7 00000007
|
||||
EQU PORTD0 00000000
|
||||
EQU PD0 00000000
|
||||
EQU PORTD1 00000001
|
||||
EQU PD1 00000001
|
||||
EQU PORTD2 00000002
|
||||
EQU PD2 00000002
|
||||
EQU PORTD3 00000003
|
||||
EQU PD3 00000003
|
||||
EQU PORTD4 00000004
|
||||
EQU PD4 00000004
|
||||
EQU PORTD5 00000005
|
||||
EQU PD5 00000005
|
||||
EQU PORTD6 00000006
|
||||
EQU PD6 00000006
|
||||
EQU PORTD7 00000007
|
||||
EQU PD7 00000007
|
||||
EQU DDD0 00000000
|
||||
EQU DDD1 00000001
|
||||
EQU DDD2 00000002
|
||||
EQU DDD3 00000003
|
||||
EQU DDD4 00000004
|
||||
EQU DDD5 00000005
|
||||
EQU DDD6 00000006
|
||||
EQU DDD7 00000007
|
||||
EQU PIND0 00000000
|
||||
EQU PIND1 00000001
|
||||
EQU PIND2 00000002
|
||||
EQU PIND3 00000003
|
||||
EQU PIND4 00000004
|
||||
EQU PIND5 00000005
|
||||
EQU PIND6 00000006
|
||||
EQU PIND7 00000007
|
||||
EQU PORTE0 00000000
|
||||
EQU PE0 00000000
|
||||
EQU PORTE1 00000001
|
||||
EQU PE1 00000001
|
||||
EQU PORTE2 00000002
|
||||
EQU PE2 00000002
|
||||
EQU PORTE3 00000003
|
||||
EQU PE3 00000003
|
||||
EQU PORTE4 00000004
|
||||
EQU PE4 00000004
|
||||
EQU PORTE5 00000005
|
||||
EQU PE5 00000005
|
||||
EQU PORTE6 00000006
|
||||
EQU PE6 00000006
|
||||
EQU PORTE7 00000007
|
||||
EQU PE7 00000007
|
||||
EQU DDE0 00000000
|
||||
EQU DDE1 00000001
|
||||
EQU DDE2 00000002
|
||||
EQU DDE3 00000003
|
||||
EQU DDE4 00000004
|
||||
EQU DDE5 00000005
|
||||
EQU DDE6 00000006
|
||||
EQU DDE7 00000007
|
||||
EQU PINE0 00000000
|
||||
EQU PINE1 00000001
|
||||
EQU PINE2 00000002
|
||||
EQU PINE3 00000003
|
||||
EQU PINE4 00000004
|
||||
EQU PINE5 00000005
|
||||
EQU PINE6 00000006
|
||||
EQU PINE7 00000007
|
||||
EQU PORTF0 00000000
|
||||
EQU PF0 00000000
|
||||
EQU PORTF1 00000001
|
||||
EQU PF1 00000001
|
||||
EQU PORTF2 00000002
|
||||
EQU PF2 00000002
|
||||
EQU PORTF3 00000003
|
||||
EQU PF3 00000003
|
||||
EQU PORTF4 00000004
|
||||
EQU PF4 00000004
|
||||
EQU PORTF5 00000005
|
||||
EQU PF5 00000005
|
||||
EQU PORTF6 00000006
|
||||
EQU PF6 00000006
|
||||
EQU PORTF7 00000007
|
||||
EQU PF7 00000007
|
||||
EQU DDF0 00000000
|
||||
EQU DDF1 00000001
|
||||
EQU DDF2 00000002
|
||||
EQU DDF3 00000003
|
||||
EQU DDF4 00000004
|
||||
EQU DDF5 00000005
|
||||
EQU DDF6 00000006
|
||||
EQU DDF7 00000007
|
||||
EQU PINF0 00000000
|
||||
EQU PINF1 00000001
|
||||
EQU PINF2 00000002
|
||||
EQU PINF3 00000003
|
||||
EQU PINF4 00000004
|
||||
EQU PINF5 00000005
|
||||
EQU PINF6 00000006
|
||||
EQU PINF7 00000007
|
||||
EQU PORTG0 00000000
|
||||
EQU PG0 00000000
|
||||
EQU PORTG1 00000001
|
||||
EQU PG1 00000001
|
||||
EQU PORTG2 00000002
|
||||
EQU PG2 00000002
|
||||
EQU PORTG3 00000003
|
||||
EQU PG3 00000003
|
||||
EQU PORTG4 00000004
|
||||
EQU PG4 00000004
|
||||
EQU DDG0 00000000
|
||||
EQU DDG1 00000001
|
||||
EQU DDG2 00000002
|
||||
EQU DDG3 00000003
|
||||
EQU DDG4 00000004
|
||||
EQU PING0 00000000
|
||||
EQU PING1 00000001
|
||||
EQU PING2 00000002
|
||||
EQU PING3 00000003
|
||||
EQU PING4 00000004
|
||||
EQU CS00 00000000
|
||||
EQU CS01 00000001
|
||||
EQU CS02 00000002
|
||||
EQU WGM01 00000003
|
||||
EQU CTC0 00000003
|
||||
EQU COM00 00000004
|
||||
EQU COM01 00000005
|
||||
EQU WGM00 00000006
|
||||
EQU PWM0 00000006
|
||||
EQU FOC0 00000007
|
||||
EQU TCNT0_0 00000000
|
||||
EQU TCNT0_1 00000001
|
||||
EQU TCNT0_2 00000002
|
||||
EQU TCNT0_3 00000003
|
||||
EQU TCNT0_4 00000004
|
||||
EQU TCNT0_5 00000005
|
||||
EQU TCNT0_6 00000006
|
||||
EQU TCNT0_7 00000007
|
||||
EQU OCR0_0 00000000
|
||||
EQU OCR0_1 00000001
|
||||
EQU OCR0_2 00000002
|
||||
EQU OCR0_3 00000003
|
||||
EQU OCR0_4 00000004
|
||||
EQU OCR0_5 00000005
|
||||
EQU OCR0_6 00000006
|
||||
EQU OCR0_7 00000007
|
||||
EQU TCR0UB 00000000
|
||||
EQU OCR0UB 00000001
|
||||
EQU TCN0UB 00000002
|
||||
EQU AS0 00000003
|
||||
EQU TOIE0 00000000
|
||||
EQU OCIE0 00000001
|
||||
EQU TOV0 00000000
|
||||
EQU OCF0 00000001
|
||||
EQU TOIE1 00000002
|
||||
EQU OCIE1B 00000003
|
||||
EQU OCIE1A 00000004
|
||||
EQU TICIE1 00000005
|
||||
EQU OCIE1C 00000000
|
||||
EQU TOV1 00000002
|
||||
EQU OCF1B 00000003
|
||||
EQU OCF1A 00000004
|
||||
EQU ICF1 00000005
|
||||
EQU OCF1C 00000000
|
||||
EQU WGM10 00000000
|
||||
EQU PWM10 00000000
|
||||
EQU WGM11 00000001
|
||||
EQU PWM11 00000001
|
||||
EQU COM1C0 00000002
|
||||
EQU COM1C1 00000003
|
||||
EQU COM1B0 00000004
|
||||
EQU COM1B1 00000005
|
||||
EQU COM1A0 00000006
|
||||
EQU COM1A1 00000007
|
||||
EQU CS10 00000000
|
||||
EQU CS11 00000001
|
||||
EQU CS12 00000002
|
||||
EQU WGM12 00000003
|
||||
EQU CTC10 00000003
|
||||
EQU WGM13 00000004
|
||||
EQU CTC11 00000004
|
||||
EQU ICES1 00000006
|
||||
EQU ICNC1 00000007
|
||||
EQU FOC1C 00000005
|
||||
EQU FOC1B 00000006
|
||||
EQU FOC1A 00000007
|
||||
EQU CS20 00000000
|
||||
EQU CS21 00000001
|
||||
EQU CS22 00000002
|
||||
EQU WGM21 00000003
|
||||
EQU CTC2 00000003
|
||||
EQU COM20 00000004
|
||||
EQU COM21 00000005
|
||||
EQU WGM20 00000006
|
||||
EQU PWM2 00000006
|
||||
EQU FOC2 00000007
|
||||
EQU TCNT2_0 00000000
|
||||
EQU TCNT2_1 00000001
|
||||
EQU TCNT2_2 00000002
|
||||
EQU TCNT2_3 00000003
|
||||
EQU TCNT2_4 00000004
|
||||
EQU TCNT2_5 00000005
|
||||
EQU TCNT2_6 00000006
|
||||
EQU TCNT2_7 00000007
|
||||
EQU OCR2_0 00000000
|
||||
EQU OCR2_1 00000001
|
||||
EQU OCR2_2 00000002
|
||||
EQU OCR2_3 00000003
|
||||
EQU OCR2_4 00000004
|
||||
EQU OCR2_5 00000005
|
||||
EQU OCR2_6 00000006
|
||||
EQU OCR2_7 00000007
|
||||
EQU TOIE2 00000006
|
||||
EQU OCIE2 00000007
|
||||
EQU TOV2 00000006
|
||||
EQU OCF2 00000007
|
||||
EQU OCIE3C 00000001
|
||||
EQU TOIE3 00000002
|
||||
EQU OCIE3B 00000003
|
||||
EQU OCIE3A 00000004
|
||||
EQU TICIE3 00000005
|
||||
EQU OCF3C 00000001
|
||||
EQU TOV3 00000002
|
||||
EQU OCF3B 00000003
|
||||
EQU OCF3A 00000004
|
||||
EQU ICF3 00000005
|
||||
EQU WGM30 00000000
|
||||
EQU PWM30 00000000
|
||||
EQU WGM31 00000001
|
||||
EQU PWM31 00000001
|
||||
EQU COM3C0 00000002
|
||||
EQU COM3C1 00000003
|
||||
EQU COM3B0 00000004
|
||||
EQU COM3B1 00000005
|
||||
EQU COM3A0 00000006
|
||||
EQU COM3A1 00000007
|
||||
EQU CS30 00000000
|
||||
EQU CS31 00000001
|
||||
EQU CS32 00000002
|
||||
EQU WGM32 00000003
|
||||
EQU CTC30 00000003
|
||||
EQU WGM33 00000004
|
||||
EQU CTC31 00000004
|
||||
EQU ICES3 00000006
|
||||
EQU ICNC3 00000007
|
||||
EQU FOC3C 00000005
|
||||
EQU FOC3B 00000006
|
||||
EQU FOC3A 00000007
|
||||
EQU TCN3L0 00000000
|
||||
EQU TCN3L1 00000001
|
||||
EQU TCN3L2 00000002
|
||||
EQU TCN3L3 00000003
|
||||
EQU TCN3L4 00000004
|
||||
EQU TCN3L5 00000005
|
||||
EQU TCN3L6 00000006
|
||||
EQU TCN3L7 00000007
|
||||
EQU WDTCSR 00000021
|
||||
EQU WDP0 00000000
|
||||
EQU WDP1 00000001
|
||||
EQU WDP2 00000002
|
||||
EQU WDE 00000003
|
||||
EQU WDCE 00000004
|
||||
EQU WDTOE 00000004
|
||||
EQU MUX0 00000000
|
||||
EQU MUX1 00000001
|
||||
EQU MUX2 00000002
|
||||
EQU MUX3 00000003
|
||||
EQU MUX4 00000004
|
||||
EQU ADLAR 00000005
|
||||
EQU REFS0 00000006
|
||||
EQU REFS1 00000007
|
||||
EQU ADCSR 00000006
|
||||
EQU ADPS0 00000000
|
||||
EQU ADPS1 00000001
|
||||
EQU ADPS2 00000002
|
||||
EQU ADIE 00000003
|
||||
EQU ADIF 00000004
|
||||
EQU ADFR 00000005
|
||||
EQU ADSC 00000006
|
||||
EQU ADEN 00000007
|
||||
EQU ADCH0 00000000
|
||||
EQU ADCH1 00000001
|
||||
EQU ADCH2 00000002
|
||||
EQU ADCH3 00000003
|
||||
EQU ADCH4 00000004
|
||||
EQU ADCH5 00000005
|
||||
EQU ADCH6 00000006
|
||||
EQU ADCH7 00000007
|
||||
EQU ADCL0 00000000
|
||||
EQU ADCL1 00000001
|
||||
EQU ADCL2 00000002
|
||||
EQU ADCL3 00000003
|
||||
EQU ADCL4 00000004
|
||||
EQU ADCL5 00000005
|
||||
EQU ADCL6 00000006
|
||||
EQU ADCL7 00000007
|
||||
EQU LB1 00000000
|
||||
EQU LB2 00000001
|
||||
EQU BLB01 00000002
|
||||
EQU BLB02 00000003
|
||||
EQU BLB11 00000004
|
||||
EQU BLB12 00000005
|
||||
EQU CKSEL0 00000000
|
||||
EQU CKSEL1 00000001
|
||||
EQU CKSEL2 00000002
|
||||
EQU CKSEL3 00000003
|
||||
EQU SUT0 00000004
|
||||
EQU SUT1 00000005
|
||||
EQU BODEN 00000006
|
||||
EQU BODLEVEL 00000007
|
||||
EQU BOOTRST 00000000
|
||||
EQU BOOTSZ0 00000001
|
||||
EQU BOOTSZ1 00000002
|
||||
EQU EESAVE 00000003
|
||||
EQU CKOPT 00000004
|
||||
EQU SPIEN 00000005
|
||||
EQU JTAGEN 00000006
|
||||
EQU OCDEN 00000007
|
||||
EQU WDTON 00000000
|
||||
EQU M103C 00000001
|
||||
DEF XH r27
|
||||
DEF XL r26
|
||||
DEF YH r29
|
||||
DEF YL r28
|
||||
DEF ZH r31
|
||||
DEF ZL r30
|
||||
EQU FLASHEND 0000ffff
|
||||
EQU IOEND 000000ff
|
||||
EQU SRAM_START 00000100
|
||||
EQU SRAM_SIZE 00001000
|
||||
EQU RAMEND 000010ff
|
||||
EQU XRAMEND 0000ffff
|
||||
EQU E2END 00000fff
|
||||
EQU EEPROMEND 00000fff
|
||||
EQU EEADRBITS 0000000c
|
||||
EQU NRWW_START_ADDR 0000f000
|
||||
EQU NRWW_STOP_ADDR 0000ffff
|
||||
EQU RWW_START_ADDR 00000000
|
||||
EQU RWW_STOP_ADDR 0000efff
|
||||
EQU PAGESIZE 00000080
|
||||
EQU FIRSTBOOTSTART 0000fe00
|
||||
EQU SECONDBOOTSTART 0000fc00
|
||||
EQU THIRDBOOTSTART 0000f800
|
||||
EQU FOURTHBOOTSTART 0000f000
|
||||
EQU SMALLBOOTSTART 0000fe00
|
||||
EQU LARGEBOOTSTART 0000f000
|
||||
EQU INT0addr 00000002
|
||||
EQU INT1addr 00000004
|
||||
EQU INT2addr 00000006
|
||||
EQU INT3addr 00000008
|
||||
EQU INT4addr 0000000a
|
||||
EQU INT5addr 0000000c
|
||||
EQU INT6addr 0000000e
|
||||
EQU INT7addr 00000010
|
||||
EQU OC2addr 00000012
|
||||
EQU OVF2addr 00000014
|
||||
EQU ICP1addr 00000016
|
||||
EQU OC1Aaddr 00000018
|
||||
EQU OC1Baddr 0000001a
|
||||
EQU OVF1addr 0000001c
|
||||
EQU OC0addr 0000001e
|
||||
EQU OVF0addr 00000020
|
||||
EQU SPIaddr 00000022
|
||||
EQU URXC0addr 00000024
|
||||
EQU UDRE0addr 00000026
|
||||
EQU UTXC0addr 00000028
|
||||
EQU ADCCaddr 0000002a
|
||||
EQU ERDYaddr 0000002c
|
||||
EQU ACIaddr 0000002e
|
||||
EQU OC1Caddr 00000030
|
||||
EQU ICP3addr 00000032
|
||||
EQU OC3Aaddr 00000034
|
||||
EQU OC3Baddr 00000036
|
||||
EQU OC3Caddr 00000038
|
||||
EQU OVF3addr 0000003a
|
||||
EQU URXC1addr 0000003c
|
||||
EQU UDRE1addr 0000003e
|
||||
EQU UTXC1addr 00000040
|
||||
EQU TWIaddr 00000042
|
||||
EQU SPMRaddr 00000044
|
||||
EQU INT_VECTORS_SIZE 00000046
|
||||
DEF mpr r16
|
||||
DEF mpr2 r10
|
||||
DEF dataloopcountreg r23
|
||||
EQU WTime 00000019
|
||||
EQU datamemstart 00000100
|
||||
EQU stringlen 00000020
|
||||
CSEG INIT 00000046
|
||||
CSEG LCDInit 00000092
|
||||
CSEG STRING_BEG 00000082
|
||||
CSEG INIT_MEMCOPYLOOP 00000050
|
||||
CSEG MAIN 00000054
|
||||
CSEG LCDWrite 000000d1
|
||||
DEF wait r17
|
||||
CSEG AVRWait 00000073
|
||||
CSEG ROTATE_TEXT 0000005a
|
||||
CSEG ROTATE_TEXT_LOOP 00000064
|
||||
DEF count r18
|
||||
DEF line r19
|
||||
CSEG Loop 00000076
|
||||
CSEG OLoop 00000077
|
||||
CSEG ILoop 00000078
|
||||
CSEG STRING_END 00000092
|
||||
DEF type r20
|
||||
DEF q r21
|
||||
DEF r r22
|
||||
EQU LCDLine1 00000080
|
||||
EQU LCDLine2 000000c0
|
||||
EQU LCDClear 00000001
|
||||
EQU LCDHome 00000002
|
||||
EQU LCDPulse 00000008
|
||||
EQU LCDCmd 00000000
|
||||
EQU LCDTxt 00000001
|
||||
EQU LCDMaxCnt 00000010
|
||||
EQU LCDLn1Addr 00000100
|
||||
EQU LCDLn2Addr 00000110
|
||||
CSEG LCDINIT_L1 000000bd
|
||||
CSEG LCDWait 0000017e
|
||||
CSEG LCDWriteCmd 0000015a
|
||||
CSEG LCDClr 000000f4
|
||||
CSEG LCDWrLn1 000000d4
|
||||
CSEG LCDWrLn2 000000e4
|
||||
CSEG LCDSetLine 00000148
|
||||
CSEG LCDWriteLine 00000154
|
||||
CSEG LCDClrLn1 000000f7
|
||||
CSEG LCDClrLn2 00000107
|
||||
CSEG LCDClrLine 0000014d
|
||||
CSEG LCDWriteByte 00000117
|
||||
CSEG LCDWriteByte_3 00000126
|
||||
CSEG LCDWriteByte_1 00000120
|
||||
CSEG LCDWriteByte_2 00000123
|
||||
CSEG LCDWriteChar 00000168
|
||||
CSEG Bin2ASCII 0000012a
|
||||
CSEG B2A_1 00000134
|
||||
CSEG B2A_3 0000013b
|
||||
CSEG B2A_2 00000139
|
||||
CSEG div10 00000186
|
||||
CSEG LCDClrLine_1 0000014f
|
||||
CSEG LCDWriteLine_1 00000155
|
||||
CSEG LCDWriteData 00000171
|
||||
CSEG LCDWC_L1 00000160
|
||||
CSEG LCDW_L1 0000017f
|
||||
CSEG LCDW_L2 00000180
|
||||
CSEG div10_1 000001a5
|
||||
CSEG div10_2 000001aa
|
||||
Binary file not shown.
@@ -0,0 +1,69 @@
|
||||
<ASSEMBLER_INFO>
|
||||
<VERSION>2.2.7</VERSION>
|
||||
<DEVICE>"ATmega128"</DEVICE>
|
||||
<WORKING_DIR>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Debug</WORKING_DIR>
|
||||
<INCLUDE_PATH>
|
||||
<DIR>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</DIR>
|
||||
<DIR>C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include</DIR>
|
||||
<DIR></DIR>
|
||||
</INCLUDE_PATH>
|
||||
<SOURCE_FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</SOURCE_FILE>
|
||||
<INCLUDED_FILES>
|
||||
<FILE>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</FILE>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE>
|
||||
</INCLUDED_FILES>
|
||||
<OBJECT_FILES>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Debug\Corwin_Perren_Lab4_challengecode.obj</FILE>
|
||||
</OBJECT_FILES>
|
||||
<HEX_FILES>
|
||||
<FILE>Corwin_Perren_Lab4_challengecode.hex</FILE>
|
||||
</HEX_FILES>
|
||||
<OUTPUT_FILES>
|
||||
<FILE>Corwin_Perren_Lab4_challengecode.map</FILE>
|
||||
<FILE>Corwin_Perren_Lab4_challengecode.lss</FILE>
|
||||
</OUTPUT_FILES>
|
||||
<LABELS>
|
||||
<INIT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>49</LINE></INIT>
|
||||
<LCDInit><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>75</LINE></LCDInit>
|
||||
<STRING_BEG><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>186</LINE></STRING_BEG>
|
||||
<INIT_MEMCOPYLOOP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>68</LINE></INIT_MEMCOPYLOOP>
|
||||
<MAIN><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>85</LINE></MAIN>
|
||||
<LCDWrite><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>170</LINE></LCDWrite>
|
||||
<AVRWait><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>159</LINE></AVRWait>
|
||||
<ROTATE_TEXT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>106</LINE></ROTATE_TEXT>
|
||||
<ROTATE_TEXT_LOOP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>125</LINE></ROTATE_TEXT_LOOP>
|
||||
<Loop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>164</LINE></Loop>
|
||||
<OLoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>165</LINE></OLoop>
|
||||
<ILoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>166</LINE></ILoop>
|
||||
<STRING_END><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode.asm</FILE><LINE>188</LINE></STRING_END>
|
||||
<LCDINIT_L1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>139</LINE></LCDINIT_L1>
|
||||
<LCDWait><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>492</LINE></LCDWait>
|
||||
<LCDWriteCmd><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>436</LINE></LCDWriteCmd>
|
||||
<LCDClr><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>230</LINE></LCDClr>
|
||||
<LCDWrLn1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>180</LINE></LCDWrLn1>
|
||||
<LCDWrLn2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>205</LINE></LCDWrLn2>
|
||||
<LCDSetLine><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>388</LINE></LCDSetLine>
|
||||
<LCDWriteLine><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>423</LINE></LCDWriteLine>
|
||||
<LCDClrLn1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>240</LINE></LCDClrLn1>
|
||||
<LCDClrLn2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>265</LINE></LCDClrLn2>
|
||||
<LCDClrLine><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>404</LINE></LCDClrLine>
|
||||
<LCDWriteByte><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>302</LINE></LCDWriteByte>
|
||||
<LCDWriteByte_3><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>323</LINE></LCDWriteByte_3>
|
||||
<LCDWriteByte_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>313</LINE></LCDWriteByte_1>
|
||||
<LCDWriteByte_2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>318</LINE></LCDWriteByte_2>
|
||||
<LCDWriteChar><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>457</LINE></LCDWriteChar>
|
||||
<Bin2ASCII><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>339</LINE></Bin2ASCII>
|
||||
<B2A_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>352</LINE></B2A_1>
|
||||
<B2A_3><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>360</LINE></B2A_3>
|
||||
<B2A_2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>357</LINE></B2A_2>
|
||||
<div10><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>515</LINE></div10>
|
||||
<LCDClrLine_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>407</LINE></LCDClrLine_1>
|
||||
<LCDWriteLine_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>425</LINE></LCDWriteLine_1>
|
||||
<LCDWriteData><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>472</LINE></LCDWriteData>
|
||||
<LCDWC_L1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>443</LINE></LCDWC_L1>
|
||||
<LCDW_L1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>493</LINE></LCDW_L1>
|
||||
<LCDW_L2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>494</LINE></LCDW_L2>
|
||||
<div10_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>554</LINE></div10_1>
|
||||
<div10_2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_challengecode\Corwin_Perren_Lab4_challengecode\LCDDriver.asm</FILE><LINE>560</LINE></div10_2>
|
||||
</LABELS>
|
||||
</ASSEMBLER_INFO>
|
||||
@@ -0,0 +1,561 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* LCDDriver.asm - V2.0
|
||||
;*
|
||||
;* Contains the neccessary functions to display text to a
|
||||
;* 2 x 16 character LCD Display. Additional functions
|
||||
;* include a conversion routine from an unsigned 8-bit
|
||||
;* binary number to and ASCII text string.
|
||||
;*
|
||||
;* Version 2.0 - Added support for accessing the LCD
|
||||
;* Display via the serial port. See version 1.0 for
|
||||
;* accessing a memory mapped LCD display.
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: David Zier
|
||||
;* Date: March 17, 2003
|
||||
;* Company: TekBots(TM), Oregon State University - EECS
|
||||
;* Version: 2.0
|
||||
;*
|
||||
;***********************************************************
|
||||
;* Rev Date Name Description
|
||||
;*----------------------------------------------------------
|
||||
;* - 8/20/02 Zier Initial Creation of Version 1.0
|
||||
;* A 3/7/03 Zier V2.0 - Updated for USART LCD
|
||||
;*
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;* NOTE: A register MUST be named 'mpr' in the Main Code
|
||||
;* It is recomended to use register r16.
|
||||
;* WARNING: Register r17-r22 are reserved and cannot be
|
||||
;* renamed outside of the LCD Driver functions. Doing
|
||||
;* so will damage the functionality of the LCD Driver
|
||||
;***********************************************************
|
||||
.def wait = r17 ; Wait Loop Register
|
||||
.def count = r18 ; Character Counter
|
||||
.def line = r19 ; Line Select Register
|
||||
.def type = r20 ; LCD data type: Command or Text
|
||||
.def q = r21 ; Quotient for div10
|
||||
.def r = r22 ; Remander for div10
|
||||
|
||||
.equ LCDLine1 = $80 ; LCD Line 1 select command
|
||||
.equ LCDLine2 = $c0 ; LCD Line 2 select command
|
||||
.equ LCDClear = $01 ; LCD Clear Command
|
||||
.equ LCDHome = $02 ; LCD Set Cursor Home Command
|
||||
.equ LCDPulse = $08 ; LCD Pulse signal, used to simulate
|
||||
; write signal
|
||||
|
||||
.equ LCDCmd = $00 ; Constant used to write a command
|
||||
.equ LCDTxt = $01 ; Constant used to write a text character
|
||||
|
||||
.equ LCDMaxCnt = 16 ; Maximum number of characters per line
|
||||
.equ LCDLn1Addr = $0100 ; Beginning address for Line 1 data
|
||||
.equ LCDLn2Addr = $0110 ; Beginning address for Line 2 data
|
||||
|
||||
;-----------------------------------------------------------
|
||||
;***********************************************************
|
||||
;* Public LCD Driver Suboutines and Functions
|
||||
;* These functions and subroutines can be called safely
|
||||
;* from within any program
|
||||
;***********************************************************
|
||||
;-----------------------------------------------------------
|
||||
|
||||
|
||||
;*******************************************************
|
||||
;* SubRt: LCDInit
|
||||
;* Desc: Initialize the Serial Port and the Hitachi
|
||||
;* Display 8 Bit inc DD-RAM
|
||||
;* Pointer with no features
|
||||
;* - 2 LInes with 16 characters
|
||||
;*******************************************************
|
||||
LCDInit:
|
||||
push mpr ; Save the state of machine
|
||||
in mpr, SREG ; Save the SREG
|
||||
push mpr ;
|
||||
push wait ; Save wait
|
||||
|
||||
; Setup the Communication Ports
|
||||
; Port B: Output
|
||||
; Port D: Input w/ internal pullup resistors
|
||||
; Port F: Output on Pin 3
|
||||
ldi mpr, $00 ; Initialize Port B for outputs
|
||||
out PORTB, mpr ; Port B outputs high
|
||||
ldi mpr, $ff ; except for any overrides
|
||||
out DDRB, mpr ;
|
||||
ldi mpr, $00 ; Initialize Port D for inputs
|
||||
out PORTD, mpr ; with Tri-State
|
||||
ldi mpr, $00 ; except for any overrides
|
||||
out DDRD, mpr ;
|
||||
ldi mpr, $00 ; Initialize Port F Pin 3 to
|
||||
sts PORTF, mpr ; output inorder to twiddle the
|
||||
ldi mpr, (1<<DDF3) ; LCD interface
|
||||
sts DDRF, mpr ; Must NOT override this port
|
||||
|
||||
; Setup the Serial Functionality
|
||||
; SPI Type: Master
|
||||
; SPI Clock Rate: 2*1000.000 kHz
|
||||
; SPI Clock Phase: Cycle Half
|
||||
; SPI Clock Polarity: Low
|
||||
; SPI Data Order: MSB First
|
||||
ldi mpr, (1<<SPE|1<<MSTR)
|
||||
out SPCR, mpr ; Set Serial Port Control Register
|
||||
ldi mpr, (1<<SPI2X)
|
||||
out SPSR, mpr ; Set Serial Port Status Register
|
||||
|
||||
; Setup External SRAM configuration
|
||||
; $0460 - $7FFF / $8000 - $FFFF
|
||||
; Lower page wait state(s): None
|
||||
; Uppoer page wait state(s): 2r/w
|
||||
ldi mpr, (1<<SRE) ;
|
||||
out MCUCR, mpr ; Initialize MCUCR
|
||||
ldi mpr, (1<<SRL2|1<<SRW11)
|
||||
sts XMCRA, mpr ; Initialize XMCRA
|
||||
ldi mpr, (1<<XMBK) ;
|
||||
sts XMCRB, mpr ; Initialize XMCRB
|
||||
|
||||
; Initialize USART0
|
||||
; Communication Parameter: 8 bit, 1 stop, No Parity
|
||||
; USART0 Rx: On
|
||||
; USART0 Tx: On
|
||||
; USART0 Mode: Asynchronous
|
||||
; USART0 Baudrate: 9600
|
||||
ldi mpr, $00 ;
|
||||
out UCSR0A, mpr ; Init UCSR0A
|
||||
ldi mpr, (1<<RXEN0|1<<TXEN0)
|
||||
out UCSR0B, mpr ; Init UCSR0B
|
||||
ldi mpr, (1<<UCSZ01|1<<UCSZ00)
|
||||
sts UCSR0C, mpr ; Init UCSR0C
|
||||
ldi mpr, $00 ;
|
||||
sts UBRR0H, mpr ; Init UBRR0H
|
||||
ldi mpr, $67 ;
|
||||
out UBRR0L, mpr ; Init UBRR0L
|
||||
|
||||
; Initialize the LCD Display
|
||||
ldi mpr, 6 ;
|
||||
LCDINIT_L1:
|
||||
ldi wait, 250 ; 15ms of Display
|
||||
rcall LCDWait ; Bootup wait
|
||||
dec mpr ;
|
||||
brne LCDINIT_L1 ;
|
||||
|
||||
ldi mpr, $38 ; Display Mode set
|
||||
rcall LCDWriteCmd ;
|
||||
ldi mpr, $08 ; Display Off
|
||||
rcall LCDWriteCmd ;
|
||||
ldi mpr, $01 ; Display Clear
|
||||
rcall LCDWriteCmd ;
|
||||
ldi mpr, $06 ; Entry mode set
|
||||
rcall LCDWriteCmd ;
|
||||
ldi mpr, $0c ; Display on
|
||||
rcall LCDWriteCmd ;
|
||||
rcall LCDClr ; Clear display
|
||||
|
||||
pop wait ; Restore wait
|
||||
pop mpr ; Restore SREG
|
||||
out SREG, mpr ;
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from subroutine
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWrite
|
||||
;* Desc: Generic Write Function that writes both lines
|
||||
;* of text out to the LCD
|
||||
;* - Line 1 data is in address space $0100-$010F
|
||||
;* - Line 2 data is in address space $0110-$010F
|
||||
;*******************************************************
|
||||
LCDWrite:
|
||||
rcall LCDWrLn1 ; Write Line 1
|
||||
rcall LCDWrLn2 ; Write Line 2
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWrLn1
|
||||
;* Desc: This function will write the first line of
|
||||
;* data to the first line of the LCD Display
|
||||
;*******************************************************
|
||||
LCDWrLn1:
|
||||
push mpr ; Save mpr
|
||||
push ZL ; Save Z pointer
|
||||
push ZH ;
|
||||
push count ; Save the count register
|
||||
push line ; Save the line register
|
||||
|
||||
ldi ZL, low(LCDLn1Addr)
|
||||
ldi ZH, high(LCDLn1Addr)
|
||||
ldi line, LCDLine1 ; Set LCD line to Line 1
|
||||
rcall LCDSetLine ; Restart at the beginning of line 1
|
||||
rcall LCDWriteLine ; Write the line of text
|
||||
|
||||
pop line
|
||||
pop count ; Restore the counter
|
||||
pop ZH ; Restore Z pointer
|
||||
pop ZL ;
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWrLn2
|
||||
;* Desc: This function will write the second line of
|
||||
;* data to the second line of the LCD Display
|
||||
;*******************************************************
|
||||
LCDWrLn2:
|
||||
push mpr ; Save mpr
|
||||
push ZL ; Save Z pointer
|
||||
push ZH ;
|
||||
push count ; Save the count register
|
||||
push line ; Save the line register
|
||||
|
||||
ldi ZL, low(LCDLn2Addr)
|
||||
ldi ZH, high(LCDLn2Addr)
|
||||
ldi line, LCDLine2 ; Set LCD line to Line 2
|
||||
rcall LCDSetLine ; Restart at the beginning of line 2
|
||||
rcall LCDWriteLine ; Write the line of text
|
||||
|
||||
pop line
|
||||
pop count ; Restore the counter
|
||||
pop ZH ; Restore Z pointer
|
||||
pop ZL ;
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDClr
|
||||
;* Desc: Generic Clear Subroutine that clears both
|
||||
;* lines of the LCD and Data Memory storage area
|
||||
;*******************************************************
|
||||
LCDClr:
|
||||
rcall LCDClrLn1 ; Clear Line 1
|
||||
rcall LCDClrLn2 ; Clear Line 2
|
||||
ret ; Return from Subroutine
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDClrLn1
|
||||
;* Desc: This subroutine will clear the first line of
|
||||
;* the data and the first line of the LCD Display
|
||||
;*******************************************************
|
||||
LCDClrLn1:
|
||||
push mpr ; Save mpr
|
||||
push line ; Save line register
|
||||
push count ; Save the count register
|
||||
push ZL ; Save Z pointer
|
||||
push ZH ;
|
||||
|
||||
ldi line, LCDline1 ; Set Access to Line 1 of LCD
|
||||
rcall LCDSetLine ; Set Z pointer to address of line 1 data
|
||||
ldi ZL, low(LCDLn1Addr)
|
||||
ldi ZH, high(LCDLn1Addr)
|
||||
rcall LCDClrLine ; Call the Clear Line function
|
||||
|
||||
pop ZH ; Restore Z pointer
|
||||
pop ZL ;
|
||||
pop count ; Restore the count register
|
||||
pop line ; Restore line register
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from Subroutine
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDClrLn2
|
||||
;* Desc: This subroutine will clear the second line of
|
||||
;* the data and the second line of the LCD Display
|
||||
;*******************************************************
|
||||
LCDClrLn2:
|
||||
push mpr ; Save mpr
|
||||
push line ; Save line register
|
||||
push count ; Save the count register
|
||||
push ZL ; Save Z pointer
|
||||
push ZH ;
|
||||
|
||||
ldi line, LCDline2 ; Set Access to Line 2 of LCD
|
||||
rcall LCDSetLine ; Set Z pointer to address of line 2 data
|
||||
ldi ZL, low(LCDLn2Addr)
|
||||
ldi ZH, high(LCDLn2Addr)
|
||||
rcall LCDClrLine ; Call the Clear Line function
|
||||
|
||||
pop ZH ; Restore Z pointer
|
||||
pop ZL ;
|
||||
pop count ; Restore the count register
|
||||
pop line ; Restore line register
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from Subroutine
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteByte
|
||||
;* Desc: This is a complex and low level function that
|
||||
;* allows any program to write any ASCII character
|
||||
;* (Byte) anywhere in the LCD Display. There
|
||||
;* are several things that need to be initialized
|
||||
;* before this function is called:
|
||||
;* count - Holds the index value of the line to where
|
||||
;* the char is written, 0-15(39). i.e. if
|
||||
;* count has the value of 3, then the char is
|
||||
;* going to be written to the third element of
|
||||
;* the line.
|
||||
;* line - Holds the line number that the char is going
|
||||
;* to be written to, (1 or 2).
|
||||
;* mpr - Contains the value of the ASCII character to
|
||||
;* be written (0-255)
|
||||
;*********************************************************
|
||||
LCDWriteByte:
|
||||
push mpr ; Save the mpr
|
||||
push line ; Save the line
|
||||
push count ; Save the count
|
||||
; Preform sanity checks on count and line
|
||||
cpi count, 40 ; Make sure count is within range
|
||||
brsh LCDWriteByte_3 ; Do nothing and exit function
|
||||
cpi line, 1 ; If (line == 1)
|
||||
brne LCDWriteByte_1 ;
|
||||
ldi line, LCDLine1 ; Load line 1 base LCD Address
|
||||
rjmp LCDWriteByte_2 ; Continue on with function
|
||||
LCDWriteByte_1:
|
||||
cpi line, 2 ; If (line == 2)
|
||||
brne LCDWriteByte_3 ; Do nothing and exit function
|
||||
ldi line, LCDLine2 ; Load line 2 base LCD Address
|
||||
|
||||
LCDWriteByte_2: ; Write char to LCD
|
||||
add line, count ; Set the correct LCD address
|
||||
rcall LCDSetLine ; Set the line address to LCD
|
||||
rcall LCDWriteChar ; Write Char to LCD Display
|
||||
|
||||
LCDWriteByte_3: ; Exit Function
|
||||
pop count ; Restore the count
|
||||
pop line ; Restore the line
|
||||
pop mpr ; Restore the mpr
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: Bin2ASCII
|
||||
;* Desc: Converts a binary number into an ASCII
|
||||
;* text string equivalent.
|
||||
;* - The binary number needs to be in the mpr
|
||||
;* - The Start Address of where the text will
|
||||
;* be placed needs to be in the X Register
|
||||
;* - The count of the characters created are
|
||||
;* added to the count register
|
||||
;*******************************************************
|
||||
Bin2ASCII:
|
||||
push mpr ; save mpr
|
||||
push r ; save r
|
||||
push q ; save q
|
||||
push XH ; save X-pointer
|
||||
push XL ;
|
||||
|
||||
; Determine the range of mpr
|
||||
cpi mpr, 100 ; is mpr >= 100
|
||||
brlo B2A_1 ; goto next check
|
||||
ldi count, 3 ; Three chars are written
|
||||
adiw XL, 3 ; Increment X 3 address spaces
|
||||
rjmp B2A_3 ; Continue with program
|
||||
B2A_1: cpi mpr, 10 ; is mpr >= 10
|
||||
brlo B2A_2 ; Continue with program
|
||||
ldi count, 2 ; Two chars are written
|
||||
adiw XL, 2 ; Increment X 2 address spaces
|
||||
rjmp B2A_3 ; Continue with program
|
||||
B2A_2: adiw XL, 1 ; Increment X 1 address space
|
||||
ldi count, 1 ; One char is written
|
||||
|
||||
B2A_3: ;Do-While statement that converts Binary to ASCII
|
||||
rcall div10 ; Call the div10 function
|
||||
ldi mpr, '0' ; Set the base ASCII integer value
|
||||
add mpr, r ; Create the ASCII integer value
|
||||
st -X, mpr ; Load ASCII value to memory
|
||||
mov mpr, q ; Set mpr to quotiant value
|
||||
cpi mpr, 0 ; does mpr == 0
|
||||
brne B2A_3 ; do while (mpr != 0)
|
||||
|
||||
pop XL ; restore X-pointer
|
||||
pop XH ;
|
||||
pop q ; restore q
|
||||
pop r ; restore r
|
||||
pop mpr ; restore mpr
|
||||
ret ; return from function
|
||||
|
||||
;-------------------------------------------------------
|
||||
;*******************************************************
|
||||
;* Private LCD Driver Functions and Subroutines
|
||||
;* NOTE: It is not recommended to call these functions
|
||||
;* or subroutines, only call the Public ones.
|
||||
;*******************************************************
|
||||
;-------------------------------------------------------
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDSetLine
|
||||
;* Desc: Change line to be written to
|
||||
;*******************************************************
|
||||
LCDSetLine:
|
||||
push mpr ; Save mpr
|
||||
mov mpr,line ; Copy Command Data to mpr
|
||||
rcall LCDWriteCmd ; Write the Command
|
||||
pop mpr ; Restore the mpr
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDClrLine
|
||||
;* Desc: Manually clears a single line within an LCD
|
||||
;* Display and Data Memory by writing 16
|
||||
;* consecutive ASCII spaces $20 to both the LCD
|
||||
;* and the memory. The line to be cleared must
|
||||
;* first be set in the LCD and the Z pointer is
|
||||
;* pointing the first element in Data Memory
|
||||
;*******************************************************
|
||||
LCDClrLine:
|
||||
ldi mpr, ' ' ; The space char to be written
|
||||
ldi count, LCDMaxCnt; The character count
|
||||
LCDClrLine_1:
|
||||
st Z+, mpr ; Clear data memory element
|
||||
rcall LCDWriteChar ; Clear LCD memory element
|
||||
dec count ; Decrement the count
|
||||
brne LCDClrLine_1 ; Continue untill all elements are cleared
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteLine
|
||||
;* Desc: Writes a line of text to the LCD Display.
|
||||
;* This routine takes a data element pointed to
|
||||
;* by the Z-pointer and copies it to the LCD
|
||||
;* Display for the duration of the line. The
|
||||
;* line the Z-pointer must be set prior to the
|
||||
;* function call.
|
||||
;*******************************************************
|
||||
LCDWriteLine:
|
||||
ldi count, LCDMaxCnt; The character count
|
||||
LCDWriteLine_1:
|
||||
ld mpr, Z+ ; Get the data element
|
||||
rcall LCDWriteChar ; Write element to LCD Display
|
||||
dec count ; Decrement the count
|
||||
brne LCDWriteLine_1 ; Continue untill all elements are written
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteCmd
|
||||
;* Desc: Write command that is in the mpr to LCD
|
||||
;*******************************************************
|
||||
LCDWriteCmd:
|
||||
push type ; Save type register
|
||||
push wait ; Save wait register
|
||||
ldi type, LCDCmd ; Set type to Command data
|
||||
rcall LCDWriteData ; Write data to LCD
|
||||
push mpr ; Save mpr register
|
||||
ldi mpr, 2 ; Wait approx. 4.1 ms
|
||||
LCDWC_L1:
|
||||
ldi wait, 205 ; Wait 2050 us
|
||||
rcall LCDWait ;
|
||||
dec mpr ; The wait loop cont.
|
||||
brne LCDWC_L1 ;
|
||||
pop mpr ; Restore mpr
|
||||
pop wait ; Restore wait register
|
||||
pop type ; Restore type register
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteChar
|
||||
;* Desc: Write character data that is in the mpr
|
||||
;*******************************************************
|
||||
LCDWriteChar:
|
||||
push type ; Save type register
|
||||
push wait ; Save the wait register
|
||||
ldi type, LCDTxt ; Set type to Text data
|
||||
rcall LCDWriteData ; Write data to LCD
|
||||
ldi wait, 16 ; Delay 160 us
|
||||
rcall LCDWait ;
|
||||
pop wait ; Restore wait register
|
||||
pop type ; Restore type register
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteData
|
||||
;* Desc: Write data or command to LCD
|
||||
;*******************************************************
|
||||
LCDWriteData:
|
||||
out SPDR, type ; Send type to SP
|
||||
ldi wait, 2 ; Wait 2 us
|
||||
rcall LCDWait ; Call Wait function
|
||||
out SPDR,mpr ; Send data to serial port
|
||||
ldi wait, 2 ; Wait 2 us
|
||||
rcall LCDWait ; Call Wait function
|
||||
ldi wait, LCDPulse ; Use wait temporarially to
|
||||
sts PORTF, wait ; to send write pulse to LCD
|
||||
ldi wait, $00 ;
|
||||
sts PORTF, wait ;
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWait
|
||||
;* Desc: A wait loop that is 10 + 159*wait cycles or
|
||||
;* roughly wait*10us. Just initialize wait
|
||||
;* for the specific amount of time in 10us
|
||||
;* intervals.
|
||||
;*******************************************************
|
||||
LCDWait:push mpr ; Save mpr
|
||||
LCDW_L1:ldi mpr, $49 ; Load with a 10us value
|
||||
LCDW_L2:dec mpr ; Inner Wait Loop
|
||||
brne LCDW_L2
|
||||
dec wait ; Outer Wait Loop
|
||||
brne LCDW_L1
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from Wait Function
|
||||
|
||||
;*******************************************************
|
||||
;* Bin2ASCII routines that can be used as a psuedo-
|
||||
;* printf function to convert an 8-bit binary
|
||||
;* number into the unigned decimal ASCII text
|
||||
;*******************************************************
|
||||
|
||||
;***********************************************************
|
||||
;* Func: div10
|
||||
;* Desc: Divides the value in the mpr by 10 and
|
||||
;* puts the remander in the 'r' register and
|
||||
;* and the quotiant in the 'q' register.
|
||||
;* DO NOT modify this function, trust me, it does
|
||||
;* divide by 10 :) ~DZ
|
||||
;***********************************************************
|
||||
div10:
|
||||
push r0 ; Save register
|
||||
|
||||
; q = mpr / 10 = mpr * 0.000110011001101b
|
||||
mov q, mpr ; q = mpr * 1.0b
|
||||
lsr q ; q >> 2
|
||||
lsr q ; q = mpr * 0.01b
|
||||
add q, mpr ; q = (q + mpr) >> 1
|
||||
lsr q ; q = mpr * 0.101b
|
||||
add q, mpr ; q = (q + mpr) >> 3
|
||||
lsr q
|
||||
lsr q
|
||||
lsr q ; q = mpr * 0.001101b
|
||||
add q, mpr ; q = (q + mpr) >> 1
|
||||
lsr q ; q = mpr * 0.1001101b
|
||||
add q, mpr ; q = (q + mpr) >> 3
|
||||
lsr q
|
||||
lsr q
|
||||
lsr q ; q = mpr * 0.0011001101b
|
||||
add q, mpr ; q = (q + mpr) >> 1
|
||||
lsr q ; q = mpr * 0.10011001101b
|
||||
add q, mpr ; q = (q + mpr) >> 4
|
||||
lsr q
|
||||
lsr q
|
||||
lsr q
|
||||
lsr q ; q = mpr * 0.000110011001101b
|
||||
|
||||
; compute the remainder as r = i - 10 * q
|
||||
; calculate r = q * 10 = q * 1010b
|
||||
mov r, q ; r = q * 1
|
||||
lsl r ; r << 2
|
||||
lsl r ; r = q * 100b
|
||||
add r, q ; r = (r + q) << 1
|
||||
lsl r ; r = q * 1010b
|
||||
mov r0, r ; r0 = 10 * q
|
||||
mov r, mpr ; r = mpr
|
||||
sub r, r0 ; r = mpr - 10 * q
|
||||
|
||||
; Fix any errors that occur
|
||||
div10_1:cpi r, 10 ; Compare with 10
|
||||
brlo div10_2 ; do nothing if r < 10
|
||||
inc q ; fix qoutient
|
||||
subi r, 10 ; fix remainder
|
||||
rjmp div10_1 ; Continue until error is corrected
|
||||
|
||||
div10_2:pop r0 ; Restore registers
|
||||
ret ; Return from function
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{18226A42-8477-4023-8AD2-40C49DA407C9}") = "Corwin_Perren_Lab4_sourcecode", "Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asmproj", "{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
Release|AVR = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,108 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Corwin_Perren_Lab4_sourcecode.asm
|
||||
;*
|
||||
;* This program loads a two line string from program memory
|
||||
;* into data memory, then shows it on an LCD
|
||||
;*
|
||||
;* This is the skeleton file for Lab 4 of ECE 375
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: Corwin Perren
|
||||
;* Date: 10/17/2018
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
.include "m128def.inc" ; Include definition file
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;***********************************************************
|
||||
.def mpr = r16 ; Multipurpose register is required for LCD Driver
|
||||
.def dataloopcountreg = r23
|
||||
|
||||
.equ datamemstart = 0x0100
|
||||
|
||||
.equ stringlen = 32
|
||||
|
||||
;***********************************************************
|
||||
;* Start of Code Segment
|
||||
;***********************************************************
|
||||
.cseg ; Beginning of code segment
|
||||
|
||||
;***********************************************************
|
||||
;* Interrupt Vectors
|
||||
;***********************************************************
|
||||
.org $0000 ; Beginning of IVs
|
||||
rjmp INIT ; Reset interrupt
|
||||
|
||||
.org $0046 ; End of Interrupt Vectors
|
||||
|
||||
;***********************************************************
|
||||
;* Program Initialization
|
||||
;***********************************************************
|
||||
INIT: ; The initialization routine
|
||||
; Initialize Stack Pointer
|
||||
ldi mpr, low(RAMEND) ; Load the low and high bytes of ram end to the
|
||||
; stack pointer
|
||||
out SPL, mpr
|
||||
ldi mpr, high(RAMEND)
|
||||
out SPH, mpr
|
||||
|
||||
; Initialize LCD Display
|
||||
rcall LCDInit ; Call the lcd init function
|
||||
|
||||
; Move strings from Program Memory to Data Memory
|
||||
ldi ZL, low(STRING_BEG << 1) ; Low byte of first byte in string into ZL
|
||||
ldi ZH, high(STRING_BEG << 1) ; High byte of first byte in string into ZH
|
||||
|
||||
ldi YL, low(datamemstart) ; Low byte of data memory start into YL
|
||||
ldi YH, high(datamemstart) ; High byte of data memory start into YH
|
||||
|
||||
ldi dataloopcountreg, stringlen ; Initialize count for loop to string length
|
||||
|
||||
INIT_MEMCOPYLOOP: ; Loop to read data from progmem to datamem
|
||||
lpm mpr, Z+ ; Get byte from address pointed to be Z,
|
||||
; store in reg, move to next byte
|
||||
|
||||
st Y+, mpr ; Store byte from reg into data mem address
|
||||
; pointed to by Y, then move Y to next open spot
|
||||
dec dataloopcountreg ; Decrement count as we're done with byte
|
||||
brne INIT_MEMCOPYLOOP ; If we haven't read in the whole string, loop again
|
||||
|
||||
|
||||
; NOTE that there is no RET or RJMP from INIT, this
|
||||
; is because the next instruction executed is the
|
||||
; first instruction of the main program
|
||||
|
||||
;***********************************************************
|
||||
;* Main Program
|
||||
;***********************************************************
|
||||
MAIN: ; The Main program
|
||||
; Display the strings on the LCD Display
|
||||
|
||||
rcall LCDWrite ; This writes the data mem to the display, based on
|
||||
; fixed mem addresses in LCDDriver.asm
|
||||
|
||||
rjmp MAIN ; jump back to main and create an infinite
|
||||
; while loop. Generally, every main program is an
|
||||
; infinite while loop, never let the main program
|
||||
; just run off
|
||||
|
||||
;***********************************************************
|
||||
;* Stored Program Data
|
||||
;***********************************************************
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; An example of storing a string. Note the labels before and
|
||||
; after the .DB directive; these can help to access the data
|
||||
;-----------------------------------------------------------
|
||||
STRING_BEG:
|
||||
.DB " Corwin Perren Hello World! " ; Declaring data in ProgMem
|
||||
STRING_END:
|
||||
|
||||
;***********************************************************
|
||||
;* Additional Program Includes
|
||||
;***********************************************************
|
||||
.include "LCDDriver.asm" ; Include the LCD Driver
|
||||
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRAssembler</ToolchainName>
|
||||
<ProjectGuid>59B1D629-9DCC-43ed-A0FD-8AB0E4D622AB</ProjectGuid>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.obj</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<Language>ASSEMBLY</Language>
|
||||
<AssemblyName>Corwin_Perren_Lab4_sourcecode</AssemblyName>
|
||||
<Name>Corwin_Perren_Lab4_sourcecode</Name>
|
||||
<RootNamespace>Corwin_Perren_Lab4_sourcecode</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<EntryFile>$(MSBuildProjectDirectory)\Corwin_Perren_Lab4_sourcecode.asm</EntryFile>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress>0x20000000</RamSnippetAddress>
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue>exception_table</OverrideVtorValue>
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
<avrtool>com.atmel.avrdbg.tool.simulator</avrtool>
|
||||
<avrtoolserialnumber />
|
||||
<avrdeviceexpectedsignature>0x1E9702</avrdeviceexpectedsignature>
|
||||
<com_atmel_avrdbg_tool_simulator>
|
||||
<ToolOptions xmlns="">
|
||||
<InterfaceProperties>
|
||||
</InterfaceProperties>
|
||||
</ToolOptions>
|
||||
<ToolType xmlns="">com.atmel.avrdbg.tool.simulator</ToolType>
|
||||
<ToolNumber xmlns="">
|
||||
</ToolNumber>
|
||||
<ToolName xmlns="">Simulator</ToolName>
|
||||
</com_atmel_avrdbg_tool_simulator>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
<OutputType>Executable</OutputType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Corwin_Perren_Lab4_sourcecode.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LCDDriver.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Assembler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.2.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>bd3TUV9UtxpdYQkn+6MWPA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc/m128def.inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\templates\main.asm</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>pYQtEYjLcSjMDsRgadVFow==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/templates/main.asm</Name>
|
||||
<SelectString>Main file (.asm)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.2.209</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -0,0 +1,42 @@
|
||||
:020000020000FC
|
||||
:0200000045C0F9
|
||||
:10008C001BD0E4EAF0E0C0E0D1E070E20591099306
|
||||
:10009C007A95E1F750D0FECF20436F7277696E20CE
|
||||
:1000AC0050657272656E2020202048656C6C6F2044
|
||||
:1000BC00576F726C642120200F930FB70F931F930F
|
||||
:1000CC0000E008BB0FEF07BB00E002BB00E001BB88
|
||||
:1000DC0000E00093620008E00093610000E50DB9B8
|
||||
:1000EC0001E00EB900E805BF02E400936D0000E8E2
|
||||
:1000FC0000936C0000E00BB908E10AB906E000932C
|
||||
:10010C00950000E00093900007E609B906E01AEFAD
|
||||
:10011C00BFD00A95E1F708E397D008E095D001E04D
|
||||
:10012C0093D006E091D00CE08FD028D01F910F9186
|
||||
:10013C000FBF0F91089502D011D008950F93EF9334
|
||||
:10014C00FF932F933F93E0E0F1E030E86BD076D053
|
||||
:10015C003F912F91FF91EF910F9108950F93EF9392
|
||||
:10016C00FF932F933F93E0E1F1E030EC5BD066D04E
|
||||
:10017C003F912F91FF91EF910F91089502D011D0E3
|
||||
:10018C0008950F933F932F93EF93FF9330E84AD04A
|
||||
:10019C00E0E0F1E04CD0FF91EF912F913F910F9166
|
||||
:1001AC0008950F933F932F93EF93FF9330EC3AD036
|
||||
:1001BC00E0E1F1E03CD0FF91EF912F913F910F9155
|
||||
:1001CC0008950F933F932F93283250F4313011F44C
|
||||
:1001DC0030E803C0323021F430EC320F23D042D05F
|
||||
:1001EC002F913F910F9108950F936F935F93BF934E
|
||||
:1001FC00AF93043618F023E0139607C00A3018F0BA
|
||||
:10020C0022E0129602C0119621E04AD000E3060FBC
|
||||
:10021C000E93052F0030C9F7AF91BF915F916F918D
|
||||
:10022C000F9108950F93032F0FD00F91089500E2B3
|
||||
:10023C0020E1019317D02A95E1F7089520E101916F
|
||||
:10024C0011D02A95E1F708954F931F9340E013D0F6
|
||||
:10025C000F9302E01DEC1CD00A95E1F70F911F9152
|
||||
:10026C004F9108954F931F9341E005D010E110D0AA
|
||||
:10027C001F914F9108954FB912E00AD00FB912E0B7
|
||||
:10028C0007D018E01093620010E0109362000895FC
|
||||
:10029C000F9309E40A95F1F71A95D9F70F91089580
|
||||
:1002AC000F92502F56955695500F5695500F5695B8
|
||||
:1002BC0056955695500F5695500F569556955695F2
|
||||
:1002CC00500F5695500F5695569556955695652F39
|
||||
:1002DC00660F660F650F660F062E602F60196A3069
|
||||
:0C02EC0018F053956A50FBCF0F90089556
|
||||
:00000001FF
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,925 @@
|
||||
|
||||
AVRASM ver. 2.2.7 C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm Tue Oct 23 20:41:05 2018
|
||||
|
||||
|
||||
EQU SIGNATURE_000 0000001e
|
||||
EQU SIGNATURE_001 00000097
|
||||
EQU SIGNATURE_002 00000002
|
||||
EQU UCSR1C 0000009d
|
||||
EQU UDR1 0000009c
|
||||
EQU UCSR1A 0000009b
|
||||
EQU UCSR1B 0000009a
|
||||
EQU UBRR1H 00000098
|
||||
EQU UBRR1L 00000099
|
||||
EQU UCSR0C 00000095
|
||||
EQU UBRR0H 00000090
|
||||
EQU TCCR3C 0000008c
|
||||
EQU TCCR3A 0000008b
|
||||
EQU TCCR3B 0000008a
|
||||
EQU TCNT3L 00000088
|
||||
EQU TCNT3H 00000089
|
||||
EQU OCR3AL 00000086
|
||||
EQU OCR3AH 00000087
|
||||
EQU OCR3BL 00000084
|
||||
EQU OCR3BH 00000085
|
||||
EQU OCR3CL 00000082
|
||||
EQU OCR3CH 00000083
|
||||
EQU ICR3L 00000080
|
||||
EQU ICR3H 00000081
|
||||
EQU ETIMSK 0000007d
|
||||
EQU ETIFR 0000007c
|
||||
EQU TCCR1C 0000007a
|
||||
EQU OCR1CL 00000078
|
||||
EQU OCR1CH 00000079
|
||||
EQU TWCR 00000074
|
||||
EQU TWDR 00000073
|
||||
EQU TWAR 00000072
|
||||
EQU TWSR 00000071
|
||||
EQU TWBR 00000070
|
||||
EQU OSCCAL 0000006f
|
||||
EQU XMCRA 0000006d
|
||||
EQU XMCRB 0000006c
|
||||
EQU EICRA 0000006a
|
||||
EQU SPMCSR 00000068
|
||||
EQU PORTG 00000065
|
||||
EQU DDRG 00000064
|
||||
EQU PING 00000063
|
||||
EQU PORTF 00000062
|
||||
EQU DDRF 00000061
|
||||
EQU SREG 0000003f
|
||||
EQU SPL 0000003d
|
||||
EQU SPH 0000003e
|
||||
EQU XDIV 0000003c
|
||||
EQU RAMPZ 0000003b
|
||||
EQU EICRB 0000003a
|
||||
EQU EIMSK 00000039
|
||||
EQU EIFR 00000038
|
||||
EQU TIMSK 00000037
|
||||
EQU TIFR 00000036
|
||||
EQU MCUCR 00000035
|
||||
EQU MCUCSR 00000034
|
||||
EQU TCCR0 00000033
|
||||
EQU TCNT0 00000032
|
||||
EQU OCR0 00000031
|
||||
EQU ASSR 00000030
|
||||
EQU TCCR1A 0000002f
|
||||
EQU TCCR1B 0000002e
|
||||
EQU TCNT1L 0000002c
|
||||
EQU TCNT1H 0000002d
|
||||
EQU OCR1AL 0000002a
|
||||
EQU OCR1AH 0000002b
|
||||
EQU OCR1BL 00000028
|
||||
EQU OCR1BH 00000029
|
||||
EQU ICR1L 00000026
|
||||
EQU ICR1H 00000027
|
||||
EQU TCCR2 00000025
|
||||
EQU TCNT2 00000024
|
||||
EQU OCR2 00000023
|
||||
EQU OCDR 00000022
|
||||
EQU WDTCR 00000021
|
||||
EQU SFIOR 00000020
|
||||
EQU EEARL 0000001e
|
||||
EQU EEARH 0000001f
|
||||
EQU EEDR 0000001d
|
||||
EQU EECR 0000001c
|
||||
EQU PORTA 0000001b
|
||||
EQU DDRA 0000001a
|
||||
EQU PINA 00000019
|
||||
EQU PORTB 00000018
|
||||
EQU DDRB 00000017
|
||||
EQU PINB 00000016
|
||||
EQU PORTC 00000015
|
||||
EQU DDRC 00000014
|
||||
EQU PINC 00000013
|
||||
EQU PORTD 00000012
|
||||
EQU DDRD 00000011
|
||||
EQU PIND 00000010
|
||||
EQU SPDR 0000000f
|
||||
EQU SPSR 0000000e
|
||||
EQU SPCR 0000000d
|
||||
EQU UDR0 0000000c
|
||||
EQU UCSR0A 0000000b
|
||||
EQU UCSR0B 0000000a
|
||||
EQU UBRR0L 00000009
|
||||
EQU ACSR 00000008
|
||||
EQU ADMUX 00000007
|
||||
EQU ADCSRA 00000006
|
||||
EQU ADCH 00000005
|
||||
EQU ADCL 00000004
|
||||
EQU PORTE 00000003
|
||||
EQU DDRE 00000002
|
||||
EQU PINE 00000001
|
||||
EQU PINF 00000000
|
||||
EQU ACME 00000003
|
||||
EQU ACIS0 00000000
|
||||
EQU ACIS1 00000001
|
||||
EQU ACIC 00000002
|
||||
EQU ACIE 00000003
|
||||
EQU ACI 00000004
|
||||
EQU ACO 00000005
|
||||
EQU ACBG 00000006
|
||||
EQU ACD 00000007
|
||||
EQU SPDR0 00000000
|
||||
EQU SPDR1 00000001
|
||||
EQU SPDR2 00000002
|
||||
EQU SPDR3 00000003
|
||||
EQU SPDR4 00000004
|
||||
EQU SPDR5 00000005
|
||||
EQU SPDR6 00000006
|
||||
EQU SPDR7 00000007
|
||||
EQU SPI2X 00000000
|
||||
EQU WCOL 00000006
|
||||
EQU SPIF 00000007
|
||||
EQU SPR0 00000000
|
||||
EQU SPR1 00000001
|
||||
EQU CPHA 00000002
|
||||
EQU CPOL 00000003
|
||||
EQU MSTR 00000004
|
||||
EQU DORD 00000005
|
||||
EQU SPE 00000006
|
||||
EQU SPIE 00000007
|
||||
EQU I2BR 00000070
|
||||
EQU TWBR0 00000000
|
||||
EQU TWBR1 00000001
|
||||
EQU TWBR2 00000002
|
||||
EQU TWBR3 00000003
|
||||
EQU TWBR4 00000004
|
||||
EQU TWBR5 00000005
|
||||
EQU TWBR6 00000006
|
||||
EQU TWBR7 00000007
|
||||
EQU I2CR 00000074
|
||||
EQU TWIE 00000000
|
||||
EQU I2IE 00000000
|
||||
EQU TWEN 00000002
|
||||
EQU I2EN 00000002
|
||||
EQU ENI2C 00000002
|
||||
EQU TWWC 00000003
|
||||
EQU I2WC 00000003
|
||||
EQU TWSTO 00000004
|
||||
EQU I2STO 00000004
|
||||
EQU TWSTA 00000005
|
||||
EQU I2STA 00000005
|
||||
EQU TWEA 00000006
|
||||
EQU I2EA 00000006
|
||||
EQU TWINT 00000007
|
||||
EQU I2INT 00000007
|
||||
EQU I2SR 00000071
|
||||
EQU TWPS0 00000000
|
||||
EQU TWS0 00000000
|
||||
EQU I2GCE 00000000
|
||||
EQU TWPS1 00000001
|
||||
EQU TWS1 00000001
|
||||
EQU TWS3 00000003
|
||||
EQU I2S3 00000003
|
||||
EQU TWS4 00000004
|
||||
EQU I2S4 00000004
|
||||
EQU TWS5 00000005
|
||||
EQU I2S5 00000005
|
||||
EQU TWS6 00000006
|
||||
EQU I2S6 00000006
|
||||
EQU TWS7 00000007
|
||||
EQU I2S7 00000007
|
||||
EQU I2DR 00000073
|
||||
EQU TWD0 00000000
|
||||
EQU TWD1 00000001
|
||||
EQU TWD2 00000002
|
||||
EQU TWD3 00000003
|
||||
EQU TWD4 00000004
|
||||
EQU TWD5 00000005
|
||||
EQU TWD6 00000006
|
||||
EQU TWD7 00000007
|
||||
EQU I2AR 00000072
|
||||
EQU TWGCE 00000000
|
||||
EQU TWA0 00000001
|
||||
EQU TWA1 00000002
|
||||
EQU TWA2 00000003
|
||||
EQU TWA3 00000004
|
||||
EQU TWA4 00000005
|
||||
EQU TWA5 00000006
|
||||
EQU TWA6 00000007
|
||||
EQU UDR00 00000000
|
||||
EQU UDR01 00000001
|
||||
EQU UDR02 00000002
|
||||
EQU UDR03 00000003
|
||||
EQU UDR04 00000004
|
||||
EQU UDR05 00000005
|
||||
EQU UDR06 00000006
|
||||
EQU UDR07 00000007
|
||||
EQU MPCM0 00000000
|
||||
EQU U2X0 00000001
|
||||
EQU UPE0 00000002
|
||||
EQU DOR0 00000003
|
||||
EQU FE0 00000004
|
||||
EQU UDRE0 00000005
|
||||
EQU TXC0 00000006
|
||||
EQU RXC0 00000007
|
||||
EQU TXB80 00000000
|
||||
EQU RXB80 00000001
|
||||
EQU UCSZ02 00000002
|
||||
EQU UCSZ2 00000002
|
||||
EQU TXEN0 00000003
|
||||
EQU RXEN0 00000004
|
||||
EQU UDRIE0 00000005
|
||||
EQU TXCIE0 00000006
|
||||
EQU RXCIE0 00000007
|
||||
EQU UCPOL0 00000000
|
||||
EQU UCSZ00 00000001
|
||||
EQU UCSZ01 00000002
|
||||
EQU USBS0 00000003
|
||||
EQU UPM00 00000004
|
||||
EQU UPM01 00000005
|
||||
EQU UMSEL0 00000006
|
||||
EQU UBRR8 00000000
|
||||
EQU UBRR9 00000001
|
||||
EQU UBRR10 00000002
|
||||
EQU UBRR11 00000003
|
||||
EQU UBRR0 00000000
|
||||
EQU UBRR1 00000001
|
||||
EQU UBRR2 00000002
|
||||
EQU UBRR3 00000003
|
||||
EQU UBRR4 00000004
|
||||
EQU UBRR5 00000005
|
||||
EQU UBRR6 00000006
|
||||
EQU UBRR7 00000007
|
||||
EQU UDR10 00000000
|
||||
EQU UDR11 00000001
|
||||
EQU UDR12 00000002
|
||||
EQU UDR13 00000003
|
||||
EQU UDR14 00000004
|
||||
EQU UDR15 00000005
|
||||
EQU UDR16 00000006
|
||||
EQU UDR17 00000007
|
||||
EQU MPCM1 00000000
|
||||
EQU U2X1 00000001
|
||||
EQU UPE1 00000002
|
||||
EQU DOR1 00000003
|
||||
EQU FE1 00000004
|
||||
EQU UDRE1 00000005
|
||||
EQU TXC1 00000006
|
||||
EQU RXC1 00000007
|
||||
EQU TXB81 00000000
|
||||
EQU RXB81 00000001
|
||||
EQU UCSZ12 00000002
|
||||
EQU TXEN1 00000003
|
||||
EQU RXEN1 00000004
|
||||
EQU UDRIE1 00000005
|
||||
EQU TXCIE1 00000006
|
||||
EQU RXCIE1 00000007
|
||||
EQU UCPOL1 00000000
|
||||
EQU UCSZ10 00000001
|
||||
EQU UCSZ11 00000002
|
||||
EQU USBS1 00000003
|
||||
EQU UPM10 00000004
|
||||
EQU UPM11 00000005
|
||||
EQU UMSEL1 00000006
|
||||
EQU SREG_C 00000000
|
||||
EQU SREG_Z 00000001
|
||||
EQU SREG_N 00000002
|
||||
EQU SREG_V 00000003
|
||||
EQU SREG_S 00000004
|
||||
EQU SREG_H 00000005
|
||||
EQU SREG_T 00000006
|
||||
EQU SREG_I 00000007
|
||||
EQU IVCE 00000000
|
||||
EQU IVSEL 00000001
|
||||
EQU SM2 00000002
|
||||
EQU SM0 00000003
|
||||
EQU SM1 00000004
|
||||
EQU SE 00000005
|
||||
EQU SRW10 00000006
|
||||
EQU SRE 00000007
|
||||
EQU SRW11 00000001
|
||||
EQU SRW00 00000002
|
||||
EQU SRW01 00000003
|
||||
EQU SRL0 00000004
|
||||
EQU SRL1 00000005
|
||||
EQU SRL2 00000006
|
||||
EQU XMM0 00000000
|
||||
EQU XMM1 00000001
|
||||
EQU XMM2 00000002
|
||||
EQU XMBK 00000007
|
||||
EQU CAL0 00000000
|
||||
EQU CAL1 00000001
|
||||
EQU CAL2 00000002
|
||||
EQU CAL3 00000003
|
||||
EQU CAL4 00000004
|
||||
EQU CAL5 00000005
|
||||
EQU CAL6 00000006
|
||||
EQU CAL7 00000007
|
||||
EQU XDIV0 00000000
|
||||
EQU XDIV1 00000001
|
||||
EQU XDIV2 00000002
|
||||
EQU XDIV3 00000003
|
||||
EQU XDIV4 00000004
|
||||
EQU XDIV5 00000005
|
||||
EQU XDIV6 00000006
|
||||
EQU XDIVEN 00000007
|
||||
EQU PORF 00000000
|
||||
EQU EXTRF 00000001
|
||||
EQU BORF 00000002
|
||||
EQU WDRF 00000003
|
||||
EQU JTRF 00000004
|
||||
EQU JTD 00000007
|
||||
EQU RAMPZ0 00000000
|
||||
EQU SPMCR 00000068
|
||||
EQU SPMEN 00000000
|
||||
EQU PGERS 00000001
|
||||
EQU PGWRT 00000002
|
||||
EQU BLBSET 00000003
|
||||
EQU RWWSRE 00000004
|
||||
EQU ASRE 00000004
|
||||
EQU RWWSB 00000006
|
||||
EQU ASB 00000006
|
||||
EQU SPMIE 00000007
|
||||
EQU OCDR0 00000000
|
||||
EQU OCDR1 00000001
|
||||
EQU OCDR2 00000002
|
||||
EQU OCDR3 00000003
|
||||
EQU OCDR4 00000004
|
||||
EQU OCDR5 00000005
|
||||
EQU OCDR6 00000006
|
||||
EQU OCDR7 00000007
|
||||
EQU IDRD 00000007
|
||||
EQU PSR321 00000000
|
||||
EQU PSR1 00000000
|
||||
EQU PSR2 00000000
|
||||
EQU PSR3 00000000
|
||||
EQU PSR0 00000001
|
||||
EQU PUD 00000002
|
||||
EQU TSM 00000007
|
||||
EQU ISC00 00000000
|
||||
EQU ISC01 00000001
|
||||
EQU ISC10 00000002
|
||||
EQU ISC11 00000003
|
||||
EQU ISC20 00000004
|
||||
EQU ISC21 00000005
|
||||
EQU ISC30 00000006
|
||||
EQU ISC31 00000007
|
||||
EQU ISC40 00000000
|
||||
EQU ISC41 00000001
|
||||
EQU ISC50 00000002
|
||||
EQU ISC51 00000003
|
||||
EQU ISC60 00000004
|
||||
EQU ISC61 00000005
|
||||
EQU ISC70 00000006
|
||||
EQU ISC71 00000007
|
||||
EQU GICR 00000039
|
||||
EQU GIMSK 00000039
|
||||
EQU INT0 00000000
|
||||
EQU INT1 00000001
|
||||
EQU INT2 00000002
|
||||
EQU INT3 00000003
|
||||
EQU INT4 00000004
|
||||
EQU INT5 00000005
|
||||
EQU INT6 00000006
|
||||
EQU INT7 00000007
|
||||
EQU GIFR 00000038
|
||||
EQU INTF0 00000000
|
||||
EQU INTF1 00000001
|
||||
EQU INTF2 00000002
|
||||
EQU INTF3 00000003
|
||||
EQU INTF4 00000004
|
||||
EQU INTF5 00000005
|
||||
EQU INTF6 00000006
|
||||
EQU INTF7 00000007
|
||||
EQU EEDR0 00000000
|
||||
EQU EEDR1 00000001
|
||||
EQU EEDR2 00000002
|
||||
EQU EEDR3 00000003
|
||||
EQU EEDR4 00000004
|
||||
EQU EEDR5 00000005
|
||||
EQU EEDR6 00000006
|
||||
EQU EEDR7 00000007
|
||||
EQU EERE 00000000
|
||||
EQU EEWE 00000001
|
||||
EQU EEMWE 00000002
|
||||
EQU EERIE 00000003
|
||||
EQU PORTA0 00000000
|
||||
EQU PA0 00000000
|
||||
EQU PORTA1 00000001
|
||||
EQU PA1 00000001
|
||||
EQU PORTA2 00000002
|
||||
EQU PA2 00000002
|
||||
EQU PORTA3 00000003
|
||||
EQU PA3 00000003
|
||||
EQU PORTA4 00000004
|
||||
EQU PA4 00000004
|
||||
EQU PORTA5 00000005
|
||||
EQU PA5 00000005
|
||||
EQU PORTA6 00000006
|
||||
EQU PA6 00000006
|
||||
EQU PORTA7 00000007
|
||||
EQU PA7 00000007
|
||||
EQU DDA0 00000000
|
||||
EQU DDA1 00000001
|
||||
EQU DDA2 00000002
|
||||
EQU DDA3 00000003
|
||||
EQU DDA4 00000004
|
||||
EQU DDA5 00000005
|
||||
EQU DDA6 00000006
|
||||
EQU DDA7 00000007
|
||||
EQU PINA0 00000000
|
||||
EQU PINA1 00000001
|
||||
EQU PINA2 00000002
|
||||
EQU PINA3 00000003
|
||||
EQU PINA4 00000004
|
||||
EQU PINA5 00000005
|
||||
EQU PINA6 00000006
|
||||
EQU PINA7 00000007
|
||||
EQU PORTB0 00000000
|
||||
EQU PB0 00000000
|
||||
EQU PORTB1 00000001
|
||||
EQU PB1 00000001
|
||||
EQU PORTB2 00000002
|
||||
EQU PB2 00000002
|
||||
EQU PORTB3 00000003
|
||||
EQU PB3 00000003
|
||||
EQU PORTB4 00000004
|
||||
EQU PB4 00000004
|
||||
EQU PORTB5 00000005
|
||||
EQU PB5 00000005
|
||||
EQU PORTB6 00000006
|
||||
EQU PB6 00000006
|
||||
EQU PORTB7 00000007
|
||||
EQU PB7 00000007
|
||||
EQU DDB0 00000000
|
||||
EQU DDB1 00000001
|
||||
EQU DDB2 00000002
|
||||
EQU DDB3 00000003
|
||||
EQU DDB4 00000004
|
||||
EQU DDB5 00000005
|
||||
EQU DDB6 00000006
|
||||
EQU DDB7 00000007
|
||||
EQU PINB0 00000000
|
||||
EQU PINB1 00000001
|
||||
EQU PINB2 00000002
|
||||
EQU PINB3 00000003
|
||||
EQU PINB4 00000004
|
||||
EQU PINB5 00000005
|
||||
EQU PINB6 00000006
|
||||
EQU PINB7 00000007
|
||||
EQU PORTC0 00000000
|
||||
EQU PC0 00000000
|
||||
EQU PORTC1 00000001
|
||||
EQU PC1 00000001
|
||||
EQU PORTC2 00000002
|
||||
EQU PC2 00000002
|
||||
EQU PORTC3 00000003
|
||||
EQU PC3 00000003
|
||||
EQU PORTC4 00000004
|
||||
EQU PC4 00000004
|
||||
EQU PORTC5 00000005
|
||||
EQU PC5 00000005
|
||||
EQU PORTC6 00000006
|
||||
EQU PC6 00000006
|
||||
EQU PORTC7 00000007
|
||||
EQU PC7 00000007
|
||||
EQU DDC0 00000000
|
||||
EQU DDC1 00000001
|
||||
EQU DDC2 00000002
|
||||
EQU DDC3 00000003
|
||||
EQU DDC4 00000004
|
||||
EQU DDC5 00000005
|
||||
EQU DDC6 00000006
|
||||
EQU DDC7 00000007
|
||||
EQU PINC0 00000000
|
||||
EQU PINC1 00000001
|
||||
EQU PINC2 00000002
|
||||
EQU PINC3 00000003
|
||||
EQU PINC4 00000004
|
||||
EQU PINC5 00000005
|
||||
EQU PINC6 00000006
|
||||
EQU PINC7 00000007
|
||||
EQU PORTD0 00000000
|
||||
EQU PD0 00000000
|
||||
EQU PORTD1 00000001
|
||||
EQU PD1 00000001
|
||||
EQU PORTD2 00000002
|
||||
EQU PD2 00000002
|
||||
EQU PORTD3 00000003
|
||||
EQU PD3 00000003
|
||||
EQU PORTD4 00000004
|
||||
EQU PD4 00000004
|
||||
EQU PORTD5 00000005
|
||||
EQU PD5 00000005
|
||||
EQU PORTD6 00000006
|
||||
EQU PD6 00000006
|
||||
EQU PORTD7 00000007
|
||||
EQU PD7 00000007
|
||||
EQU DDD0 00000000
|
||||
EQU DDD1 00000001
|
||||
EQU DDD2 00000002
|
||||
EQU DDD3 00000003
|
||||
EQU DDD4 00000004
|
||||
EQU DDD5 00000005
|
||||
EQU DDD6 00000006
|
||||
EQU DDD7 00000007
|
||||
EQU PIND0 00000000
|
||||
EQU PIND1 00000001
|
||||
EQU PIND2 00000002
|
||||
EQU PIND3 00000003
|
||||
EQU PIND4 00000004
|
||||
EQU PIND5 00000005
|
||||
EQU PIND6 00000006
|
||||
EQU PIND7 00000007
|
||||
EQU PORTE0 00000000
|
||||
EQU PE0 00000000
|
||||
EQU PORTE1 00000001
|
||||
EQU PE1 00000001
|
||||
EQU PORTE2 00000002
|
||||
EQU PE2 00000002
|
||||
EQU PORTE3 00000003
|
||||
EQU PE3 00000003
|
||||
EQU PORTE4 00000004
|
||||
EQU PE4 00000004
|
||||
EQU PORTE5 00000005
|
||||
EQU PE5 00000005
|
||||
EQU PORTE6 00000006
|
||||
EQU PE6 00000006
|
||||
EQU PORTE7 00000007
|
||||
EQU PE7 00000007
|
||||
EQU DDE0 00000000
|
||||
EQU DDE1 00000001
|
||||
EQU DDE2 00000002
|
||||
EQU DDE3 00000003
|
||||
EQU DDE4 00000004
|
||||
EQU DDE5 00000005
|
||||
EQU DDE6 00000006
|
||||
EQU DDE7 00000007
|
||||
EQU PINE0 00000000
|
||||
EQU PINE1 00000001
|
||||
EQU PINE2 00000002
|
||||
EQU PINE3 00000003
|
||||
EQU PINE4 00000004
|
||||
EQU PINE5 00000005
|
||||
EQU PINE6 00000006
|
||||
EQU PINE7 00000007
|
||||
EQU PORTF0 00000000
|
||||
EQU PF0 00000000
|
||||
EQU PORTF1 00000001
|
||||
EQU PF1 00000001
|
||||
EQU PORTF2 00000002
|
||||
EQU PF2 00000002
|
||||
EQU PORTF3 00000003
|
||||
EQU PF3 00000003
|
||||
EQU PORTF4 00000004
|
||||
EQU PF4 00000004
|
||||
EQU PORTF5 00000005
|
||||
EQU PF5 00000005
|
||||
EQU PORTF6 00000006
|
||||
EQU PF6 00000006
|
||||
EQU PORTF7 00000007
|
||||
EQU PF7 00000007
|
||||
EQU DDF0 00000000
|
||||
EQU DDF1 00000001
|
||||
EQU DDF2 00000002
|
||||
EQU DDF3 00000003
|
||||
EQU DDF4 00000004
|
||||
EQU DDF5 00000005
|
||||
EQU DDF6 00000006
|
||||
EQU DDF7 00000007
|
||||
EQU PINF0 00000000
|
||||
EQU PINF1 00000001
|
||||
EQU PINF2 00000002
|
||||
EQU PINF3 00000003
|
||||
EQU PINF4 00000004
|
||||
EQU PINF5 00000005
|
||||
EQU PINF6 00000006
|
||||
EQU PINF7 00000007
|
||||
EQU PORTG0 00000000
|
||||
EQU PG0 00000000
|
||||
EQU PORTG1 00000001
|
||||
EQU PG1 00000001
|
||||
EQU PORTG2 00000002
|
||||
EQU PG2 00000002
|
||||
EQU PORTG3 00000003
|
||||
EQU PG3 00000003
|
||||
EQU PORTG4 00000004
|
||||
EQU PG4 00000004
|
||||
EQU DDG0 00000000
|
||||
EQU DDG1 00000001
|
||||
EQU DDG2 00000002
|
||||
EQU DDG3 00000003
|
||||
EQU DDG4 00000004
|
||||
EQU PING0 00000000
|
||||
EQU PING1 00000001
|
||||
EQU PING2 00000002
|
||||
EQU PING3 00000003
|
||||
EQU PING4 00000004
|
||||
EQU CS00 00000000
|
||||
EQU CS01 00000001
|
||||
EQU CS02 00000002
|
||||
EQU WGM01 00000003
|
||||
EQU CTC0 00000003
|
||||
EQU COM00 00000004
|
||||
EQU COM01 00000005
|
||||
EQU WGM00 00000006
|
||||
EQU PWM0 00000006
|
||||
EQU FOC0 00000007
|
||||
EQU TCNT0_0 00000000
|
||||
EQU TCNT0_1 00000001
|
||||
EQU TCNT0_2 00000002
|
||||
EQU TCNT0_3 00000003
|
||||
EQU TCNT0_4 00000004
|
||||
EQU TCNT0_5 00000005
|
||||
EQU TCNT0_6 00000006
|
||||
EQU TCNT0_7 00000007
|
||||
EQU OCR0_0 00000000
|
||||
EQU OCR0_1 00000001
|
||||
EQU OCR0_2 00000002
|
||||
EQU OCR0_3 00000003
|
||||
EQU OCR0_4 00000004
|
||||
EQU OCR0_5 00000005
|
||||
EQU OCR0_6 00000006
|
||||
EQU OCR0_7 00000007
|
||||
EQU TCR0UB 00000000
|
||||
EQU OCR0UB 00000001
|
||||
EQU TCN0UB 00000002
|
||||
EQU AS0 00000003
|
||||
EQU TOIE0 00000000
|
||||
EQU OCIE0 00000001
|
||||
EQU TOV0 00000000
|
||||
EQU OCF0 00000001
|
||||
EQU TOIE1 00000002
|
||||
EQU OCIE1B 00000003
|
||||
EQU OCIE1A 00000004
|
||||
EQU TICIE1 00000005
|
||||
EQU OCIE1C 00000000
|
||||
EQU TOV1 00000002
|
||||
EQU OCF1B 00000003
|
||||
EQU OCF1A 00000004
|
||||
EQU ICF1 00000005
|
||||
EQU OCF1C 00000000
|
||||
EQU WGM10 00000000
|
||||
EQU PWM10 00000000
|
||||
EQU WGM11 00000001
|
||||
EQU PWM11 00000001
|
||||
EQU COM1C0 00000002
|
||||
EQU COM1C1 00000003
|
||||
EQU COM1B0 00000004
|
||||
EQU COM1B1 00000005
|
||||
EQU COM1A0 00000006
|
||||
EQU COM1A1 00000007
|
||||
EQU CS10 00000000
|
||||
EQU CS11 00000001
|
||||
EQU CS12 00000002
|
||||
EQU WGM12 00000003
|
||||
EQU CTC10 00000003
|
||||
EQU WGM13 00000004
|
||||
EQU CTC11 00000004
|
||||
EQU ICES1 00000006
|
||||
EQU ICNC1 00000007
|
||||
EQU FOC1C 00000005
|
||||
EQU FOC1B 00000006
|
||||
EQU FOC1A 00000007
|
||||
EQU CS20 00000000
|
||||
EQU CS21 00000001
|
||||
EQU CS22 00000002
|
||||
EQU WGM21 00000003
|
||||
EQU CTC2 00000003
|
||||
EQU COM20 00000004
|
||||
EQU COM21 00000005
|
||||
EQU WGM20 00000006
|
||||
EQU PWM2 00000006
|
||||
EQU FOC2 00000007
|
||||
EQU TCNT2_0 00000000
|
||||
EQU TCNT2_1 00000001
|
||||
EQU TCNT2_2 00000002
|
||||
EQU TCNT2_3 00000003
|
||||
EQU TCNT2_4 00000004
|
||||
EQU TCNT2_5 00000005
|
||||
EQU TCNT2_6 00000006
|
||||
EQU TCNT2_7 00000007
|
||||
EQU OCR2_0 00000000
|
||||
EQU OCR2_1 00000001
|
||||
EQU OCR2_2 00000002
|
||||
EQU OCR2_3 00000003
|
||||
EQU OCR2_4 00000004
|
||||
EQU OCR2_5 00000005
|
||||
EQU OCR2_6 00000006
|
||||
EQU OCR2_7 00000007
|
||||
EQU TOIE2 00000006
|
||||
EQU OCIE2 00000007
|
||||
EQU TOV2 00000006
|
||||
EQU OCF2 00000007
|
||||
EQU OCIE3C 00000001
|
||||
EQU TOIE3 00000002
|
||||
EQU OCIE3B 00000003
|
||||
EQU OCIE3A 00000004
|
||||
EQU TICIE3 00000005
|
||||
EQU OCF3C 00000001
|
||||
EQU TOV3 00000002
|
||||
EQU OCF3B 00000003
|
||||
EQU OCF3A 00000004
|
||||
EQU ICF3 00000005
|
||||
EQU WGM30 00000000
|
||||
EQU PWM30 00000000
|
||||
EQU WGM31 00000001
|
||||
EQU PWM31 00000001
|
||||
EQU COM3C0 00000002
|
||||
EQU COM3C1 00000003
|
||||
EQU COM3B0 00000004
|
||||
EQU COM3B1 00000005
|
||||
EQU COM3A0 00000006
|
||||
EQU COM3A1 00000007
|
||||
EQU CS30 00000000
|
||||
EQU CS31 00000001
|
||||
EQU CS32 00000002
|
||||
EQU WGM32 00000003
|
||||
EQU CTC30 00000003
|
||||
EQU WGM33 00000004
|
||||
EQU CTC31 00000004
|
||||
EQU ICES3 00000006
|
||||
EQU ICNC3 00000007
|
||||
EQU FOC3C 00000005
|
||||
EQU FOC3B 00000006
|
||||
EQU FOC3A 00000007
|
||||
EQU TCN3L0 00000000
|
||||
EQU TCN3L1 00000001
|
||||
EQU TCN3L2 00000002
|
||||
EQU TCN3L3 00000003
|
||||
EQU TCN3L4 00000004
|
||||
EQU TCN3L5 00000005
|
||||
EQU TCN3L6 00000006
|
||||
EQU TCN3L7 00000007
|
||||
EQU WDTCSR 00000021
|
||||
EQU WDP0 00000000
|
||||
EQU WDP1 00000001
|
||||
EQU WDP2 00000002
|
||||
EQU WDE 00000003
|
||||
EQU WDCE 00000004
|
||||
EQU WDTOE 00000004
|
||||
EQU MUX0 00000000
|
||||
EQU MUX1 00000001
|
||||
EQU MUX2 00000002
|
||||
EQU MUX3 00000003
|
||||
EQU MUX4 00000004
|
||||
EQU ADLAR 00000005
|
||||
EQU REFS0 00000006
|
||||
EQU REFS1 00000007
|
||||
EQU ADCSR 00000006
|
||||
EQU ADPS0 00000000
|
||||
EQU ADPS1 00000001
|
||||
EQU ADPS2 00000002
|
||||
EQU ADIE 00000003
|
||||
EQU ADIF 00000004
|
||||
EQU ADFR 00000005
|
||||
EQU ADSC 00000006
|
||||
EQU ADEN 00000007
|
||||
EQU ADCH0 00000000
|
||||
EQU ADCH1 00000001
|
||||
EQU ADCH2 00000002
|
||||
EQU ADCH3 00000003
|
||||
EQU ADCH4 00000004
|
||||
EQU ADCH5 00000005
|
||||
EQU ADCH6 00000006
|
||||
EQU ADCH7 00000007
|
||||
EQU ADCL0 00000000
|
||||
EQU ADCL1 00000001
|
||||
EQU ADCL2 00000002
|
||||
EQU ADCL3 00000003
|
||||
EQU ADCL4 00000004
|
||||
EQU ADCL5 00000005
|
||||
EQU ADCL6 00000006
|
||||
EQU ADCL7 00000007
|
||||
EQU LB1 00000000
|
||||
EQU LB2 00000001
|
||||
EQU BLB01 00000002
|
||||
EQU BLB02 00000003
|
||||
EQU BLB11 00000004
|
||||
EQU BLB12 00000005
|
||||
EQU CKSEL0 00000000
|
||||
EQU CKSEL1 00000001
|
||||
EQU CKSEL2 00000002
|
||||
EQU CKSEL3 00000003
|
||||
EQU SUT0 00000004
|
||||
EQU SUT1 00000005
|
||||
EQU BODEN 00000006
|
||||
EQU BODLEVEL 00000007
|
||||
EQU BOOTRST 00000000
|
||||
EQU BOOTSZ0 00000001
|
||||
EQU BOOTSZ1 00000002
|
||||
EQU EESAVE 00000003
|
||||
EQU CKOPT 00000004
|
||||
EQU SPIEN 00000005
|
||||
EQU JTAGEN 00000006
|
||||
EQU OCDEN 00000007
|
||||
EQU WDTON 00000000
|
||||
EQU M103C 00000001
|
||||
DEF XH r27
|
||||
DEF XL r26
|
||||
DEF YH r29
|
||||
DEF YL r28
|
||||
DEF ZH r31
|
||||
DEF ZL r30
|
||||
EQU FLASHEND 0000ffff
|
||||
EQU IOEND 000000ff
|
||||
EQU SRAM_START 00000100
|
||||
EQU SRAM_SIZE 00001000
|
||||
EQU RAMEND 000010ff
|
||||
EQU XRAMEND 0000ffff
|
||||
EQU E2END 00000fff
|
||||
EQU EEPROMEND 00000fff
|
||||
EQU EEADRBITS 0000000c
|
||||
EQU NRWW_START_ADDR 0000f000
|
||||
EQU NRWW_STOP_ADDR 0000ffff
|
||||
EQU RWW_START_ADDR 00000000
|
||||
EQU RWW_STOP_ADDR 0000efff
|
||||
EQU PAGESIZE 00000080
|
||||
EQU FIRSTBOOTSTART 0000fe00
|
||||
EQU SECONDBOOTSTART 0000fc00
|
||||
EQU THIRDBOOTSTART 0000f800
|
||||
EQU FOURTHBOOTSTART 0000f000
|
||||
EQU SMALLBOOTSTART 0000fe00
|
||||
EQU LARGEBOOTSTART 0000f000
|
||||
EQU INT0addr 00000002
|
||||
EQU INT1addr 00000004
|
||||
EQU INT2addr 00000006
|
||||
EQU INT3addr 00000008
|
||||
EQU INT4addr 0000000a
|
||||
EQU INT5addr 0000000c
|
||||
EQU INT6addr 0000000e
|
||||
EQU INT7addr 00000010
|
||||
EQU OC2addr 00000012
|
||||
EQU OVF2addr 00000014
|
||||
EQU ICP1addr 00000016
|
||||
EQU OC1Aaddr 00000018
|
||||
EQU OC1Baddr 0000001a
|
||||
EQU OVF1addr 0000001c
|
||||
EQU OC0addr 0000001e
|
||||
EQU OVF0addr 00000020
|
||||
EQU SPIaddr 00000022
|
||||
EQU URXC0addr 00000024
|
||||
EQU UDRE0addr 00000026
|
||||
EQU UTXC0addr 00000028
|
||||
EQU ADCCaddr 0000002a
|
||||
EQU ERDYaddr 0000002c
|
||||
EQU ACIaddr 0000002e
|
||||
EQU OC1Caddr 00000030
|
||||
EQU ICP3addr 00000032
|
||||
EQU OC3Aaddr 00000034
|
||||
EQU OC3Baddr 00000036
|
||||
EQU OC3Caddr 00000038
|
||||
EQU OVF3addr 0000003a
|
||||
EQU URXC1addr 0000003c
|
||||
EQU UDRE1addr 0000003e
|
||||
EQU UTXC1addr 00000040
|
||||
EQU TWIaddr 00000042
|
||||
EQU SPMRaddr 00000044
|
||||
EQU INT_VECTORS_SIZE 00000046
|
||||
DEF mpr r16
|
||||
DEF dataloopcountreg r23
|
||||
EQU datamemstart 00000100
|
||||
EQU stringlen 00000020
|
||||
CSEG INIT 00000046
|
||||
CSEG LCDInit 00000062
|
||||
CSEG STRING_BEG 00000052
|
||||
CSEG INIT_MEMCOPYLOOP 0000004c
|
||||
CSEG MAIN 00000050
|
||||
CSEG LCDWrite 000000a1
|
||||
CSEG STRING_END 00000062
|
||||
DEF wait r17
|
||||
DEF count r18
|
||||
DEF line r19
|
||||
DEF type r20
|
||||
DEF q r21
|
||||
DEF r r22
|
||||
EQU LCDLine1 00000080
|
||||
EQU LCDLine2 000000c0
|
||||
EQU LCDClear 00000001
|
||||
EQU LCDHome 00000002
|
||||
EQU LCDPulse 00000008
|
||||
EQU LCDCmd 00000000
|
||||
EQU LCDTxt 00000001
|
||||
EQU LCDMaxCnt 00000010
|
||||
EQU LCDLn1Addr 00000100
|
||||
EQU LCDLn2Addr 00000110
|
||||
CSEG LCDINIT_L1 0000008d
|
||||
CSEG LCDWait 0000014e
|
||||
CSEG LCDWriteCmd 0000012a
|
||||
CSEG LCDClr 000000c4
|
||||
CSEG LCDWrLn1 000000a4
|
||||
CSEG LCDWrLn2 000000b4
|
||||
CSEG LCDSetLine 00000118
|
||||
CSEG LCDWriteLine 00000124
|
||||
CSEG LCDClrLn1 000000c7
|
||||
CSEG LCDClrLn2 000000d7
|
||||
CSEG LCDClrLine 0000011d
|
||||
CSEG LCDWriteByte 000000e7
|
||||
CSEG LCDWriteByte_3 000000f6
|
||||
CSEG LCDWriteByte_1 000000f0
|
||||
CSEG LCDWriteByte_2 000000f3
|
||||
CSEG LCDWriteChar 00000138
|
||||
CSEG Bin2ASCII 000000fa
|
||||
CSEG B2A_1 00000104
|
||||
CSEG B2A_3 0000010b
|
||||
CSEG B2A_2 00000109
|
||||
CSEG div10 00000156
|
||||
CSEG LCDClrLine_1 0000011f
|
||||
CSEG LCDWriteLine_1 00000125
|
||||
CSEG LCDWriteData 00000141
|
||||
CSEG LCDWC_L1 00000130
|
||||
CSEG LCDW_L1 0000014f
|
||||
CSEG LCDW_L2 00000150
|
||||
CSEG div10_1 00000175
|
||||
CSEG div10_2 0000017a
|
||||
Binary file not shown.
@@ -0,0 +1,63 @@
|
||||
<ASSEMBLER_INFO>
|
||||
<VERSION>2.2.7</VERSION>
|
||||
<DEVICE>"ATmega128"</DEVICE>
|
||||
<WORKING_DIR>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Debug</WORKING_DIR>
|
||||
<INCLUDE_PATH>
|
||||
<DIR>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</DIR>
|
||||
<DIR>C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include</DIR>
|
||||
<DIR></DIR>
|
||||
</INCLUDE_PATH>
|
||||
<SOURCE_FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</SOURCE_FILE>
|
||||
<INCLUDED_FILES>
|
||||
<FILE>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</FILE>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE>
|
||||
</INCLUDED_FILES>
|
||||
<OBJECT_FILES>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Debug\Corwin_Perren_Lab4_sourcecode.obj</FILE>
|
||||
</OBJECT_FILES>
|
||||
<HEX_FILES>
|
||||
<FILE>Corwin_Perren_Lab4_sourcecode.hex</FILE>
|
||||
</HEX_FILES>
|
||||
<OUTPUT_FILES>
|
||||
<FILE>Corwin_Perren_Lab4_sourcecode.map</FILE>
|
||||
<FILE>Corwin_Perren_Lab4_sourcecode.lss</FILE>
|
||||
</OUTPUT_FILES>
|
||||
<LABELS>
|
||||
<INIT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>45</LINE></INIT>
|
||||
<LCDInit><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>75</LINE></LCDInit>
|
||||
<STRING_BEG><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>101</LINE></STRING_BEG>
|
||||
<INIT_MEMCOPYLOOP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>65</LINE></INIT_MEMCOPYLOOP>
|
||||
<MAIN><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>82</LINE></MAIN>
|
||||
<LCDWrite><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>170</LINE></LCDWrite>
|
||||
<STRING_END><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>103</LINE></STRING_END>
|
||||
<LCDINIT_L1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>139</LINE></LCDINIT_L1>
|
||||
<LCDWait><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>492</LINE></LCDWait>
|
||||
<LCDWriteCmd><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>436</LINE></LCDWriteCmd>
|
||||
<LCDClr><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>230</LINE></LCDClr>
|
||||
<LCDWrLn1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>180</LINE></LCDWrLn1>
|
||||
<LCDWrLn2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>205</LINE></LCDWrLn2>
|
||||
<LCDSetLine><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>388</LINE></LCDSetLine>
|
||||
<LCDWriteLine><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>423</LINE></LCDWriteLine>
|
||||
<LCDClrLn1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>240</LINE></LCDClrLn1>
|
||||
<LCDClrLn2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>265</LINE></LCDClrLn2>
|
||||
<LCDClrLine><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>404</LINE></LCDClrLine>
|
||||
<LCDWriteByte><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>302</LINE></LCDWriteByte>
|
||||
<LCDWriteByte_3><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>323</LINE></LCDWriteByte_3>
|
||||
<LCDWriteByte_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>313</LINE></LCDWriteByte_1>
|
||||
<LCDWriteByte_2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>318</LINE></LCDWriteByte_2>
|
||||
<LCDWriteChar><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>457</LINE></LCDWriteChar>
|
||||
<Bin2ASCII><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>339</LINE></Bin2ASCII>
|
||||
<B2A_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>352</LINE></B2A_1>
|
||||
<B2A_3><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>360</LINE></B2A_3>
|
||||
<B2A_2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>357</LINE></B2A_2>
|
||||
<div10><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>515</LINE></div10>
|
||||
<LCDClrLine_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>407</LINE></LCDClrLine_1>
|
||||
<LCDWriteLine_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>425</LINE></LCDWriteLine_1>
|
||||
<LCDWriteData><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>472</LINE></LCDWriteData>
|
||||
<LCDWC_L1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>443</LINE></LCDWC_L1>
|
||||
<LCDW_L1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>493</LINE></LCDW_L1>
|
||||
<LCDW_L2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>494</LINE></LCDW_L2>
|
||||
<div10_1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>554</LINE></div10_1>
|
||||
<div10_2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 4\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\LCDDriver.asm</FILE><LINE>560</LINE></div10_2>
|
||||
</LABELS>
|
||||
</ASSEMBLER_INFO>
|
||||
@@ -0,0 +1,561 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* LCDDriver.asm - V2.0
|
||||
;*
|
||||
;* Contains the neccessary functions to display text to a
|
||||
;* 2 x 16 character LCD Display. Additional functions
|
||||
;* include a conversion routine from an unsigned 8-bit
|
||||
;* binary number to and ASCII text string.
|
||||
;*
|
||||
;* Version 2.0 - Added support for accessing the LCD
|
||||
;* Display via the serial port. See version 1.0 for
|
||||
;* accessing a memory mapped LCD display.
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: David Zier
|
||||
;* Date: March 17, 2003
|
||||
;* Company: TekBots(TM), Oregon State University - EECS
|
||||
;* Version: 2.0
|
||||
;*
|
||||
;***********************************************************
|
||||
;* Rev Date Name Description
|
||||
;*----------------------------------------------------------
|
||||
;* - 8/20/02 Zier Initial Creation of Version 1.0
|
||||
;* A 3/7/03 Zier V2.0 - Updated for USART LCD
|
||||
;*
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;* NOTE: A register MUST be named 'mpr' in the Main Code
|
||||
;* It is recomended to use register r16.
|
||||
;* WARNING: Register r17-r22 are reserved and cannot be
|
||||
;* renamed outside of the LCD Driver functions. Doing
|
||||
;* so will damage the functionality of the LCD Driver
|
||||
;***********************************************************
|
||||
.def wait = r17 ; Wait Loop Register
|
||||
.def count = r18 ; Character Counter
|
||||
.def line = r19 ; Line Select Register
|
||||
.def type = r20 ; LCD data type: Command or Text
|
||||
.def q = r21 ; Quotient for div10
|
||||
.def r = r22 ; Remander for div10
|
||||
|
||||
.equ LCDLine1 = $80 ; LCD Line 1 select command
|
||||
.equ LCDLine2 = $c0 ; LCD Line 2 select command
|
||||
.equ LCDClear = $01 ; LCD Clear Command
|
||||
.equ LCDHome = $02 ; LCD Set Cursor Home Command
|
||||
.equ LCDPulse = $08 ; LCD Pulse signal, used to simulate
|
||||
; write signal
|
||||
|
||||
.equ LCDCmd = $00 ; Constant used to write a command
|
||||
.equ LCDTxt = $01 ; Constant used to write a text character
|
||||
|
||||
.equ LCDMaxCnt = 16 ; Maximum number of characters per line
|
||||
.equ LCDLn1Addr = $0100 ; Beginning address for Line 1 data
|
||||
.equ LCDLn2Addr = $0110 ; Beginning address for Line 2 data
|
||||
|
||||
;-----------------------------------------------------------
|
||||
;***********************************************************
|
||||
;* Public LCD Driver Suboutines and Functions
|
||||
;* These functions and subroutines can be called safely
|
||||
;* from within any program
|
||||
;***********************************************************
|
||||
;-----------------------------------------------------------
|
||||
|
||||
|
||||
;*******************************************************
|
||||
;* SubRt: LCDInit
|
||||
;* Desc: Initialize the Serial Port and the Hitachi
|
||||
;* Display 8 Bit inc DD-RAM
|
||||
;* Pointer with no features
|
||||
;* - 2 LInes with 16 characters
|
||||
;*******************************************************
|
||||
LCDInit:
|
||||
push mpr ; Save the state of machine
|
||||
in mpr, SREG ; Save the SREG
|
||||
push mpr ;
|
||||
push wait ; Save wait
|
||||
|
||||
; Setup the Communication Ports
|
||||
; Port B: Output
|
||||
; Port D: Input w/ internal pullup resistors
|
||||
; Port F: Output on Pin 3
|
||||
ldi mpr, $00 ; Initialize Port B for outputs
|
||||
out PORTB, mpr ; Port B outputs high
|
||||
ldi mpr, $ff ; except for any overrides
|
||||
out DDRB, mpr ;
|
||||
ldi mpr, $00 ; Initialize Port D for inputs
|
||||
out PORTD, mpr ; with Tri-State
|
||||
ldi mpr, $00 ; except for any overrides
|
||||
out DDRD, mpr ;
|
||||
ldi mpr, $00 ; Initialize Port F Pin 3 to
|
||||
sts PORTF, mpr ; output inorder to twiddle the
|
||||
ldi mpr, (1<<DDF3) ; LCD interface
|
||||
sts DDRF, mpr ; Must NOT override this port
|
||||
|
||||
; Setup the Serial Functionality
|
||||
; SPI Type: Master
|
||||
; SPI Clock Rate: 2*1000.000 kHz
|
||||
; SPI Clock Phase: Cycle Half
|
||||
; SPI Clock Polarity: Low
|
||||
; SPI Data Order: MSB First
|
||||
ldi mpr, (1<<SPE|1<<MSTR)
|
||||
out SPCR, mpr ; Set Serial Port Control Register
|
||||
ldi mpr, (1<<SPI2X)
|
||||
out SPSR, mpr ; Set Serial Port Status Register
|
||||
|
||||
; Setup External SRAM configuration
|
||||
; $0460 - $7FFF / $8000 - $FFFF
|
||||
; Lower page wait state(s): None
|
||||
; Uppoer page wait state(s): 2r/w
|
||||
ldi mpr, (1<<SRE) ;
|
||||
out MCUCR, mpr ; Initialize MCUCR
|
||||
ldi mpr, (1<<SRL2|1<<SRW11)
|
||||
sts XMCRA, mpr ; Initialize XMCRA
|
||||
ldi mpr, (1<<XMBK) ;
|
||||
sts XMCRB, mpr ; Initialize XMCRB
|
||||
|
||||
; Initialize USART0
|
||||
; Communication Parameter: 8 bit, 1 stop, No Parity
|
||||
; USART0 Rx: On
|
||||
; USART0 Tx: On
|
||||
; USART0 Mode: Asynchronous
|
||||
; USART0 Baudrate: 9600
|
||||
ldi mpr, $00 ;
|
||||
out UCSR0A, mpr ; Init UCSR0A
|
||||
ldi mpr, (1<<RXEN0|1<<TXEN0)
|
||||
out UCSR0B, mpr ; Init UCSR0B
|
||||
ldi mpr, (1<<UCSZ01|1<<UCSZ00)
|
||||
sts UCSR0C, mpr ; Init UCSR0C
|
||||
ldi mpr, $00 ;
|
||||
sts UBRR0H, mpr ; Init UBRR0H
|
||||
ldi mpr, $67 ;
|
||||
out UBRR0L, mpr ; Init UBRR0L
|
||||
|
||||
; Initialize the LCD Display
|
||||
ldi mpr, 6 ;
|
||||
LCDINIT_L1:
|
||||
ldi wait, 250 ; 15ms of Display
|
||||
rcall LCDWait ; Bootup wait
|
||||
dec mpr ;
|
||||
brne LCDINIT_L1 ;
|
||||
|
||||
ldi mpr, $38 ; Display Mode set
|
||||
rcall LCDWriteCmd ;
|
||||
ldi mpr, $08 ; Display Off
|
||||
rcall LCDWriteCmd ;
|
||||
ldi mpr, $01 ; Display Clear
|
||||
rcall LCDWriteCmd ;
|
||||
ldi mpr, $06 ; Entry mode set
|
||||
rcall LCDWriteCmd ;
|
||||
ldi mpr, $0c ; Display on
|
||||
rcall LCDWriteCmd ;
|
||||
rcall LCDClr ; Clear display
|
||||
|
||||
pop wait ; Restore wait
|
||||
pop mpr ; Restore SREG
|
||||
out SREG, mpr ;
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from subroutine
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWrite
|
||||
;* Desc: Generic Write Function that writes both lines
|
||||
;* of text out to the LCD
|
||||
;* - Line 1 data is in address space $0100-$010F
|
||||
;* - Line 2 data is in address space $0110-$010F
|
||||
;*******************************************************
|
||||
LCDWrite:
|
||||
rcall LCDWrLn1 ; Write Line 1
|
||||
rcall LCDWrLn2 ; Write Line 2
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWrLn1
|
||||
;* Desc: This function will write the first line of
|
||||
;* data to the first line of the LCD Display
|
||||
;*******************************************************
|
||||
LCDWrLn1:
|
||||
push mpr ; Save mpr
|
||||
push ZL ; Save Z pointer
|
||||
push ZH ;
|
||||
push count ; Save the count register
|
||||
push line ; Save the line register
|
||||
|
||||
ldi ZL, low(LCDLn1Addr)
|
||||
ldi ZH, high(LCDLn1Addr)
|
||||
ldi line, LCDLine1 ; Set LCD line to Line 1
|
||||
rcall LCDSetLine ; Restart at the beginning of line 1
|
||||
rcall LCDWriteLine ; Write the line of text
|
||||
|
||||
pop line
|
||||
pop count ; Restore the counter
|
||||
pop ZH ; Restore Z pointer
|
||||
pop ZL ;
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWrLn2
|
||||
;* Desc: This function will write the second line of
|
||||
;* data to the second line of the LCD Display
|
||||
;*******************************************************
|
||||
LCDWrLn2:
|
||||
push mpr ; Save mpr
|
||||
push ZL ; Save Z pointer
|
||||
push ZH ;
|
||||
push count ; Save the count register
|
||||
push line ; Save the line register
|
||||
|
||||
ldi ZL, low(LCDLn2Addr)
|
||||
ldi ZH, high(LCDLn2Addr)
|
||||
ldi line, LCDLine2 ; Set LCD line to Line 2
|
||||
rcall LCDSetLine ; Restart at the beginning of line 2
|
||||
rcall LCDWriteLine ; Write the line of text
|
||||
|
||||
pop line
|
||||
pop count ; Restore the counter
|
||||
pop ZH ; Restore Z pointer
|
||||
pop ZL ;
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDClr
|
||||
;* Desc: Generic Clear Subroutine that clears both
|
||||
;* lines of the LCD and Data Memory storage area
|
||||
;*******************************************************
|
||||
LCDClr:
|
||||
rcall LCDClrLn1 ; Clear Line 1
|
||||
rcall LCDClrLn2 ; Clear Line 2
|
||||
ret ; Return from Subroutine
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDClrLn1
|
||||
;* Desc: This subroutine will clear the first line of
|
||||
;* the data and the first line of the LCD Display
|
||||
;*******************************************************
|
||||
LCDClrLn1:
|
||||
push mpr ; Save mpr
|
||||
push line ; Save line register
|
||||
push count ; Save the count register
|
||||
push ZL ; Save Z pointer
|
||||
push ZH ;
|
||||
|
||||
ldi line, LCDline1 ; Set Access to Line 1 of LCD
|
||||
rcall LCDSetLine ; Set Z pointer to address of line 1 data
|
||||
ldi ZL, low(LCDLn1Addr)
|
||||
ldi ZH, high(LCDLn1Addr)
|
||||
rcall LCDClrLine ; Call the Clear Line function
|
||||
|
||||
pop ZH ; Restore Z pointer
|
||||
pop ZL ;
|
||||
pop count ; Restore the count register
|
||||
pop line ; Restore line register
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from Subroutine
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDClrLn2
|
||||
;* Desc: This subroutine will clear the second line of
|
||||
;* the data and the second line of the LCD Display
|
||||
;*******************************************************
|
||||
LCDClrLn2:
|
||||
push mpr ; Save mpr
|
||||
push line ; Save line register
|
||||
push count ; Save the count register
|
||||
push ZL ; Save Z pointer
|
||||
push ZH ;
|
||||
|
||||
ldi line, LCDline2 ; Set Access to Line 2 of LCD
|
||||
rcall LCDSetLine ; Set Z pointer to address of line 2 data
|
||||
ldi ZL, low(LCDLn2Addr)
|
||||
ldi ZH, high(LCDLn2Addr)
|
||||
rcall LCDClrLine ; Call the Clear Line function
|
||||
|
||||
pop ZH ; Restore Z pointer
|
||||
pop ZL ;
|
||||
pop count ; Restore the count register
|
||||
pop line ; Restore line register
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from Subroutine
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteByte
|
||||
;* Desc: This is a complex and low level function that
|
||||
;* allows any program to write any ASCII character
|
||||
;* (Byte) anywhere in the LCD Display. There
|
||||
;* are several things that need to be initialized
|
||||
;* before this function is called:
|
||||
;* count - Holds the index value of the line to where
|
||||
;* the char is written, 0-15(39). i.e. if
|
||||
;* count has the value of 3, then the char is
|
||||
;* going to be written to the third element of
|
||||
;* the line.
|
||||
;* line - Holds the line number that the char is going
|
||||
;* to be written to, (1 or 2).
|
||||
;* mpr - Contains the value of the ASCII character to
|
||||
;* be written (0-255)
|
||||
;*********************************************************
|
||||
LCDWriteByte:
|
||||
push mpr ; Save the mpr
|
||||
push line ; Save the line
|
||||
push count ; Save the count
|
||||
; Preform sanity checks on count and line
|
||||
cpi count, 40 ; Make sure count is within range
|
||||
brsh LCDWriteByte_3 ; Do nothing and exit function
|
||||
cpi line, 1 ; If (line == 1)
|
||||
brne LCDWriteByte_1 ;
|
||||
ldi line, LCDLine1 ; Load line 1 base LCD Address
|
||||
rjmp LCDWriteByte_2 ; Continue on with function
|
||||
LCDWriteByte_1:
|
||||
cpi line, 2 ; If (line == 2)
|
||||
brne LCDWriteByte_3 ; Do nothing and exit function
|
||||
ldi line, LCDLine2 ; Load line 2 base LCD Address
|
||||
|
||||
LCDWriteByte_2: ; Write char to LCD
|
||||
add line, count ; Set the correct LCD address
|
||||
rcall LCDSetLine ; Set the line address to LCD
|
||||
rcall LCDWriteChar ; Write Char to LCD Display
|
||||
|
||||
LCDWriteByte_3: ; Exit Function
|
||||
pop count ; Restore the count
|
||||
pop line ; Restore the line
|
||||
pop mpr ; Restore the mpr
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: Bin2ASCII
|
||||
;* Desc: Converts a binary number into an ASCII
|
||||
;* text string equivalent.
|
||||
;* - The binary number needs to be in the mpr
|
||||
;* - The Start Address of where the text will
|
||||
;* be placed needs to be in the X Register
|
||||
;* - The count of the characters created are
|
||||
;* added to the count register
|
||||
;*******************************************************
|
||||
Bin2ASCII:
|
||||
push mpr ; save mpr
|
||||
push r ; save r
|
||||
push q ; save q
|
||||
push XH ; save X-pointer
|
||||
push XL ;
|
||||
|
||||
; Determine the range of mpr
|
||||
cpi mpr, 100 ; is mpr >= 100
|
||||
brlo B2A_1 ; goto next check
|
||||
ldi count, 3 ; Three chars are written
|
||||
adiw XL, 3 ; Increment X 3 address spaces
|
||||
rjmp B2A_3 ; Continue with program
|
||||
B2A_1: cpi mpr, 10 ; is mpr >= 10
|
||||
brlo B2A_2 ; Continue with program
|
||||
ldi count, 2 ; Two chars are written
|
||||
adiw XL, 2 ; Increment X 2 address spaces
|
||||
rjmp B2A_3 ; Continue with program
|
||||
B2A_2: adiw XL, 1 ; Increment X 1 address space
|
||||
ldi count, 1 ; One char is written
|
||||
|
||||
B2A_3: ;Do-While statement that converts Binary to ASCII
|
||||
rcall div10 ; Call the div10 function
|
||||
ldi mpr, '0' ; Set the base ASCII integer value
|
||||
add mpr, r ; Create the ASCII integer value
|
||||
st -X, mpr ; Load ASCII value to memory
|
||||
mov mpr, q ; Set mpr to quotiant value
|
||||
cpi mpr, 0 ; does mpr == 0
|
||||
brne B2A_3 ; do while (mpr != 0)
|
||||
|
||||
pop XL ; restore X-pointer
|
||||
pop XH ;
|
||||
pop q ; restore q
|
||||
pop r ; restore r
|
||||
pop mpr ; restore mpr
|
||||
ret ; return from function
|
||||
|
||||
;-------------------------------------------------------
|
||||
;*******************************************************
|
||||
;* Private LCD Driver Functions and Subroutines
|
||||
;* NOTE: It is not recommended to call these functions
|
||||
;* or subroutines, only call the Public ones.
|
||||
;*******************************************************
|
||||
;-------------------------------------------------------
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDSetLine
|
||||
;* Desc: Change line to be written to
|
||||
;*******************************************************
|
||||
LCDSetLine:
|
||||
push mpr ; Save mpr
|
||||
mov mpr,line ; Copy Command Data to mpr
|
||||
rcall LCDWriteCmd ; Write the Command
|
||||
pop mpr ; Restore the mpr
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDClrLine
|
||||
;* Desc: Manually clears a single line within an LCD
|
||||
;* Display and Data Memory by writing 16
|
||||
;* consecutive ASCII spaces $20 to both the LCD
|
||||
;* and the memory. The line to be cleared must
|
||||
;* first be set in the LCD and the Z pointer is
|
||||
;* pointing the first element in Data Memory
|
||||
;*******************************************************
|
||||
LCDClrLine:
|
||||
ldi mpr, ' ' ; The space char to be written
|
||||
ldi count, LCDMaxCnt; The character count
|
||||
LCDClrLine_1:
|
||||
st Z+, mpr ; Clear data memory element
|
||||
rcall LCDWriteChar ; Clear LCD memory element
|
||||
dec count ; Decrement the count
|
||||
brne LCDClrLine_1 ; Continue untill all elements are cleared
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteLine
|
||||
;* Desc: Writes a line of text to the LCD Display.
|
||||
;* This routine takes a data element pointed to
|
||||
;* by the Z-pointer and copies it to the LCD
|
||||
;* Display for the duration of the line. The
|
||||
;* line the Z-pointer must be set prior to the
|
||||
;* function call.
|
||||
;*******************************************************
|
||||
LCDWriteLine:
|
||||
ldi count, LCDMaxCnt; The character count
|
||||
LCDWriteLine_1:
|
||||
ld mpr, Z+ ; Get the data element
|
||||
rcall LCDWriteChar ; Write element to LCD Display
|
||||
dec count ; Decrement the count
|
||||
brne LCDWriteLine_1 ; Continue untill all elements are written
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteCmd
|
||||
;* Desc: Write command that is in the mpr to LCD
|
||||
;*******************************************************
|
||||
LCDWriteCmd:
|
||||
push type ; Save type register
|
||||
push wait ; Save wait register
|
||||
ldi type, LCDCmd ; Set type to Command data
|
||||
rcall LCDWriteData ; Write data to LCD
|
||||
push mpr ; Save mpr register
|
||||
ldi mpr, 2 ; Wait approx. 4.1 ms
|
||||
LCDWC_L1:
|
||||
ldi wait, 205 ; Wait 2050 us
|
||||
rcall LCDWait ;
|
||||
dec mpr ; The wait loop cont.
|
||||
brne LCDWC_L1 ;
|
||||
pop mpr ; Restore mpr
|
||||
pop wait ; Restore wait register
|
||||
pop type ; Restore type register
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteChar
|
||||
;* Desc: Write character data that is in the mpr
|
||||
;*******************************************************
|
||||
LCDWriteChar:
|
||||
push type ; Save type register
|
||||
push wait ; Save the wait register
|
||||
ldi type, LCDTxt ; Set type to Text data
|
||||
rcall LCDWriteData ; Write data to LCD
|
||||
ldi wait, 16 ; Delay 160 us
|
||||
rcall LCDWait ;
|
||||
pop wait ; Restore wait register
|
||||
pop type ; Restore type register
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWriteData
|
||||
;* Desc: Write data or command to LCD
|
||||
;*******************************************************
|
||||
LCDWriteData:
|
||||
out SPDR, type ; Send type to SP
|
||||
ldi wait, 2 ; Wait 2 us
|
||||
rcall LCDWait ; Call Wait function
|
||||
out SPDR,mpr ; Send data to serial port
|
||||
ldi wait, 2 ; Wait 2 us
|
||||
rcall LCDWait ; Call Wait function
|
||||
ldi wait, LCDPulse ; Use wait temporarially to
|
||||
sts PORTF, wait ; to send write pulse to LCD
|
||||
ldi wait, $00 ;
|
||||
sts PORTF, wait ;
|
||||
ret ; Return from function
|
||||
|
||||
;*******************************************************
|
||||
;* Func: LCDWait
|
||||
;* Desc: A wait loop that is 10 + 159*wait cycles or
|
||||
;* roughly wait*10us. Just initialize wait
|
||||
;* for the specific amount of time in 10us
|
||||
;* intervals.
|
||||
;*******************************************************
|
||||
LCDWait:push mpr ; Save mpr
|
||||
LCDW_L1:ldi mpr, $49 ; Load with a 10us value
|
||||
LCDW_L2:dec mpr ; Inner Wait Loop
|
||||
brne LCDW_L2
|
||||
dec wait ; Outer Wait Loop
|
||||
brne LCDW_L1
|
||||
pop mpr ; Restore mpr
|
||||
ret ; Return from Wait Function
|
||||
|
||||
;*******************************************************
|
||||
;* Bin2ASCII routines that can be used as a psuedo-
|
||||
;* printf function to convert an 8-bit binary
|
||||
;* number into the unigned decimal ASCII text
|
||||
;*******************************************************
|
||||
|
||||
;***********************************************************
|
||||
;* Func: div10
|
||||
;* Desc: Divides the value in the mpr by 10 and
|
||||
;* puts the remander in the 'r' register and
|
||||
;* and the quotiant in the 'q' register.
|
||||
;* DO NOT modify this function, trust me, it does
|
||||
;* divide by 10 :) ~DZ
|
||||
;***********************************************************
|
||||
div10:
|
||||
push r0 ; Save register
|
||||
|
||||
; q = mpr / 10 = mpr * 0.000110011001101b
|
||||
mov q, mpr ; q = mpr * 1.0b
|
||||
lsr q ; q >> 2
|
||||
lsr q ; q = mpr * 0.01b
|
||||
add q, mpr ; q = (q + mpr) >> 1
|
||||
lsr q ; q = mpr * 0.101b
|
||||
add q, mpr ; q = (q + mpr) >> 3
|
||||
lsr q
|
||||
lsr q
|
||||
lsr q ; q = mpr * 0.001101b
|
||||
add q, mpr ; q = (q + mpr) >> 1
|
||||
lsr q ; q = mpr * 0.1001101b
|
||||
add q, mpr ; q = (q + mpr) >> 3
|
||||
lsr q
|
||||
lsr q
|
||||
lsr q ; q = mpr * 0.0011001101b
|
||||
add q, mpr ; q = (q + mpr) >> 1
|
||||
lsr q ; q = mpr * 0.10011001101b
|
||||
add q, mpr ; q = (q + mpr) >> 4
|
||||
lsr q
|
||||
lsr q
|
||||
lsr q
|
||||
lsr q ; q = mpr * 0.000110011001101b
|
||||
|
||||
; compute the remainder as r = i - 10 * q
|
||||
; calculate r = q * 10 = q * 1010b
|
||||
mov r, q ; r = q * 1
|
||||
lsl r ; r << 2
|
||||
lsl r ; r = q * 100b
|
||||
add r, q ; r = (r + q) << 1
|
||||
lsl r ; r = q * 1010b
|
||||
mov r0, r ; r0 = 10 * q
|
||||
mov r, mpr ; r = mpr
|
||||
sub r, r0 ; r = mpr - 10 * q
|
||||
|
||||
; Fix any errors that occur
|
||||
div10_1:cpi r, 10 ; Compare with 10
|
||||
brlo div10_2 ; do nothing if r < 10
|
||||
inc q ; fix qoutient
|
||||
subi r, 10 ; fix remainder
|
||||
rjmp div10_1 ; Continue until error is corrected
|
||||
|
||||
div10_2:pop r0 ; Restore registers
|
||||
ret ; Return from function
|
||||
@@ -0,0 +1,31 @@
|
||||
<ASSEMBLER_INFO>
|
||||
<VERSION>2.2.7</VERSION>
|
||||
<DEVICE>"ATmega128"</DEVICE>
|
||||
<WORKING_DIR>c:\users\caperren\Documents\Atmel Studio\7.0\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Release</WORKING_DIR>
|
||||
<INCLUDE_PATH>
|
||||
<DIR>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</DIR>
|
||||
<DIR>C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include</DIR>
|
||||
<DIR></DIR>
|
||||
</INCLUDE_PATH>
|
||||
<SOURCE_FILE>c:\users\caperren\Documents\Atmel Studio\7.0\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</SOURCE_FILE>
|
||||
<INCLUDED_FILES>
|
||||
<FILE>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</FILE>
|
||||
</INCLUDED_FILES>
|
||||
<OBJECT_FILES>
|
||||
<FILE>c:\users\caperren\Documents\Atmel Studio\7.0\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Release\Corwin_Perren_Lab4_sourcecode.obj</FILE>
|
||||
</OBJECT_FILES>
|
||||
<HEX_FILES>
|
||||
<FILE>Corwin_Perren_Lab4_sourcecode.hex</FILE>
|
||||
</HEX_FILES>
|
||||
<OUTPUT_FILES>
|
||||
<FILE>Corwin_Perren_Lab4_sourcecode.map</FILE>
|
||||
<FILE>Corwin_Perren_Lab4_sourcecode.lss</FILE>
|
||||
</OUTPUT_FILES>
|
||||
<LABELS>
|
||||
<INIT><FILE>c:\users\caperren\Documents\Atmel Studio\7.0\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>40</LINE></INIT>
|
||||
<MAIN><FILE>c:\users\caperren\Documents\Atmel Studio\7.0\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>60</LINE></MAIN>
|
||||
<FUNC><FILE>c:\users\caperren\Documents\Atmel Studio\7.0\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>77</LINE></FUNC>
|
||||
<STRING_BEG><FILE>c:\users\caperren\Documents\Atmel Studio\7.0\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>95</LINE></STRING_BEG>
|
||||
<STRING_END><FILE>c:\users\caperren\Documents\Atmel Studio\7.0\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode\Corwin_Perren_Lab4_sourcecode.asm</FILE><LINE>97</LINE></STRING_END>
|
||||
</LABELS>
|
||||
</ASSEMBLER_INFO>
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{18226A42-8477-4023-8AD2-40C49DA407C9}") = "Corwin_Perren_Lab5_sourcecode", "Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asmproj", "{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
Release|AVR = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,601 @@
|
||||
;***********************************************************
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Corwin_Perren_Lab5_sourcecode.asm
|
||||
;*
|
||||
;* The program performs 16 bit addition/subtraction,
|
||||
;* and 24-bit multiplication.
|
||||
;*
|
||||
;* This is the skeleton file for Lab 5 of ECE 375
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: Corwin Perren
|
||||
;* Date: 10/29/18
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
.include "m128def.inc" ; Include definition file
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;***********************************************************
|
||||
.def mpr = r16 ; Multipurpose register
|
||||
.def rlo = r0 ; Low byte of MUL result
|
||||
.def rhi = r1 ; High byte of MUL result
|
||||
.def zero = r2 ; Zero register, set to zero in INIT, useful for calculations
|
||||
.def A = r3 ; A variable
|
||||
.def B = r4 ; Another variable
|
||||
.def C = r5 ; Another another variable
|
||||
.def D = r6 ; Another another another variable
|
||||
|
||||
.def oloop = r17 ; Outer Loop Counter
|
||||
.def iloop = r18 ; Inner Loop Counter
|
||||
|
||||
|
||||
;***********************************************************
|
||||
;* Start of Code Segment
|
||||
;***********************************************************
|
||||
.cseg ; Beginning of code segment
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Interrupt Vectors
|
||||
;-----------------------------------------------------------
|
||||
.org $0000 ; Beginning of IVs
|
||||
rjmp INIT ; Reset interrupt
|
||||
|
||||
.org $0046 ; End of Interrupt Vectors
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Program Initialization
|
||||
;-----------------------------------------------------------
|
||||
INIT: ; The initialization routine
|
||||
; Initialize Stack
|
||||
ldi mpr, low(RAMEND) ; Init the 2 stack pointer registers
|
||||
out SPL, mpr
|
||||
ldi mpr, high(RAMEND)
|
||||
out SPH, mpr
|
||||
|
||||
clr zero ; Set the zero register to zero, maintain
|
||||
; these semantics, meaning, don't
|
||||
; load anything else into it.
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Main Program
|
||||
;-----------------------------------------------------------
|
||||
MAIN: ; The Main program
|
||||
; Setup the ADD16 function direct test
|
||||
|
||||
; Move values 0xA2FF and 0xF477 in program memory to data memory
|
||||
; memory locations where ADD16 will get its inputs from
|
||||
; (see "Data Memory Allocation" section below)
|
||||
;;;;; Operand 1
|
||||
ldi ZL, low(Add16_Operand1 << 1)
|
||||
ldi ZH, high(Add16_Operand1 << 1)
|
||||
ldi YL, low(ADD16_OP1)
|
||||
ldi YH, high(ADD16_OP1)
|
||||
|
||||
; Two bytes to load
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
|
||||
;;;;; Operand 2
|
||||
ldi ZL, low(Add16_Operand2 << 1)
|
||||
ldi ZH, high(Add16_Operand2 << 1)
|
||||
ldi YL, low(ADD16_OP2)
|
||||
ldi YH, high(ADD16_OP2)
|
||||
|
||||
; Two bytes to load
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
|
||||
|
||||
nop ; Check load ADD16 operands (Set Break point here #1)
|
||||
; Call ADD16 function to test its correctness
|
||||
; (calculate A2FF + F477)
|
||||
|
||||
call ADD16
|
||||
|
||||
nop ; Check ADD16 result (Set Break point here #2)
|
||||
; Observe result in Memory window
|
||||
|
||||
; Setup the SUB16 function direct test
|
||||
|
||||
; Move values 0xF08A and 0x4BCD in program memory to data memory
|
||||
; memory locations where SUB16 will get its inputs from
|
||||
;;;;; Operand 1
|
||||
ldi ZL, low(Sub16_Operand1 << 1)
|
||||
ldi ZH, high(Sub16_Operand1 << 1)
|
||||
ldi YL, low(SUB16_OP1)
|
||||
ldi YH, high(SUB16_OP1)
|
||||
|
||||
; Two bytes to load
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
|
||||
;;;; Operand 2
|
||||
ldi ZL, low(Sub16_Operand2 << 1)
|
||||
ldi ZH, high(Sub16_Operand2 << 1)
|
||||
ldi YL, low(SUB16_OP2)
|
||||
ldi YH, high(SUB16_OP2)
|
||||
|
||||
; Two bytes to load
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
|
||||
nop ; Check load SUB16 operands (Set Break point here #3)
|
||||
; Call SUB16 function to test its correctness
|
||||
; (calculate F08A - 4BCD)
|
||||
|
||||
call SUB16
|
||||
|
||||
nop ; Check SUB16 result (Set Break point here #4)
|
||||
; Observe result in Memory window
|
||||
|
||||
; Setup the MUL24 function direct test
|
||||
|
||||
; Move values 0xFFFFFF and 0xFFFFFF in program memory to data memory
|
||||
; memory locations where MUL24 will get its inputs from
|
||||
;;;;; Operand 1
|
||||
ldi ZL, low(Mul24_Operand1 << 1)
|
||||
ldi ZH, high(Mul24_Operand1 << 1)
|
||||
ldi YL, low(MUL24_OP1)
|
||||
ldi YH, high(MUL24_OP1)
|
||||
|
||||
; Three bytes to load
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
|
||||
;;;;; Operand 2
|
||||
ldi ZL, low(Mul24_Operand2 << 1)
|
||||
ldi ZH, high(Mul24_Operand2 << 1)
|
||||
ldi YL, low(MUL24_OP2)
|
||||
ldi YH, high(MUL24_OP2)
|
||||
|
||||
; Three bytes to load
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
lpm mpr, Z+
|
||||
ST Y+, mpr
|
||||
|
||||
nop ; Check load MUL24 operands (Set Break point here #5)
|
||||
; Call MUL24 function to test its correctness
|
||||
; (calculate FFFFFF * FFFFFF)
|
||||
|
||||
call MUL24
|
||||
|
||||
nop ; Check MUL24 result (Set Break point here #6)
|
||||
; Observe result in Memory window
|
||||
|
||||
nop ; Check load COMPOUND operands (Set Break point here #7)
|
||||
; Call the COMPOUND function
|
||||
|
||||
nop ; Check COMPUND result (Set Break point here #8)
|
||||
; Observe final result in Memory window
|
||||
|
||||
DONE: rjmp DONE ; Create an infinite while loop to signify the
|
||||
; end of the program.
|
||||
|
||||
;***********************************************************
|
||||
;* Functions and Subroutines
|
||||
;***********************************************************
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: ADD16
|
||||
; Desc: Adds two 16-bit numbers and generates a 24-bit number
|
||||
; where the high byte of the result contains the carry
|
||||
; out bit.
|
||||
;-----------------------------------------------------------
|
||||
ADD16:
|
||||
; Push all regs used
|
||||
push XL
|
||||
push XH
|
||||
push YL
|
||||
push YH
|
||||
push ZL
|
||||
push ZH
|
||||
push A
|
||||
push B
|
||||
push C
|
||||
push D
|
||||
|
||||
|
||||
; Load beginning address of first operand into X
|
||||
ldi XL, low(ADD16_OP1) ; Load low byte of address
|
||||
ldi XH, high(ADD16_OP1) ; Load high byte of address
|
||||
|
||||
; Load beginning address of second operand into Y
|
||||
ldi YL, low(ADD16_OP2) ; Load low byte of address
|
||||
ldi YH, high(ADD16_OP2) ; Load high byte of address
|
||||
|
||||
; Load beginning address of result into Z
|
||||
ldi ZL, low(ADD16_Result) ; Load low byte of address
|
||||
ldi ZH, high(ADD16_Result) ; Load high byte of address
|
||||
|
||||
; Execute the function
|
||||
ld A, X+ ; Get low byte of op1
|
||||
ld B, Y+ ; Get low byte of op2
|
||||
add A, B ; Add low bytes
|
||||
|
||||
ld C, X ; Get high byte of op1
|
||||
ld D, Y ; Get high byte of op2
|
||||
adc C, D ; Add with carry from low byte add
|
||||
|
||||
clr B ; Clear to store carry bit if low byte carry
|
||||
adc B, B ; Get carry bit if it was set
|
||||
|
||||
st Z+, A ; Store lowest byte
|
||||
st Z+, C ; Store middle byte
|
||||
st Z, B ; Store upper byte
|
||||
|
||||
; Pop all regs used
|
||||
pop D
|
||||
pop C
|
||||
pop B
|
||||
pop A
|
||||
pop ZH
|
||||
pop ZL
|
||||
pop YH
|
||||
pop YL
|
||||
pop XH
|
||||
pop XL
|
||||
|
||||
ret ; End a function with RET
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: SUB16
|
||||
; Desc: Subtracts two 16-bit numbers and generates a 16-bit
|
||||
; result.
|
||||
;-----------------------------------------------------------
|
||||
SUB16:
|
||||
; Push all regs used
|
||||
push XL
|
||||
push XH
|
||||
push YL
|
||||
push YH
|
||||
push ZL
|
||||
push ZH
|
||||
push A
|
||||
push B
|
||||
push C
|
||||
push D
|
||||
|
||||
|
||||
; Load beginning address of first operand into X
|
||||
ldi XL, low(SUB16_OP1) ; Load low byte of address
|
||||
ldi XH, high(SUB16_OP1) ; Load high byte of address
|
||||
;adiw XH:XL, 1 ; Move pointer to high byte
|
||||
|
||||
; Load beginning address of second operand into Y
|
||||
ldi YL, low(SUB16_OP2) ; Load low byte of address
|
||||
ldi YH, high(SUB16_OP2) ; Load high byte of address
|
||||
;adiw YH:YL, 1 ; Move pointer to high byte
|
||||
|
||||
; Load beginning address of result into Z
|
||||
ldi ZL, low(SUB16_Result) ; Load low byte of address
|
||||
ldi ZH, high(SUB16_Result) ; Load high byte of address
|
||||
|
||||
; Execute the function
|
||||
ld A, X+ ; Get low byte of op1
|
||||
ld B, Y+ ; Get low byte of op2
|
||||
sub A, B ; Sub low bytes
|
||||
|
||||
ld C, X ; Get high byte of op1
|
||||
ld D, Y ; Get high byte of op2
|
||||
sbc C, D ; Sub with carry from low byte sub
|
||||
|
||||
st Z+, A ; Store lowest byte
|
||||
st Z+, C ; Store middle byte
|
||||
|
||||
; Pop all regs used
|
||||
pop D
|
||||
pop C
|
||||
pop B
|
||||
pop A
|
||||
pop ZH
|
||||
pop ZL
|
||||
pop YH
|
||||
pop YL
|
||||
pop XH
|
||||
pop XL
|
||||
|
||||
ret ; End a function with RET
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: MUL24
|
||||
; Desc: Multiplies two 24-bit numbers and generates a 48-bit
|
||||
; result.
|
||||
;-----------------------------------------------------------
|
||||
MUL24:
|
||||
push A ; Save A register
|
||||
push B ; Save B register
|
||||
push rhi ; Save rhi register
|
||||
push rlo ; Save rlo register
|
||||
push zero ; Save zero register
|
||||
push XH ; Save X-ptr
|
||||
push XL
|
||||
push YH ; Save Y-ptr
|
||||
push YL
|
||||
push ZH ; Save Z-ptr
|
||||
push ZL
|
||||
push oloop ; Save counters
|
||||
push iloop
|
||||
|
||||
clr zero ; Maintain zero semantics
|
||||
|
||||
; Set Y to beginning address of B
|
||||
ldi YL, low(MUL24_OP2) ; Load low byte
|
||||
ldi YH, high(MUL24_OP2) ; Load high byte
|
||||
|
||||
; Set Z to begginning address of resulting Product
|
||||
ldi ZL, low(MUL24_Result) ; Load low byte
|
||||
ldi ZH, high(MUL24_Result); Load high byte
|
||||
|
||||
; Begin outer for loop
|
||||
ldi oloop, 3 ; Load counter
|
||||
MUL24_OLOOP:
|
||||
; Set X to beginning address of A
|
||||
ldi XL, low(MUL24_OP1) ; Load low byte
|
||||
ldi XH, high(MUL24_OP1) ; Load high byte
|
||||
|
||||
; Begin inner for loop
|
||||
ldi iloop, 3 ; Load counter
|
||||
MUL24_ILOOP:
|
||||
ld A, X+ ; Get byte of A operand
|
||||
ld B, Y ; Get byte of B operand
|
||||
mul A,B ; Multiply A and B
|
||||
ld A, Z+ ; Get a result byte from memory
|
||||
ld B, Z+ ; Get the next result byte from memory
|
||||
add rlo, A ; rlo <= rlo + A
|
||||
adc rhi, B ; rhi <= rhi + B + carry
|
||||
ld A, Z ; Get a third byte from the result
|
||||
adc A, zero ; Add carry to A
|
||||
st Z, A ; Store third byte to memory
|
||||
st -Z, rhi ; Store second byte to memory
|
||||
st -Z, rlo ; Store third byte to memory
|
||||
adiw ZH:ZL, 1 ; Z <= Z + 1
|
||||
dec iloop ; Decrement counter
|
||||
brne MUL24_ILOOP ; Loop if iLoop != 0
|
||||
; End inner for loop
|
||||
|
||||
sbiw ZH:ZL, 2 ; Z <= Z - 1
|
||||
adiw YH:YL, 1 ; Y <= Y + 1
|
||||
dec oloop ; Decrement counter
|
||||
brne MUL24_OLOOP ; Loop if oLoop != 0
|
||||
; End outer for loop
|
||||
|
||||
pop iloop ; Restore all registers in reverves order
|
||||
pop oloop
|
||||
pop ZL
|
||||
pop ZH
|
||||
pop YL
|
||||
pop YH
|
||||
pop XL
|
||||
pop XH
|
||||
pop zero
|
||||
pop rlo
|
||||
pop rhi
|
||||
pop B
|
||||
pop A
|
||||
|
||||
ret ; End a function with RET
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: COMPOUND
|
||||
; Desc: Computes the compound expression ((D - E) + F)^2
|
||||
; by making use of SUB16, ADD16, and MUL24.
|
||||
;
|
||||
; D, E, and F are declared in program memory, and must
|
||||
; be moved into data memory for use as input operands.
|
||||
;
|
||||
; All result bytes should be cleared before beginning.
|
||||
;-----------------------------------------------------------
|
||||
COMPOUND:
|
||||
|
||||
; Setup SUB16 with operands D and E
|
||||
; Perform subtraction to calculate D - E
|
||||
|
||||
; Setup the ADD16 function with SUB16 result and operand F
|
||||
; Perform addition next to calculate (D - E) + F
|
||||
|
||||
; Setup the MUL24 function with ADD16 result as both operands
|
||||
; Perform multiplication to calculate ((D - E) + F)^2
|
||||
|
||||
ret ; End a function with RET
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: MUL16
|
||||
; Desc: An example function that multiplies two 16-bit numbers
|
||||
; A - Operand A is gathered from address $0101:$0100
|
||||
; B - Operand B is gathered from address $0103:$0102
|
||||
; Res - Result is stored in address
|
||||
; $0107:$0106:$0105:$0104
|
||||
; You will need to make sure that Res is cleared before
|
||||
; calling this function.
|
||||
;-----------------------------------------------------------
|
||||
MUL16:
|
||||
push A ; Save A register
|
||||
push B ; Save B register
|
||||
push rhi ; Save rhi register
|
||||
push rlo ; Save rlo register
|
||||
push zero ; Save zero register
|
||||
push XH ; Save X-ptr
|
||||
push XL
|
||||
push YH ; Save Y-ptr
|
||||
push YL
|
||||
push ZH ; Save Z-ptr
|
||||
push ZL
|
||||
push oloop ; Save counters
|
||||
push iloop
|
||||
|
||||
clr zero ; Maintain zero semantics
|
||||
|
||||
; Set Y to beginning address of B
|
||||
ldi YL, low(addrB) ; Load low byte
|
||||
ldi YH, high(addrB) ; Load high byte
|
||||
|
||||
; Set Z to begginning address of resulting Product
|
||||
ldi ZL, low(LAddrP) ; Load low byte
|
||||
ldi ZH, high(LAddrP); Load high byte
|
||||
|
||||
; Begin outer for loop
|
||||
ldi oloop, 2 ; Load counter
|
||||
MUL16_OLOOP:
|
||||
; Set X to beginning address of A
|
||||
ldi XL, low(addrA) ; Load low byte
|
||||
ldi XH, high(addrA) ; Load high byte
|
||||
|
||||
; Begin inner for loop
|
||||
ldi iloop, 2 ; Load counter
|
||||
MUL16_ILOOP:
|
||||
ld A, X+ ; Get byte of A operand
|
||||
ld B, Y ; Get byte of B operand
|
||||
mul A,B ; Multiply A and B
|
||||
ld A, Z+ ; Get a result byte from memory
|
||||
ld B, Z+ ; Get the next result byte from memory
|
||||
add rlo, A ; rlo <= rlo + A
|
||||
adc rhi, B ; rhi <= rhi + B + carry
|
||||
ld A, Z ; Get a third byte from the result
|
||||
adc A, zero ; Add carry to A
|
||||
st Z, A ; Store third byte to memory
|
||||
st -Z, rhi ; Store second byte to memory
|
||||
st -Z, rlo ; Store first byte to memory
|
||||
adiw ZH:ZL, 1 ; Z <= Z + 1
|
||||
dec iloop ; Decrement counter
|
||||
brne MUL16_ILOOP ; Loop if iLoop != 0
|
||||
; End inner for loop
|
||||
|
||||
sbiw ZH:ZL, 1 ; Z <= Z - 1
|
||||
adiw YH:YL, 1 ; Y <= Y + 1
|
||||
dec oloop ; Decrement counter
|
||||
brne MUL16_OLOOP ; Loop if oLoop != 0
|
||||
; End outer for loop
|
||||
|
||||
pop iloop ; Restore all registers in reverves order
|
||||
pop oloop
|
||||
pop ZL
|
||||
pop ZH
|
||||
pop YL
|
||||
pop YH
|
||||
pop XL
|
||||
pop XH
|
||||
pop zero
|
||||
pop rlo
|
||||
pop rhi
|
||||
pop B
|
||||
pop A
|
||||
ret ; End a function with RET
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: Template function header
|
||||
; Desc: Cut and paste this and fill in the info at the
|
||||
; beginning of your functions
|
||||
;-----------------------------------------------------------
|
||||
FUNC: ; Begin a function with a label
|
||||
; Save variable by pushing them to the stack
|
||||
|
||||
; Execute the function here
|
||||
|
||||
; Restore variable by popping them from the stack in reverse order
|
||||
ret ; End a function with RET
|
||||
|
||||
|
||||
;***********************************************************
|
||||
;* Stored Program Data
|
||||
;***********************************************************
|
||||
|
||||
; Enter any stored data you might need here
|
||||
|
||||
; ADD16 operands
|
||||
Add16_Operand1:
|
||||
.DW 0xA2FF
|
||||
|
||||
Add16_Operand2:
|
||||
.DW 0xF477
|
||||
|
||||
; SUB16 operands
|
||||
Sub16_Operand1:
|
||||
.DW 0xF08A
|
||||
|
||||
Sub16_Operand2:
|
||||
.DW 0x4BCD
|
||||
|
||||
; MUL24 operands
|
||||
Mul24_Operand1:
|
||||
.DW 0xFFFF
|
||||
.DW 0x00FF
|
||||
|
||||
Mul24_Operand2:
|
||||
.DW 0xFFFF
|
||||
.DW 0x00FF
|
||||
|
||||
; Compoud operands
|
||||
OperandD:
|
||||
.DW 0xFD51 ; test value for operand D
|
||||
OperandE:
|
||||
.DW 0x1EFF ; test value for operand E
|
||||
OperandF:
|
||||
.DW 0xFFFF ; test value for operand F
|
||||
|
||||
;***********************************************************
|
||||
;* Data Memory Allocation
|
||||
;***********************************************************
|
||||
|
||||
.dseg
|
||||
.org $0100 ; data memory allocation for MUL16 example
|
||||
addrA: .byte 2
|
||||
addrB: .byte 2
|
||||
LAddrP: .byte 4
|
||||
|
||||
; Below is an example of data memory allocation for ADD16.
|
||||
; Consider using something similar for SUB16 and MUL24.
|
||||
|
||||
.org $0110 ; data memory allocation for operands
|
||||
ADD16_OP1:
|
||||
.byte 2 ; allocate two bytes for first operand of ADD16
|
||||
ADD16_OP2:
|
||||
.byte 2 ; allocate two bytes for second operand of ADD16
|
||||
|
||||
.org $0120 ; data memory allocation for results
|
||||
ADD16_Result:
|
||||
.byte 3 ; allocate three bytes for ADD16 result
|
||||
|
||||
.org $0130 ; data memory allocation for operands
|
||||
SUB16_OP1:
|
||||
.byte 2 ; allocate two bytes for first operand of ADD16
|
||||
SUB16_OP2:
|
||||
.byte 2 ; allocate two bytes for second operand of ADD16
|
||||
|
||||
.org $0140 ; data memory allocation for results
|
||||
SUB16_Result:
|
||||
.byte 3 ; allocate three bytes for ADD16 result
|
||||
|
||||
.org $0150 ; data memory allocation for operands
|
||||
MUL24_OP1:
|
||||
.byte 3 ; allocate two bytes for first operand of ADD16
|
||||
MUL24_OP2:
|
||||
.byte 3 ; allocate two bytes for second operand of ADD16
|
||||
|
||||
.org $0160 ; data memory allocation for results
|
||||
MUL24_Result:
|
||||
.byte 6 ; allocate three bytes for ADD16 result
|
||||
MUL24_Result_End:
|
||||
|
||||
;***********************************************************
|
||||
;* Additional Program Includes
|
||||
;***********************************************************
|
||||
; There are no additional file includes for this program
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRAssembler</ToolchainName>
|
||||
<ProjectGuid>59B1D629-9DCC-43ed-A0FD-8AB0E4D622AB</ProjectGuid>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.obj</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<Language>ASSEMBLY</Language>
|
||||
<AssemblyName>Corwin_Perren_Lab5_sourcecode</AssemblyName>
|
||||
<Name>Corwin_Perren_Lab5_sourcecode</Name>
|
||||
<RootNamespace>Corwin_Perren_Lab5_sourcecode</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<EntryFile>$(MSBuildProjectDirectory)\Corwin_Perren_Lab5_sourcecode.asm</EntryFile>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress>0x20000000</RamSnippetAddress>
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue>exception_table</OverrideVtorValue>
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
<avrtool>com.atmel.avrdbg.tool.simulator</avrtool>
|
||||
<avrtoolserialnumber />
|
||||
<avrdeviceexpectedsignature>0x1E9702</avrdeviceexpectedsignature>
|
||||
<com_atmel_avrdbg_tool_simulator>
|
||||
<ToolOptions xmlns="">
|
||||
<InterfaceProperties>
|
||||
</InterfaceProperties>
|
||||
</ToolOptions>
|
||||
<ToolType xmlns="">com.atmel.avrdbg.tool.simulator</ToolType>
|
||||
<ToolNumber xmlns="">
|
||||
</ToolNumber>
|
||||
<ToolName xmlns="">Simulator</ToolName>
|
||||
</com_atmel_avrdbg_tool_simulator>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
<OutputType>Executable</OutputType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Corwin_Perren_Lab5_sourcecode.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Assembler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.2.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>bd3TUV9UtxpdYQkn+6MWPA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc/m128def.inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\templates\main.asm</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>mtZe20JVV8Qf6TIychMQqA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/templates/main.asm</Name>
|
||||
<SelectString>Main file (.asm)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.2.209</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -0,0 +1,37 @@
|
||||
:020000020000FC
|
||||
:0200000045C0F9
|
||||
:10008C000FEF0DBF00E10EBF2224EEE8F2E0C0E15D
|
||||
:10009C00D1E00591099305910993E0E9F2E0C2E101
|
||||
:1000AC00D1E0059109930591099300000E948E00FF
|
||||
:1000BC000000E2E9F2E0C0E3D1E00591099305917B
|
||||
:1000CC000993E4E9F2E0C2E3D1E0059109930591CB
|
||||
:1000DC00099300000E94B4000000E6E9F2E0C0E5DC
|
||||
:1000EC00D1E0059109930591099305910993EAE9EA
|
||||
:1000FC00F2E0C3E5D1E005910993059109930591CF
|
||||
:10010C00099300000E94D700000000000000FFCF00
|
||||
:10011C00AF93BF93CF93DF93EF93FF933F924F92A5
|
||||
:10012C005F926F92A0E1B1E0C2E1D1E0E0E2F1E0D8
|
||||
:10013C003D904990340C5C906880561C4424441CBF
|
||||
:10014C003192519240826F905F904F903F90FF910F
|
||||
:10015C00EF91DF91CF91BF91AF910895AF93BF9382
|
||||
:10016C00CF93DF93EF93FF933F924F925F926F92F7
|
||||
:10017C00A0E3B1E0C2E3D1E0E0E4F1E03D904990CE
|
||||
:10018C0034185C9068805608319251926F905F9051
|
||||
:10019C004F903F90FF91EF91DF91CF91BF91AF9135
|
||||
:1001AC0008953F924F921F920F922F92BF93AF934D
|
||||
:1001BC00DF93CF93FF93EF931F932F932224C3E5E9
|
||||
:1001CC00D1E0E0E6F1E013E0A0E5B1E023E03D9002
|
||||
:1001DC004880349C31904190030C141C3080321CAC
|
||||
:1001EC0030821292029231962A9589F73297219693
|
||||
:1001FC001A9551F72F911F91EF91FF91CF91DF91AC
|
||||
:10020C00AF91BF912F900F901F904F903F900895FA
|
||||
:10021C0008953F924F921F920F922F92BF93AF93DC
|
||||
:10022C00DF93CF93FF93EF931F932F932224C2E07E
|
||||
:10023C00D1E0E4E0F1E012E0A0E0B1E022E03D909A
|
||||
:10024C004880349C31904190030C141C3080321C3B
|
||||
:10025C0030821292029231962A9589F73197219623
|
||||
:10026C001A9551F72F911F91EF91FF91CF91DF913B
|
||||
:10027C00AF91BF912F900F901F904F903F9008958A
|
||||
:10028C000895FFA277F48AF0CD4BFFFFFF00FFFF2C
|
||||
:08029C00FF0051FDFF1EFFFFF2
|
||||
:00000001FF
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,914 @@
|
||||
|
||||
AVRASM ver. 2.2.7 C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm Wed Oct 31 15:11:04 2018
|
||||
|
||||
|
||||
EQU SIGNATURE_000 0000001e
|
||||
EQU SIGNATURE_001 00000097
|
||||
EQU SIGNATURE_002 00000002
|
||||
EQU UCSR1C 0000009d
|
||||
EQU UDR1 0000009c
|
||||
EQU UCSR1A 0000009b
|
||||
EQU UCSR1B 0000009a
|
||||
EQU UBRR1H 00000098
|
||||
EQU UBRR1L 00000099
|
||||
EQU UCSR0C 00000095
|
||||
EQU UBRR0H 00000090
|
||||
EQU TCCR3C 0000008c
|
||||
EQU TCCR3A 0000008b
|
||||
EQU TCCR3B 0000008a
|
||||
EQU TCNT3L 00000088
|
||||
EQU TCNT3H 00000089
|
||||
EQU OCR3AL 00000086
|
||||
EQU OCR3AH 00000087
|
||||
EQU OCR3BL 00000084
|
||||
EQU OCR3BH 00000085
|
||||
EQU OCR3CL 00000082
|
||||
EQU OCR3CH 00000083
|
||||
EQU ICR3L 00000080
|
||||
EQU ICR3H 00000081
|
||||
EQU ETIMSK 0000007d
|
||||
EQU ETIFR 0000007c
|
||||
EQU TCCR1C 0000007a
|
||||
EQU OCR1CL 00000078
|
||||
EQU OCR1CH 00000079
|
||||
EQU TWCR 00000074
|
||||
EQU TWDR 00000073
|
||||
EQU TWAR 00000072
|
||||
EQU TWSR 00000071
|
||||
EQU TWBR 00000070
|
||||
EQU OSCCAL 0000006f
|
||||
EQU XMCRA 0000006d
|
||||
EQU XMCRB 0000006c
|
||||
EQU EICRA 0000006a
|
||||
EQU SPMCSR 00000068
|
||||
EQU PORTG 00000065
|
||||
EQU DDRG 00000064
|
||||
EQU PING 00000063
|
||||
EQU PORTF 00000062
|
||||
EQU DDRF 00000061
|
||||
EQU SREG 0000003f
|
||||
EQU SPL 0000003d
|
||||
EQU SPH 0000003e
|
||||
EQU XDIV 0000003c
|
||||
EQU RAMPZ 0000003b
|
||||
EQU EICRB 0000003a
|
||||
EQU EIMSK 00000039
|
||||
EQU EIFR 00000038
|
||||
EQU TIMSK 00000037
|
||||
EQU TIFR 00000036
|
||||
EQU MCUCR 00000035
|
||||
EQU MCUCSR 00000034
|
||||
EQU TCCR0 00000033
|
||||
EQU TCNT0 00000032
|
||||
EQU OCR0 00000031
|
||||
EQU ASSR 00000030
|
||||
EQU TCCR1A 0000002f
|
||||
EQU TCCR1B 0000002e
|
||||
EQU TCNT1L 0000002c
|
||||
EQU TCNT1H 0000002d
|
||||
EQU OCR1AL 0000002a
|
||||
EQU OCR1AH 0000002b
|
||||
EQU OCR1BL 00000028
|
||||
EQU OCR1BH 00000029
|
||||
EQU ICR1L 00000026
|
||||
EQU ICR1H 00000027
|
||||
EQU TCCR2 00000025
|
||||
EQU TCNT2 00000024
|
||||
EQU OCR2 00000023
|
||||
EQU OCDR 00000022
|
||||
EQU WDTCR 00000021
|
||||
EQU SFIOR 00000020
|
||||
EQU EEARL 0000001e
|
||||
EQU EEARH 0000001f
|
||||
EQU EEDR 0000001d
|
||||
EQU EECR 0000001c
|
||||
EQU PORTA 0000001b
|
||||
EQU DDRA 0000001a
|
||||
EQU PINA 00000019
|
||||
EQU PORTB 00000018
|
||||
EQU DDRB 00000017
|
||||
EQU PINB 00000016
|
||||
EQU PORTC 00000015
|
||||
EQU DDRC 00000014
|
||||
EQU PINC 00000013
|
||||
EQU PORTD 00000012
|
||||
EQU DDRD 00000011
|
||||
EQU PIND 00000010
|
||||
EQU SPDR 0000000f
|
||||
EQU SPSR 0000000e
|
||||
EQU SPCR 0000000d
|
||||
EQU UDR0 0000000c
|
||||
EQU UCSR0A 0000000b
|
||||
EQU UCSR0B 0000000a
|
||||
EQU UBRR0L 00000009
|
||||
EQU ACSR 00000008
|
||||
EQU ADMUX 00000007
|
||||
EQU ADCSRA 00000006
|
||||
EQU ADCH 00000005
|
||||
EQU ADCL 00000004
|
||||
EQU PORTE 00000003
|
||||
EQU DDRE 00000002
|
||||
EQU PINE 00000001
|
||||
EQU PINF 00000000
|
||||
EQU ACME 00000003
|
||||
EQU ACIS0 00000000
|
||||
EQU ACIS1 00000001
|
||||
EQU ACIC 00000002
|
||||
EQU ACIE 00000003
|
||||
EQU ACI 00000004
|
||||
EQU ACO 00000005
|
||||
EQU ACBG 00000006
|
||||
EQU ACD 00000007
|
||||
EQU SPDR0 00000000
|
||||
EQU SPDR1 00000001
|
||||
EQU SPDR2 00000002
|
||||
EQU SPDR3 00000003
|
||||
EQU SPDR4 00000004
|
||||
EQU SPDR5 00000005
|
||||
EQU SPDR6 00000006
|
||||
EQU SPDR7 00000007
|
||||
EQU SPI2X 00000000
|
||||
EQU WCOL 00000006
|
||||
EQU SPIF 00000007
|
||||
EQU SPR0 00000000
|
||||
EQU SPR1 00000001
|
||||
EQU CPHA 00000002
|
||||
EQU CPOL 00000003
|
||||
EQU MSTR 00000004
|
||||
EQU DORD 00000005
|
||||
EQU SPE 00000006
|
||||
EQU SPIE 00000007
|
||||
EQU I2BR 00000070
|
||||
EQU TWBR0 00000000
|
||||
EQU TWBR1 00000001
|
||||
EQU TWBR2 00000002
|
||||
EQU TWBR3 00000003
|
||||
EQU TWBR4 00000004
|
||||
EQU TWBR5 00000005
|
||||
EQU TWBR6 00000006
|
||||
EQU TWBR7 00000007
|
||||
EQU I2CR 00000074
|
||||
EQU TWIE 00000000
|
||||
EQU I2IE 00000000
|
||||
EQU TWEN 00000002
|
||||
EQU I2EN 00000002
|
||||
EQU ENI2C 00000002
|
||||
EQU TWWC 00000003
|
||||
EQU I2WC 00000003
|
||||
EQU TWSTO 00000004
|
||||
EQU I2STO 00000004
|
||||
EQU TWSTA 00000005
|
||||
EQU I2STA 00000005
|
||||
EQU TWEA 00000006
|
||||
EQU I2EA 00000006
|
||||
EQU TWINT 00000007
|
||||
EQU I2INT 00000007
|
||||
EQU I2SR 00000071
|
||||
EQU TWPS0 00000000
|
||||
EQU TWS0 00000000
|
||||
EQU I2GCE 00000000
|
||||
EQU TWPS1 00000001
|
||||
EQU TWS1 00000001
|
||||
EQU TWS3 00000003
|
||||
EQU I2S3 00000003
|
||||
EQU TWS4 00000004
|
||||
EQU I2S4 00000004
|
||||
EQU TWS5 00000005
|
||||
EQU I2S5 00000005
|
||||
EQU TWS6 00000006
|
||||
EQU I2S6 00000006
|
||||
EQU TWS7 00000007
|
||||
EQU I2S7 00000007
|
||||
EQU I2DR 00000073
|
||||
EQU TWD0 00000000
|
||||
EQU TWD1 00000001
|
||||
EQU TWD2 00000002
|
||||
EQU TWD3 00000003
|
||||
EQU TWD4 00000004
|
||||
EQU TWD5 00000005
|
||||
EQU TWD6 00000006
|
||||
EQU TWD7 00000007
|
||||
EQU I2AR 00000072
|
||||
EQU TWGCE 00000000
|
||||
EQU TWA0 00000001
|
||||
EQU TWA1 00000002
|
||||
EQU TWA2 00000003
|
||||
EQU TWA3 00000004
|
||||
EQU TWA4 00000005
|
||||
EQU TWA5 00000006
|
||||
EQU TWA6 00000007
|
||||
EQU UDR00 00000000
|
||||
EQU UDR01 00000001
|
||||
EQU UDR02 00000002
|
||||
EQU UDR03 00000003
|
||||
EQU UDR04 00000004
|
||||
EQU UDR05 00000005
|
||||
EQU UDR06 00000006
|
||||
EQU UDR07 00000007
|
||||
EQU MPCM0 00000000
|
||||
EQU U2X0 00000001
|
||||
EQU UPE0 00000002
|
||||
EQU DOR0 00000003
|
||||
EQU FE0 00000004
|
||||
EQU UDRE0 00000005
|
||||
EQU TXC0 00000006
|
||||
EQU RXC0 00000007
|
||||
EQU TXB80 00000000
|
||||
EQU RXB80 00000001
|
||||
EQU UCSZ02 00000002
|
||||
EQU UCSZ2 00000002
|
||||
EQU TXEN0 00000003
|
||||
EQU RXEN0 00000004
|
||||
EQU UDRIE0 00000005
|
||||
EQU TXCIE0 00000006
|
||||
EQU RXCIE0 00000007
|
||||
EQU UCPOL0 00000000
|
||||
EQU UCSZ00 00000001
|
||||
EQU UCSZ01 00000002
|
||||
EQU USBS0 00000003
|
||||
EQU UPM00 00000004
|
||||
EQU UPM01 00000005
|
||||
EQU UMSEL0 00000006
|
||||
EQU UBRR8 00000000
|
||||
EQU UBRR9 00000001
|
||||
EQU UBRR10 00000002
|
||||
EQU UBRR11 00000003
|
||||
EQU UBRR0 00000000
|
||||
EQU UBRR1 00000001
|
||||
EQU UBRR2 00000002
|
||||
EQU UBRR3 00000003
|
||||
EQU UBRR4 00000004
|
||||
EQU UBRR5 00000005
|
||||
EQU UBRR6 00000006
|
||||
EQU UBRR7 00000007
|
||||
EQU UDR10 00000000
|
||||
EQU UDR11 00000001
|
||||
EQU UDR12 00000002
|
||||
EQU UDR13 00000003
|
||||
EQU UDR14 00000004
|
||||
EQU UDR15 00000005
|
||||
EQU UDR16 00000006
|
||||
EQU UDR17 00000007
|
||||
EQU MPCM1 00000000
|
||||
EQU U2X1 00000001
|
||||
EQU UPE1 00000002
|
||||
EQU DOR1 00000003
|
||||
EQU FE1 00000004
|
||||
EQU UDRE1 00000005
|
||||
EQU TXC1 00000006
|
||||
EQU RXC1 00000007
|
||||
EQU TXB81 00000000
|
||||
EQU RXB81 00000001
|
||||
EQU UCSZ12 00000002
|
||||
EQU TXEN1 00000003
|
||||
EQU RXEN1 00000004
|
||||
EQU UDRIE1 00000005
|
||||
EQU TXCIE1 00000006
|
||||
EQU RXCIE1 00000007
|
||||
EQU UCPOL1 00000000
|
||||
EQU UCSZ10 00000001
|
||||
EQU UCSZ11 00000002
|
||||
EQU USBS1 00000003
|
||||
EQU UPM10 00000004
|
||||
EQU UPM11 00000005
|
||||
EQU UMSEL1 00000006
|
||||
EQU SREG_C 00000000
|
||||
EQU SREG_Z 00000001
|
||||
EQU SREG_N 00000002
|
||||
EQU SREG_V 00000003
|
||||
EQU SREG_S 00000004
|
||||
EQU SREG_H 00000005
|
||||
EQU SREG_T 00000006
|
||||
EQU SREG_I 00000007
|
||||
EQU IVCE 00000000
|
||||
EQU IVSEL 00000001
|
||||
EQU SM2 00000002
|
||||
EQU SM0 00000003
|
||||
EQU SM1 00000004
|
||||
EQU SE 00000005
|
||||
EQU SRW10 00000006
|
||||
EQU SRE 00000007
|
||||
EQU SRW11 00000001
|
||||
EQU SRW00 00000002
|
||||
EQU SRW01 00000003
|
||||
EQU SRL0 00000004
|
||||
EQU SRL1 00000005
|
||||
EQU SRL2 00000006
|
||||
EQU XMM0 00000000
|
||||
EQU XMM1 00000001
|
||||
EQU XMM2 00000002
|
||||
EQU XMBK 00000007
|
||||
EQU CAL0 00000000
|
||||
EQU CAL1 00000001
|
||||
EQU CAL2 00000002
|
||||
EQU CAL3 00000003
|
||||
EQU CAL4 00000004
|
||||
EQU CAL5 00000005
|
||||
EQU CAL6 00000006
|
||||
EQU CAL7 00000007
|
||||
EQU XDIV0 00000000
|
||||
EQU XDIV1 00000001
|
||||
EQU XDIV2 00000002
|
||||
EQU XDIV3 00000003
|
||||
EQU XDIV4 00000004
|
||||
EQU XDIV5 00000005
|
||||
EQU XDIV6 00000006
|
||||
EQU XDIVEN 00000007
|
||||
EQU PORF 00000000
|
||||
EQU EXTRF 00000001
|
||||
EQU BORF 00000002
|
||||
EQU WDRF 00000003
|
||||
EQU JTRF 00000004
|
||||
EQU JTD 00000007
|
||||
EQU RAMPZ0 00000000
|
||||
EQU SPMCR 00000068
|
||||
EQU SPMEN 00000000
|
||||
EQU PGERS 00000001
|
||||
EQU PGWRT 00000002
|
||||
EQU BLBSET 00000003
|
||||
EQU RWWSRE 00000004
|
||||
EQU ASRE 00000004
|
||||
EQU RWWSB 00000006
|
||||
EQU ASB 00000006
|
||||
EQU SPMIE 00000007
|
||||
EQU OCDR0 00000000
|
||||
EQU OCDR1 00000001
|
||||
EQU OCDR2 00000002
|
||||
EQU OCDR3 00000003
|
||||
EQU OCDR4 00000004
|
||||
EQU OCDR5 00000005
|
||||
EQU OCDR6 00000006
|
||||
EQU OCDR7 00000007
|
||||
EQU IDRD 00000007
|
||||
EQU PSR321 00000000
|
||||
EQU PSR1 00000000
|
||||
EQU PSR2 00000000
|
||||
EQU PSR3 00000000
|
||||
EQU PSR0 00000001
|
||||
EQU PUD 00000002
|
||||
EQU TSM 00000007
|
||||
EQU ISC00 00000000
|
||||
EQU ISC01 00000001
|
||||
EQU ISC10 00000002
|
||||
EQU ISC11 00000003
|
||||
EQU ISC20 00000004
|
||||
EQU ISC21 00000005
|
||||
EQU ISC30 00000006
|
||||
EQU ISC31 00000007
|
||||
EQU ISC40 00000000
|
||||
EQU ISC41 00000001
|
||||
EQU ISC50 00000002
|
||||
EQU ISC51 00000003
|
||||
EQU ISC60 00000004
|
||||
EQU ISC61 00000005
|
||||
EQU ISC70 00000006
|
||||
EQU ISC71 00000007
|
||||
EQU GICR 00000039
|
||||
EQU GIMSK 00000039
|
||||
EQU INT0 00000000
|
||||
EQU INT1 00000001
|
||||
EQU INT2 00000002
|
||||
EQU INT3 00000003
|
||||
EQU INT4 00000004
|
||||
EQU INT5 00000005
|
||||
EQU INT6 00000006
|
||||
EQU INT7 00000007
|
||||
EQU GIFR 00000038
|
||||
EQU INTF0 00000000
|
||||
EQU INTF1 00000001
|
||||
EQU INTF2 00000002
|
||||
EQU INTF3 00000003
|
||||
EQU INTF4 00000004
|
||||
EQU INTF5 00000005
|
||||
EQU INTF6 00000006
|
||||
EQU INTF7 00000007
|
||||
EQU EEDR0 00000000
|
||||
EQU EEDR1 00000001
|
||||
EQU EEDR2 00000002
|
||||
EQU EEDR3 00000003
|
||||
EQU EEDR4 00000004
|
||||
EQU EEDR5 00000005
|
||||
EQU EEDR6 00000006
|
||||
EQU EEDR7 00000007
|
||||
EQU EERE 00000000
|
||||
EQU EEWE 00000001
|
||||
EQU EEMWE 00000002
|
||||
EQU EERIE 00000003
|
||||
EQU PORTA0 00000000
|
||||
EQU PA0 00000000
|
||||
EQU PORTA1 00000001
|
||||
EQU PA1 00000001
|
||||
EQU PORTA2 00000002
|
||||
EQU PA2 00000002
|
||||
EQU PORTA3 00000003
|
||||
EQU PA3 00000003
|
||||
EQU PORTA4 00000004
|
||||
EQU PA4 00000004
|
||||
EQU PORTA5 00000005
|
||||
EQU PA5 00000005
|
||||
EQU PORTA6 00000006
|
||||
EQU PA6 00000006
|
||||
EQU PORTA7 00000007
|
||||
EQU PA7 00000007
|
||||
EQU DDA0 00000000
|
||||
EQU DDA1 00000001
|
||||
EQU DDA2 00000002
|
||||
EQU DDA3 00000003
|
||||
EQU DDA4 00000004
|
||||
EQU DDA5 00000005
|
||||
EQU DDA6 00000006
|
||||
EQU DDA7 00000007
|
||||
EQU PINA0 00000000
|
||||
EQU PINA1 00000001
|
||||
EQU PINA2 00000002
|
||||
EQU PINA3 00000003
|
||||
EQU PINA4 00000004
|
||||
EQU PINA5 00000005
|
||||
EQU PINA6 00000006
|
||||
EQU PINA7 00000007
|
||||
EQU PORTB0 00000000
|
||||
EQU PB0 00000000
|
||||
EQU PORTB1 00000001
|
||||
EQU PB1 00000001
|
||||
EQU PORTB2 00000002
|
||||
EQU PB2 00000002
|
||||
EQU PORTB3 00000003
|
||||
EQU PB3 00000003
|
||||
EQU PORTB4 00000004
|
||||
EQU PB4 00000004
|
||||
EQU PORTB5 00000005
|
||||
EQU PB5 00000005
|
||||
EQU PORTB6 00000006
|
||||
EQU PB6 00000006
|
||||
EQU PORTB7 00000007
|
||||
EQU PB7 00000007
|
||||
EQU DDB0 00000000
|
||||
EQU DDB1 00000001
|
||||
EQU DDB2 00000002
|
||||
EQU DDB3 00000003
|
||||
EQU DDB4 00000004
|
||||
EQU DDB5 00000005
|
||||
EQU DDB6 00000006
|
||||
EQU DDB7 00000007
|
||||
EQU PINB0 00000000
|
||||
EQU PINB1 00000001
|
||||
EQU PINB2 00000002
|
||||
EQU PINB3 00000003
|
||||
EQU PINB4 00000004
|
||||
EQU PINB5 00000005
|
||||
EQU PINB6 00000006
|
||||
EQU PINB7 00000007
|
||||
EQU PORTC0 00000000
|
||||
EQU PC0 00000000
|
||||
EQU PORTC1 00000001
|
||||
EQU PC1 00000001
|
||||
EQU PORTC2 00000002
|
||||
EQU PC2 00000002
|
||||
EQU PORTC3 00000003
|
||||
EQU PC3 00000003
|
||||
EQU PORTC4 00000004
|
||||
EQU PC4 00000004
|
||||
EQU PORTC5 00000005
|
||||
EQU PC5 00000005
|
||||
EQU PORTC6 00000006
|
||||
EQU PC6 00000006
|
||||
EQU PORTC7 00000007
|
||||
EQU PC7 00000007
|
||||
EQU DDC0 00000000
|
||||
EQU DDC1 00000001
|
||||
EQU DDC2 00000002
|
||||
EQU DDC3 00000003
|
||||
EQU DDC4 00000004
|
||||
EQU DDC5 00000005
|
||||
EQU DDC6 00000006
|
||||
EQU DDC7 00000007
|
||||
EQU PINC0 00000000
|
||||
EQU PINC1 00000001
|
||||
EQU PINC2 00000002
|
||||
EQU PINC3 00000003
|
||||
EQU PINC4 00000004
|
||||
EQU PINC5 00000005
|
||||
EQU PINC6 00000006
|
||||
EQU PINC7 00000007
|
||||
EQU PORTD0 00000000
|
||||
EQU PD0 00000000
|
||||
EQU PORTD1 00000001
|
||||
EQU PD1 00000001
|
||||
EQU PORTD2 00000002
|
||||
EQU PD2 00000002
|
||||
EQU PORTD3 00000003
|
||||
EQU PD3 00000003
|
||||
EQU PORTD4 00000004
|
||||
EQU PD4 00000004
|
||||
EQU PORTD5 00000005
|
||||
EQU PD5 00000005
|
||||
EQU PORTD6 00000006
|
||||
EQU PD6 00000006
|
||||
EQU PORTD7 00000007
|
||||
EQU PD7 00000007
|
||||
EQU DDD0 00000000
|
||||
EQU DDD1 00000001
|
||||
EQU DDD2 00000002
|
||||
EQU DDD3 00000003
|
||||
EQU DDD4 00000004
|
||||
EQU DDD5 00000005
|
||||
EQU DDD6 00000006
|
||||
EQU DDD7 00000007
|
||||
EQU PIND0 00000000
|
||||
EQU PIND1 00000001
|
||||
EQU PIND2 00000002
|
||||
EQU PIND3 00000003
|
||||
EQU PIND4 00000004
|
||||
EQU PIND5 00000005
|
||||
EQU PIND6 00000006
|
||||
EQU PIND7 00000007
|
||||
EQU PORTE0 00000000
|
||||
EQU PE0 00000000
|
||||
EQU PORTE1 00000001
|
||||
EQU PE1 00000001
|
||||
EQU PORTE2 00000002
|
||||
EQU PE2 00000002
|
||||
EQU PORTE3 00000003
|
||||
EQU PE3 00000003
|
||||
EQU PORTE4 00000004
|
||||
EQU PE4 00000004
|
||||
EQU PORTE5 00000005
|
||||
EQU PE5 00000005
|
||||
EQU PORTE6 00000006
|
||||
EQU PE6 00000006
|
||||
EQU PORTE7 00000007
|
||||
EQU PE7 00000007
|
||||
EQU DDE0 00000000
|
||||
EQU DDE1 00000001
|
||||
EQU DDE2 00000002
|
||||
EQU DDE3 00000003
|
||||
EQU DDE4 00000004
|
||||
EQU DDE5 00000005
|
||||
EQU DDE6 00000006
|
||||
EQU DDE7 00000007
|
||||
EQU PINE0 00000000
|
||||
EQU PINE1 00000001
|
||||
EQU PINE2 00000002
|
||||
EQU PINE3 00000003
|
||||
EQU PINE4 00000004
|
||||
EQU PINE5 00000005
|
||||
EQU PINE6 00000006
|
||||
EQU PINE7 00000007
|
||||
EQU PORTF0 00000000
|
||||
EQU PF0 00000000
|
||||
EQU PORTF1 00000001
|
||||
EQU PF1 00000001
|
||||
EQU PORTF2 00000002
|
||||
EQU PF2 00000002
|
||||
EQU PORTF3 00000003
|
||||
EQU PF3 00000003
|
||||
EQU PORTF4 00000004
|
||||
EQU PF4 00000004
|
||||
EQU PORTF5 00000005
|
||||
EQU PF5 00000005
|
||||
EQU PORTF6 00000006
|
||||
EQU PF6 00000006
|
||||
EQU PORTF7 00000007
|
||||
EQU PF7 00000007
|
||||
EQU DDF0 00000000
|
||||
EQU DDF1 00000001
|
||||
EQU DDF2 00000002
|
||||
EQU DDF3 00000003
|
||||
EQU DDF4 00000004
|
||||
EQU DDF5 00000005
|
||||
EQU DDF6 00000006
|
||||
EQU DDF7 00000007
|
||||
EQU PINF0 00000000
|
||||
EQU PINF1 00000001
|
||||
EQU PINF2 00000002
|
||||
EQU PINF3 00000003
|
||||
EQU PINF4 00000004
|
||||
EQU PINF5 00000005
|
||||
EQU PINF6 00000006
|
||||
EQU PINF7 00000007
|
||||
EQU PORTG0 00000000
|
||||
EQU PG0 00000000
|
||||
EQU PORTG1 00000001
|
||||
EQU PG1 00000001
|
||||
EQU PORTG2 00000002
|
||||
EQU PG2 00000002
|
||||
EQU PORTG3 00000003
|
||||
EQU PG3 00000003
|
||||
EQU PORTG4 00000004
|
||||
EQU PG4 00000004
|
||||
EQU DDG0 00000000
|
||||
EQU DDG1 00000001
|
||||
EQU DDG2 00000002
|
||||
EQU DDG3 00000003
|
||||
EQU DDG4 00000004
|
||||
EQU PING0 00000000
|
||||
EQU PING1 00000001
|
||||
EQU PING2 00000002
|
||||
EQU PING3 00000003
|
||||
EQU PING4 00000004
|
||||
EQU CS00 00000000
|
||||
EQU CS01 00000001
|
||||
EQU CS02 00000002
|
||||
EQU WGM01 00000003
|
||||
EQU CTC0 00000003
|
||||
EQU COM00 00000004
|
||||
EQU COM01 00000005
|
||||
EQU WGM00 00000006
|
||||
EQU PWM0 00000006
|
||||
EQU FOC0 00000007
|
||||
EQU TCNT0_0 00000000
|
||||
EQU TCNT0_1 00000001
|
||||
EQU TCNT0_2 00000002
|
||||
EQU TCNT0_3 00000003
|
||||
EQU TCNT0_4 00000004
|
||||
EQU TCNT0_5 00000005
|
||||
EQU TCNT0_6 00000006
|
||||
EQU TCNT0_7 00000007
|
||||
EQU OCR0_0 00000000
|
||||
EQU OCR0_1 00000001
|
||||
EQU OCR0_2 00000002
|
||||
EQU OCR0_3 00000003
|
||||
EQU OCR0_4 00000004
|
||||
EQU OCR0_5 00000005
|
||||
EQU OCR0_6 00000006
|
||||
EQU OCR0_7 00000007
|
||||
EQU TCR0UB 00000000
|
||||
EQU OCR0UB 00000001
|
||||
EQU TCN0UB 00000002
|
||||
EQU AS0 00000003
|
||||
EQU TOIE0 00000000
|
||||
EQU OCIE0 00000001
|
||||
EQU TOV0 00000000
|
||||
EQU OCF0 00000001
|
||||
EQU TOIE1 00000002
|
||||
EQU OCIE1B 00000003
|
||||
EQU OCIE1A 00000004
|
||||
EQU TICIE1 00000005
|
||||
EQU OCIE1C 00000000
|
||||
EQU TOV1 00000002
|
||||
EQU OCF1B 00000003
|
||||
EQU OCF1A 00000004
|
||||
EQU ICF1 00000005
|
||||
EQU OCF1C 00000000
|
||||
EQU WGM10 00000000
|
||||
EQU PWM10 00000000
|
||||
EQU WGM11 00000001
|
||||
EQU PWM11 00000001
|
||||
EQU COM1C0 00000002
|
||||
EQU COM1C1 00000003
|
||||
EQU COM1B0 00000004
|
||||
EQU COM1B1 00000005
|
||||
EQU COM1A0 00000006
|
||||
EQU COM1A1 00000007
|
||||
EQU CS10 00000000
|
||||
EQU CS11 00000001
|
||||
EQU CS12 00000002
|
||||
EQU WGM12 00000003
|
||||
EQU CTC10 00000003
|
||||
EQU WGM13 00000004
|
||||
EQU CTC11 00000004
|
||||
EQU ICES1 00000006
|
||||
EQU ICNC1 00000007
|
||||
EQU FOC1C 00000005
|
||||
EQU FOC1B 00000006
|
||||
EQU FOC1A 00000007
|
||||
EQU CS20 00000000
|
||||
EQU CS21 00000001
|
||||
EQU CS22 00000002
|
||||
EQU WGM21 00000003
|
||||
EQU CTC2 00000003
|
||||
EQU COM20 00000004
|
||||
EQU COM21 00000005
|
||||
EQU WGM20 00000006
|
||||
EQU PWM2 00000006
|
||||
EQU FOC2 00000007
|
||||
EQU TCNT2_0 00000000
|
||||
EQU TCNT2_1 00000001
|
||||
EQU TCNT2_2 00000002
|
||||
EQU TCNT2_3 00000003
|
||||
EQU TCNT2_4 00000004
|
||||
EQU TCNT2_5 00000005
|
||||
EQU TCNT2_6 00000006
|
||||
EQU TCNT2_7 00000007
|
||||
EQU OCR2_0 00000000
|
||||
EQU OCR2_1 00000001
|
||||
EQU OCR2_2 00000002
|
||||
EQU OCR2_3 00000003
|
||||
EQU OCR2_4 00000004
|
||||
EQU OCR2_5 00000005
|
||||
EQU OCR2_6 00000006
|
||||
EQU OCR2_7 00000007
|
||||
EQU TOIE2 00000006
|
||||
EQU OCIE2 00000007
|
||||
EQU TOV2 00000006
|
||||
EQU OCF2 00000007
|
||||
EQU OCIE3C 00000001
|
||||
EQU TOIE3 00000002
|
||||
EQU OCIE3B 00000003
|
||||
EQU OCIE3A 00000004
|
||||
EQU TICIE3 00000005
|
||||
EQU OCF3C 00000001
|
||||
EQU TOV3 00000002
|
||||
EQU OCF3B 00000003
|
||||
EQU OCF3A 00000004
|
||||
EQU ICF3 00000005
|
||||
EQU WGM30 00000000
|
||||
EQU PWM30 00000000
|
||||
EQU WGM31 00000001
|
||||
EQU PWM31 00000001
|
||||
EQU COM3C0 00000002
|
||||
EQU COM3C1 00000003
|
||||
EQU COM3B0 00000004
|
||||
EQU COM3B1 00000005
|
||||
EQU COM3A0 00000006
|
||||
EQU COM3A1 00000007
|
||||
EQU CS30 00000000
|
||||
EQU CS31 00000001
|
||||
EQU CS32 00000002
|
||||
EQU WGM32 00000003
|
||||
EQU CTC30 00000003
|
||||
EQU WGM33 00000004
|
||||
EQU CTC31 00000004
|
||||
EQU ICES3 00000006
|
||||
EQU ICNC3 00000007
|
||||
EQU FOC3C 00000005
|
||||
EQU FOC3B 00000006
|
||||
EQU FOC3A 00000007
|
||||
EQU TCN3L0 00000000
|
||||
EQU TCN3L1 00000001
|
||||
EQU TCN3L2 00000002
|
||||
EQU TCN3L3 00000003
|
||||
EQU TCN3L4 00000004
|
||||
EQU TCN3L5 00000005
|
||||
EQU TCN3L6 00000006
|
||||
EQU TCN3L7 00000007
|
||||
EQU WDTCSR 00000021
|
||||
EQU WDP0 00000000
|
||||
EQU WDP1 00000001
|
||||
EQU WDP2 00000002
|
||||
EQU WDE 00000003
|
||||
EQU WDCE 00000004
|
||||
EQU WDTOE 00000004
|
||||
EQU MUX0 00000000
|
||||
EQU MUX1 00000001
|
||||
EQU MUX2 00000002
|
||||
EQU MUX3 00000003
|
||||
EQU MUX4 00000004
|
||||
EQU ADLAR 00000005
|
||||
EQU REFS0 00000006
|
||||
EQU REFS1 00000007
|
||||
EQU ADCSR 00000006
|
||||
EQU ADPS0 00000000
|
||||
EQU ADPS1 00000001
|
||||
EQU ADPS2 00000002
|
||||
EQU ADIE 00000003
|
||||
EQU ADIF 00000004
|
||||
EQU ADFR 00000005
|
||||
EQU ADSC 00000006
|
||||
EQU ADEN 00000007
|
||||
EQU ADCH0 00000000
|
||||
EQU ADCH1 00000001
|
||||
EQU ADCH2 00000002
|
||||
EQU ADCH3 00000003
|
||||
EQU ADCH4 00000004
|
||||
EQU ADCH5 00000005
|
||||
EQU ADCH6 00000006
|
||||
EQU ADCH7 00000007
|
||||
EQU ADCL0 00000000
|
||||
EQU ADCL1 00000001
|
||||
EQU ADCL2 00000002
|
||||
EQU ADCL3 00000003
|
||||
EQU ADCL4 00000004
|
||||
EQU ADCL5 00000005
|
||||
EQU ADCL6 00000006
|
||||
EQU ADCL7 00000007
|
||||
EQU LB1 00000000
|
||||
EQU LB2 00000001
|
||||
EQU BLB01 00000002
|
||||
EQU BLB02 00000003
|
||||
EQU BLB11 00000004
|
||||
EQU BLB12 00000005
|
||||
EQU CKSEL0 00000000
|
||||
EQU CKSEL1 00000001
|
||||
EQU CKSEL2 00000002
|
||||
EQU CKSEL3 00000003
|
||||
EQU SUT0 00000004
|
||||
EQU SUT1 00000005
|
||||
EQU BODEN 00000006
|
||||
EQU BODLEVEL 00000007
|
||||
EQU BOOTRST 00000000
|
||||
EQU BOOTSZ0 00000001
|
||||
EQU BOOTSZ1 00000002
|
||||
EQU EESAVE 00000003
|
||||
EQU CKOPT 00000004
|
||||
EQU SPIEN 00000005
|
||||
EQU JTAGEN 00000006
|
||||
EQU OCDEN 00000007
|
||||
EQU WDTON 00000000
|
||||
EQU M103C 00000001
|
||||
DEF XH r27
|
||||
DEF XL r26
|
||||
DEF YH r29
|
||||
DEF YL r28
|
||||
DEF ZH r31
|
||||
DEF ZL r30
|
||||
EQU FLASHEND 0000ffff
|
||||
EQU IOEND 000000ff
|
||||
EQU SRAM_START 00000100
|
||||
EQU SRAM_SIZE 00001000
|
||||
EQU RAMEND 000010ff
|
||||
EQU XRAMEND 0000ffff
|
||||
EQU E2END 00000fff
|
||||
EQU EEPROMEND 00000fff
|
||||
EQU EEADRBITS 0000000c
|
||||
EQU NRWW_START_ADDR 0000f000
|
||||
EQU NRWW_STOP_ADDR 0000ffff
|
||||
EQU RWW_START_ADDR 00000000
|
||||
EQU RWW_STOP_ADDR 0000efff
|
||||
EQU PAGESIZE 00000080
|
||||
EQU FIRSTBOOTSTART 0000fe00
|
||||
EQU SECONDBOOTSTART 0000fc00
|
||||
EQU THIRDBOOTSTART 0000f800
|
||||
EQU FOURTHBOOTSTART 0000f000
|
||||
EQU SMALLBOOTSTART 0000fe00
|
||||
EQU LARGEBOOTSTART 0000f000
|
||||
EQU INT0addr 00000002
|
||||
EQU INT1addr 00000004
|
||||
EQU INT2addr 00000006
|
||||
EQU INT3addr 00000008
|
||||
EQU INT4addr 0000000a
|
||||
EQU INT5addr 0000000c
|
||||
EQU INT6addr 0000000e
|
||||
EQU INT7addr 00000010
|
||||
EQU OC2addr 00000012
|
||||
EQU OVF2addr 00000014
|
||||
EQU ICP1addr 00000016
|
||||
EQU OC1Aaddr 00000018
|
||||
EQU OC1Baddr 0000001a
|
||||
EQU OVF1addr 0000001c
|
||||
EQU OC0addr 0000001e
|
||||
EQU OVF0addr 00000020
|
||||
EQU SPIaddr 00000022
|
||||
EQU URXC0addr 00000024
|
||||
EQU UDRE0addr 00000026
|
||||
EQU UTXC0addr 00000028
|
||||
EQU ADCCaddr 0000002a
|
||||
EQU ERDYaddr 0000002c
|
||||
EQU ACIaddr 0000002e
|
||||
EQU OC1Caddr 00000030
|
||||
EQU ICP3addr 00000032
|
||||
EQU OC3Aaddr 00000034
|
||||
EQU OC3Baddr 00000036
|
||||
EQU OC3Caddr 00000038
|
||||
EQU OVF3addr 0000003a
|
||||
EQU URXC1addr 0000003c
|
||||
EQU UDRE1addr 0000003e
|
||||
EQU UTXC1addr 00000040
|
||||
EQU TWIaddr 00000042
|
||||
EQU SPMRaddr 00000044
|
||||
EQU INT_VECTORS_SIZE 00000046
|
||||
DEF mpr r16
|
||||
DEF rlo r0
|
||||
DEF rhi r1
|
||||
DEF zero r2
|
||||
DEF A r3
|
||||
DEF B r4
|
||||
DEF C r5
|
||||
DEF D r6
|
||||
DEF oloop r17
|
||||
DEF iloop r18
|
||||
CSEG INIT 00000046
|
||||
CSEG MAIN 0000004b
|
||||
CSEG Add16_Operand1 00000147
|
||||
DSEG ADD16_OP1 00000110
|
||||
CSEG Add16_Operand2 00000148
|
||||
DSEG ADD16_OP2 00000112
|
||||
CSEG ADD16 0000008e
|
||||
CSEG Sub16_Operand1 00000149
|
||||
DSEG SUB16_OP1 00000130
|
||||
CSEG Sub16_Operand2 0000014a
|
||||
DSEG SUB16_OP2 00000132
|
||||
CSEG SUB16 000000b4
|
||||
CSEG Mul24_Operand1 0000014b
|
||||
DSEG MUL24_OP1 00000150
|
||||
CSEG Mul24_Operand2 0000014d
|
||||
DSEG MUL24_OP2 00000153
|
||||
CSEG MUL24 000000d7
|
||||
CSEG DONE 0000008d
|
||||
DSEG ADD16_Result 00000120
|
||||
DSEG SUB16_Result 00000140
|
||||
DSEG MUL24_Result 00000160
|
||||
CSEG MUL24_OLOOP 000000ea
|
||||
CSEG MUL24_ILOOP 000000ed
|
||||
CSEG COMPOUND 0000010e
|
||||
CSEG MUL16 0000010f
|
||||
DSEG addrB 00000102
|
||||
DSEG LAddrP 00000104
|
||||
CSEG MUL16_OLOOP 00000122
|
||||
DSEG addrA 00000100
|
||||
CSEG MUL16_ILOOP 00000125
|
||||
CSEG FUNC 00000146
|
||||
CSEG OperandD 0000014f
|
||||
CSEG OperandE 00000150
|
||||
CSEG OperandF 00000151
|
||||
DSEG MUL24_Result_End 00000166
|
||||
Binary file not shown.
@@ -0,0 +1,61 @@
|
||||
<ASSEMBLER_INFO>
|
||||
<VERSION>2.2.7</VERSION>
|
||||
<DEVICE>"ATmega128"</DEVICE>
|
||||
<WORKING_DIR>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Debug</WORKING_DIR>
|
||||
<INCLUDE_PATH>
|
||||
<DIR>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</DIR>
|
||||
<DIR>C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include</DIR>
|
||||
<DIR></DIR>
|
||||
</INCLUDE_PATH>
|
||||
<SOURCE_FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</SOURCE_FILE>
|
||||
<INCLUDED_FILES>
|
||||
<FILE>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</FILE>
|
||||
</INCLUDED_FILES>
|
||||
<OBJECT_FILES>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Debug\Corwin_Perren_Lab5_sourcecode.obj</FILE>
|
||||
</OBJECT_FILES>
|
||||
<HEX_FILES>
|
||||
<FILE>Corwin_Perren_Lab5_sourcecode.hex</FILE>
|
||||
</HEX_FILES>
|
||||
<OUTPUT_FILES>
|
||||
<FILE>Corwin_Perren_Lab5_sourcecode.map</FILE>
|
||||
<FILE>Corwin_Perren_Lab5_sourcecode.lss</FILE>
|
||||
</OUTPUT_FILES>
|
||||
<LABELS>
|
||||
<INIT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>52</LINE></INIT>
|
||||
<MAIN><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>66</LINE></MAIN>
|
||||
<Add16_Operand1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>524</LINE></Add16_Operand1>
|
||||
<ADD16_OP1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>568</LINE></ADD16_OP1>
|
||||
<Add16_Operand2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>527</LINE></Add16_Operand2>
|
||||
<ADD16_OP2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>570</LINE></ADD16_OP2>
|
||||
<ADD16><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>203</LINE></ADD16>
|
||||
<Sub16_Operand1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>531</LINE></Sub16_Operand1>
|
||||
<SUB16_OP1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>578</LINE></SUB16_OP1>
|
||||
<Sub16_Operand2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>534</LINE></Sub16_Operand2>
|
||||
<SUB16_OP2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>580</LINE></SUB16_OP2>
|
||||
<SUB16><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>264</LINE></SUB16>
|
||||
<Mul24_Operand1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>538</LINE></Mul24_Operand1>
|
||||
<MUL24_OP1><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>588</LINE></MUL24_OP1>
|
||||
<Mul24_Operand2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>542</LINE></Mul24_Operand2>
|
||||
<MUL24_OP2><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>590</LINE></MUL24_OP2>
|
||||
<MUL24><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>323</LINE></MUL24>
|
||||
<DONE><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>190</LINE></DONE>
|
||||
<ADD16_Result><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>574</LINE></ADD16_Result>
|
||||
<SUB16_Result><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>584</LINE></SUB16_Result>
|
||||
<MUL24_Result><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>594</LINE></MUL24_Result>
|
||||
<MUL24_OLOOP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>350</LINE></MUL24_OLOOP>
|
||||
<MUL24_ILOOP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>357</LINE></MUL24_ILOOP>
|
||||
<COMPOUND><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>407</LINE></COMPOUND>
|
||||
<MUL16><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>430</LINE></MUL16>
|
||||
<addrB><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>561</LINE></addrB>
|
||||
<LAddrP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>562</LINE></LAddrP>
|
||||
<MUL16_OLOOP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>457</LINE></MUL16_OLOOP>
|
||||
<addrA><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>560</LINE></addrA>
|
||||
<MUL16_ILOOP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>464</LINE></MUL16_ILOOP>
|
||||
<FUNC><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>508</LINE></FUNC>
|
||||
<OperandD><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>547</LINE></OperandD>
|
||||
<OperandE><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>549</LINE></OperandE>
|
||||
<OperandF><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>551</LINE></OperandF>
|
||||
<MUL24_Result_End><FILE>C:\Users\caperren\Github\ECE_375\Labs\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode\Corwin_Perren_Lab5_sourcecode.asm</FILE><LINE>596</LINE></MUL24_Result_End>
|
||||
</LABELS>
|
||||
</ASSEMBLER_INFO>
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{18226A42-8477-4023-8AD2-40C49DA407C9}") = "Corwin_Perren_Lab6_sourcecode", "Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asmproj", "{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
Release|AVR = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,257 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Corwin_Perren_Lab6_sourcecode.asm
|
||||
;*
|
||||
;* This program uses external pin interrupts to emulate
|
||||
;* the polling bumpbot routine.
|
||||
;*
|
||||
;* This is the skeleton file for Lab 6 of ECE 375
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: Corwin Perren
|
||||
;* Date: 10/31/18
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
.include "m128def.inc" ; Include definition file
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;***********************************************************
|
||||
.def mpr = r16 ; Multipurpose register
|
||||
.def waitcnt = r17 ; Wait Loop Counter
|
||||
.def ilcnt = r18 ; Inner Loop Counter
|
||||
.def olcnt = r19 ; Outer Loop Counter
|
||||
|
||||
.equ WTime = 100 ; Time to wait in wait loop, used to be 100
|
||||
|
||||
.equ WskrR = 0 ; Right Whisker Input Bit [D]
|
||||
.equ WskrL = 1 ; Left Whisker Input Bit [D]
|
||||
.equ EngEnR = 4 ; Right Engine Enable Bit [B]
|
||||
.equ EngEnL = 7 ; Left Engine Enable Bit [B]
|
||||
.equ EngDirR = 5 ; Right Engine Direction Bit [B]
|
||||
.equ EngDirL = 6 ; Left Engine Direction Bit [B]
|
||||
|
||||
; Bits 1 and 3 set for INT0 and INT1 trigger on falling edge
|
||||
.equ InterruptsFallingEdge = (1 << ISC01) | (1 << ISC11)
|
||||
|
||||
; Bits 0 and 1 set for INT0 and INT1 interrupts enabled
|
||||
.equ InterruptMasksEnabled = (1 << INT0) | (1 << INT1)
|
||||
.equ InterruptMasksDisabled = 0
|
||||
|
||||
; Setting these bits to one and writing them to the flag register clears them
|
||||
.equ InterruptFlagRegisterClear = (1 << INTF0) | (1 << INTF1)
|
||||
|
||||
;/////////////////////////////////////////////////////////////
|
||||
;These macros are the values to make the TekBot Move.
|
||||
;/////////////////////////////////////////////////////////////
|
||||
|
||||
.equ MovFwd = (1<<EngDirR|1<<EngDirL) ; Move Forward Command
|
||||
.equ MovBck = $00 ; Move Backward Command
|
||||
.equ TurnR = (1<<EngDirL) ; Turn Right Command
|
||||
.equ TurnL = (1<<EngDirR) ; Turn Left Command
|
||||
.equ Halt = (1<<EngEnR|1<<EngEnL) ; Halt Command
|
||||
|
||||
;***********************************************************
|
||||
;* Start of Code Segment
|
||||
;***********************************************************
|
||||
.cseg ; Beginning of code segment
|
||||
|
||||
;***********************************************************
|
||||
;* Interrupt Vectors
|
||||
;***********************************************************
|
||||
.org $0000 ; Beginning of IVs
|
||||
rjmp INIT ; Reset interrupt
|
||||
|
||||
; Set up interrupt vectors for any interrupts being used
|
||||
.org INT0addr
|
||||
rcall HitRight
|
||||
reti
|
||||
|
||||
.org INT1addr
|
||||
rcall HitLeft
|
||||
reti
|
||||
; This is just an example:
|
||||
;.org $002E ; Analog Comparator IV
|
||||
; rcall HandleAC ; Call function to handle interrupt
|
||||
; reti ; Return from interrupt
|
||||
|
||||
.org $0046 ; End of Interrupt Vectors
|
||||
|
||||
;***********************************************************
|
||||
;* Program Initialization
|
||||
;***********************************************************
|
||||
INIT: ; The initialization routine
|
||||
; Initialize Stack Pointer
|
||||
ldi mpr, low(RAMEND) ; Init the 2 stack pointer registers
|
||||
out SPL, mpr
|
||||
ldi mpr, high(RAMEND)
|
||||
out SPH, mpr
|
||||
|
||||
; Initialize Port B for output
|
||||
ldi mpr, ((1 << EngEnR) | (1 << EngDirR) | (1 << EngEnL) | (1 << EngDirL))
|
||||
out DDRB, mpr
|
||||
|
||||
; Initialize Port D for input
|
||||
ldi mpr, ((0 << WskrR) | (0 << WskrL)) ; Not necessary, just being explicit
|
||||
out DDRD, mpr
|
||||
|
||||
; Set pins to enable pullups
|
||||
ldi mpr, ((1 << WskrR) | (1 << WskrL))
|
||||
out PORTD, mpr
|
||||
|
||||
; Initialize external interrupts
|
||||
; D0 is INT0, D1 is INT1
|
||||
; Set the Interrupt Sense Control to falling edge
|
||||
ldi mpr, InterruptsFallingEdge
|
||||
sts EICRA, mpr
|
||||
|
||||
; Configure the External Interrupt Mask
|
||||
ldi mpr, InterruptMasksEnabled
|
||||
out EIMSK, mpr
|
||||
|
||||
; Turn on interrupts
|
||||
sei
|
||||
; NOTE: This must be the last thing to do in the INIT function
|
||||
|
||||
;***********************************************************
|
||||
;* Main Program
|
||||
;***********************************************************
|
||||
MAIN: ; The Main program
|
||||
|
||||
; Initialize TekBot Forward Movement
|
||||
ldi mpr, MovFwd ; Load Move Forward Command
|
||||
out PORTB, mpr ; Send command to motors
|
||||
rjmp MAIN ; Create an infinite while loop to signify the
|
||||
; end of the program.
|
||||
|
||||
;***********************************************************
|
||||
;* Functions and Subroutines
|
||||
;***********************************************************
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; You will probably want several functions, one to handle the
|
||||
; left whisker interrupt, one to handle the right whisker
|
||||
; interrupt, and maybe a wait function
|
||||
;------------------------------------------------------------
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: HitRight
|
||||
; Desc: Handles functionality of the TekBot when the right whisker
|
||||
; is triggered.
|
||||
;----------------------------------------------------------------
|
||||
HitRight:
|
||||
cli
|
||||
|
||||
push mpr ; Save mpr register
|
||||
push waitcnt ; Save wait register
|
||||
in mpr, SREG ; Save program state
|
||||
push mpr ;
|
||||
|
||||
; Move Backwards for a second
|
||||
ldi mpr, MovBck ; Load Move Backward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Turn left for a second
|
||||
ldi mpr, TurnL ; Load Turn Left Command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Move Forward again
|
||||
ldi mpr, MovFwd ; Load Move Forward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
pop mpr ; Restore program state
|
||||
out SREG, mpr ;
|
||||
pop waitcnt ; Restore wait register
|
||||
pop mpr ; Restore mpr
|
||||
|
||||
sei
|
||||
ret ; Return from subroutine
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: HitLeft
|
||||
; Desc: Handles functionality of the TekBot when the left whisker
|
||||
; is triggered.
|
||||
;----------------------------------------------------------------
|
||||
HitLeft:
|
||||
cli
|
||||
|
||||
push mpr ; Save mpr register
|
||||
push waitcnt ; Save wait register
|
||||
in mpr, SREG ; Save program state
|
||||
push mpr ;
|
||||
|
||||
; Move Backwards for a second
|
||||
ldi mpr, MovBck ; Load Move Backward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Turn right for a second
|
||||
ldi mpr, TurnR ; Load Turn Left Command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Move Forward again
|
||||
ldi mpr, MovFwd ; Load Move Forward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
pop mpr ; Restore program state
|
||||
out SREG, mpr ;
|
||||
pop waitcnt ; Restore wait register
|
||||
pop mpr ; Restore mpr
|
||||
|
||||
sei
|
||||
ret ; Return from subroutine
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: Wait
|
||||
; Desc: A wait loop that is 16 + 159975*waitcnt cycles or roughly
|
||||
; waitcnt*10ms. Just initialize wait for the specific amount
|
||||
; of time in 10ms intervals. Here is the general eqaution
|
||||
; for the number of clock cycles in the wait loop:
|
||||
; ((3 * ilcnt + 3) * olcnt + 3) * waitcnt + 13 + call
|
||||
;----------------------------------------------------------------
|
||||
Wait:
|
||||
push waitcnt ; Save wait register
|
||||
push ilcnt ; Save ilcnt register
|
||||
push olcnt ; Save olcnt register
|
||||
|
||||
Loop: ldi olcnt, 224 ; load olcnt register
|
||||
OLoop: ldi ilcnt, 237 ; load ilcnt register
|
||||
ILoop: dec ilcnt ; decrement ilcnt
|
||||
brne ILoop ; Continue Inner Loop
|
||||
dec olcnt ; decrement olcnt
|
||||
brne OLoop ; Continue Outer Loop
|
||||
dec waitcnt ; Decrement wait
|
||||
brne Loop ; Continue Wait loop
|
||||
|
||||
pop olcnt ; Restore olcnt register
|
||||
pop ilcnt ; Restore ilcnt register
|
||||
pop waitcnt ; Restore wait register
|
||||
ret ; Return from subroutine
|
||||
|
||||
;***********************************************************
|
||||
;* Stored Program Data
|
||||
;***********************************************************
|
||||
|
||||
; Enter any stored data you might need here
|
||||
|
||||
;***********************************************************
|
||||
;* Additional Program Includes
|
||||
;***********************************************************
|
||||
; There are no additional file includes for this program
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRAssembler</ToolchainName>
|
||||
<ProjectGuid>59B1D629-9DCC-43ed-A0FD-8AB0E4D622AB</ProjectGuid>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.obj</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<Language>ASSEMBLY</Language>
|
||||
<AssemblyName>Corwin_Perren_Lab6_sourcecode</AssemblyName>
|
||||
<Name>Corwin_Perren_Lab6_sourcecode</Name>
|
||||
<RootNamespace>Corwin_Perren_Lab6_sourcecode</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<EntryFile>$(MSBuildProjectDirectory)\Corwin_Perren_Lab6_sourcecode.asm</EntryFile>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress>0x20000000</RamSnippetAddress>
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue>exception_table</OverrideVtorValue>
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
<avrtool>com.atmel.avrdbg.tool.simulator</avrtool>
|
||||
<avrtoolserialnumber />
|
||||
<avrdeviceexpectedsignature>0x1E9702</avrdeviceexpectedsignature>
|
||||
<com_atmel_avrdbg_tool_simulator>
|
||||
<ToolOptions xmlns="">
|
||||
<InterfaceProperties>
|
||||
</InterfaceProperties>
|
||||
</ToolOptions>
|
||||
<ToolType xmlns="">com.atmel.avrdbg.tool.simulator</ToolType>
|
||||
<ToolNumber xmlns="">
|
||||
</ToolNumber>
|
||||
<ToolName xmlns="">Simulator</ToolName>
|
||||
</com_atmel_avrdbg_tool_simulator>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
<OutputType>Executable</OutputType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Corwin_Perren_Lab6_sourcecode.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Assembler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.2.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>bd3TUV9UtxpdYQkn+6MWPA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc/m128def.inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\templates\main.asm</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>BcqqR0hRIlKLOeSbNeOo6g==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/templates/main.asm</Name>
|
||||
<SelectString>Main file (.asm)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.2.209</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -0,0 +1,15 @@
|
||||
:020000020000FC
|
||||
:0200000045C0F9
|
||||
:0800040057D018956CD0189537
|
||||
:10008C000CBD0FEF0DBF00E10EBF00EF07BB00E092
|
||||
:10009C0001BB03E002BB0AE000936A0003E009BF66
|
||||
:1000AC00789400E608BBFDCFF8940F931F930FB71D
|
||||
:1000BC000F9300E008BB14E625D000E208BB14E661
|
||||
:1000CC0021D000E608BB03E008BF0F910FBF1F91C2
|
||||
:1000DC000F9178940895F8940F931F930FB70F9383
|
||||
:1000EC0000E008BB14E60ED000E408BB14E60AD00E
|
||||
:1000FC0000E608BB03E008BF0F910FBF1F910F91E3
|
||||
:10010C00789408951F932F933F9330EE2DEE2A95FC
|
||||
:10011C00F1F73A95D9F71A95C1F73F912F911F91A5
|
||||
:02012C00089534
|
||||
:00000001FF
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,897 @@
|
||||
|
||||
AVRASM ver. 2.2.7 C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm Wed Nov 07 10:41:33 2018
|
||||
|
||||
|
||||
EQU SIGNATURE_000 0000001e
|
||||
EQU SIGNATURE_001 00000097
|
||||
EQU SIGNATURE_002 00000002
|
||||
EQU UCSR1C 0000009d
|
||||
EQU UDR1 0000009c
|
||||
EQU UCSR1A 0000009b
|
||||
EQU UCSR1B 0000009a
|
||||
EQU UBRR1H 00000098
|
||||
EQU UBRR1L 00000099
|
||||
EQU UCSR0C 00000095
|
||||
EQU UBRR0H 00000090
|
||||
EQU TCCR3C 0000008c
|
||||
EQU TCCR3A 0000008b
|
||||
EQU TCCR3B 0000008a
|
||||
EQU TCNT3L 00000088
|
||||
EQU TCNT3H 00000089
|
||||
EQU OCR3AL 00000086
|
||||
EQU OCR3AH 00000087
|
||||
EQU OCR3BL 00000084
|
||||
EQU OCR3BH 00000085
|
||||
EQU OCR3CL 00000082
|
||||
EQU OCR3CH 00000083
|
||||
EQU ICR3L 00000080
|
||||
EQU ICR3H 00000081
|
||||
EQU ETIMSK 0000007d
|
||||
EQU ETIFR 0000007c
|
||||
EQU TCCR1C 0000007a
|
||||
EQU OCR1CL 00000078
|
||||
EQU OCR1CH 00000079
|
||||
EQU TWCR 00000074
|
||||
EQU TWDR 00000073
|
||||
EQU TWAR 00000072
|
||||
EQU TWSR 00000071
|
||||
EQU TWBR 00000070
|
||||
EQU OSCCAL 0000006f
|
||||
EQU XMCRA 0000006d
|
||||
EQU XMCRB 0000006c
|
||||
EQU EICRA 0000006a
|
||||
EQU SPMCSR 00000068
|
||||
EQU PORTG 00000065
|
||||
EQU DDRG 00000064
|
||||
EQU PING 00000063
|
||||
EQU PORTF 00000062
|
||||
EQU DDRF 00000061
|
||||
EQU SREG 0000003f
|
||||
EQU SPL 0000003d
|
||||
EQU SPH 0000003e
|
||||
EQU XDIV 0000003c
|
||||
EQU RAMPZ 0000003b
|
||||
EQU EICRB 0000003a
|
||||
EQU EIMSK 00000039
|
||||
EQU EIFR 00000038
|
||||
EQU TIMSK 00000037
|
||||
EQU TIFR 00000036
|
||||
EQU MCUCR 00000035
|
||||
EQU MCUCSR 00000034
|
||||
EQU TCCR0 00000033
|
||||
EQU TCNT0 00000032
|
||||
EQU OCR0 00000031
|
||||
EQU ASSR 00000030
|
||||
EQU TCCR1A 0000002f
|
||||
EQU TCCR1B 0000002e
|
||||
EQU TCNT1L 0000002c
|
||||
EQU TCNT1H 0000002d
|
||||
EQU OCR1AL 0000002a
|
||||
EQU OCR1AH 0000002b
|
||||
EQU OCR1BL 00000028
|
||||
EQU OCR1BH 00000029
|
||||
EQU ICR1L 00000026
|
||||
EQU ICR1H 00000027
|
||||
EQU TCCR2 00000025
|
||||
EQU TCNT2 00000024
|
||||
EQU OCR2 00000023
|
||||
EQU OCDR 00000022
|
||||
EQU WDTCR 00000021
|
||||
EQU SFIOR 00000020
|
||||
EQU EEARL 0000001e
|
||||
EQU EEARH 0000001f
|
||||
EQU EEDR 0000001d
|
||||
EQU EECR 0000001c
|
||||
EQU PORTA 0000001b
|
||||
EQU DDRA 0000001a
|
||||
EQU PINA 00000019
|
||||
EQU PORTB 00000018
|
||||
EQU DDRB 00000017
|
||||
EQU PINB 00000016
|
||||
EQU PORTC 00000015
|
||||
EQU DDRC 00000014
|
||||
EQU PINC 00000013
|
||||
EQU PORTD 00000012
|
||||
EQU DDRD 00000011
|
||||
EQU PIND 00000010
|
||||
EQU SPDR 0000000f
|
||||
EQU SPSR 0000000e
|
||||
EQU SPCR 0000000d
|
||||
EQU UDR0 0000000c
|
||||
EQU UCSR0A 0000000b
|
||||
EQU UCSR0B 0000000a
|
||||
EQU UBRR0L 00000009
|
||||
EQU ACSR 00000008
|
||||
EQU ADMUX 00000007
|
||||
EQU ADCSRA 00000006
|
||||
EQU ADCH 00000005
|
||||
EQU ADCL 00000004
|
||||
EQU PORTE 00000003
|
||||
EQU DDRE 00000002
|
||||
EQU PINE 00000001
|
||||
EQU PINF 00000000
|
||||
EQU ACME 00000003
|
||||
EQU ACIS0 00000000
|
||||
EQU ACIS1 00000001
|
||||
EQU ACIC 00000002
|
||||
EQU ACIE 00000003
|
||||
EQU ACI 00000004
|
||||
EQU ACO 00000005
|
||||
EQU ACBG 00000006
|
||||
EQU ACD 00000007
|
||||
EQU SPDR0 00000000
|
||||
EQU SPDR1 00000001
|
||||
EQU SPDR2 00000002
|
||||
EQU SPDR3 00000003
|
||||
EQU SPDR4 00000004
|
||||
EQU SPDR5 00000005
|
||||
EQU SPDR6 00000006
|
||||
EQU SPDR7 00000007
|
||||
EQU SPI2X 00000000
|
||||
EQU WCOL 00000006
|
||||
EQU SPIF 00000007
|
||||
EQU SPR0 00000000
|
||||
EQU SPR1 00000001
|
||||
EQU CPHA 00000002
|
||||
EQU CPOL 00000003
|
||||
EQU MSTR 00000004
|
||||
EQU DORD 00000005
|
||||
EQU SPE 00000006
|
||||
EQU SPIE 00000007
|
||||
EQU I2BR 00000070
|
||||
EQU TWBR0 00000000
|
||||
EQU TWBR1 00000001
|
||||
EQU TWBR2 00000002
|
||||
EQU TWBR3 00000003
|
||||
EQU TWBR4 00000004
|
||||
EQU TWBR5 00000005
|
||||
EQU TWBR6 00000006
|
||||
EQU TWBR7 00000007
|
||||
EQU I2CR 00000074
|
||||
EQU TWIE 00000000
|
||||
EQU I2IE 00000000
|
||||
EQU TWEN 00000002
|
||||
EQU I2EN 00000002
|
||||
EQU ENI2C 00000002
|
||||
EQU TWWC 00000003
|
||||
EQU I2WC 00000003
|
||||
EQU TWSTO 00000004
|
||||
EQU I2STO 00000004
|
||||
EQU TWSTA 00000005
|
||||
EQU I2STA 00000005
|
||||
EQU TWEA 00000006
|
||||
EQU I2EA 00000006
|
||||
EQU TWINT 00000007
|
||||
EQU I2INT 00000007
|
||||
EQU I2SR 00000071
|
||||
EQU TWPS0 00000000
|
||||
EQU TWS0 00000000
|
||||
EQU I2GCE 00000000
|
||||
EQU TWPS1 00000001
|
||||
EQU TWS1 00000001
|
||||
EQU TWS3 00000003
|
||||
EQU I2S3 00000003
|
||||
EQU TWS4 00000004
|
||||
EQU I2S4 00000004
|
||||
EQU TWS5 00000005
|
||||
EQU I2S5 00000005
|
||||
EQU TWS6 00000006
|
||||
EQU I2S6 00000006
|
||||
EQU TWS7 00000007
|
||||
EQU I2S7 00000007
|
||||
EQU I2DR 00000073
|
||||
EQU TWD0 00000000
|
||||
EQU TWD1 00000001
|
||||
EQU TWD2 00000002
|
||||
EQU TWD3 00000003
|
||||
EQU TWD4 00000004
|
||||
EQU TWD5 00000005
|
||||
EQU TWD6 00000006
|
||||
EQU TWD7 00000007
|
||||
EQU I2AR 00000072
|
||||
EQU TWGCE 00000000
|
||||
EQU TWA0 00000001
|
||||
EQU TWA1 00000002
|
||||
EQU TWA2 00000003
|
||||
EQU TWA3 00000004
|
||||
EQU TWA4 00000005
|
||||
EQU TWA5 00000006
|
||||
EQU TWA6 00000007
|
||||
EQU UDR00 00000000
|
||||
EQU UDR01 00000001
|
||||
EQU UDR02 00000002
|
||||
EQU UDR03 00000003
|
||||
EQU UDR04 00000004
|
||||
EQU UDR05 00000005
|
||||
EQU UDR06 00000006
|
||||
EQU UDR07 00000007
|
||||
EQU MPCM0 00000000
|
||||
EQU U2X0 00000001
|
||||
EQU UPE0 00000002
|
||||
EQU DOR0 00000003
|
||||
EQU FE0 00000004
|
||||
EQU UDRE0 00000005
|
||||
EQU TXC0 00000006
|
||||
EQU RXC0 00000007
|
||||
EQU TXB80 00000000
|
||||
EQU RXB80 00000001
|
||||
EQU UCSZ02 00000002
|
||||
EQU UCSZ2 00000002
|
||||
EQU TXEN0 00000003
|
||||
EQU RXEN0 00000004
|
||||
EQU UDRIE0 00000005
|
||||
EQU TXCIE0 00000006
|
||||
EQU RXCIE0 00000007
|
||||
EQU UCPOL0 00000000
|
||||
EQU UCSZ00 00000001
|
||||
EQU UCSZ01 00000002
|
||||
EQU USBS0 00000003
|
||||
EQU UPM00 00000004
|
||||
EQU UPM01 00000005
|
||||
EQU UMSEL0 00000006
|
||||
EQU UBRR8 00000000
|
||||
EQU UBRR9 00000001
|
||||
EQU UBRR10 00000002
|
||||
EQU UBRR11 00000003
|
||||
EQU UBRR0 00000000
|
||||
EQU UBRR1 00000001
|
||||
EQU UBRR2 00000002
|
||||
EQU UBRR3 00000003
|
||||
EQU UBRR4 00000004
|
||||
EQU UBRR5 00000005
|
||||
EQU UBRR6 00000006
|
||||
EQU UBRR7 00000007
|
||||
EQU UDR10 00000000
|
||||
EQU UDR11 00000001
|
||||
EQU UDR12 00000002
|
||||
EQU UDR13 00000003
|
||||
EQU UDR14 00000004
|
||||
EQU UDR15 00000005
|
||||
EQU UDR16 00000006
|
||||
EQU UDR17 00000007
|
||||
EQU MPCM1 00000000
|
||||
EQU U2X1 00000001
|
||||
EQU UPE1 00000002
|
||||
EQU DOR1 00000003
|
||||
EQU FE1 00000004
|
||||
EQU UDRE1 00000005
|
||||
EQU TXC1 00000006
|
||||
EQU RXC1 00000007
|
||||
EQU TXB81 00000000
|
||||
EQU RXB81 00000001
|
||||
EQU UCSZ12 00000002
|
||||
EQU TXEN1 00000003
|
||||
EQU RXEN1 00000004
|
||||
EQU UDRIE1 00000005
|
||||
EQU TXCIE1 00000006
|
||||
EQU RXCIE1 00000007
|
||||
EQU UCPOL1 00000000
|
||||
EQU UCSZ10 00000001
|
||||
EQU UCSZ11 00000002
|
||||
EQU USBS1 00000003
|
||||
EQU UPM10 00000004
|
||||
EQU UPM11 00000005
|
||||
EQU UMSEL1 00000006
|
||||
EQU SREG_C 00000000
|
||||
EQU SREG_Z 00000001
|
||||
EQU SREG_N 00000002
|
||||
EQU SREG_V 00000003
|
||||
EQU SREG_S 00000004
|
||||
EQU SREG_H 00000005
|
||||
EQU SREG_T 00000006
|
||||
EQU SREG_I 00000007
|
||||
EQU IVCE 00000000
|
||||
EQU IVSEL 00000001
|
||||
EQU SM2 00000002
|
||||
EQU SM0 00000003
|
||||
EQU SM1 00000004
|
||||
EQU SE 00000005
|
||||
EQU SRW10 00000006
|
||||
EQU SRE 00000007
|
||||
EQU SRW11 00000001
|
||||
EQU SRW00 00000002
|
||||
EQU SRW01 00000003
|
||||
EQU SRL0 00000004
|
||||
EQU SRL1 00000005
|
||||
EQU SRL2 00000006
|
||||
EQU XMM0 00000000
|
||||
EQU XMM1 00000001
|
||||
EQU XMM2 00000002
|
||||
EQU XMBK 00000007
|
||||
EQU CAL0 00000000
|
||||
EQU CAL1 00000001
|
||||
EQU CAL2 00000002
|
||||
EQU CAL3 00000003
|
||||
EQU CAL4 00000004
|
||||
EQU CAL5 00000005
|
||||
EQU CAL6 00000006
|
||||
EQU CAL7 00000007
|
||||
EQU XDIV0 00000000
|
||||
EQU XDIV1 00000001
|
||||
EQU XDIV2 00000002
|
||||
EQU XDIV3 00000003
|
||||
EQU XDIV4 00000004
|
||||
EQU XDIV5 00000005
|
||||
EQU XDIV6 00000006
|
||||
EQU XDIVEN 00000007
|
||||
EQU PORF 00000000
|
||||
EQU EXTRF 00000001
|
||||
EQU BORF 00000002
|
||||
EQU WDRF 00000003
|
||||
EQU JTRF 00000004
|
||||
EQU JTD 00000007
|
||||
EQU RAMPZ0 00000000
|
||||
EQU SPMCR 00000068
|
||||
EQU SPMEN 00000000
|
||||
EQU PGERS 00000001
|
||||
EQU PGWRT 00000002
|
||||
EQU BLBSET 00000003
|
||||
EQU RWWSRE 00000004
|
||||
EQU ASRE 00000004
|
||||
EQU RWWSB 00000006
|
||||
EQU ASB 00000006
|
||||
EQU SPMIE 00000007
|
||||
EQU OCDR0 00000000
|
||||
EQU OCDR1 00000001
|
||||
EQU OCDR2 00000002
|
||||
EQU OCDR3 00000003
|
||||
EQU OCDR4 00000004
|
||||
EQU OCDR5 00000005
|
||||
EQU OCDR6 00000006
|
||||
EQU OCDR7 00000007
|
||||
EQU IDRD 00000007
|
||||
EQU PSR321 00000000
|
||||
EQU PSR1 00000000
|
||||
EQU PSR2 00000000
|
||||
EQU PSR3 00000000
|
||||
EQU PSR0 00000001
|
||||
EQU PUD 00000002
|
||||
EQU TSM 00000007
|
||||
EQU ISC00 00000000
|
||||
EQU ISC01 00000001
|
||||
EQU ISC10 00000002
|
||||
EQU ISC11 00000003
|
||||
EQU ISC20 00000004
|
||||
EQU ISC21 00000005
|
||||
EQU ISC30 00000006
|
||||
EQU ISC31 00000007
|
||||
EQU ISC40 00000000
|
||||
EQU ISC41 00000001
|
||||
EQU ISC50 00000002
|
||||
EQU ISC51 00000003
|
||||
EQU ISC60 00000004
|
||||
EQU ISC61 00000005
|
||||
EQU ISC70 00000006
|
||||
EQU ISC71 00000007
|
||||
EQU GICR 00000039
|
||||
EQU GIMSK 00000039
|
||||
EQU INT0 00000000
|
||||
EQU INT1 00000001
|
||||
EQU INT2 00000002
|
||||
EQU INT3 00000003
|
||||
EQU INT4 00000004
|
||||
EQU INT5 00000005
|
||||
EQU INT6 00000006
|
||||
EQU INT7 00000007
|
||||
EQU GIFR 00000038
|
||||
EQU INTF0 00000000
|
||||
EQU INTF1 00000001
|
||||
EQU INTF2 00000002
|
||||
EQU INTF3 00000003
|
||||
EQU INTF4 00000004
|
||||
EQU INTF5 00000005
|
||||
EQU INTF6 00000006
|
||||
EQU INTF7 00000007
|
||||
EQU EEDR0 00000000
|
||||
EQU EEDR1 00000001
|
||||
EQU EEDR2 00000002
|
||||
EQU EEDR3 00000003
|
||||
EQU EEDR4 00000004
|
||||
EQU EEDR5 00000005
|
||||
EQU EEDR6 00000006
|
||||
EQU EEDR7 00000007
|
||||
EQU EERE 00000000
|
||||
EQU EEWE 00000001
|
||||
EQU EEMWE 00000002
|
||||
EQU EERIE 00000003
|
||||
EQU PORTA0 00000000
|
||||
EQU PA0 00000000
|
||||
EQU PORTA1 00000001
|
||||
EQU PA1 00000001
|
||||
EQU PORTA2 00000002
|
||||
EQU PA2 00000002
|
||||
EQU PORTA3 00000003
|
||||
EQU PA3 00000003
|
||||
EQU PORTA4 00000004
|
||||
EQU PA4 00000004
|
||||
EQU PORTA5 00000005
|
||||
EQU PA5 00000005
|
||||
EQU PORTA6 00000006
|
||||
EQU PA6 00000006
|
||||
EQU PORTA7 00000007
|
||||
EQU PA7 00000007
|
||||
EQU DDA0 00000000
|
||||
EQU DDA1 00000001
|
||||
EQU DDA2 00000002
|
||||
EQU DDA3 00000003
|
||||
EQU DDA4 00000004
|
||||
EQU DDA5 00000005
|
||||
EQU DDA6 00000006
|
||||
EQU DDA7 00000007
|
||||
EQU PINA0 00000000
|
||||
EQU PINA1 00000001
|
||||
EQU PINA2 00000002
|
||||
EQU PINA3 00000003
|
||||
EQU PINA4 00000004
|
||||
EQU PINA5 00000005
|
||||
EQU PINA6 00000006
|
||||
EQU PINA7 00000007
|
||||
EQU PORTB0 00000000
|
||||
EQU PB0 00000000
|
||||
EQU PORTB1 00000001
|
||||
EQU PB1 00000001
|
||||
EQU PORTB2 00000002
|
||||
EQU PB2 00000002
|
||||
EQU PORTB3 00000003
|
||||
EQU PB3 00000003
|
||||
EQU PORTB4 00000004
|
||||
EQU PB4 00000004
|
||||
EQU PORTB5 00000005
|
||||
EQU PB5 00000005
|
||||
EQU PORTB6 00000006
|
||||
EQU PB6 00000006
|
||||
EQU PORTB7 00000007
|
||||
EQU PB7 00000007
|
||||
EQU DDB0 00000000
|
||||
EQU DDB1 00000001
|
||||
EQU DDB2 00000002
|
||||
EQU DDB3 00000003
|
||||
EQU DDB4 00000004
|
||||
EQU DDB5 00000005
|
||||
EQU DDB6 00000006
|
||||
EQU DDB7 00000007
|
||||
EQU PINB0 00000000
|
||||
EQU PINB1 00000001
|
||||
EQU PINB2 00000002
|
||||
EQU PINB3 00000003
|
||||
EQU PINB4 00000004
|
||||
EQU PINB5 00000005
|
||||
EQU PINB6 00000006
|
||||
EQU PINB7 00000007
|
||||
EQU PORTC0 00000000
|
||||
EQU PC0 00000000
|
||||
EQU PORTC1 00000001
|
||||
EQU PC1 00000001
|
||||
EQU PORTC2 00000002
|
||||
EQU PC2 00000002
|
||||
EQU PORTC3 00000003
|
||||
EQU PC3 00000003
|
||||
EQU PORTC4 00000004
|
||||
EQU PC4 00000004
|
||||
EQU PORTC5 00000005
|
||||
EQU PC5 00000005
|
||||
EQU PORTC6 00000006
|
||||
EQU PC6 00000006
|
||||
EQU PORTC7 00000007
|
||||
EQU PC7 00000007
|
||||
EQU DDC0 00000000
|
||||
EQU DDC1 00000001
|
||||
EQU DDC2 00000002
|
||||
EQU DDC3 00000003
|
||||
EQU DDC4 00000004
|
||||
EQU DDC5 00000005
|
||||
EQU DDC6 00000006
|
||||
EQU DDC7 00000007
|
||||
EQU PINC0 00000000
|
||||
EQU PINC1 00000001
|
||||
EQU PINC2 00000002
|
||||
EQU PINC3 00000003
|
||||
EQU PINC4 00000004
|
||||
EQU PINC5 00000005
|
||||
EQU PINC6 00000006
|
||||
EQU PINC7 00000007
|
||||
EQU PORTD0 00000000
|
||||
EQU PD0 00000000
|
||||
EQU PORTD1 00000001
|
||||
EQU PD1 00000001
|
||||
EQU PORTD2 00000002
|
||||
EQU PD2 00000002
|
||||
EQU PORTD3 00000003
|
||||
EQU PD3 00000003
|
||||
EQU PORTD4 00000004
|
||||
EQU PD4 00000004
|
||||
EQU PORTD5 00000005
|
||||
EQU PD5 00000005
|
||||
EQU PORTD6 00000006
|
||||
EQU PD6 00000006
|
||||
EQU PORTD7 00000007
|
||||
EQU PD7 00000007
|
||||
EQU DDD0 00000000
|
||||
EQU DDD1 00000001
|
||||
EQU DDD2 00000002
|
||||
EQU DDD3 00000003
|
||||
EQU DDD4 00000004
|
||||
EQU DDD5 00000005
|
||||
EQU DDD6 00000006
|
||||
EQU DDD7 00000007
|
||||
EQU PIND0 00000000
|
||||
EQU PIND1 00000001
|
||||
EQU PIND2 00000002
|
||||
EQU PIND3 00000003
|
||||
EQU PIND4 00000004
|
||||
EQU PIND5 00000005
|
||||
EQU PIND6 00000006
|
||||
EQU PIND7 00000007
|
||||
EQU PORTE0 00000000
|
||||
EQU PE0 00000000
|
||||
EQU PORTE1 00000001
|
||||
EQU PE1 00000001
|
||||
EQU PORTE2 00000002
|
||||
EQU PE2 00000002
|
||||
EQU PORTE3 00000003
|
||||
EQU PE3 00000003
|
||||
EQU PORTE4 00000004
|
||||
EQU PE4 00000004
|
||||
EQU PORTE5 00000005
|
||||
EQU PE5 00000005
|
||||
EQU PORTE6 00000006
|
||||
EQU PE6 00000006
|
||||
EQU PORTE7 00000007
|
||||
EQU PE7 00000007
|
||||
EQU DDE0 00000000
|
||||
EQU DDE1 00000001
|
||||
EQU DDE2 00000002
|
||||
EQU DDE3 00000003
|
||||
EQU DDE4 00000004
|
||||
EQU DDE5 00000005
|
||||
EQU DDE6 00000006
|
||||
EQU DDE7 00000007
|
||||
EQU PINE0 00000000
|
||||
EQU PINE1 00000001
|
||||
EQU PINE2 00000002
|
||||
EQU PINE3 00000003
|
||||
EQU PINE4 00000004
|
||||
EQU PINE5 00000005
|
||||
EQU PINE6 00000006
|
||||
EQU PINE7 00000007
|
||||
EQU PORTF0 00000000
|
||||
EQU PF0 00000000
|
||||
EQU PORTF1 00000001
|
||||
EQU PF1 00000001
|
||||
EQU PORTF2 00000002
|
||||
EQU PF2 00000002
|
||||
EQU PORTF3 00000003
|
||||
EQU PF3 00000003
|
||||
EQU PORTF4 00000004
|
||||
EQU PF4 00000004
|
||||
EQU PORTF5 00000005
|
||||
EQU PF5 00000005
|
||||
EQU PORTF6 00000006
|
||||
EQU PF6 00000006
|
||||
EQU PORTF7 00000007
|
||||
EQU PF7 00000007
|
||||
EQU DDF0 00000000
|
||||
EQU DDF1 00000001
|
||||
EQU DDF2 00000002
|
||||
EQU DDF3 00000003
|
||||
EQU DDF4 00000004
|
||||
EQU DDF5 00000005
|
||||
EQU DDF6 00000006
|
||||
EQU DDF7 00000007
|
||||
EQU PINF0 00000000
|
||||
EQU PINF1 00000001
|
||||
EQU PINF2 00000002
|
||||
EQU PINF3 00000003
|
||||
EQU PINF4 00000004
|
||||
EQU PINF5 00000005
|
||||
EQU PINF6 00000006
|
||||
EQU PINF7 00000007
|
||||
EQU PORTG0 00000000
|
||||
EQU PG0 00000000
|
||||
EQU PORTG1 00000001
|
||||
EQU PG1 00000001
|
||||
EQU PORTG2 00000002
|
||||
EQU PG2 00000002
|
||||
EQU PORTG3 00000003
|
||||
EQU PG3 00000003
|
||||
EQU PORTG4 00000004
|
||||
EQU PG4 00000004
|
||||
EQU DDG0 00000000
|
||||
EQU DDG1 00000001
|
||||
EQU DDG2 00000002
|
||||
EQU DDG3 00000003
|
||||
EQU DDG4 00000004
|
||||
EQU PING0 00000000
|
||||
EQU PING1 00000001
|
||||
EQU PING2 00000002
|
||||
EQU PING3 00000003
|
||||
EQU PING4 00000004
|
||||
EQU CS00 00000000
|
||||
EQU CS01 00000001
|
||||
EQU CS02 00000002
|
||||
EQU WGM01 00000003
|
||||
EQU CTC0 00000003
|
||||
EQU COM00 00000004
|
||||
EQU COM01 00000005
|
||||
EQU WGM00 00000006
|
||||
EQU PWM0 00000006
|
||||
EQU FOC0 00000007
|
||||
EQU TCNT0_0 00000000
|
||||
EQU TCNT0_1 00000001
|
||||
EQU TCNT0_2 00000002
|
||||
EQU TCNT0_3 00000003
|
||||
EQU TCNT0_4 00000004
|
||||
EQU TCNT0_5 00000005
|
||||
EQU TCNT0_6 00000006
|
||||
EQU TCNT0_7 00000007
|
||||
EQU OCR0_0 00000000
|
||||
EQU OCR0_1 00000001
|
||||
EQU OCR0_2 00000002
|
||||
EQU OCR0_3 00000003
|
||||
EQU OCR0_4 00000004
|
||||
EQU OCR0_5 00000005
|
||||
EQU OCR0_6 00000006
|
||||
EQU OCR0_7 00000007
|
||||
EQU TCR0UB 00000000
|
||||
EQU OCR0UB 00000001
|
||||
EQU TCN0UB 00000002
|
||||
EQU AS0 00000003
|
||||
EQU TOIE0 00000000
|
||||
EQU OCIE0 00000001
|
||||
EQU TOV0 00000000
|
||||
EQU OCF0 00000001
|
||||
EQU TOIE1 00000002
|
||||
EQU OCIE1B 00000003
|
||||
EQU OCIE1A 00000004
|
||||
EQU TICIE1 00000005
|
||||
EQU OCIE1C 00000000
|
||||
EQU TOV1 00000002
|
||||
EQU OCF1B 00000003
|
||||
EQU OCF1A 00000004
|
||||
EQU ICF1 00000005
|
||||
EQU OCF1C 00000000
|
||||
EQU WGM10 00000000
|
||||
EQU PWM10 00000000
|
||||
EQU WGM11 00000001
|
||||
EQU PWM11 00000001
|
||||
EQU COM1C0 00000002
|
||||
EQU COM1C1 00000003
|
||||
EQU COM1B0 00000004
|
||||
EQU COM1B1 00000005
|
||||
EQU COM1A0 00000006
|
||||
EQU COM1A1 00000007
|
||||
EQU CS10 00000000
|
||||
EQU CS11 00000001
|
||||
EQU CS12 00000002
|
||||
EQU WGM12 00000003
|
||||
EQU CTC10 00000003
|
||||
EQU WGM13 00000004
|
||||
EQU CTC11 00000004
|
||||
EQU ICES1 00000006
|
||||
EQU ICNC1 00000007
|
||||
EQU FOC1C 00000005
|
||||
EQU FOC1B 00000006
|
||||
EQU FOC1A 00000007
|
||||
EQU CS20 00000000
|
||||
EQU CS21 00000001
|
||||
EQU CS22 00000002
|
||||
EQU WGM21 00000003
|
||||
EQU CTC2 00000003
|
||||
EQU COM20 00000004
|
||||
EQU COM21 00000005
|
||||
EQU WGM20 00000006
|
||||
EQU PWM2 00000006
|
||||
EQU FOC2 00000007
|
||||
EQU TCNT2_0 00000000
|
||||
EQU TCNT2_1 00000001
|
||||
EQU TCNT2_2 00000002
|
||||
EQU TCNT2_3 00000003
|
||||
EQU TCNT2_4 00000004
|
||||
EQU TCNT2_5 00000005
|
||||
EQU TCNT2_6 00000006
|
||||
EQU TCNT2_7 00000007
|
||||
EQU OCR2_0 00000000
|
||||
EQU OCR2_1 00000001
|
||||
EQU OCR2_2 00000002
|
||||
EQU OCR2_3 00000003
|
||||
EQU OCR2_4 00000004
|
||||
EQU OCR2_5 00000005
|
||||
EQU OCR2_6 00000006
|
||||
EQU OCR2_7 00000007
|
||||
EQU TOIE2 00000006
|
||||
EQU OCIE2 00000007
|
||||
EQU TOV2 00000006
|
||||
EQU OCF2 00000007
|
||||
EQU OCIE3C 00000001
|
||||
EQU TOIE3 00000002
|
||||
EQU OCIE3B 00000003
|
||||
EQU OCIE3A 00000004
|
||||
EQU TICIE3 00000005
|
||||
EQU OCF3C 00000001
|
||||
EQU TOV3 00000002
|
||||
EQU OCF3B 00000003
|
||||
EQU OCF3A 00000004
|
||||
EQU ICF3 00000005
|
||||
EQU WGM30 00000000
|
||||
EQU PWM30 00000000
|
||||
EQU WGM31 00000001
|
||||
EQU PWM31 00000001
|
||||
EQU COM3C0 00000002
|
||||
EQU COM3C1 00000003
|
||||
EQU COM3B0 00000004
|
||||
EQU COM3B1 00000005
|
||||
EQU COM3A0 00000006
|
||||
EQU COM3A1 00000007
|
||||
EQU CS30 00000000
|
||||
EQU CS31 00000001
|
||||
EQU CS32 00000002
|
||||
EQU WGM32 00000003
|
||||
EQU CTC30 00000003
|
||||
EQU WGM33 00000004
|
||||
EQU CTC31 00000004
|
||||
EQU ICES3 00000006
|
||||
EQU ICNC3 00000007
|
||||
EQU FOC3C 00000005
|
||||
EQU FOC3B 00000006
|
||||
EQU FOC3A 00000007
|
||||
EQU TCN3L0 00000000
|
||||
EQU TCN3L1 00000001
|
||||
EQU TCN3L2 00000002
|
||||
EQU TCN3L3 00000003
|
||||
EQU TCN3L4 00000004
|
||||
EQU TCN3L5 00000005
|
||||
EQU TCN3L6 00000006
|
||||
EQU TCN3L7 00000007
|
||||
EQU WDTCSR 00000021
|
||||
EQU WDP0 00000000
|
||||
EQU WDP1 00000001
|
||||
EQU WDP2 00000002
|
||||
EQU WDE 00000003
|
||||
EQU WDCE 00000004
|
||||
EQU WDTOE 00000004
|
||||
EQU MUX0 00000000
|
||||
EQU MUX1 00000001
|
||||
EQU MUX2 00000002
|
||||
EQU MUX3 00000003
|
||||
EQU MUX4 00000004
|
||||
EQU ADLAR 00000005
|
||||
EQU REFS0 00000006
|
||||
EQU REFS1 00000007
|
||||
EQU ADCSR 00000006
|
||||
EQU ADPS0 00000000
|
||||
EQU ADPS1 00000001
|
||||
EQU ADPS2 00000002
|
||||
EQU ADIE 00000003
|
||||
EQU ADIF 00000004
|
||||
EQU ADFR 00000005
|
||||
EQU ADSC 00000006
|
||||
EQU ADEN 00000007
|
||||
EQU ADCH0 00000000
|
||||
EQU ADCH1 00000001
|
||||
EQU ADCH2 00000002
|
||||
EQU ADCH3 00000003
|
||||
EQU ADCH4 00000004
|
||||
EQU ADCH5 00000005
|
||||
EQU ADCH6 00000006
|
||||
EQU ADCH7 00000007
|
||||
EQU ADCL0 00000000
|
||||
EQU ADCL1 00000001
|
||||
EQU ADCL2 00000002
|
||||
EQU ADCL3 00000003
|
||||
EQU ADCL4 00000004
|
||||
EQU ADCL5 00000005
|
||||
EQU ADCL6 00000006
|
||||
EQU ADCL7 00000007
|
||||
EQU LB1 00000000
|
||||
EQU LB2 00000001
|
||||
EQU BLB01 00000002
|
||||
EQU BLB02 00000003
|
||||
EQU BLB11 00000004
|
||||
EQU BLB12 00000005
|
||||
EQU CKSEL0 00000000
|
||||
EQU CKSEL1 00000001
|
||||
EQU CKSEL2 00000002
|
||||
EQU CKSEL3 00000003
|
||||
EQU SUT0 00000004
|
||||
EQU SUT1 00000005
|
||||
EQU BODEN 00000006
|
||||
EQU BODLEVEL 00000007
|
||||
EQU BOOTRST 00000000
|
||||
EQU BOOTSZ0 00000001
|
||||
EQU BOOTSZ1 00000002
|
||||
EQU EESAVE 00000003
|
||||
EQU CKOPT 00000004
|
||||
EQU SPIEN 00000005
|
||||
EQU JTAGEN 00000006
|
||||
EQU OCDEN 00000007
|
||||
EQU WDTON 00000000
|
||||
EQU M103C 00000001
|
||||
DEF XH r27
|
||||
DEF XL r26
|
||||
DEF YH r29
|
||||
DEF YL r28
|
||||
DEF ZH r31
|
||||
DEF ZL r30
|
||||
EQU FLASHEND 0000ffff
|
||||
EQU IOEND 000000ff
|
||||
EQU SRAM_START 00000100
|
||||
EQU SRAM_SIZE 00001000
|
||||
EQU RAMEND 000010ff
|
||||
EQU XRAMEND 0000ffff
|
||||
EQU E2END 00000fff
|
||||
EQU EEPROMEND 00000fff
|
||||
EQU EEADRBITS 0000000c
|
||||
EQU NRWW_START_ADDR 0000f000
|
||||
EQU NRWW_STOP_ADDR 0000ffff
|
||||
EQU RWW_START_ADDR 00000000
|
||||
EQU RWW_STOP_ADDR 0000efff
|
||||
EQU PAGESIZE 00000080
|
||||
EQU FIRSTBOOTSTART 0000fe00
|
||||
EQU SECONDBOOTSTART 0000fc00
|
||||
EQU THIRDBOOTSTART 0000f800
|
||||
EQU FOURTHBOOTSTART 0000f000
|
||||
EQU SMALLBOOTSTART 0000fe00
|
||||
EQU LARGEBOOTSTART 0000f000
|
||||
EQU INT0addr 00000002
|
||||
EQU INT1addr 00000004
|
||||
EQU INT2addr 00000006
|
||||
EQU INT3addr 00000008
|
||||
EQU INT4addr 0000000a
|
||||
EQU INT5addr 0000000c
|
||||
EQU INT6addr 0000000e
|
||||
EQU INT7addr 00000010
|
||||
EQU OC2addr 00000012
|
||||
EQU OVF2addr 00000014
|
||||
EQU ICP1addr 00000016
|
||||
EQU OC1Aaddr 00000018
|
||||
EQU OC1Baddr 0000001a
|
||||
EQU OVF1addr 0000001c
|
||||
EQU OC0addr 0000001e
|
||||
EQU OVF0addr 00000020
|
||||
EQU SPIaddr 00000022
|
||||
EQU URXC0addr 00000024
|
||||
EQU UDRE0addr 00000026
|
||||
EQU UTXC0addr 00000028
|
||||
EQU ADCCaddr 0000002a
|
||||
EQU ERDYaddr 0000002c
|
||||
EQU ACIaddr 0000002e
|
||||
EQU OC1Caddr 00000030
|
||||
EQU ICP3addr 00000032
|
||||
EQU OC3Aaddr 00000034
|
||||
EQU OC3Baddr 00000036
|
||||
EQU OC3Caddr 00000038
|
||||
EQU OVF3addr 0000003a
|
||||
EQU URXC1addr 0000003c
|
||||
EQU UDRE1addr 0000003e
|
||||
EQU UTXC1addr 00000040
|
||||
EQU TWIaddr 00000042
|
||||
EQU SPMRaddr 00000044
|
||||
EQU INT_VECTORS_SIZE 00000046
|
||||
DEF mpr r16
|
||||
DEF waitcnt r17
|
||||
DEF ilcnt r18
|
||||
DEF olcnt r19
|
||||
EQU WTime 00000064
|
||||
EQU WskrR 00000000
|
||||
EQU WskrL 00000001
|
||||
EQU EngEnR 00000004
|
||||
EQU EngEnL 00000007
|
||||
EQU EngDirR 00000005
|
||||
EQU EngDirL 00000006
|
||||
EQU InterruptsFallingEdge 0000000a
|
||||
EQU InterruptMasksEnabled 00000003
|
||||
EQU InterruptMasksDisabled 00000000
|
||||
EQU InterruptFlagRegisterClear 00000003
|
||||
EQU MovFwd 00000060
|
||||
EQU MovBck 00000000
|
||||
EQU TurnR 00000040
|
||||
EQU TurnL 00000020
|
||||
EQU Halt 00000090
|
||||
CSEG INIT 00000046
|
||||
CSEG HitRight 0000005a
|
||||
CSEG HitLeft 00000071
|
||||
CSEG MAIN 00000057
|
||||
CSEG Wait 00000088
|
||||
CSEG Loop 0000008b
|
||||
CSEG OLoop 0000008c
|
||||
CSEG ILoop 0000008d
|
||||
Binary file not shown.
@@ -0,0 +1,34 @@
|
||||
<ASSEMBLER_INFO>
|
||||
<VERSION>2.2.7</VERSION>
|
||||
<DEVICE>"ATmega128"</DEVICE>
|
||||
<WORKING_DIR>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Debug</WORKING_DIR>
|
||||
<INCLUDE_PATH>
|
||||
<DIR>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</DIR>
|
||||
<DIR>C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include</DIR>
|
||||
<DIR></DIR>
|
||||
</INCLUDE_PATH>
|
||||
<SOURCE_FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</SOURCE_FILE>
|
||||
<INCLUDED_FILES>
|
||||
<FILE>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</FILE>
|
||||
</INCLUDED_FILES>
|
||||
<OBJECT_FILES>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Debug\Corwin_Perren_Lab6_sourcecode.obj</FILE>
|
||||
</OBJECT_FILES>
|
||||
<HEX_FILES>
|
||||
<FILE>Corwin_Perren_Lab6_sourcecode.hex</FILE>
|
||||
</HEX_FILES>
|
||||
<OUTPUT_FILES>
|
||||
<FILE>Corwin_Perren_Lab6_sourcecode.map</FILE>
|
||||
<FILE>Corwin_Perren_Lab6_sourcecode.lss</FILE>
|
||||
</OUTPUT_FILES>
|
||||
<LABELS>
|
||||
<INIT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</FILE><LINE>85</LINE></INIT>
|
||||
<HitRight><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</FILE><LINE>146</LINE></HitRight>
|
||||
<HitLeft><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</FILE><LINE>187</LINE></HitLeft>
|
||||
<MAIN><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</FILE><LINE>123</LINE></MAIN>
|
||||
<Wait><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</FILE><LINE>231</LINE></Wait>
|
||||
<Loop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</FILE><LINE>236</LINE></Loop>
|
||||
<OLoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</FILE><LINE>237</LINE></OLoop>
|
||||
<ILoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 6\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode\Corwin_Perren_Lab6_sourcecode.asm</FILE><LINE>238</LINE></ILoop>
|
||||
</LABELS>
|
||||
</ASSEMBLER_INFO>
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{18226A42-8477-4023-8AD2-40C49DA407C9}") = "Corwin_Perren_Lab7_challengecode", "Corwin_Perren_Lab7_challengecode\Corwin_Perren_Lab7_challengecode.asmproj", "{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
Release|AVR = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,12 @@
|
||||
;
|
||||
; Corwin_Perren_Lab7_challengecode.asm
|
||||
;
|
||||
; Created: 11/7/2018 4:13:18 PM
|
||||
; Author : caperren
|
||||
;
|
||||
|
||||
|
||||
; Replace with your application code
|
||||
start:
|
||||
inc r16
|
||||
rjmp start
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRAssembler</ToolchainName>
|
||||
<ProjectGuid>59B1D629-9DCC-43ed-A0FD-8AB0E4D622AB</ProjectGuid>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.obj</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<Language>ASSEMBLY</Language>
|
||||
<AssemblyName>Corwin_Perren_Lab7_challengecode</AssemblyName>
|
||||
<Name>Corwin_Perren_Lab7_challengecode</Name>
|
||||
<RootNamespace>Corwin_Perren_Lab7_challengecode</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<EntryFile>$(MSBuildProjectDirectory)\Corwin_Perren_Lab7_challengecode.asm</EntryFile>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Corwin_Perren_Lab7_challengecode.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Assembler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.2.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>bd3TUV9UtxpdYQkn+6MWPA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc/m128def.inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\templates\main.asm</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>rbbsner92ALdzlNDevb80Q==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/templates/main.asm</Name>
|
||||
<SelectString>Main file (.asm)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.2.209</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{18226A42-8477-4023-8AD2-40C49DA407C9}") = "Corwin_Perren_Lab7_sourcecode", "Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asmproj", "{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
Release|AVR = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,306 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Corwin_Perren_Lab7_sourcecode.asm
|
||||
;*
|
||||
;* This program allows for speed control of the tekbot
|
||||
;* by using timer counters, with adjustment via buttons
|
||||
;*
|
||||
;* This is the skeleton file for Lab 7 of ECE 375
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: Corwin Perren
|
||||
;* Date: 11/7/2018
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
.include "m128def.inc" ; Include definition file
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;***********************************************************
|
||||
.def mpr = r16 ; Multipurpose register
|
||||
.def waitcnt = r17 ; Wait Loop Counter
|
||||
.def ilcnt = r18 ; Inner Loop Counter
|
||||
.def olcnt = r19 ; Outer Loop Counter
|
||||
.def speed_reg = r20 ; Store of speed
|
||||
.def mpr2 = r21
|
||||
|
||||
.equ WTime = 15 ; Button debounce time
|
||||
|
||||
.equ max_level = 15 ; Max speed level
|
||||
.equ min_level = 0 ; Min speed level
|
||||
.equ speed_multiplier = 17 ; Mutiplier for timer
|
||||
|
||||
.equ sd_mask = 0b00001111 ; Pins for speed display [B]
|
||||
.equ dr_mask = 0b11110000 ; Pins for driving [B]
|
||||
|
||||
.equ EngEnR = 4 ; Right Engine Enable Bit [B]
|
||||
.equ EngEnL = 7 ; Left Engine Enable Bit [B]
|
||||
.equ EngDirR = 5 ; Right Engine Direction Bit [B]
|
||||
.equ EngDirL = 6 ; Left Engine Direction Bit [B]
|
||||
|
||||
.equ upMax = 0 ; Set speed to max bit [D]
|
||||
.equ upInc = 1 ; Increase speed by one bit [D]
|
||||
.equ downInc = 2 ; Decrease speed by one bit [D]
|
||||
.equ downMin = 3 ; Decrease speed to min bit [D]
|
||||
|
||||
.equ InterruptFlagRegisterClear = (1 << INTF0) | (1 << INTF1) | (1 << INTF2) | (1 << INTF3)
|
||||
|
||||
;***********************************************************
|
||||
;* Start of Code Segment
|
||||
;***********************************************************
|
||||
.cseg ; beginning of code segment
|
||||
|
||||
;***********************************************************
|
||||
;* Interrupt Vectors
|
||||
;***********************************************************
|
||||
.org $0000
|
||||
rjmp INIT ; reset interrupt
|
||||
|
||||
; place instructions in interrupt vectors here, if needed
|
||||
.org INT0addr
|
||||
rjmp SPEEDMAX
|
||||
|
||||
.org INT1addr
|
||||
rjmp INCSPEED
|
||||
|
||||
.org INT2addr
|
||||
rjmp DECSPEED
|
||||
|
||||
.org INT3addr
|
||||
rjmp SPEEDMIN
|
||||
|
||||
.org $0046 ; end of interrupt vectors
|
||||
|
||||
;***********************************************************
|
||||
;* Program Initialization
|
||||
;***********************************************************
|
||||
INIT:
|
||||
; Initialize the Stack Pointer
|
||||
ldi mpr, low(RAMEND) ; Init the 2 stack pointer registers
|
||||
out SPL, mpr
|
||||
ldi mpr, high(RAMEND)
|
||||
out SPH, mpr
|
||||
|
||||
|
||||
; Configure I/O ports
|
||||
; Set drive pins and led display to outputs
|
||||
ldi mpr, ((1 << EngEnR) | (1 << EngDirR) | (1 << EngEnL) | (1 << EngDirL) | sd_mask)
|
||||
out DDRB, mpr
|
||||
|
||||
; Initialize Port D pins for input
|
||||
ldi mpr, ((0 << upMax) | (0 << upInc) | (0 << downInc) | (0 << downMin)) ; Not necessary, just being explicit
|
||||
out DDRD, mpr
|
||||
|
||||
; Set input pins to enable pullups
|
||||
ldi mpr, ((1 << upMax) | (1 << upInc) | (1 << downInc) | (1 << downMin))
|
||||
out PORTD, mpr
|
||||
|
||||
; Configure External Interrupts, if needed
|
||||
; Enable falling edge pin change interrupts on all input pins
|
||||
ldi mpr, ((1 << ISC01) | (1 << ISC11) | (1 << ISC21) | (1 << ISC31))
|
||||
sts EICRA, mpr
|
||||
|
||||
; Set mask to enable the four interrupts
|
||||
ldi mpr, ((1 << INT0) | (1 << INT1) | (1 << INT2) | (1 << INT3))
|
||||
out EIMSK, mpr
|
||||
|
||||
; Configure 8-bit Timer/Counters
|
||||
; Setup timer/counter 0
|
||||
ldi mpr, ((1 << WGM00) | (1 << COM01) | (1 << COM00) | (1 << WGM01) | ( 1 << CS00) | ( 1 << CS01) | ( 1 << CS02))
|
||||
out TCCR0, mpr
|
||||
|
||||
; Setup timer/counter 2
|
||||
ldi mpr, ((1 << WGM20) | (1 << COM21) | (1 << COM20) | (1 << WGM21) | ( 1 << CS20) | ( 1 << CS22))
|
||||
out TCCR2, mpr
|
||||
|
||||
; Set TekBot to Move Forward (1<<EngDirR|1<<EngDirL)
|
||||
ldi mpr, (1 << EngDirR | 1 << EngDirL)
|
||||
out PORTB, mpr
|
||||
|
||||
; Set initial speed, display on Port B pins 3:0
|
||||
ldi speed_reg, min_level ; Gets displayed on first loop run
|
||||
|
||||
; Enable global interrupts (if any are used)
|
||||
sei
|
||||
|
||||
;***********************************************************
|
||||
;* Main Program
|
||||
;***********************************************************
|
||||
MAIN:
|
||||
in mpr, PINB ; Load current drive state
|
||||
ldi mpr2, dr_mask ; Load drive mask
|
||||
and mpr, mpr2 ; And to clear all speed pins
|
||||
|
||||
or mpr, speed_reg ; Or to set new speed display
|
||||
|
||||
out PORTB, mpr ; Write display
|
||||
|
||||
ldi mpr2, speed_multiplier ; Load multiplier
|
||||
mul speed_reg, mpr2 ; Multiply for real speed
|
||||
|
||||
out OCR0, r0 ; Load low byte into counter
|
||||
out OCR2, r0 ; Load low byte into other counter
|
||||
|
||||
rjmp MAIN ; Return to top of MAIN
|
||||
|
||||
;***********************************************************
|
||||
;* Functions and Subroutines
|
||||
;***********************************************************
|
||||
;-----------------------------------------------------------
|
||||
; Func: SPEEDMAX (ISR)
|
||||
; Desc: Sets the tekbot speed to its max, full movement
|
||||
;-----------------------------------------------------------
|
||||
SPEEDMAX:
|
||||
cli
|
||||
|
||||
; If needed, save variables by pushing to the stack
|
||||
push waitcnt
|
||||
push mpr
|
||||
|
||||
; Execute the function here
|
||||
ldi speed_reg, max_level
|
||||
|
||||
; Wait for button to stabilize
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
; Restore any saved variables by popping from stack
|
||||
pop mpr
|
||||
pop waitcnt
|
||||
|
||||
sei
|
||||
reti ; End a function with RET
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: INCSPEED (ISR)
|
||||
; Desc: Increases tekbot speed by 1, if not at max
|
||||
;-----------------------------------------------------------
|
||||
INCSPEED: ; Begin a function with a label
|
||||
cli
|
||||
|
||||
; If needed, save variables by pushing to the stack
|
||||
push mpr
|
||||
push waitcnt
|
||||
|
||||
; Execute the function here
|
||||
ldi mpr, max_level
|
||||
cpse speed_reg, mpr
|
||||
inc speed_reg
|
||||
|
||||
; Wait for button to stabilize
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
; Restore any saved variables by popping from stack
|
||||
pop waitcnt
|
||||
pop mpr
|
||||
|
||||
sei
|
||||
reti ; End a function with RET
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: DECSPEED (ISR)
|
||||
; Desc: Decreases tekbot speed by one, if not at min
|
||||
;-----------------------------------------------------------
|
||||
DECSPEED: ; Begin a function with a label
|
||||
cli
|
||||
|
||||
; If needed, save variables by pushing to the stack
|
||||
push mpr
|
||||
push waitcnt
|
||||
|
||||
; Execute the function here
|
||||
ldi mpr, min_level
|
||||
cpse speed_reg, mpr
|
||||
dec speed_reg
|
||||
|
||||
; Wait for button to stabilize
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
; Restore any saved variables by popping from stack
|
||||
pop waitcnt
|
||||
pop mpr
|
||||
|
||||
sei
|
||||
reti ; End a function with RET
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Func: SPEEDMIN (ISR)
|
||||
; Desc: Sets tekbot speed to min, no movement
|
||||
;-----------------------------------------------------------
|
||||
SPEEDMIN: ; Begin a function with a label
|
||||
cli
|
||||
|
||||
; If needed, save variables by pushing to the stack
|
||||
push waitcnt
|
||||
push mpr
|
||||
|
||||
; Execute the function here
|
||||
ldi speed_reg, min_level
|
||||
|
||||
; Wait for button to stabilize
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
; Restore any saved variables by popping from stack
|
||||
pop mpr
|
||||
pop waitcnt
|
||||
|
||||
sei
|
||||
reti ; End a function with RET
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: Wait
|
||||
; Desc: A wait loop that is 16 + 159975*waitcnt cycles or roughly
|
||||
; waitcnt*10ms. Just initialize wait for the specific amount
|
||||
; of time in 10ms intervals. Here is the general eqaution
|
||||
; for the number of clock cycles in the wait loop:
|
||||
; ((3 * ilcnt + 3) * olcnt + 3) * waitcnt + 13 + call
|
||||
;----------------------------------------------------------------
|
||||
Wait:
|
||||
push waitcnt ; Save wait register
|
||||
push ilcnt ; Save ilcnt register
|
||||
push olcnt ; Save olcnt register
|
||||
|
||||
Loop: ldi olcnt, 224 ; load olcnt register
|
||||
OLoop: ldi ilcnt, 237 ; load ilcnt register
|
||||
ILoop: dec ilcnt ; decrement ilcnt
|
||||
brne ILoop ; Continue Inner Loop
|
||||
dec olcnt ; decrement olcnt
|
||||
brne OLoop ; Continue Outer Loop
|
||||
dec waitcnt ; Decrement wait
|
||||
brne Loop ; Continue Wait loop
|
||||
|
||||
pop olcnt ; Restore olcnt register
|
||||
pop ilcnt ; Restore ilcnt register
|
||||
pop waitcnt ; Restore wait register
|
||||
ret ; Return from subroutine
|
||||
|
||||
;***********************************************************
|
||||
;* Stored Program Data
|
||||
;***********************************************************
|
||||
; Enter any stored data you might need here
|
||||
|
||||
;***********************************************************
|
||||
;* Additional Program Includes
|
||||
;***********************************************************
|
||||
; There are no additional file includes for this program
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRAssembler</ToolchainName>
|
||||
<ProjectGuid>59B1D629-9DCC-43ed-A0FD-8AB0E4D622AB</ProjectGuid>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.obj</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<Language>ASSEMBLY</Language>
|
||||
<AssemblyName>Corwin_Perren_Lab7_sourcecode</AssemblyName>
|
||||
<Name>Corwin_Perren_Lab7_sourcecode</Name>
|
||||
<RootNamespace>Corwin_Perren_Lab7_sourcecode</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<EntryFile>$(MSBuildProjectDirectory)\Corwin_Perren_Lab7_sourcecode.asm</EntryFile>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Corwin_Perren_Lab7_sourcecode.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Assembler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.2.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>bd3TUV9UtxpdYQkn+6MWPA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc/m128def.inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\templates\main.asm</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>/AFceVdvjVlVdl/rMwg4mA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/templates/main.asm</Name>
|
||||
<SelectString>Main file (.asm)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.2.209</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -0,0 +1,20 @@
|
||||
:020000020000FC
|
||||
:0200000045C0F9
|
||||
:0200040064C0D6
|
||||
:020008006EC0C8
|
||||
:02000C007AC0B8
|
||||
:0200100086C0A8
|
||||
:10008C000FEF0DBF00E10EBF0FEF07BB00E001BB90
|
||||
:10009C000FE002BB0AEA00936A000FE009BF0FE70A
|
||||
:1000AC0003BF0DE705BD00E608BB40E0789406B33E
|
||||
:1000BC0050EF0523042B08BB51E1459F01BE03BC47
|
||||
:1000CC00F6CFF8941F930F934FE01FE02ED00FE064
|
||||
:1000DC0008BF0F911F9178941895F8940F931F9364
|
||||
:1000EC000FE0401343951FE020D00FE008BF1F9195
|
||||
:1000FC000F9178941895F8940F931F9300E0401388
|
||||
:10010C004A951FE012D00FE008BF1F910F91789411
|
||||
:10011C001895F8941F930F9340E01FE006D00FE062
|
||||
:10012C0008BF0F911F91789418951F932F933F93AD
|
||||
:10013C0030EE2DEE2A95F1F73A95D9F71A95C1F7CD
|
||||
:08014C003F912F911F910895CE
|
||||
:00000001FF
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,900 @@
|
||||
|
||||
AVRASM ver. 2.2.7 C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm Wed Nov 07 16:44:50 2018
|
||||
|
||||
|
||||
EQU SIGNATURE_000 0000001e
|
||||
EQU SIGNATURE_001 00000097
|
||||
EQU SIGNATURE_002 00000002
|
||||
EQU UCSR1C 0000009d
|
||||
EQU UDR1 0000009c
|
||||
EQU UCSR1A 0000009b
|
||||
EQU UCSR1B 0000009a
|
||||
EQU UBRR1H 00000098
|
||||
EQU UBRR1L 00000099
|
||||
EQU UCSR0C 00000095
|
||||
EQU UBRR0H 00000090
|
||||
EQU TCCR3C 0000008c
|
||||
EQU TCCR3A 0000008b
|
||||
EQU TCCR3B 0000008a
|
||||
EQU TCNT3L 00000088
|
||||
EQU TCNT3H 00000089
|
||||
EQU OCR3AL 00000086
|
||||
EQU OCR3AH 00000087
|
||||
EQU OCR3BL 00000084
|
||||
EQU OCR3BH 00000085
|
||||
EQU OCR3CL 00000082
|
||||
EQU OCR3CH 00000083
|
||||
EQU ICR3L 00000080
|
||||
EQU ICR3H 00000081
|
||||
EQU ETIMSK 0000007d
|
||||
EQU ETIFR 0000007c
|
||||
EQU TCCR1C 0000007a
|
||||
EQU OCR1CL 00000078
|
||||
EQU OCR1CH 00000079
|
||||
EQU TWCR 00000074
|
||||
EQU TWDR 00000073
|
||||
EQU TWAR 00000072
|
||||
EQU TWSR 00000071
|
||||
EQU TWBR 00000070
|
||||
EQU OSCCAL 0000006f
|
||||
EQU XMCRA 0000006d
|
||||
EQU XMCRB 0000006c
|
||||
EQU EICRA 0000006a
|
||||
EQU SPMCSR 00000068
|
||||
EQU PORTG 00000065
|
||||
EQU DDRG 00000064
|
||||
EQU PING 00000063
|
||||
EQU PORTF 00000062
|
||||
EQU DDRF 00000061
|
||||
EQU SREG 0000003f
|
||||
EQU SPL 0000003d
|
||||
EQU SPH 0000003e
|
||||
EQU XDIV 0000003c
|
||||
EQU RAMPZ 0000003b
|
||||
EQU EICRB 0000003a
|
||||
EQU EIMSK 00000039
|
||||
EQU EIFR 00000038
|
||||
EQU TIMSK 00000037
|
||||
EQU TIFR 00000036
|
||||
EQU MCUCR 00000035
|
||||
EQU MCUCSR 00000034
|
||||
EQU TCCR0 00000033
|
||||
EQU TCNT0 00000032
|
||||
EQU OCR0 00000031
|
||||
EQU ASSR 00000030
|
||||
EQU TCCR1A 0000002f
|
||||
EQU TCCR1B 0000002e
|
||||
EQU TCNT1L 0000002c
|
||||
EQU TCNT1H 0000002d
|
||||
EQU OCR1AL 0000002a
|
||||
EQU OCR1AH 0000002b
|
||||
EQU OCR1BL 00000028
|
||||
EQU OCR1BH 00000029
|
||||
EQU ICR1L 00000026
|
||||
EQU ICR1H 00000027
|
||||
EQU TCCR2 00000025
|
||||
EQU TCNT2 00000024
|
||||
EQU OCR2 00000023
|
||||
EQU OCDR 00000022
|
||||
EQU WDTCR 00000021
|
||||
EQU SFIOR 00000020
|
||||
EQU EEARL 0000001e
|
||||
EQU EEARH 0000001f
|
||||
EQU EEDR 0000001d
|
||||
EQU EECR 0000001c
|
||||
EQU PORTA 0000001b
|
||||
EQU DDRA 0000001a
|
||||
EQU PINA 00000019
|
||||
EQU PORTB 00000018
|
||||
EQU DDRB 00000017
|
||||
EQU PINB 00000016
|
||||
EQU PORTC 00000015
|
||||
EQU DDRC 00000014
|
||||
EQU PINC 00000013
|
||||
EQU PORTD 00000012
|
||||
EQU DDRD 00000011
|
||||
EQU PIND 00000010
|
||||
EQU SPDR 0000000f
|
||||
EQU SPSR 0000000e
|
||||
EQU SPCR 0000000d
|
||||
EQU UDR0 0000000c
|
||||
EQU UCSR0A 0000000b
|
||||
EQU UCSR0B 0000000a
|
||||
EQU UBRR0L 00000009
|
||||
EQU ACSR 00000008
|
||||
EQU ADMUX 00000007
|
||||
EQU ADCSRA 00000006
|
||||
EQU ADCH 00000005
|
||||
EQU ADCL 00000004
|
||||
EQU PORTE 00000003
|
||||
EQU DDRE 00000002
|
||||
EQU PINE 00000001
|
||||
EQU PINF 00000000
|
||||
EQU ACME 00000003
|
||||
EQU ACIS0 00000000
|
||||
EQU ACIS1 00000001
|
||||
EQU ACIC 00000002
|
||||
EQU ACIE 00000003
|
||||
EQU ACI 00000004
|
||||
EQU ACO 00000005
|
||||
EQU ACBG 00000006
|
||||
EQU ACD 00000007
|
||||
EQU SPDR0 00000000
|
||||
EQU SPDR1 00000001
|
||||
EQU SPDR2 00000002
|
||||
EQU SPDR3 00000003
|
||||
EQU SPDR4 00000004
|
||||
EQU SPDR5 00000005
|
||||
EQU SPDR6 00000006
|
||||
EQU SPDR7 00000007
|
||||
EQU SPI2X 00000000
|
||||
EQU WCOL 00000006
|
||||
EQU SPIF 00000007
|
||||
EQU SPR0 00000000
|
||||
EQU SPR1 00000001
|
||||
EQU CPHA 00000002
|
||||
EQU CPOL 00000003
|
||||
EQU MSTR 00000004
|
||||
EQU DORD 00000005
|
||||
EQU SPE 00000006
|
||||
EQU SPIE 00000007
|
||||
EQU I2BR 00000070
|
||||
EQU TWBR0 00000000
|
||||
EQU TWBR1 00000001
|
||||
EQU TWBR2 00000002
|
||||
EQU TWBR3 00000003
|
||||
EQU TWBR4 00000004
|
||||
EQU TWBR5 00000005
|
||||
EQU TWBR6 00000006
|
||||
EQU TWBR7 00000007
|
||||
EQU I2CR 00000074
|
||||
EQU TWIE 00000000
|
||||
EQU I2IE 00000000
|
||||
EQU TWEN 00000002
|
||||
EQU I2EN 00000002
|
||||
EQU ENI2C 00000002
|
||||
EQU TWWC 00000003
|
||||
EQU I2WC 00000003
|
||||
EQU TWSTO 00000004
|
||||
EQU I2STO 00000004
|
||||
EQU TWSTA 00000005
|
||||
EQU I2STA 00000005
|
||||
EQU TWEA 00000006
|
||||
EQU I2EA 00000006
|
||||
EQU TWINT 00000007
|
||||
EQU I2INT 00000007
|
||||
EQU I2SR 00000071
|
||||
EQU TWPS0 00000000
|
||||
EQU TWS0 00000000
|
||||
EQU I2GCE 00000000
|
||||
EQU TWPS1 00000001
|
||||
EQU TWS1 00000001
|
||||
EQU TWS3 00000003
|
||||
EQU I2S3 00000003
|
||||
EQU TWS4 00000004
|
||||
EQU I2S4 00000004
|
||||
EQU TWS5 00000005
|
||||
EQU I2S5 00000005
|
||||
EQU TWS6 00000006
|
||||
EQU I2S6 00000006
|
||||
EQU TWS7 00000007
|
||||
EQU I2S7 00000007
|
||||
EQU I2DR 00000073
|
||||
EQU TWD0 00000000
|
||||
EQU TWD1 00000001
|
||||
EQU TWD2 00000002
|
||||
EQU TWD3 00000003
|
||||
EQU TWD4 00000004
|
||||
EQU TWD5 00000005
|
||||
EQU TWD6 00000006
|
||||
EQU TWD7 00000007
|
||||
EQU I2AR 00000072
|
||||
EQU TWGCE 00000000
|
||||
EQU TWA0 00000001
|
||||
EQU TWA1 00000002
|
||||
EQU TWA2 00000003
|
||||
EQU TWA3 00000004
|
||||
EQU TWA4 00000005
|
||||
EQU TWA5 00000006
|
||||
EQU TWA6 00000007
|
||||
EQU UDR00 00000000
|
||||
EQU UDR01 00000001
|
||||
EQU UDR02 00000002
|
||||
EQU UDR03 00000003
|
||||
EQU UDR04 00000004
|
||||
EQU UDR05 00000005
|
||||
EQU UDR06 00000006
|
||||
EQU UDR07 00000007
|
||||
EQU MPCM0 00000000
|
||||
EQU U2X0 00000001
|
||||
EQU UPE0 00000002
|
||||
EQU DOR0 00000003
|
||||
EQU FE0 00000004
|
||||
EQU UDRE0 00000005
|
||||
EQU TXC0 00000006
|
||||
EQU RXC0 00000007
|
||||
EQU TXB80 00000000
|
||||
EQU RXB80 00000001
|
||||
EQU UCSZ02 00000002
|
||||
EQU UCSZ2 00000002
|
||||
EQU TXEN0 00000003
|
||||
EQU RXEN0 00000004
|
||||
EQU UDRIE0 00000005
|
||||
EQU TXCIE0 00000006
|
||||
EQU RXCIE0 00000007
|
||||
EQU UCPOL0 00000000
|
||||
EQU UCSZ00 00000001
|
||||
EQU UCSZ01 00000002
|
||||
EQU USBS0 00000003
|
||||
EQU UPM00 00000004
|
||||
EQU UPM01 00000005
|
||||
EQU UMSEL0 00000006
|
||||
EQU UBRR8 00000000
|
||||
EQU UBRR9 00000001
|
||||
EQU UBRR10 00000002
|
||||
EQU UBRR11 00000003
|
||||
EQU UBRR0 00000000
|
||||
EQU UBRR1 00000001
|
||||
EQU UBRR2 00000002
|
||||
EQU UBRR3 00000003
|
||||
EQU UBRR4 00000004
|
||||
EQU UBRR5 00000005
|
||||
EQU UBRR6 00000006
|
||||
EQU UBRR7 00000007
|
||||
EQU UDR10 00000000
|
||||
EQU UDR11 00000001
|
||||
EQU UDR12 00000002
|
||||
EQU UDR13 00000003
|
||||
EQU UDR14 00000004
|
||||
EQU UDR15 00000005
|
||||
EQU UDR16 00000006
|
||||
EQU UDR17 00000007
|
||||
EQU MPCM1 00000000
|
||||
EQU U2X1 00000001
|
||||
EQU UPE1 00000002
|
||||
EQU DOR1 00000003
|
||||
EQU FE1 00000004
|
||||
EQU UDRE1 00000005
|
||||
EQU TXC1 00000006
|
||||
EQU RXC1 00000007
|
||||
EQU TXB81 00000000
|
||||
EQU RXB81 00000001
|
||||
EQU UCSZ12 00000002
|
||||
EQU TXEN1 00000003
|
||||
EQU RXEN1 00000004
|
||||
EQU UDRIE1 00000005
|
||||
EQU TXCIE1 00000006
|
||||
EQU RXCIE1 00000007
|
||||
EQU UCPOL1 00000000
|
||||
EQU UCSZ10 00000001
|
||||
EQU UCSZ11 00000002
|
||||
EQU USBS1 00000003
|
||||
EQU UPM10 00000004
|
||||
EQU UPM11 00000005
|
||||
EQU UMSEL1 00000006
|
||||
EQU SREG_C 00000000
|
||||
EQU SREG_Z 00000001
|
||||
EQU SREG_N 00000002
|
||||
EQU SREG_V 00000003
|
||||
EQU SREG_S 00000004
|
||||
EQU SREG_H 00000005
|
||||
EQU SREG_T 00000006
|
||||
EQU SREG_I 00000007
|
||||
EQU IVCE 00000000
|
||||
EQU IVSEL 00000001
|
||||
EQU SM2 00000002
|
||||
EQU SM0 00000003
|
||||
EQU SM1 00000004
|
||||
EQU SE 00000005
|
||||
EQU SRW10 00000006
|
||||
EQU SRE 00000007
|
||||
EQU SRW11 00000001
|
||||
EQU SRW00 00000002
|
||||
EQU SRW01 00000003
|
||||
EQU SRL0 00000004
|
||||
EQU SRL1 00000005
|
||||
EQU SRL2 00000006
|
||||
EQU XMM0 00000000
|
||||
EQU XMM1 00000001
|
||||
EQU XMM2 00000002
|
||||
EQU XMBK 00000007
|
||||
EQU CAL0 00000000
|
||||
EQU CAL1 00000001
|
||||
EQU CAL2 00000002
|
||||
EQU CAL3 00000003
|
||||
EQU CAL4 00000004
|
||||
EQU CAL5 00000005
|
||||
EQU CAL6 00000006
|
||||
EQU CAL7 00000007
|
||||
EQU XDIV0 00000000
|
||||
EQU XDIV1 00000001
|
||||
EQU XDIV2 00000002
|
||||
EQU XDIV3 00000003
|
||||
EQU XDIV4 00000004
|
||||
EQU XDIV5 00000005
|
||||
EQU XDIV6 00000006
|
||||
EQU XDIVEN 00000007
|
||||
EQU PORF 00000000
|
||||
EQU EXTRF 00000001
|
||||
EQU BORF 00000002
|
||||
EQU WDRF 00000003
|
||||
EQU JTRF 00000004
|
||||
EQU JTD 00000007
|
||||
EQU RAMPZ0 00000000
|
||||
EQU SPMCR 00000068
|
||||
EQU SPMEN 00000000
|
||||
EQU PGERS 00000001
|
||||
EQU PGWRT 00000002
|
||||
EQU BLBSET 00000003
|
||||
EQU RWWSRE 00000004
|
||||
EQU ASRE 00000004
|
||||
EQU RWWSB 00000006
|
||||
EQU ASB 00000006
|
||||
EQU SPMIE 00000007
|
||||
EQU OCDR0 00000000
|
||||
EQU OCDR1 00000001
|
||||
EQU OCDR2 00000002
|
||||
EQU OCDR3 00000003
|
||||
EQU OCDR4 00000004
|
||||
EQU OCDR5 00000005
|
||||
EQU OCDR6 00000006
|
||||
EQU OCDR7 00000007
|
||||
EQU IDRD 00000007
|
||||
EQU PSR321 00000000
|
||||
EQU PSR1 00000000
|
||||
EQU PSR2 00000000
|
||||
EQU PSR3 00000000
|
||||
EQU PSR0 00000001
|
||||
EQU PUD 00000002
|
||||
EQU TSM 00000007
|
||||
EQU ISC00 00000000
|
||||
EQU ISC01 00000001
|
||||
EQU ISC10 00000002
|
||||
EQU ISC11 00000003
|
||||
EQU ISC20 00000004
|
||||
EQU ISC21 00000005
|
||||
EQU ISC30 00000006
|
||||
EQU ISC31 00000007
|
||||
EQU ISC40 00000000
|
||||
EQU ISC41 00000001
|
||||
EQU ISC50 00000002
|
||||
EQU ISC51 00000003
|
||||
EQU ISC60 00000004
|
||||
EQU ISC61 00000005
|
||||
EQU ISC70 00000006
|
||||
EQU ISC71 00000007
|
||||
EQU GICR 00000039
|
||||
EQU GIMSK 00000039
|
||||
EQU INT0 00000000
|
||||
EQU INT1 00000001
|
||||
EQU INT2 00000002
|
||||
EQU INT3 00000003
|
||||
EQU INT4 00000004
|
||||
EQU INT5 00000005
|
||||
EQU INT6 00000006
|
||||
EQU INT7 00000007
|
||||
EQU GIFR 00000038
|
||||
EQU INTF0 00000000
|
||||
EQU INTF1 00000001
|
||||
EQU INTF2 00000002
|
||||
EQU INTF3 00000003
|
||||
EQU INTF4 00000004
|
||||
EQU INTF5 00000005
|
||||
EQU INTF6 00000006
|
||||
EQU INTF7 00000007
|
||||
EQU EEDR0 00000000
|
||||
EQU EEDR1 00000001
|
||||
EQU EEDR2 00000002
|
||||
EQU EEDR3 00000003
|
||||
EQU EEDR4 00000004
|
||||
EQU EEDR5 00000005
|
||||
EQU EEDR6 00000006
|
||||
EQU EEDR7 00000007
|
||||
EQU EERE 00000000
|
||||
EQU EEWE 00000001
|
||||
EQU EEMWE 00000002
|
||||
EQU EERIE 00000003
|
||||
EQU PORTA0 00000000
|
||||
EQU PA0 00000000
|
||||
EQU PORTA1 00000001
|
||||
EQU PA1 00000001
|
||||
EQU PORTA2 00000002
|
||||
EQU PA2 00000002
|
||||
EQU PORTA3 00000003
|
||||
EQU PA3 00000003
|
||||
EQU PORTA4 00000004
|
||||
EQU PA4 00000004
|
||||
EQU PORTA5 00000005
|
||||
EQU PA5 00000005
|
||||
EQU PORTA6 00000006
|
||||
EQU PA6 00000006
|
||||
EQU PORTA7 00000007
|
||||
EQU PA7 00000007
|
||||
EQU DDA0 00000000
|
||||
EQU DDA1 00000001
|
||||
EQU DDA2 00000002
|
||||
EQU DDA3 00000003
|
||||
EQU DDA4 00000004
|
||||
EQU DDA5 00000005
|
||||
EQU DDA6 00000006
|
||||
EQU DDA7 00000007
|
||||
EQU PINA0 00000000
|
||||
EQU PINA1 00000001
|
||||
EQU PINA2 00000002
|
||||
EQU PINA3 00000003
|
||||
EQU PINA4 00000004
|
||||
EQU PINA5 00000005
|
||||
EQU PINA6 00000006
|
||||
EQU PINA7 00000007
|
||||
EQU PORTB0 00000000
|
||||
EQU PB0 00000000
|
||||
EQU PORTB1 00000001
|
||||
EQU PB1 00000001
|
||||
EQU PORTB2 00000002
|
||||
EQU PB2 00000002
|
||||
EQU PORTB3 00000003
|
||||
EQU PB3 00000003
|
||||
EQU PORTB4 00000004
|
||||
EQU PB4 00000004
|
||||
EQU PORTB5 00000005
|
||||
EQU PB5 00000005
|
||||
EQU PORTB6 00000006
|
||||
EQU PB6 00000006
|
||||
EQU PORTB7 00000007
|
||||
EQU PB7 00000007
|
||||
EQU DDB0 00000000
|
||||
EQU DDB1 00000001
|
||||
EQU DDB2 00000002
|
||||
EQU DDB3 00000003
|
||||
EQU DDB4 00000004
|
||||
EQU DDB5 00000005
|
||||
EQU DDB6 00000006
|
||||
EQU DDB7 00000007
|
||||
EQU PINB0 00000000
|
||||
EQU PINB1 00000001
|
||||
EQU PINB2 00000002
|
||||
EQU PINB3 00000003
|
||||
EQU PINB4 00000004
|
||||
EQU PINB5 00000005
|
||||
EQU PINB6 00000006
|
||||
EQU PINB7 00000007
|
||||
EQU PORTC0 00000000
|
||||
EQU PC0 00000000
|
||||
EQU PORTC1 00000001
|
||||
EQU PC1 00000001
|
||||
EQU PORTC2 00000002
|
||||
EQU PC2 00000002
|
||||
EQU PORTC3 00000003
|
||||
EQU PC3 00000003
|
||||
EQU PORTC4 00000004
|
||||
EQU PC4 00000004
|
||||
EQU PORTC5 00000005
|
||||
EQU PC5 00000005
|
||||
EQU PORTC6 00000006
|
||||
EQU PC6 00000006
|
||||
EQU PORTC7 00000007
|
||||
EQU PC7 00000007
|
||||
EQU DDC0 00000000
|
||||
EQU DDC1 00000001
|
||||
EQU DDC2 00000002
|
||||
EQU DDC3 00000003
|
||||
EQU DDC4 00000004
|
||||
EQU DDC5 00000005
|
||||
EQU DDC6 00000006
|
||||
EQU DDC7 00000007
|
||||
EQU PINC0 00000000
|
||||
EQU PINC1 00000001
|
||||
EQU PINC2 00000002
|
||||
EQU PINC3 00000003
|
||||
EQU PINC4 00000004
|
||||
EQU PINC5 00000005
|
||||
EQU PINC6 00000006
|
||||
EQU PINC7 00000007
|
||||
EQU PORTD0 00000000
|
||||
EQU PD0 00000000
|
||||
EQU PORTD1 00000001
|
||||
EQU PD1 00000001
|
||||
EQU PORTD2 00000002
|
||||
EQU PD2 00000002
|
||||
EQU PORTD3 00000003
|
||||
EQU PD3 00000003
|
||||
EQU PORTD4 00000004
|
||||
EQU PD4 00000004
|
||||
EQU PORTD5 00000005
|
||||
EQU PD5 00000005
|
||||
EQU PORTD6 00000006
|
||||
EQU PD6 00000006
|
||||
EQU PORTD7 00000007
|
||||
EQU PD7 00000007
|
||||
EQU DDD0 00000000
|
||||
EQU DDD1 00000001
|
||||
EQU DDD2 00000002
|
||||
EQU DDD3 00000003
|
||||
EQU DDD4 00000004
|
||||
EQU DDD5 00000005
|
||||
EQU DDD6 00000006
|
||||
EQU DDD7 00000007
|
||||
EQU PIND0 00000000
|
||||
EQU PIND1 00000001
|
||||
EQU PIND2 00000002
|
||||
EQU PIND3 00000003
|
||||
EQU PIND4 00000004
|
||||
EQU PIND5 00000005
|
||||
EQU PIND6 00000006
|
||||
EQU PIND7 00000007
|
||||
EQU PORTE0 00000000
|
||||
EQU PE0 00000000
|
||||
EQU PORTE1 00000001
|
||||
EQU PE1 00000001
|
||||
EQU PORTE2 00000002
|
||||
EQU PE2 00000002
|
||||
EQU PORTE3 00000003
|
||||
EQU PE3 00000003
|
||||
EQU PORTE4 00000004
|
||||
EQU PE4 00000004
|
||||
EQU PORTE5 00000005
|
||||
EQU PE5 00000005
|
||||
EQU PORTE6 00000006
|
||||
EQU PE6 00000006
|
||||
EQU PORTE7 00000007
|
||||
EQU PE7 00000007
|
||||
EQU DDE0 00000000
|
||||
EQU DDE1 00000001
|
||||
EQU DDE2 00000002
|
||||
EQU DDE3 00000003
|
||||
EQU DDE4 00000004
|
||||
EQU DDE5 00000005
|
||||
EQU DDE6 00000006
|
||||
EQU DDE7 00000007
|
||||
EQU PINE0 00000000
|
||||
EQU PINE1 00000001
|
||||
EQU PINE2 00000002
|
||||
EQU PINE3 00000003
|
||||
EQU PINE4 00000004
|
||||
EQU PINE5 00000005
|
||||
EQU PINE6 00000006
|
||||
EQU PINE7 00000007
|
||||
EQU PORTF0 00000000
|
||||
EQU PF0 00000000
|
||||
EQU PORTF1 00000001
|
||||
EQU PF1 00000001
|
||||
EQU PORTF2 00000002
|
||||
EQU PF2 00000002
|
||||
EQU PORTF3 00000003
|
||||
EQU PF3 00000003
|
||||
EQU PORTF4 00000004
|
||||
EQU PF4 00000004
|
||||
EQU PORTF5 00000005
|
||||
EQU PF5 00000005
|
||||
EQU PORTF6 00000006
|
||||
EQU PF6 00000006
|
||||
EQU PORTF7 00000007
|
||||
EQU PF7 00000007
|
||||
EQU DDF0 00000000
|
||||
EQU DDF1 00000001
|
||||
EQU DDF2 00000002
|
||||
EQU DDF3 00000003
|
||||
EQU DDF4 00000004
|
||||
EQU DDF5 00000005
|
||||
EQU DDF6 00000006
|
||||
EQU DDF7 00000007
|
||||
EQU PINF0 00000000
|
||||
EQU PINF1 00000001
|
||||
EQU PINF2 00000002
|
||||
EQU PINF3 00000003
|
||||
EQU PINF4 00000004
|
||||
EQU PINF5 00000005
|
||||
EQU PINF6 00000006
|
||||
EQU PINF7 00000007
|
||||
EQU PORTG0 00000000
|
||||
EQU PG0 00000000
|
||||
EQU PORTG1 00000001
|
||||
EQU PG1 00000001
|
||||
EQU PORTG2 00000002
|
||||
EQU PG2 00000002
|
||||
EQU PORTG3 00000003
|
||||
EQU PG3 00000003
|
||||
EQU PORTG4 00000004
|
||||
EQU PG4 00000004
|
||||
EQU DDG0 00000000
|
||||
EQU DDG1 00000001
|
||||
EQU DDG2 00000002
|
||||
EQU DDG3 00000003
|
||||
EQU DDG4 00000004
|
||||
EQU PING0 00000000
|
||||
EQU PING1 00000001
|
||||
EQU PING2 00000002
|
||||
EQU PING3 00000003
|
||||
EQU PING4 00000004
|
||||
EQU CS00 00000000
|
||||
EQU CS01 00000001
|
||||
EQU CS02 00000002
|
||||
EQU WGM01 00000003
|
||||
EQU CTC0 00000003
|
||||
EQU COM00 00000004
|
||||
EQU COM01 00000005
|
||||
EQU WGM00 00000006
|
||||
EQU PWM0 00000006
|
||||
EQU FOC0 00000007
|
||||
EQU TCNT0_0 00000000
|
||||
EQU TCNT0_1 00000001
|
||||
EQU TCNT0_2 00000002
|
||||
EQU TCNT0_3 00000003
|
||||
EQU TCNT0_4 00000004
|
||||
EQU TCNT0_5 00000005
|
||||
EQU TCNT0_6 00000006
|
||||
EQU TCNT0_7 00000007
|
||||
EQU OCR0_0 00000000
|
||||
EQU OCR0_1 00000001
|
||||
EQU OCR0_2 00000002
|
||||
EQU OCR0_3 00000003
|
||||
EQU OCR0_4 00000004
|
||||
EQU OCR0_5 00000005
|
||||
EQU OCR0_6 00000006
|
||||
EQU OCR0_7 00000007
|
||||
EQU TCR0UB 00000000
|
||||
EQU OCR0UB 00000001
|
||||
EQU TCN0UB 00000002
|
||||
EQU AS0 00000003
|
||||
EQU TOIE0 00000000
|
||||
EQU OCIE0 00000001
|
||||
EQU TOV0 00000000
|
||||
EQU OCF0 00000001
|
||||
EQU TOIE1 00000002
|
||||
EQU OCIE1B 00000003
|
||||
EQU OCIE1A 00000004
|
||||
EQU TICIE1 00000005
|
||||
EQU OCIE1C 00000000
|
||||
EQU TOV1 00000002
|
||||
EQU OCF1B 00000003
|
||||
EQU OCF1A 00000004
|
||||
EQU ICF1 00000005
|
||||
EQU OCF1C 00000000
|
||||
EQU WGM10 00000000
|
||||
EQU PWM10 00000000
|
||||
EQU WGM11 00000001
|
||||
EQU PWM11 00000001
|
||||
EQU COM1C0 00000002
|
||||
EQU COM1C1 00000003
|
||||
EQU COM1B0 00000004
|
||||
EQU COM1B1 00000005
|
||||
EQU COM1A0 00000006
|
||||
EQU COM1A1 00000007
|
||||
EQU CS10 00000000
|
||||
EQU CS11 00000001
|
||||
EQU CS12 00000002
|
||||
EQU WGM12 00000003
|
||||
EQU CTC10 00000003
|
||||
EQU WGM13 00000004
|
||||
EQU CTC11 00000004
|
||||
EQU ICES1 00000006
|
||||
EQU ICNC1 00000007
|
||||
EQU FOC1C 00000005
|
||||
EQU FOC1B 00000006
|
||||
EQU FOC1A 00000007
|
||||
EQU CS20 00000000
|
||||
EQU CS21 00000001
|
||||
EQU CS22 00000002
|
||||
EQU WGM21 00000003
|
||||
EQU CTC2 00000003
|
||||
EQU COM20 00000004
|
||||
EQU COM21 00000005
|
||||
EQU WGM20 00000006
|
||||
EQU PWM2 00000006
|
||||
EQU FOC2 00000007
|
||||
EQU TCNT2_0 00000000
|
||||
EQU TCNT2_1 00000001
|
||||
EQU TCNT2_2 00000002
|
||||
EQU TCNT2_3 00000003
|
||||
EQU TCNT2_4 00000004
|
||||
EQU TCNT2_5 00000005
|
||||
EQU TCNT2_6 00000006
|
||||
EQU TCNT2_7 00000007
|
||||
EQU OCR2_0 00000000
|
||||
EQU OCR2_1 00000001
|
||||
EQU OCR2_2 00000002
|
||||
EQU OCR2_3 00000003
|
||||
EQU OCR2_4 00000004
|
||||
EQU OCR2_5 00000005
|
||||
EQU OCR2_6 00000006
|
||||
EQU OCR2_7 00000007
|
||||
EQU TOIE2 00000006
|
||||
EQU OCIE2 00000007
|
||||
EQU TOV2 00000006
|
||||
EQU OCF2 00000007
|
||||
EQU OCIE3C 00000001
|
||||
EQU TOIE3 00000002
|
||||
EQU OCIE3B 00000003
|
||||
EQU OCIE3A 00000004
|
||||
EQU TICIE3 00000005
|
||||
EQU OCF3C 00000001
|
||||
EQU TOV3 00000002
|
||||
EQU OCF3B 00000003
|
||||
EQU OCF3A 00000004
|
||||
EQU ICF3 00000005
|
||||
EQU WGM30 00000000
|
||||
EQU PWM30 00000000
|
||||
EQU WGM31 00000001
|
||||
EQU PWM31 00000001
|
||||
EQU COM3C0 00000002
|
||||
EQU COM3C1 00000003
|
||||
EQU COM3B0 00000004
|
||||
EQU COM3B1 00000005
|
||||
EQU COM3A0 00000006
|
||||
EQU COM3A1 00000007
|
||||
EQU CS30 00000000
|
||||
EQU CS31 00000001
|
||||
EQU CS32 00000002
|
||||
EQU WGM32 00000003
|
||||
EQU CTC30 00000003
|
||||
EQU WGM33 00000004
|
||||
EQU CTC31 00000004
|
||||
EQU ICES3 00000006
|
||||
EQU ICNC3 00000007
|
||||
EQU FOC3C 00000005
|
||||
EQU FOC3B 00000006
|
||||
EQU FOC3A 00000007
|
||||
EQU TCN3L0 00000000
|
||||
EQU TCN3L1 00000001
|
||||
EQU TCN3L2 00000002
|
||||
EQU TCN3L3 00000003
|
||||
EQU TCN3L4 00000004
|
||||
EQU TCN3L5 00000005
|
||||
EQU TCN3L6 00000006
|
||||
EQU TCN3L7 00000007
|
||||
EQU WDTCSR 00000021
|
||||
EQU WDP0 00000000
|
||||
EQU WDP1 00000001
|
||||
EQU WDP2 00000002
|
||||
EQU WDE 00000003
|
||||
EQU WDCE 00000004
|
||||
EQU WDTOE 00000004
|
||||
EQU MUX0 00000000
|
||||
EQU MUX1 00000001
|
||||
EQU MUX2 00000002
|
||||
EQU MUX3 00000003
|
||||
EQU MUX4 00000004
|
||||
EQU ADLAR 00000005
|
||||
EQU REFS0 00000006
|
||||
EQU REFS1 00000007
|
||||
EQU ADCSR 00000006
|
||||
EQU ADPS0 00000000
|
||||
EQU ADPS1 00000001
|
||||
EQU ADPS2 00000002
|
||||
EQU ADIE 00000003
|
||||
EQU ADIF 00000004
|
||||
EQU ADFR 00000005
|
||||
EQU ADSC 00000006
|
||||
EQU ADEN 00000007
|
||||
EQU ADCH0 00000000
|
||||
EQU ADCH1 00000001
|
||||
EQU ADCH2 00000002
|
||||
EQU ADCH3 00000003
|
||||
EQU ADCH4 00000004
|
||||
EQU ADCH5 00000005
|
||||
EQU ADCH6 00000006
|
||||
EQU ADCH7 00000007
|
||||
EQU ADCL0 00000000
|
||||
EQU ADCL1 00000001
|
||||
EQU ADCL2 00000002
|
||||
EQU ADCL3 00000003
|
||||
EQU ADCL4 00000004
|
||||
EQU ADCL5 00000005
|
||||
EQU ADCL6 00000006
|
||||
EQU ADCL7 00000007
|
||||
EQU LB1 00000000
|
||||
EQU LB2 00000001
|
||||
EQU BLB01 00000002
|
||||
EQU BLB02 00000003
|
||||
EQU BLB11 00000004
|
||||
EQU BLB12 00000005
|
||||
EQU CKSEL0 00000000
|
||||
EQU CKSEL1 00000001
|
||||
EQU CKSEL2 00000002
|
||||
EQU CKSEL3 00000003
|
||||
EQU SUT0 00000004
|
||||
EQU SUT1 00000005
|
||||
EQU BODEN 00000006
|
||||
EQU BODLEVEL 00000007
|
||||
EQU BOOTRST 00000000
|
||||
EQU BOOTSZ0 00000001
|
||||
EQU BOOTSZ1 00000002
|
||||
EQU EESAVE 00000003
|
||||
EQU CKOPT 00000004
|
||||
EQU SPIEN 00000005
|
||||
EQU JTAGEN 00000006
|
||||
EQU OCDEN 00000007
|
||||
EQU WDTON 00000000
|
||||
EQU M103C 00000001
|
||||
DEF XH r27
|
||||
DEF XL r26
|
||||
DEF YH r29
|
||||
DEF YL r28
|
||||
DEF ZH r31
|
||||
DEF ZL r30
|
||||
EQU FLASHEND 0000ffff
|
||||
EQU IOEND 000000ff
|
||||
EQU SRAM_START 00000100
|
||||
EQU SRAM_SIZE 00001000
|
||||
EQU RAMEND 000010ff
|
||||
EQU XRAMEND 0000ffff
|
||||
EQU E2END 00000fff
|
||||
EQU EEPROMEND 00000fff
|
||||
EQU EEADRBITS 0000000c
|
||||
EQU NRWW_START_ADDR 0000f000
|
||||
EQU NRWW_STOP_ADDR 0000ffff
|
||||
EQU RWW_START_ADDR 00000000
|
||||
EQU RWW_STOP_ADDR 0000efff
|
||||
EQU PAGESIZE 00000080
|
||||
EQU FIRSTBOOTSTART 0000fe00
|
||||
EQU SECONDBOOTSTART 0000fc00
|
||||
EQU THIRDBOOTSTART 0000f800
|
||||
EQU FOURTHBOOTSTART 0000f000
|
||||
EQU SMALLBOOTSTART 0000fe00
|
||||
EQU LARGEBOOTSTART 0000f000
|
||||
EQU INT0addr 00000002
|
||||
EQU INT1addr 00000004
|
||||
EQU INT2addr 00000006
|
||||
EQU INT3addr 00000008
|
||||
EQU INT4addr 0000000a
|
||||
EQU INT5addr 0000000c
|
||||
EQU INT6addr 0000000e
|
||||
EQU INT7addr 00000010
|
||||
EQU OC2addr 00000012
|
||||
EQU OVF2addr 00000014
|
||||
EQU ICP1addr 00000016
|
||||
EQU OC1Aaddr 00000018
|
||||
EQU OC1Baddr 0000001a
|
||||
EQU OVF1addr 0000001c
|
||||
EQU OC0addr 0000001e
|
||||
EQU OVF0addr 00000020
|
||||
EQU SPIaddr 00000022
|
||||
EQU URXC0addr 00000024
|
||||
EQU UDRE0addr 00000026
|
||||
EQU UTXC0addr 00000028
|
||||
EQU ADCCaddr 0000002a
|
||||
EQU ERDYaddr 0000002c
|
||||
EQU ACIaddr 0000002e
|
||||
EQU OC1Caddr 00000030
|
||||
EQU ICP3addr 00000032
|
||||
EQU OC3Aaddr 00000034
|
||||
EQU OC3Baddr 00000036
|
||||
EQU OC3Caddr 00000038
|
||||
EQU OVF3addr 0000003a
|
||||
EQU URXC1addr 0000003c
|
||||
EQU UDRE1addr 0000003e
|
||||
EQU UTXC1addr 00000040
|
||||
EQU TWIaddr 00000042
|
||||
EQU SPMRaddr 00000044
|
||||
EQU INT_VECTORS_SIZE 00000046
|
||||
DEF mpr r16
|
||||
DEF waitcnt r17
|
||||
DEF ilcnt r18
|
||||
DEF olcnt r19
|
||||
DEF speed_reg r20
|
||||
DEF mpr2 r21
|
||||
EQU WTime 0000000f
|
||||
EQU max_level 0000000f
|
||||
EQU min_level 00000000
|
||||
EQU speed_multiplier 00000011
|
||||
EQU sd_mask 0000000f
|
||||
EQU dr_mask 000000f0
|
||||
EQU EngEnR 00000004
|
||||
EQU EngEnL 00000007
|
||||
EQU EngDirR 00000005
|
||||
EQU EngDirL 00000006
|
||||
EQU upMax 00000000
|
||||
EQU upInc 00000001
|
||||
EQU downInc 00000002
|
||||
EQU downMin 00000003
|
||||
EQU InterruptFlagRegisterClear 0000000f
|
||||
CSEG INIT 00000046
|
||||
CSEG SPEEDMAX 00000067
|
||||
CSEG INCSPEED 00000073
|
||||
CSEG DECSPEED 00000081
|
||||
CSEG SPEEDMIN 0000008f
|
||||
CSEG MAIN 0000005d
|
||||
CSEG Wait 0000009b
|
||||
CSEG Loop 0000009e
|
||||
CSEG OLoop 0000009f
|
||||
CSEG ILoop 000000a0
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
<ASSEMBLER_INFO>
|
||||
<VERSION>2.2.7</VERSION>
|
||||
<DEVICE>"ATmega128"</DEVICE>
|
||||
<WORKING_DIR>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Debug</WORKING_DIR>
|
||||
<INCLUDE_PATH>
|
||||
<DIR>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</DIR>
|
||||
<DIR>C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include</DIR>
|
||||
<DIR></DIR>
|
||||
</INCLUDE_PATH>
|
||||
<SOURCE_FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</SOURCE_FILE>
|
||||
<INCLUDED_FILES>
|
||||
<FILE>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</FILE>
|
||||
</INCLUDED_FILES>
|
||||
<OBJECT_FILES>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Debug\Corwin_Perren_Lab7_sourcecode.obj</FILE>
|
||||
</OBJECT_FILES>
|
||||
<HEX_FILES>
|
||||
<FILE>Corwin_Perren_Lab7_sourcecode.hex</FILE>
|
||||
</HEX_FILES>
|
||||
<OUTPUT_FILES>
|
||||
<FILE>Corwin_Perren_Lab7_sourcecode.map</FILE>
|
||||
<FILE>Corwin_Perren_Lab7_sourcecode.lss</FILE>
|
||||
</OUTPUT_FILES>
|
||||
<LABELS>
|
||||
<INIT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>79</LINE></INIT>
|
||||
<SPEEDMAX><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>155</LINE></SPEEDMAX>
|
||||
<INCSPEED><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>184</LINE></INCSPEED>
|
||||
<DECSPEED><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>215</LINE></DECSPEED>
|
||||
<SPEEDMIN><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>246</LINE></SPEEDMIN>
|
||||
<MAIN><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>131</LINE></MAIN>
|
||||
<Wait><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>279</LINE></Wait>
|
||||
<Loop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>284</LINE></Loop>
|
||||
<OLoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>285</LINE></OLoop>
|
||||
<ILoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 7\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode\Corwin_Perren_Lab7_sourcecode.asm</FILE><LINE>286</LINE></ILoop>
|
||||
</LABELS>
|
||||
</ASSEMBLER_INFO>
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{18226A42-8477-4023-8AD2-40C49DA407C9}") = "Corwin_Perren_Lab8_remote_sourcecode", "Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asmproj", "{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
Release|AVR = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,263 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Enter Name of file here
|
||||
;*
|
||||
;* Enter the description of the program here
|
||||
;*
|
||||
;* This is the TRANSMIT skeleton file for Lab 8 of ECE 375
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: Enter your name
|
||||
;* Date: Enter Date
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
.include "m128def.inc" ; Include definition file
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;***********************************************************
|
||||
.def mpr = r16 ; Multi-Purpose Register
|
||||
.def waitcnt = r17 ; Wait Loop Counter
|
||||
.def ilcnt = r18 ; Inner Loop Counter
|
||||
.def olcnt = r19 ; Outer Loop Counter
|
||||
.def speed_reg = r20 ; Store of speed
|
||||
.def command_reg = r21 ; Reg to store current command
|
||||
|
||||
.equ WTime = 15 ; Button debounce time
|
||||
|
||||
.equ EngEnR = 4 ; Right Engine Enable Bit
|
||||
.equ EngEnL = 7 ; Left Engine Enable Bit
|
||||
.equ EngDirR = 5 ; Right Engine Direction Bit
|
||||
.equ EngDirL = 6 ; Left Engine Direction Bit
|
||||
|
||||
.equ BotAddress = 0x1a ; (Enter your robot's address here (8 bits))
|
||||
|
||||
; Use these action codes between the remote and robot
|
||||
; MSB = 1 thus:
|
||||
; control signals are shifted right by one and ORed with 0b10000000 = $80
|
||||
.equ MovFwdCmd = ($80|1<<(EngDirR-1)|1<<(EngDirL-1)) ;0b10110000 Move Forward Action Code
|
||||
.equ MovBckCmd = ($80|$00) ;0b10000000 Move Backward Action Code
|
||||
.equ TurnRCmd = ($80|1<<(EngDirL-1)) ;0b10100000 Turn Right Action Code
|
||||
.equ TurnLCmd = ($80|1<<(EngDirR-1)) ;0b10010000 Turn Left Action Code
|
||||
.equ HaltCmd = ($80|1<<(EngEnR-1)|1<<(EngEnL-1)) ;0b11001000 Halt Action Code
|
||||
.equ FreezeCmd = 0b11111000 ;0b11111000 Freeze Action Code
|
||||
|
||||
; Input pins for sending control commands
|
||||
; Note that I had to avoid using the pin
|
||||
; that is the transmitter on port D
|
||||
.equ MoveFwdPin = 0
|
||||
.equ MoveBackPin = 1
|
||||
.equ MoveLeftPin = 7
|
||||
.equ MoveRightPin = 6
|
||||
.equ MoveHaltPin = 5
|
||||
.equ FreezePin = 4
|
||||
|
||||
; Outputs on port D
|
||||
.equ TXD1 = 3
|
||||
|
||||
; Store the upper and lower bytes for ubrr setting
|
||||
.equ ubrr_low = low(832)
|
||||
.equ ubrr_high = high(832)
|
||||
|
||||
;***********************************************************
|
||||
;* Start of Code Segment
|
||||
;***********************************************************
|
||||
.cseg ; Beginning of code segment
|
||||
|
||||
;***********************************************************
|
||||
;* Interrupt Vectors
|
||||
;***********************************************************
|
||||
.org $0000 ; Beginning of IVs
|
||||
rjmp INIT ; Reset interrupt
|
||||
|
||||
.org $0046 ; End of Interrupt Vectors
|
||||
|
||||
;***********************************************************
|
||||
;* Program Initialization
|
||||
;***********************************************************
|
||||
INIT:
|
||||
; Initialize the Stack Pointer
|
||||
ldi mpr, low(RAMEND) ; Init the 2 stack pointer registers
|
||||
out SPL, mpr
|
||||
ldi mpr, high(RAMEND)
|
||||
out SPH, mpr
|
||||
|
||||
; I/O Ports
|
||||
; Initialize Port D pins for input
|
||||
ldi mpr, ((0 << MoveFwdPin) | (0 << MoveBackPin) | (0 << MoveLeftPin) | (0 << MoveRightPin) | (0 << MoveHaltPin) | (1 << TXD1))
|
||||
out DDRD, mpr
|
||||
|
||||
; Enable pullups on input pins
|
||||
ldi mpr, ((1 << MoveFwdPin) | (1 << MoveBackPin) | (1 << MoveLeftPin) | (1 << MoveRightPin) | (1 << MoveHaltPin) | (1 << FreezePin))
|
||||
out PORTD, mpr
|
||||
|
||||
; USART1
|
||||
; Set baudrate at 2400bps
|
||||
ldi mpr, ubrr_low
|
||||
sts UBRR1L, mpr
|
||||
|
||||
ldi mpr, ubrr_high
|
||||
sts UBRR1H, mpr
|
||||
|
||||
; Enable transmitter
|
||||
ldi mpr, ((1 << TXEN1) | (1 << RXEN1))
|
||||
sts UCSR1B, mpr
|
||||
|
||||
; Set frame format: 8 data bits, 2 stop bits
|
||||
; Double data rate
|
||||
ldi mpr, (1 << U2X1)
|
||||
sts UCSR1A, mpr
|
||||
|
||||
; 8N2 setting
|
||||
ldi mpr, ((1 << UCSZ10) | (1 << UCSZ11) | (1 << USBS1))
|
||||
sts UCSR1C, mpr
|
||||
|
||||
;***********************************************************
|
||||
;* Main Program
|
||||
;***********************************************************
|
||||
MAIN:
|
||||
in mpr, PIND ; Get current state of button pins
|
||||
|
||||
sbrs mpr, MoveFwdPin ; Check if forward pin pressed
|
||||
rcall SendMoveFwd ; Send move forward if pressed
|
||||
|
||||
sbrs mpr, MoveBackPin ; Check if back pin pressed
|
||||
rcall SendMoveBack ; Send move back if pressed
|
||||
|
||||
sbrs mpr, MoveLeftPin ; Check if left pin pressed
|
||||
rcall SendMoveLeft ; Send move left if pressed
|
||||
|
||||
sbrs mpr, MoveRightPin ; Check if right pin pressed
|
||||
rcall SendMoveRight ; Send move right if pressed
|
||||
|
||||
sbrs mpr, MoveHaltPin ; Check if halt pin pressed
|
||||
rcall SendMoveHalt ; Send move halt if pressed
|
||||
|
||||
sbrs mpr, FreezePin ; Check if freeze pin pressed
|
||||
rcall SendFreeze ; Send move freeze if pressed
|
||||
|
||||
; Some debounce time for any button presses
|
||||
ldi waitcnt, WTime ; Wait for 150 milliseconds
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
rjmp MAIN
|
||||
|
||||
;***********************************************************
|
||||
;* Functions and Subroutines
|
||||
;***********************************************************
|
||||
SendAddress:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendAddress ; Jump back until it is
|
||||
|
||||
ldi mpr, BotAddress ; Load the bot address
|
||||
sts UDR1, mpr ; Send the address over serial
|
||||
ret
|
||||
|
||||
SendCommand:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendCommand ; Jump back until it is
|
||||
|
||||
sts UDR1, command_reg ; Send command over serial
|
||||
ret
|
||||
|
||||
SendMoveFwd:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendMoveFwd ; Jump back until it is
|
||||
|
||||
rcall SendAddress ; Send the address
|
||||
|
||||
ldi command_reg, MovFwdCmd ; Load move forward command
|
||||
rcall SendCommand ; Call the subroutine to send it
|
||||
|
||||
ldi mpr, 0xFF ; Set mpr to max val so next loop can set it
|
||||
ret
|
||||
|
||||
SendMoveBack:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendMoveFwd ; Jump back until it is
|
||||
|
||||
rcall SendAddress ; Send the address
|
||||
|
||||
ldi command_reg, MovBckCmd ; Load move back command
|
||||
rcall SendCommand ; Call the subroutine to send it
|
||||
|
||||
ldi mpr, 0xFF ; Set mpr to max val so next loop can set it
|
||||
ret
|
||||
|
||||
SendMoveLeft:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendMoveFwd ; Jump back until it is
|
||||
|
||||
rcall SendAddress ; Send the address
|
||||
|
||||
ldi command_reg, TurnLCmd ; Load turn left command
|
||||
rcall SendCommand ; Call the subroutine to send it
|
||||
|
||||
ldi mpr, 0xFF ; Set mpr to max val so next loop can set it
|
||||
ret
|
||||
|
||||
SendMoveRight:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendMoveFwd ; Jump back until it is
|
||||
|
||||
rcall SendAddress ; Send the address
|
||||
|
||||
ldi command_reg, TurnRCmd ; Load turn right command
|
||||
rcall SendCommand ; Call the subroutine to send it
|
||||
|
||||
ldi mpr, 0xFF ; Set mpr to max val so next loop can set it
|
||||
ret
|
||||
|
||||
SendMoveHalt:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendMoveFwd ; Jump back until it is
|
||||
|
||||
rcall SendAddress ; Send the address
|
||||
|
||||
ldi command_reg, HaltCmd ; Load halt command
|
||||
rcall SendCommand ; Call the subroutine to send it
|
||||
|
||||
ldi mpr, 0xFF ; Set mpr to max val so next loop can set it
|
||||
ret
|
||||
|
||||
SendFreeze:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendFreeze ; Jump back until it is
|
||||
|
||||
rcall SendAddress ; Send the address
|
||||
|
||||
ldi command_reg, FreezeCmd ; Load halt command
|
||||
rcall SendCommand ; Call the subroutine to send it
|
||||
|
||||
ldi mpr, 0xFF ; Set mpr to max val so next loop can set it
|
||||
ret
|
||||
|
||||
Wait:
|
||||
push waitcnt ; Save wait register
|
||||
push ilcnt ; Save ilcnt register
|
||||
push olcnt ; Save olcnt register
|
||||
|
||||
Loop: ldi olcnt, 224 ; load olcnt register
|
||||
OLoop: ldi ilcnt, 237 ; load ilcnt register
|
||||
ILoop: dec ilcnt ; decrement ilcnt
|
||||
brne ILoop ; Continue Inner Loop
|
||||
dec olcnt ; decrement olcnt
|
||||
brne OLoop ; Continue Outer Loop
|
||||
dec waitcnt ; Decrement wait
|
||||
brne Loop ; Continue Wait loop
|
||||
|
||||
pop olcnt ; Restore olcnt register
|
||||
pop ilcnt ; Restore ilcnt register
|
||||
pop waitcnt ; Restore wait register
|
||||
ret ; Return from subroutine
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRAssembler</ToolchainName>
|
||||
<ProjectGuid>59B1D629-9DCC-43ed-A0FD-8AB0E4D622AB</ProjectGuid>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.obj</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<Language>ASSEMBLY</Language>
|
||||
<AssemblyName>Corwin_Perren_Lab8_remote_sourcecode</AssemblyName>
|
||||
<Name>Corwin_Perren_Lab8_remote_sourcecode</Name>
|
||||
<RootNamespace>Corwin_Perren_Lab8_remote_sourcecode</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<EntryFile>$(MSBuildProjectDirectory)\Corwin_Perren_Lab8_remote_sourcecode.asm</EntryFile>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Corwin_Perren_Lab8_remote_sourcecode.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Assembler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.2.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>bd3TUV9UtxpdYQkn+6MWPA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc/m128def.inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\templates\main.asm</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>3eRwuFZpVzSU1OGBkc7CFw==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/templates/main.asm</Name>
|
||||
<SelectString>Main file (.asm)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.2.209</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -0,0 +1,19 @@
|
||||
:020000020000FC
|
||||
:0200000045C0F9
|
||||
:10008C000FEF0DBF00E10EBF08E001BB03EF02BB99
|
||||
:10009C0000E40093990003E00093980008E10093BA
|
||||
:1000AC009A0002E000939B000EE000939D0000B3C9
|
||||
:1000BC0000FF1CD001FF23D007FF2AD006FF31D050
|
||||
:1000CC0005FF38D004FF3FD01FE046D0F0CF0091A1
|
||||
:1000DC009B0005FFFCCF0AE100939C000895009162
|
||||
:1000EC009B0005FFFCCF50939C00089500919B0052
|
||||
:1000FC0005FFFCCFECDF50EBF2DF0FEF0895009122
|
||||
:10010C009B0005FFF3CFE3DF50E8E9DF0FEF089525
|
||||
:10011C0000919B0005FFEACFDADF50E9E0DF0FEF3B
|
||||
:10012C00089500919B0005FFE1CFD1DF50EAD7DFA6
|
||||
:10013C000FEF089500919B0005FFD8CFC8DF58EC56
|
||||
:10014C00CEDF0FEF089500919B0005FFFCCFBFDFC2
|
||||
:10015C0058EFC5DF0FEF08951F932F933F9330EEA9
|
||||
:10016C002DEE2A95F1F73A95D9F71A95C1F73F91EB
|
||||
:06017C002F911F91089570
|
||||
:00000001FF
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,910 @@
|
||||
|
||||
AVRASM ver. 2.2.7 C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm Sun Nov 25 15:14:57 2018
|
||||
|
||||
|
||||
EQU SIGNATURE_000 0000001e
|
||||
EQU SIGNATURE_001 00000097
|
||||
EQU SIGNATURE_002 00000002
|
||||
EQU UCSR1C 0000009d
|
||||
EQU UDR1 0000009c
|
||||
EQU UCSR1A 0000009b
|
||||
EQU UCSR1B 0000009a
|
||||
EQU UBRR1H 00000098
|
||||
EQU UBRR1L 00000099
|
||||
EQU UCSR0C 00000095
|
||||
EQU UBRR0H 00000090
|
||||
EQU TCCR3C 0000008c
|
||||
EQU TCCR3A 0000008b
|
||||
EQU TCCR3B 0000008a
|
||||
EQU TCNT3L 00000088
|
||||
EQU TCNT3H 00000089
|
||||
EQU OCR3AL 00000086
|
||||
EQU OCR3AH 00000087
|
||||
EQU OCR3BL 00000084
|
||||
EQU OCR3BH 00000085
|
||||
EQU OCR3CL 00000082
|
||||
EQU OCR3CH 00000083
|
||||
EQU ICR3L 00000080
|
||||
EQU ICR3H 00000081
|
||||
EQU ETIMSK 0000007d
|
||||
EQU ETIFR 0000007c
|
||||
EQU TCCR1C 0000007a
|
||||
EQU OCR1CL 00000078
|
||||
EQU OCR1CH 00000079
|
||||
EQU TWCR 00000074
|
||||
EQU TWDR 00000073
|
||||
EQU TWAR 00000072
|
||||
EQU TWSR 00000071
|
||||
EQU TWBR 00000070
|
||||
EQU OSCCAL 0000006f
|
||||
EQU XMCRA 0000006d
|
||||
EQU XMCRB 0000006c
|
||||
EQU EICRA 0000006a
|
||||
EQU SPMCSR 00000068
|
||||
EQU PORTG 00000065
|
||||
EQU DDRG 00000064
|
||||
EQU PING 00000063
|
||||
EQU PORTF 00000062
|
||||
EQU DDRF 00000061
|
||||
EQU SREG 0000003f
|
||||
EQU SPL 0000003d
|
||||
EQU SPH 0000003e
|
||||
EQU XDIV 0000003c
|
||||
EQU RAMPZ 0000003b
|
||||
EQU EICRB 0000003a
|
||||
EQU EIMSK 00000039
|
||||
EQU EIFR 00000038
|
||||
EQU TIMSK 00000037
|
||||
EQU TIFR 00000036
|
||||
EQU MCUCR 00000035
|
||||
EQU MCUCSR 00000034
|
||||
EQU TCCR0 00000033
|
||||
EQU TCNT0 00000032
|
||||
EQU OCR0 00000031
|
||||
EQU ASSR 00000030
|
||||
EQU TCCR1A 0000002f
|
||||
EQU TCCR1B 0000002e
|
||||
EQU TCNT1L 0000002c
|
||||
EQU TCNT1H 0000002d
|
||||
EQU OCR1AL 0000002a
|
||||
EQU OCR1AH 0000002b
|
||||
EQU OCR1BL 00000028
|
||||
EQU OCR1BH 00000029
|
||||
EQU ICR1L 00000026
|
||||
EQU ICR1H 00000027
|
||||
EQU TCCR2 00000025
|
||||
EQU TCNT2 00000024
|
||||
EQU OCR2 00000023
|
||||
EQU OCDR 00000022
|
||||
EQU WDTCR 00000021
|
||||
EQU SFIOR 00000020
|
||||
EQU EEARL 0000001e
|
||||
EQU EEARH 0000001f
|
||||
EQU EEDR 0000001d
|
||||
EQU EECR 0000001c
|
||||
EQU PORTA 0000001b
|
||||
EQU DDRA 0000001a
|
||||
EQU PINA 00000019
|
||||
EQU PORTB 00000018
|
||||
EQU DDRB 00000017
|
||||
EQU PINB 00000016
|
||||
EQU PORTC 00000015
|
||||
EQU DDRC 00000014
|
||||
EQU PINC 00000013
|
||||
EQU PORTD 00000012
|
||||
EQU DDRD 00000011
|
||||
EQU PIND 00000010
|
||||
EQU SPDR 0000000f
|
||||
EQU SPSR 0000000e
|
||||
EQU SPCR 0000000d
|
||||
EQU UDR0 0000000c
|
||||
EQU UCSR0A 0000000b
|
||||
EQU UCSR0B 0000000a
|
||||
EQU UBRR0L 00000009
|
||||
EQU ACSR 00000008
|
||||
EQU ADMUX 00000007
|
||||
EQU ADCSRA 00000006
|
||||
EQU ADCH 00000005
|
||||
EQU ADCL 00000004
|
||||
EQU PORTE 00000003
|
||||
EQU DDRE 00000002
|
||||
EQU PINE 00000001
|
||||
EQU PINF 00000000
|
||||
EQU ACME 00000003
|
||||
EQU ACIS0 00000000
|
||||
EQU ACIS1 00000001
|
||||
EQU ACIC 00000002
|
||||
EQU ACIE 00000003
|
||||
EQU ACI 00000004
|
||||
EQU ACO 00000005
|
||||
EQU ACBG 00000006
|
||||
EQU ACD 00000007
|
||||
EQU SPDR0 00000000
|
||||
EQU SPDR1 00000001
|
||||
EQU SPDR2 00000002
|
||||
EQU SPDR3 00000003
|
||||
EQU SPDR4 00000004
|
||||
EQU SPDR5 00000005
|
||||
EQU SPDR6 00000006
|
||||
EQU SPDR7 00000007
|
||||
EQU SPI2X 00000000
|
||||
EQU WCOL 00000006
|
||||
EQU SPIF 00000007
|
||||
EQU SPR0 00000000
|
||||
EQU SPR1 00000001
|
||||
EQU CPHA 00000002
|
||||
EQU CPOL 00000003
|
||||
EQU MSTR 00000004
|
||||
EQU DORD 00000005
|
||||
EQU SPE 00000006
|
||||
EQU SPIE 00000007
|
||||
EQU I2BR 00000070
|
||||
EQU TWBR0 00000000
|
||||
EQU TWBR1 00000001
|
||||
EQU TWBR2 00000002
|
||||
EQU TWBR3 00000003
|
||||
EQU TWBR4 00000004
|
||||
EQU TWBR5 00000005
|
||||
EQU TWBR6 00000006
|
||||
EQU TWBR7 00000007
|
||||
EQU I2CR 00000074
|
||||
EQU TWIE 00000000
|
||||
EQU I2IE 00000000
|
||||
EQU TWEN 00000002
|
||||
EQU I2EN 00000002
|
||||
EQU ENI2C 00000002
|
||||
EQU TWWC 00000003
|
||||
EQU I2WC 00000003
|
||||
EQU TWSTO 00000004
|
||||
EQU I2STO 00000004
|
||||
EQU TWSTA 00000005
|
||||
EQU I2STA 00000005
|
||||
EQU TWEA 00000006
|
||||
EQU I2EA 00000006
|
||||
EQU TWINT 00000007
|
||||
EQU I2INT 00000007
|
||||
EQU I2SR 00000071
|
||||
EQU TWPS0 00000000
|
||||
EQU TWS0 00000000
|
||||
EQU I2GCE 00000000
|
||||
EQU TWPS1 00000001
|
||||
EQU TWS1 00000001
|
||||
EQU TWS3 00000003
|
||||
EQU I2S3 00000003
|
||||
EQU TWS4 00000004
|
||||
EQU I2S4 00000004
|
||||
EQU TWS5 00000005
|
||||
EQU I2S5 00000005
|
||||
EQU TWS6 00000006
|
||||
EQU I2S6 00000006
|
||||
EQU TWS7 00000007
|
||||
EQU I2S7 00000007
|
||||
EQU I2DR 00000073
|
||||
EQU TWD0 00000000
|
||||
EQU TWD1 00000001
|
||||
EQU TWD2 00000002
|
||||
EQU TWD3 00000003
|
||||
EQU TWD4 00000004
|
||||
EQU TWD5 00000005
|
||||
EQU TWD6 00000006
|
||||
EQU TWD7 00000007
|
||||
EQU I2AR 00000072
|
||||
EQU TWGCE 00000000
|
||||
EQU TWA0 00000001
|
||||
EQU TWA1 00000002
|
||||
EQU TWA2 00000003
|
||||
EQU TWA3 00000004
|
||||
EQU TWA4 00000005
|
||||
EQU TWA5 00000006
|
||||
EQU TWA6 00000007
|
||||
EQU UDR00 00000000
|
||||
EQU UDR01 00000001
|
||||
EQU UDR02 00000002
|
||||
EQU UDR03 00000003
|
||||
EQU UDR04 00000004
|
||||
EQU UDR05 00000005
|
||||
EQU UDR06 00000006
|
||||
EQU UDR07 00000007
|
||||
EQU MPCM0 00000000
|
||||
EQU U2X0 00000001
|
||||
EQU UPE0 00000002
|
||||
EQU DOR0 00000003
|
||||
EQU FE0 00000004
|
||||
EQU UDRE0 00000005
|
||||
EQU TXC0 00000006
|
||||
EQU RXC0 00000007
|
||||
EQU TXB80 00000000
|
||||
EQU RXB80 00000001
|
||||
EQU UCSZ02 00000002
|
||||
EQU UCSZ2 00000002
|
||||
EQU TXEN0 00000003
|
||||
EQU RXEN0 00000004
|
||||
EQU UDRIE0 00000005
|
||||
EQU TXCIE0 00000006
|
||||
EQU RXCIE0 00000007
|
||||
EQU UCPOL0 00000000
|
||||
EQU UCSZ00 00000001
|
||||
EQU UCSZ01 00000002
|
||||
EQU USBS0 00000003
|
||||
EQU UPM00 00000004
|
||||
EQU UPM01 00000005
|
||||
EQU UMSEL0 00000006
|
||||
EQU UBRR8 00000000
|
||||
EQU UBRR9 00000001
|
||||
EQU UBRR10 00000002
|
||||
EQU UBRR11 00000003
|
||||
EQU UBRR0 00000000
|
||||
EQU UBRR1 00000001
|
||||
EQU UBRR2 00000002
|
||||
EQU UBRR3 00000003
|
||||
EQU UBRR4 00000004
|
||||
EQU UBRR5 00000005
|
||||
EQU UBRR6 00000006
|
||||
EQU UBRR7 00000007
|
||||
EQU UDR10 00000000
|
||||
EQU UDR11 00000001
|
||||
EQU UDR12 00000002
|
||||
EQU UDR13 00000003
|
||||
EQU UDR14 00000004
|
||||
EQU UDR15 00000005
|
||||
EQU UDR16 00000006
|
||||
EQU UDR17 00000007
|
||||
EQU MPCM1 00000000
|
||||
EQU U2X1 00000001
|
||||
EQU UPE1 00000002
|
||||
EQU DOR1 00000003
|
||||
EQU FE1 00000004
|
||||
EQU UDRE1 00000005
|
||||
EQU TXC1 00000006
|
||||
EQU RXC1 00000007
|
||||
EQU TXB81 00000000
|
||||
EQU RXB81 00000001
|
||||
EQU UCSZ12 00000002
|
||||
EQU TXEN1 00000003
|
||||
EQU RXEN1 00000004
|
||||
EQU UDRIE1 00000005
|
||||
EQU TXCIE1 00000006
|
||||
EQU RXCIE1 00000007
|
||||
EQU UCPOL1 00000000
|
||||
EQU UCSZ10 00000001
|
||||
EQU UCSZ11 00000002
|
||||
EQU USBS1 00000003
|
||||
EQU UPM10 00000004
|
||||
EQU UPM11 00000005
|
||||
EQU UMSEL1 00000006
|
||||
EQU SREG_C 00000000
|
||||
EQU SREG_Z 00000001
|
||||
EQU SREG_N 00000002
|
||||
EQU SREG_V 00000003
|
||||
EQU SREG_S 00000004
|
||||
EQU SREG_H 00000005
|
||||
EQU SREG_T 00000006
|
||||
EQU SREG_I 00000007
|
||||
EQU IVCE 00000000
|
||||
EQU IVSEL 00000001
|
||||
EQU SM2 00000002
|
||||
EQU SM0 00000003
|
||||
EQU SM1 00000004
|
||||
EQU SE 00000005
|
||||
EQU SRW10 00000006
|
||||
EQU SRE 00000007
|
||||
EQU SRW11 00000001
|
||||
EQU SRW00 00000002
|
||||
EQU SRW01 00000003
|
||||
EQU SRL0 00000004
|
||||
EQU SRL1 00000005
|
||||
EQU SRL2 00000006
|
||||
EQU XMM0 00000000
|
||||
EQU XMM1 00000001
|
||||
EQU XMM2 00000002
|
||||
EQU XMBK 00000007
|
||||
EQU CAL0 00000000
|
||||
EQU CAL1 00000001
|
||||
EQU CAL2 00000002
|
||||
EQU CAL3 00000003
|
||||
EQU CAL4 00000004
|
||||
EQU CAL5 00000005
|
||||
EQU CAL6 00000006
|
||||
EQU CAL7 00000007
|
||||
EQU XDIV0 00000000
|
||||
EQU XDIV1 00000001
|
||||
EQU XDIV2 00000002
|
||||
EQU XDIV3 00000003
|
||||
EQU XDIV4 00000004
|
||||
EQU XDIV5 00000005
|
||||
EQU XDIV6 00000006
|
||||
EQU XDIVEN 00000007
|
||||
EQU PORF 00000000
|
||||
EQU EXTRF 00000001
|
||||
EQU BORF 00000002
|
||||
EQU WDRF 00000003
|
||||
EQU JTRF 00000004
|
||||
EQU JTD 00000007
|
||||
EQU RAMPZ0 00000000
|
||||
EQU SPMCR 00000068
|
||||
EQU SPMEN 00000000
|
||||
EQU PGERS 00000001
|
||||
EQU PGWRT 00000002
|
||||
EQU BLBSET 00000003
|
||||
EQU RWWSRE 00000004
|
||||
EQU ASRE 00000004
|
||||
EQU RWWSB 00000006
|
||||
EQU ASB 00000006
|
||||
EQU SPMIE 00000007
|
||||
EQU OCDR0 00000000
|
||||
EQU OCDR1 00000001
|
||||
EQU OCDR2 00000002
|
||||
EQU OCDR3 00000003
|
||||
EQU OCDR4 00000004
|
||||
EQU OCDR5 00000005
|
||||
EQU OCDR6 00000006
|
||||
EQU OCDR7 00000007
|
||||
EQU IDRD 00000007
|
||||
EQU PSR321 00000000
|
||||
EQU PSR1 00000000
|
||||
EQU PSR2 00000000
|
||||
EQU PSR3 00000000
|
||||
EQU PSR0 00000001
|
||||
EQU PUD 00000002
|
||||
EQU TSM 00000007
|
||||
EQU ISC00 00000000
|
||||
EQU ISC01 00000001
|
||||
EQU ISC10 00000002
|
||||
EQU ISC11 00000003
|
||||
EQU ISC20 00000004
|
||||
EQU ISC21 00000005
|
||||
EQU ISC30 00000006
|
||||
EQU ISC31 00000007
|
||||
EQU ISC40 00000000
|
||||
EQU ISC41 00000001
|
||||
EQU ISC50 00000002
|
||||
EQU ISC51 00000003
|
||||
EQU ISC60 00000004
|
||||
EQU ISC61 00000005
|
||||
EQU ISC70 00000006
|
||||
EQU ISC71 00000007
|
||||
EQU GICR 00000039
|
||||
EQU GIMSK 00000039
|
||||
EQU INT0 00000000
|
||||
EQU INT1 00000001
|
||||
EQU INT2 00000002
|
||||
EQU INT3 00000003
|
||||
EQU INT4 00000004
|
||||
EQU INT5 00000005
|
||||
EQU INT6 00000006
|
||||
EQU INT7 00000007
|
||||
EQU GIFR 00000038
|
||||
EQU INTF0 00000000
|
||||
EQU INTF1 00000001
|
||||
EQU INTF2 00000002
|
||||
EQU INTF3 00000003
|
||||
EQU INTF4 00000004
|
||||
EQU INTF5 00000005
|
||||
EQU INTF6 00000006
|
||||
EQU INTF7 00000007
|
||||
EQU EEDR0 00000000
|
||||
EQU EEDR1 00000001
|
||||
EQU EEDR2 00000002
|
||||
EQU EEDR3 00000003
|
||||
EQU EEDR4 00000004
|
||||
EQU EEDR5 00000005
|
||||
EQU EEDR6 00000006
|
||||
EQU EEDR7 00000007
|
||||
EQU EERE 00000000
|
||||
EQU EEWE 00000001
|
||||
EQU EEMWE 00000002
|
||||
EQU EERIE 00000003
|
||||
EQU PORTA0 00000000
|
||||
EQU PA0 00000000
|
||||
EQU PORTA1 00000001
|
||||
EQU PA1 00000001
|
||||
EQU PORTA2 00000002
|
||||
EQU PA2 00000002
|
||||
EQU PORTA3 00000003
|
||||
EQU PA3 00000003
|
||||
EQU PORTA4 00000004
|
||||
EQU PA4 00000004
|
||||
EQU PORTA5 00000005
|
||||
EQU PA5 00000005
|
||||
EQU PORTA6 00000006
|
||||
EQU PA6 00000006
|
||||
EQU PORTA7 00000007
|
||||
EQU PA7 00000007
|
||||
EQU DDA0 00000000
|
||||
EQU DDA1 00000001
|
||||
EQU DDA2 00000002
|
||||
EQU DDA3 00000003
|
||||
EQU DDA4 00000004
|
||||
EQU DDA5 00000005
|
||||
EQU DDA6 00000006
|
||||
EQU DDA7 00000007
|
||||
EQU PINA0 00000000
|
||||
EQU PINA1 00000001
|
||||
EQU PINA2 00000002
|
||||
EQU PINA3 00000003
|
||||
EQU PINA4 00000004
|
||||
EQU PINA5 00000005
|
||||
EQU PINA6 00000006
|
||||
EQU PINA7 00000007
|
||||
EQU PORTB0 00000000
|
||||
EQU PB0 00000000
|
||||
EQU PORTB1 00000001
|
||||
EQU PB1 00000001
|
||||
EQU PORTB2 00000002
|
||||
EQU PB2 00000002
|
||||
EQU PORTB3 00000003
|
||||
EQU PB3 00000003
|
||||
EQU PORTB4 00000004
|
||||
EQU PB4 00000004
|
||||
EQU PORTB5 00000005
|
||||
EQU PB5 00000005
|
||||
EQU PORTB6 00000006
|
||||
EQU PB6 00000006
|
||||
EQU PORTB7 00000007
|
||||
EQU PB7 00000007
|
||||
EQU DDB0 00000000
|
||||
EQU DDB1 00000001
|
||||
EQU DDB2 00000002
|
||||
EQU DDB3 00000003
|
||||
EQU DDB4 00000004
|
||||
EQU DDB5 00000005
|
||||
EQU DDB6 00000006
|
||||
EQU DDB7 00000007
|
||||
EQU PINB0 00000000
|
||||
EQU PINB1 00000001
|
||||
EQU PINB2 00000002
|
||||
EQU PINB3 00000003
|
||||
EQU PINB4 00000004
|
||||
EQU PINB5 00000005
|
||||
EQU PINB6 00000006
|
||||
EQU PINB7 00000007
|
||||
EQU PORTC0 00000000
|
||||
EQU PC0 00000000
|
||||
EQU PORTC1 00000001
|
||||
EQU PC1 00000001
|
||||
EQU PORTC2 00000002
|
||||
EQU PC2 00000002
|
||||
EQU PORTC3 00000003
|
||||
EQU PC3 00000003
|
||||
EQU PORTC4 00000004
|
||||
EQU PC4 00000004
|
||||
EQU PORTC5 00000005
|
||||
EQU PC5 00000005
|
||||
EQU PORTC6 00000006
|
||||
EQU PC6 00000006
|
||||
EQU PORTC7 00000007
|
||||
EQU PC7 00000007
|
||||
EQU DDC0 00000000
|
||||
EQU DDC1 00000001
|
||||
EQU DDC2 00000002
|
||||
EQU DDC3 00000003
|
||||
EQU DDC4 00000004
|
||||
EQU DDC5 00000005
|
||||
EQU DDC6 00000006
|
||||
EQU DDC7 00000007
|
||||
EQU PINC0 00000000
|
||||
EQU PINC1 00000001
|
||||
EQU PINC2 00000002
|
||||
EQU PINC3 00000003
|
||||
EQU PINC4 00000004
|
||||
EQU PINC5 00000005
|
||||
EQU PINC6 00000006
|
||||
EQU PINC7 00000007
|
||||
EQU PORTD0 00000000
|
||||
EQU PD0 00000000
|
||||
EQU PORTD1 00000001
|
||||
EQU PD1 00000001
|
||||
EQU PORTD2 00000002
|
||||
EQU PD2 00000002
|
||||
EQU PORTD3 00000003
|
||||
EQU PD3 00000003
|
||||
EQU PORTD4 00000004
|
||||
EQU PD4 00000004
|
||||
EQU PORTD5 00000005
|
||||
EQU PD5 00000005
|
||||
EQU PORTD6 00000006
|
||||
EQU PD6 00000006
|
||||
EQU PORTD7 00000007
|
||||
EQU PD7 00000007
|
||||
EQU DDD0 00000000
|
||||
EQU DDD1 00000001
|
||||
EQU DDD2 00000002
|
||||
EQU DDD3 00000003
|
||||
EQU DDD4 00000004
|
||||
EQU DDD5 00000005
|
||||
EQU DDD6 00000006
|
||||
EQU DDD7 00000007
|
||||
EQU PIND0 00000000
|
||||
EQU PIND1 00000001
|
||||
EQU PIND2 00000002
|
||||
EQU PIND3 00000003
|
||||
EQU PIND4 00000004
|
||||
EQU PIND5 00000005
|
||||
EQU PIND6 00000006
|
||||
EQU PIND7 00000007
|
||||
EQU PORTE0 00000000
|
||||
EQU PE0 00000000
|
||||
EQU PORTE1 00000001
|
||||
EQU PE1 00000001
|
||||
EQU PORTE2 00000002
|
||||
EQU PE2 00000002
|
||||
EQU PORTE3 00000003
|
||||
EQU PE3 00000003
|
||||
EQU PORTE4 00000004
|
||||
EQU PE4 00000004
|
||||
EQU PORTE5 00000005
|
||||
EQU PE5 00000005
|
||||
EQU PORTE6 00000006
|
||||
EQU PE6 00000006
|
||||
EQU PORTE7 00000007
|
||||
EQU PE7 00000007
|
||||
EQU DDE0 00000000
|
||||
EQU DDE1 00000001
|
||||
EQU DDE2 00000002
|
||||
EQU DDE3 00000003
|
||||
EQU DDE4 00000004
|
||||
EQU DDE5 00000005
|
||||
EQU DDE6 00000006
|
||||
EQU DDE7 00000007
|
||||
EQU PINE0 00000000
|
||||
EQU PINE1 00000001
|
||||
EQU PINE2 00000002
|
||||
EQU PINE3 00000003
|
||||
EQU PINE4 00000004
|
||||
EQU PINE5 00000005
|
||||
EQU PINE6 00000006
|
||||
EQU PINE7 00000007
|
||||
EQU PORTF0 00000000
|
||||
EQU PF0 00000000
|
||||
EQU PORTF1 00000001
|
||||
EQU PF1 00000001
|
||||
EQU PORTF2 00000002
|
||||
EQU PF2 00000002
|
||||
EQU PORTF3 00000003
|
||||
EQU PF3 00000003
|
||||
EQU PORTF4 00000004
|
||||
EQU PF4 00000004
|
||||
EQU PORTF5 00000005
|
||||
EQU PF5 00000005
|
||||
EQU PORTF6 00000006
|
||||
EQU PF6 00000006
|
||||
EQU PORTF7 00000007
|
||||
EQU PF7 00000007
|
||||
EQU DDF0 00000000
|
||||
EQU DDF1 00000001
|
||||
EQU DDF2 00000002
|
||||
EQU DDF3 00000003
|
||||
EQU DDF4 00000004
|
||||
EQU DDF5 00000005
|
||||
EQU DDF6 00000006
|
||||
EQU DDF7 00000007
|
||||
EQU PINF0 00000000
|
||||
EQU PINF1 00000001
|
||||
EQU PINF2 00000002
|
||||
EQU PINF3 00000003
|
||||
EQU PINF4 00000004
|
||||
EQU PINF5 00000005
|
||||
EQU PINF6 00000006
|
||||
EQU PINF7 00000007
|
||||
EQU PORTG0 00000000
|
||||
EQU PG0 00000000
|
||||
EQU PORTG1 00000001
|
||||
EQU PG1 00000001
|
||||
EQU PORTG2 00000002
|
||||
EQU PG2 00000002
|
||||
EQU PORTG3 00000003
|
||||
EQU PG3 00000003
|
||||
EQU PORTG4 00000004
|
||||
EQU PG4 00000004
|
||||
EQU DDG0 00000000
|
||||
EQU DDG1 00000001
|
||||
EQU DDG2 00000002
|
||||
EQU DDG3 00000003
|
||||
EQU DDG4 00000004
|
||||
EQU PING0 00000000
|
||||
EQU PING1 00000001
|
||||
EQU PING2 00000002
|
||||
EQU PING3 00000003
|
||||
EQU PING4 00000004
|
||||
EQU CS00 00000000
|
||||
EQU CS01 00000001
|
||||
EQU CS02 00000002
|
||||
EQU WGM01 00000003
|
||||
EQU CTC0 00000003
|
||||
EQU COM00 00000004
|
||||
EQU COM01 00000005
|
||||
EQU WGM00 00000006
|
||||
EQU PWM0 00000006
|
||||
EQU FOC0 00000007
|
||||
EQU TCNT0_0 00000000
|
||||
EQU TCNT0_1 00000001
|
||||
EQU TCNT0_2 00000002
|
||||
EQU TCNT0_3 00000003
|
||||
EQU TCNT0_4 00000004
|
||||
EQU TCNT0_5 00000005
|
||||
EQU TCNT0_6 00000006
|
||||
EQU TCNT0_7 00000007
|
||||
EQU OCR0_0 00000000
|
||||
EQU OCR0_1 00000001
|
||||
EQU OCR0_2 00000002
|
||||
EQU OCR0_3 00000003
|
||||
EQU OCR0_4 00000004
|
||||
EQU OCR0_5 00000005
|
||||
EQU OCR0_6 00000006
|
||||
EQU OCR0_7 00000007
|
||||
EQU TCR0UB 00000000
|
||||
EQU OCR0UB 00000001
|
||||
EQU TCN0UB 00000002
|
||||
EQU AS0 00000003
|
||||
EQU TOIE0 00000000
|
||||
EQU OCIE0 00000001
|
||||
EQU TOV0 00000000
|
||||
EQU OCF0 00000001
|
||||
EQU TOIE1 00000002
|
||||
EQU OCIE1B 00000003
|
||||
EQU OCIE1A 00000004
|
||||
EQU TICIE1 00000005
|
||||
EQU OCIE1C 00000000
|
||||
EQU TOV1 00000002
|
||||
EQU OCF1B 00000003
|
||||
EQU OCF1A 00000004
|
||||
EQU ICF1 00000005
|
||||
EQU OCF1C 00000000
|
||||
EQU WGM10 00000000
|
||||
EQU PWM10 00000000
|
||||
EQU WGM11 00000001
|
||||
EQU PWM11 00000001
|
||||
EQU COM1C0 00000002
|
||||
EQU COM1C1 00000003
|
||||
EQU COM1B0 00000004
|
||||
EQU COM1B1 00000005
|
||||
EQU COM1A0 00000006
|
||||
EQU COM1A1 00000007
|
||||
EQU CS10 00000000
|
||||
EQU CS11 00000001
|
||||
EQU CS12 00000002
|
||||
EQU WGM12 00000003
|
||||
EQU CTC10 00000003
|
||||
EQU WGM13 00000004
|
||||
EQU CTC11 00000004
|
||||
EQU ICES1 00000006
|
||||
EQU ICNC1 00000007
|
||||
EQU FOC1C 00000005
|
||||
EQU FOC1B 00000006
|
||||
EQU FOC1A 00000007
|
||||
EQU CS20 00000000
|
||||
EQU CS21 00000001
|
||||
EQU CS22 00000002
|
||||
EQU WGM21 00000003
|
||||
EQU CTC2 00000003
|
||||
EQU COM20 00000004
|
||||
EQU COM21 00000005
|
||||
EQU WGM20 00000006
|
||||
EQU PWM2 00000006
|
||||
EQU FOC2 00000007
|
||||
EQU TCNT2_0 00000000
|
||||
EQU TCNT2_1 00000001
|
||||
EQU TCNT2_2 00000002
|
||||
EQU TCNT2_3 00000003
|
||||
EQU TCNT2_4 00000004
|
||||
EQU TCNT2_5 00000005
|
||||
EQU TCNT2_6 00000006
|
||||
EQU TCNT2_7 00000007
|
||||
EQU OCR2_0 00000000
|
||||
EQU OCR2_1 00000001
|
||||
EQU OCR2_2 00000002
|
||||
EQU OCR2_3 00000003
|
||||
EQU OCR2_4 00000004
|
||||
EQU OCR2_5 00000005
|
||||
EQU OCR2_6 00000006
|
||||
EQU OCR2_7 00000007
|
||||
EQU TOIE2 00000006
|
||||
EQU OCIE2 00000007
|
||||
EQU TOV2 00000006
|
||||
EQU OCF2 00000007
|
||||
EQU OCIE3C 00000001
|
||||
EQU TOIE3 00000002
|
||||
EQU OCIE3B 00000003
|
||||
EQU OCIE3A 00000004
|
||||
EQU TICIE3 00000005
|
||||
EQU OCF3C 00000001
|
||||
EQU TOV3 00000002
|
||||
EQU OCF3B 00000003
|
||||
EQU OCF3A 00000004
|
||||
EQU ICF3 00000005
|
||||
EQU WGM30 00000000
|
||||
EQU PWM30 00000000
|
||||
EQU WGM31 00000001
|
||||
EQU PWM31 00000001
|
||||
EQU COM3C0 00000002
|
||||
EQU COM3C1 00000003
|
||||
EQU COM3B0 00000004
|
||||
EQU COM3B1 00000005
|
||||
EQU COM3A0 00000006
|
||||
EQU COM3A1 00000007
|
||||
EQU CS30 00000000
|
||||
EQU CS31 00000001
|
||||
EQU CS32 00000002
|
||||
EQU WGM32 00000003
|
||||
EQU CTC30 00000003
|
||||
EQU WGM33 00000004
|
||||
EQU CTC31 00000004
|
||||
EQU ICES3 00000006
|
||||
EQU ICNC3 00000007
|
||||
EQU FOC3C 00000005
|
||||
EQU FOC3B 00000006
|
||||
EQU FOC3A 00000007
|
||||
EQU TCN3L0 00000000
|
||||
EQU TCN3L1 00000001
|
||||
EQU TCN3L2 00000002
|
||||
EQU TCN3L3 00000003
|
||||
EQU TCN3L4 00000004
|
||||
EQU TCN3L5 00000005
|
||||
EQU TCN3L6 00000006
|
||||
EQU TCN3L7 00000007
|
||||
EQU WDTCSR 00000021
|
||||
EQU WDP0 00000000
|
||||
EQU WDP1 00000001
|
||||
EQU WDP2 00000002
|
||||
EQU WDE 00000003
|
||||
EQU WDCE 00000004
|
||||
EQU WDTOE 00000004
|
||||
EQU MUX0 00000000
|
||||
EQU MUX1 00000001
|
||||
EQU MUX2 00000002
|
||||
EQU MUX3 00000003
|
||||
EQU MUX4 00000004
|
||||
EQU ADLAR 00000005
|
||||
EQU REFS0 00000006
|
||||
EQU REFS1 00000007
|
||||
EQU ADCSR 00000006
|
||||
EQU ADPS0 00000000
|
||||
EQU ADPS1 00000001
|
||||
EQU ADPS2 00000002
|
||||
EQU ADIE 00000003
|
||||
EQU ADIF 00000004
|
||||
EQU ADFR 00000005
|
||||
EQU ADSC 00000006
|
||||
EQU ADEN 00000007
|
||||
EQU ADCH0 00000000
|
||||
EQU ADCH1 00000001
|
||||
EQU ADCH2 00000002
|
||||
EQU ADCH3 00000003
|
||||
EQU ADCH4 00000004
|
||||
EQU ADCH5 00000005
|
||||
EQU ADCH6 00000006
|
||||
EQU ADCH7 00000007
|
||||
EQU ADCL0 00000000
|
||||
EQU ADCL1 00000001
|
||||
EQU ADCL2 00000002
|
||||
EQU ADCL3 00000003
|
||||
EQU ADCL4 00000004
|
||||
EQU ADCL5 00000005
|
||||
EQU ADCL6 00000006
|
||||
EQU ADCL7 00000007
|
||||
EQU LB1 00000000
|
||||
EQU LB2 00000001
|
||||
EQU BLB01 00000002
|
||||
EQU BLB02 00000003
|
||||
EQU BLB11 00000004
|
||||
EQU BLB12 00000005
|
||||
EQU CKSEL0 00000000
|
||||
EQU CKSEL1 00000001
|
||||
EQU CKSEL2 00000002
|
||||
EQU CKSEL3 00000003
|
||||
EQU SUT0 00000004
|
||||
EQU SUT1 00000005
|
||||
EQU BODEN 00000006
|
||||
EQU BODLEVEL 00000007
|
||||
EQU BOOTRST 00000000
|
||||
EQU BOOTSZ0 00000001
|
||||
EQU BOOTSZ1 00000002
|
||||
EQU EESAVE 00000003
|
||||
EQU CKOPT 00000004
|
||||
EQU SPIEN 00000005
|
||||
EQU JTAGEN 00000006
|
||||
EQU OCDEN 00000007
|
||||
EQU WDTON 00000000
|
||||
EQU M103C 00000001
|
||||
DEF XH r27
|
||||
DEF XL r26
|
||||
DEF YH r29
|
||||
DEF YL r28
|
||||
DEF ZH r31
|
||||
DEF ZL r30
|
||||
EQU FLASHEND 0000ffff
|
||||
EQU IOEND 000000ff
|
||||
EQU SRAM_START 00000100
|
||||
EQU SRAM_SIZE 00001000
|
||||
EQU RAMEND 000010ff
|
||||
EQU XRAMEND 0000ffff
|
||||
EQU E2END 00000fff
|
||||
EQU EEPROMEND 00000fff
|
||||
EQU EEADRBITS 0000000c
|
||||
EQU NRWW_START_ADDR 0000f000
|
||||
EQU NRWW_STOP_ADDR 0000ffff
|
||||
EQU RWW_START_ADDR 00000000
|
||||
EQU RWW_STOP_ADDR 0000efff
|
||||
EQU PAGESIZE 00000080
|
||||
EQU FIRSTBOOTSTART 0000fe00
|
||||
EQU SECONDBOOTSTART 0000fc00
|
||||
EQU THIRDBOOTSTART 0000f800
|
||||
EQU FOURTHBOOTSTART 0000f000
|
||||
EQU SMALLBOOTSTART 0000fe00
|
||||
EQU LARGEBOOTSTART 0000f000
|
||||
EQU INT0addr 00000002
|
||||
EQU INT1addr 00000004
|
||||
EQU INT2addr 00000006
|
||||
EQU INT3addr 00000008
|
||||
EQU INT4addr 0000000a
|
||||
EQU INT5addr 0000000c
|
||||
EQU INT6addr 0000000e
|
||||
EQU INT7addr 00000010
|
||||
EQU OC2addr 00000012
|
||||
EQU OVF2addr 00000014
|
||||
EQU ICP1addr 00000016
|
||||
EQU OC1Aaddr 00000018
|
||||
EQU OC1Baddr 0000001a
|
||||
EQU OVF1addr 0000001c
|
||||
EQU OC0addr 0000001e
|
||||
EQU OVF0addr 00000020
|
||||
EQU SPIaddr 00000022
|
||||
EQU URXC0addr 00000024
|
||||
EQU UDRE0addr 00000026
|
||||
EQU UTXC0addr 00000028
|
||||
EQU ADCCaddr 0000002a
|
||||
EQU ERDYaddr 0000002c
|
||||
EQU ACIaddr 0000002e
|
||||
EQU OC1Caddr 00000030
|
||||
EQU ICP3addr 00000032
|
||||
EQU OC3Aaddr 00000034
|
||||
EQU OC3Baddr 00000036
|
||||
EQU OC3Caddr 00000038
|
||||
EQU OVF3addr 0000003a
|
||||
EQU URXC1addr 0000003c
|
||||
EQU UDRE1addr 0000003e
|
||||
EQU UTXC1addr 00000040
|
||||
EQU TWIaddr 00000042
|
||||
EQU SPMRaddr 00000044
|
||||
EQU INT_VECTORS_SIZE 00000046
|
||||
DEF mpr r16
|
||||
DEF waitcnt r17
|
||||
DEF ilcnt r18
|
||||
DEF olcnt r19
|
||||
DEF speed_reg r20
|
||||
DEF command_reg r21
|
||||
EQU WTime 0000000f
|
||||
EQU EngEnR 00000004
|
||||
EQU EngEnL 00000007
|
||||
EQU EngDirR 00000005
|
||||
EQU EngDirL 00000006
|
||||
EQU BotAddress 0000001a
|
||||
EQU MovFwdCmd 000000b0
|
||||
EQU MovBckCmd 00000080
|
||||
EQU TurnRCmd 000000a0
|
||||
EQU TurnLCmd 00000090
|
||||
EQU HaltCmd 000000c8
|
||||
EQU FreezeCmd 000000f8
|
||||
EQU MoveFwdPin 00000000
|
||||
EQU MoveBackPin 00000001
|
||||
EQU MoveLeftPin 00000007
|
||||
EQU MoveRightPin 00000006
|
||||
EQU MoveHaltPin 00000005
|
||||
EQU FreezePin 00000004
|
||||
EQU TXD1 00000003
|
||||
EQU ubrr_low 00000040
|
||||
EQU ubrr_high 00000003
|
||||
CSEG INIT 00000046
|
||||
CSEG MAIN 0000005d
|
||||
CSEG SendMoveFwd 0000007c
|
||||
CSEG SendMoveBack 00000085
|
||||
CSEG SendMoveLeft 0000008e
|
||||
CSEG SendMoveRight 00000097
|
||||
CSEG SendMoveHalt 000000a0
|
||||
CSEG SendFreeze 000000a9
|
||||
CSEG Wait 000000b2
|
||||
CSEG SendAddress 0000006d
|
||||
CSEG SendCommand 00000075
|
||||
CSEG Loop 000000b5
|
||||
CSEG OLoop 000000b6
|
||||
CSEG ILoop 000000b7
|
||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
<ASSEMBLER_INFO>
|
||||
<VERSION>2.2.7</VERSION>
|
||||
<DEVICE>"ATmega128"</DEVICE>
|
||||
<WORKING_DIR>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Debug</WORKING_DIR>
|
||||
<INCLUDE_PATH>
|
||||
<DIR>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</DIR>
|
||||
<DIR>C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include</DIR>
|
||||
<DIR></DIR>
|
||||
</INCLUDE_PATH>
|
||||
<SOURCE_FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</SOURCE_FILE>
|
||||
<INCLUDED_FILES>
|
||||
<FILE>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</FILE>
|
||||
</INCLUDED_FILES>
|
||||
<OBJECT_FILES>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Debug\Corwin_Perren_Lab8_remote_sourcecode.obj</FILE>
|
||||
</OBJECT_FILES>
|
||||
<HEX_FILES>
|
||||
<FILE>Corwin_Perren_Lab8_remote_sourcecode.hex</FILE>
|
||||
</HEX_FILES>
|
||||
<OUTPUT_FILES>
|
||||
<FILE>Corwin_Perren_Lab8_remote_sourcecode.map</FILE>
|
||||
<FILE>Corwin_Perren_Lab8_remote_sourcecode.lss</FILE>
|
||||
</OUTPUT_FILES>
|
||||
<LABELS>
|
||||
<INIT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>80</LINE></INIT>
|
||||
<MAIN><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>120</LINE></MAIN>
|
||||
<SendMoveFwd><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>167</LINE></SendMoveFwd>
|
||||
<SendMoveBack><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>180</LINE></SendMoveBack>
|
||||
<SendMoveLeft><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>193</LINE></SendMoveLeft>
|
||||
<SendMoveRight><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>206</LINE></SendMoveRight>
|
||||
<SendMoveHalt><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>219</LINE></SendMoveHalt>
|
||||
<SendFreeze><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>232</LINE></SendFreeze>
|
||||
<Wait><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>245</LINE></Wait>
|
||||
<SendAddress><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>150</LINE></SendAddress>
|
||||
<SendCommand><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>159</LINE></SendCommand>
|
||||
<Loop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>250</LINE></Loop>
|
||||
<OLoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>251</LINE></OLoop>
|
||||
<ILoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode\Corwin_Perren_Lab8_remote_sourcecode.asm</FILE><LINE>252</LINE></ILoop>
|
||||
</LABELS>
|
||||
</ASSEMBLER_INFO>
|
||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Atmel Studio Solution File, Format Version 11.00
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{18226A42-8477-4023-8AD2-40C49DA407C9}") = "Corwin_Perren_Lab8_robot_sourcecode", "Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asmproj", "{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
Release|AVR = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{59B1D629-9DCC-43ED-A0FD-8AB0E4D622AB}.Release|AVR.Build.0 = Release|AVR
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,425 @@
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Enter Name of file here
|
||||
;*
|
||||
;* Enter the description of the program here
|
||||
;*
|
||||
;* This is the RECEIVE skeleton file for Lab 8 of ECE 375
|
||||
;*
|
||||
;***********************************************************
|
||||
;*
|
||||
;* Author: Enter your name
|
||||
;* Date: Enter Date
|
||||
;*
|
||||
;***********************************************************
|
||||
|
||||
.include "m128def.inc" ; Include definition file
|
||||
|
||||
;***********************************************************
|
||||
;* Internal Register Definitions and Constants
|
||||
;***********************************************************
|
||||
.def mpr = r16 ; Multi-Purpose Register
|
||||
.def waitcnt = r17 ; Wait Loop Counter
|
||||
.def ilcnt = r18 ; Inner Loop Counter
|
||||
.def olcnt = r19 ; Outer Loop Counter
|
||||
.def cmd_reg = r20 ; Current command reg
|
||||
.def addr_reg = r21 ; Current address reg
|
||||
.def freeze_sent_reg = r22 ; State of freeze send
|
||||
.def freeze_count_reg = r23 ; Freeze count
|
||||
|
||||
.equ WTime = 100 ; Time to wait in wait loop, used to be 100
|
||||
|
||||
; Inputs on port d
|
||||
.equ WskrR = 0 ; Right Whisker Input Bit
|
||||
.equ WskrL = 1 ; Left Whisker Input Bit
|
||||
.equ RXD1 = 2 ; RX Input Pin
|
||||
|
||||
; Drive pins
|
||||
.equ EngEnR = 4 ; Right Engine Enable Bit
|
||||
.equ EngEnL = 7 ; Left Engine Enable Bit
|
||||
.equ EngDirR = 5 ; Right Engine Direction Bit
|
||||
.equ EngDirL = 6 ; Left Engine Direction Bit
|
||||
|
||||
.equ BotAddress = 0x1a ; (Enter your robot's address here (8 bits))
|
||||
|
||||
;/////////////////////////////////////////////////////////////
|
||||
;These macros are the values to make the TekBot Move.
|
||||
;/////////////////////////////////////////////////////////////
|
||||
.equ MovFwd = (1<<EngDirR|1<<EngDirL) ;0b01100000 Move Forward Action Code
|
||||
.equ MovBck = $00 ;0b00000000 Move Backward Action Code
|
||||
.equ TurnR = (1<<EngDirL) ;0b01000000 Turn Right Action Code
|
||||
.equ TurnL = (1<<EngDirR) ;0b00100000 Turn Left Action Code
|
||||
.equ Halt = (1<<EngEnR|1<<EngEnL) ;0b10010000 Halt Action Code
|
||||
|
||||
;/////////////////////////////////////////////////////////////
|
||||
;These macros are the TekBot IR commands.
|
||||
;/////////////////////////////////////////////////////////////
|
||||
; INPUT
|
||||
.equ MovFwdCmd = ($80|1<<(EngDirR-1)|1<<(EngDirL-1)) ;0b10110000 Move Forward Action Code
|
||||
.equ MovBckCmd = ($80|$00) ;0b10000000 Move Backward Action Code
|
||||
.equ TurnRCmd = ($80|1<<(EngDirL-1)) ;0b10100000 Turn Right Action Code
|
||||
.equ TurnLCmd = ($80|1<<(EngDirR-1)) ;0b10010000 Turn Left Action Code
|
||||
.equ HaltCmd = ($80|1<<(EngEnR-1)|1<<(EngEnL-1)) ;0b11001000 Halt Action Code
|
||||
.equ FreezeCmd = 0b11111000 ;0b11111000 Freeze Action Code
|
||||
|
||||
; OUTPUT
|
||||
.equ FreezeOthersCmd = 0b01010101 ;0b01010101 Broadcase freeze action code
|
||||
|
||||
; Store the upper and lower bytes for ubrr setting
|
||||
.equ ubrr_low = low(832)
|
||||
.equ ubrr_high = high(832)
|
||||
|
||||
; Bits 1 and 3 set for INT0 and INT1 trigger on falling edge
|
||||
.equ InterruptsFallingEdge = (1 << ISC01) | (1 << ISC11)
|
||||
|
||||
; Bits 0 and 1 set for INT0 and INT1 interrupts enabled
|
||||
.equ InterruptMasksEnabled = (1 << INT0) | (1 << INT1)
|
||||
.equ InterruptMasksDisabled = 0
|
||||
|
||||
; Setting these bits to one and writing them to the flag register clears them
|
||||
.equ InterruptFlagRegisterClear = (1 << INTF0) | (1 << INTF1)
|
||||
|
||||
; Mask for commands vs addresses
|
||||
.equ cmd_addr_bit = 7
|
||||
|
||||
; Max freeze before offline
|
||||
.equ freezes_to_perm_halt = 3
|
||||
|
||||
;***********************************************************
|
||||
;* Start of Code Segment
|
||||
;***********************************************************
|
||||
.cseg ; Beginning of code segment
|
||||
|
||||
;***********************************************************
|
||||
;* Interrupt Vectors
|
||||
;***********************************************************
|
||||
.org $0000 ; Beginning of IVs
|
||||
rjmp INIT ; Reset interrupt
|
||||
|
||||
;Should have Interrupt vectors for:
|
||||
;- Right whisker
|
||||
.org INT0addr
|
||||
rjmp HitRight
|
||||
|
||||
;- Left whisker
|
||||
.org INT1addr
|
||||
rjmp HitLeft
|
||||
|
||||
;- USART receive
|
||||
.org URXC1addr
|
||||
rjmp RX1_DATA_RECEIVED
|
||||
|
||||
.org $0046 ; End of Interrupt Vectors
|
||||
|
||||
;***********************************************************
|
||||
;* Program Initialization
|
||||
;***********************************************************
|
||||
INIT:
|
||||
; Initialize the Stack Pointer
|
||||
ldi mpr, low(RAMEND) ; Init the 2 stack pointer registers
|
||||
out SPL, mpr
|
||||
ldi mpr, high(RAMEND)
|
||||
out SPH, mpr
|
||||
|
||||
; I/O Ports
|
||||
; Set drive pins to outputs
|
||||
ldi mpr, ((1 << EngEnR) | (1 << EngDirR) | (1 << EngEnL) | (1 << EngDirL))
|
||||
out DDRB, mpr
|
||||
|
||||
; Set whisker pins and rx pin to inputs
|
||||
ldi mpr, ((0 << WskrR) | (0 << WskrL) | (0 << RXD1))
|
||||
out DDRD, mpr
|
||||
|
||||
; Set whisker pins to enable pullups
|
||||
ldi mpr, ((1 << WskrR) | (1 << WskrL))
|
||||
out PORTD, mpr
|
||||
|
||||
; USART1
|
||||
; Set baudrate at 2400bps
|
||||
ldi mpr, ubrr_low
|
||||
sts UBRR1L, mpr
|
||||
|
||||
ldi mpr, ubrr_high
|
||||
sts UBRR1H, mpr
|
||||
|
||||
; Enable transmitter, reciever, and enable interrupt on receive
|
||||
ldi mpr, ((1 << TXEN1) | (1 << RXEN1) | (1 << RXCIE1))
|
||||
sts UCSR1B, mpr
|
||||
|
||||
; Set frame format: 8 data bits, 2 stop bits
|
||||
; Double data rate
|
||||
ldi mpr, (1 << U2X1)
|
||||
sts UCSR1A, mpr
|
||||
|
||||
; 8N2 setting
|
||||
ldi mpr, ((1 << UCSZ10) | (1 << UCSZ11) | (1 << USBS1))
|
||||
sts UCSR1C, mpr
|
||||
|
||||
; External Interrupts
|
||||
; D0 is INT0, D1 is INT1
|
||||
; Set the Interrupt Sense Control to falling edge
|
||||
ldi mpr, InterruptsFallingEdge
|
||||
sts EICRA, mpr
|
||||
|
||||
; Configure the External Interrupt Mask
|
||||
ldi mpr, InterruptMasksEnabled
|
||||
out EIMSK, mpr
|
||||
|
||||
; Initialize TekBot Forward Movement
|
||||
ldi cmd_reg, MovFwd ; Load Move Forward Command
|
||||
out PORTB, cmd_reg ; Send command to motors
|
||||
|
||||
; Flush usart rx
|
||||
rcall USART_Flush
|
||||
|
||||
; Clear address register
|
||||
clr addr_reg
|
||||
clr freeze_count_reg
|
||||
|
||||
; Enabled global interrupts
|
||||
sei
|
||||
|
||||
;***********************************************************
|
||||
;* Main Program
|
||||
;***********************************************************
|
||||
MAIN:
|
||||
rjmp MAIN
|
||||
|
||||
;***********************************************************
|
||||
;* Functions and Subroutines
|
||||
;***********************************************************
|
||||
;----------------------------------------------------------------
|
||||
; Sub: SendFreezeOthers
|
||||
; Desc: Sends a tekbot command to freeze all other bots
|
||||
;----------------------------------------------------------------
|
||||
SendFreezeOthers:
|
||||
lds mpr, UCSR1A ; Load usart1 status
|
||||
sbrs mpr, UDRE1 ; Check if data reg empty
|
||||
rjmp SendFreezeOthers ; Jump back until it is
|
||||
|
||||
ldi mpr, FreezeOthersCmd ; Load freeze cmd
|
||||
sts UDR1, mpr ; Send command over serial
|
||||
ret
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: USART_Flush
|
||||
; Desc: Clear RX buffer
|
||||
;----------------------------------------------------------------
|
||||
USART_Flush:
|
||||
lds mpr, UCSR1A ; Load status reg
|
||||
sbrs mpr, RXC1 ; Check to see if there's data
|
||||
ret ; If not, return
|
||||
lds mpr, UDR1 ; Otherwise, read in data
|
||||
rjmp USART_Flush ; And go check again
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: RX1_DATA_RECEIVED
|
||||
; Desc: Processes incoming serial data on interrupt
|
||||
;----------------------------------------------------------------
|
||||
RX1_DATA_RECEIVED:
|
||||
cli ; Stop processing interrupts
|
||||
|
||||
cpi freeze_count_reg, freezes_to_perm_halt ; Check if at limit
|
||||
breq RX1_DATA_RECV_END_NO_INT ; No interrrupt return
|
||||
|
||||
lds mpr, UDR1 ; Read in data
|
||||
|
||||
; Check freeze
|
||||
cpi mpr, FreezeOthersCmd ; Check if we should be frozen
|
||||
brne RX1_DATA_RECV_ADDR ; Skip to process normal command
|
||||
|
||||
; Check if it's our freeze
|
||||
cpi freeze_sent_reg, 0 ; Check if we sent it
|
||||
breq RX1_PROCESS_FREEZE
|
||||
|
||||
; Ignore our own command
|
||||
clr freeze_sent_reg ; Reset flag
|
||||
clr addr_reg ; Clear addr reg for next run
|
||||
rjmp RX1_DATA_RECV_END ; Go to end
|
||||
|
||||
RX1_PROCESS_FREEZE:
|
||||
; Process freeze
|
||||
ldi mpr, Halt ; Load cmd to halt
|
||||
out PORTB, mpr ; Halt bot
|
||||
|
||||
ldi mpr, 5 ; Load 5 sec wait
|
||||
RX1_FREEZE_LOOP:
|
||||
ldi waitcnt, WTime ; Wait for 1 seconds
|
||||
rcall Wait ; Call wait function
|
||||
dec mpr ; Decrement counter
|
||||
brne RX1_FREEZE_LOOP ; If not done with wait, go back
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
inc freeze_count_reg ; Inc count for freeze
|
||||
cpi freeze_count_reg, freezes_to_perm_halt ; Check if at limit
|
||||
breq RX1_DATA_RECV_END_NO_INT ; No interrrupt return
|
||||
|
||||
; Not at limit, go back to last command
|
||||
rcall USART_Flush ; Clear any commands while frozen
|
||||
out PORTB, cmd_reg ; Go to prev state
|
||||
rjmp RX1_DATA_RECV_END ; Go to end
|
||||
|
||||
; Check address
|
||||
RX1_DATA_RECV_ADDR:
|
||||
sbrc mpr, cmd_addr_bit ; Check if is address
|
||||
rjmp RX1_DATA_RECV_COMMAND ; Process if was command
|
||||
|
||||
mov addr_reg, mpr ; If addr, update addr reg
|
||||
rjmp RX1_DATA_RECV_END ; Go to end
|
||||
|
||||
; Check command
|
||||
RX1_DATA_RECV_COMMAND:
|
||||
cpi addr_reg, BotAddress ; Cmp current with our addr
|
||||
brne RX1_DATA_RECV_END ; If not ours, go to end
|
||||
|
||||
; Check if it's freeze command
|
||||
cpi mpr, FreezeCmd
|
||||
brne RX1_REG_COMMAND
|
||||
|
||||
rcall SendFreezeOthers ; Send freeze
|
||||
ldi freeze_sent_reg, 1 ; Set that freeze sent
|
||||
|
||||
clr addr_reg ; Clear addr reg for next run
|
||||
rjmp RX1_DATA_RECV_END ; Go to end
|
||||
|
||||
RX1_REG_COMMAND:
|
||||
; Otherwise it's normal command
|
||||
mov cmd_reg, mpr ; Set current command
|
||||
lsl cmd_reg ; Ours, remove cmd bit, make command
|
||||
out PORTB, cmd_reg ; Write command
|
||||
|
||||
clr addr_reg ; Clear addr reg for next run
|
||||
|
||||
RX1_DATA_RECV_END:
|
||||
sei ; Reenable interrupts
|
||||
|
||||
RX1_DATA_RECV_END_NO_INT:
|
||||
reti
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: HitRight
|
||||
; Desc: Processes the logic for when the right whisker is hit
|
||||
;----------------------------------------------------------------
|
||||
HitRight:
|
||||
cli
|
||||
|
||||
cpi freeze_count_reg, freezes_to_perm_halt ; Check if at limit
|
||||
breq HitRightEnd ; No interrrupt return
|
||||
|
||||
push mpr ; Save mpr register
|
||||
push waitcnt ; Save wait register
|
||||
in mpr, SREG ; Save program state
|
||||
push mpr ; Save program state
|
||||
|
||||
; Move Backwards for a second
|
||||
ldi mpr, MovBck ; Load Move Backward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Turn left for a second
|
||||
ldi mpr, TurnL ; Load Turn Left Command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Restore drive state
|
||||
out PORTB, cmd_reg ; Send saved command to port
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
rcall USART_Flush ; Clear out receive register
|
||||
|
||||
pop mpr ; Restore program state
|
||||
out SREG, mpr ; Restore program state
|
||||
pop waitcnt ; Restore wait register
|
||||
pop mpr ; Restore mpr
|
||||
|
||||
sei
|
||||
HitRightEnd:
|
||||
reti ; Return from subroutine
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: HitLeft
|
||||
; Desc: Processes the logic for when the left whisker is hit
|
||||
;----------------------------------------------------------------
|
||||
HitLeft:
|
||||
cli
|
||||
|
||||
cpi freeze_count_reg, freezes_to_perm_halt ; Check if at limit
|
||||
breq HitLeftEnd ; No interrrupt return
|
||||
|
||||
push mpr ; Save mpr register
|
||||
push waitcnt ; Save wait register
|
||||
in mpr, SREG ; Save program state
|
||||
push mpr ; Save program state
|
||||
|
||||
; Move Backwards for a second
|
||||
ldi mpr, MovBck ; Load Move Backward command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Turn right for a second
|
||||
ldi mpr, TurnR ; Load Turn Left Command
|
||||
out PORTB, mpr ; Send command to port
|
||||
ldi waitcnt, WTime ; Wait for 1 second
|
||||
rcall Wait ; Call wait function
|
||||
|
||||
; Restore drive state
|
||||
out PORTB, cmd_reg ; Send saved command to port
|
||||
|
||||
; Clear interrupt flags so no new interrupts until after
|
||||
ldi mpr, InterruptFlagRegisterClear
|
||||
out EIFR, mpr
|
||||
|
||||
rcall USART_Flush ; Clear out receive register
|
||||
|
||||
pop mpr ; Restore program state
|
||||
out SREG, mpr ; Restore program state
|
||||
pop waitcnt ; Restore wait register
|
||||
pop mpr ; Restore mpr
|
||||
|
||||
sei
|
||||
HitLeftEnd:
|
||||
reti ; Return from subroutine
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; Sub: Wait
|
||||
; Desc: A wait loop that is 16 + 159975*waitcnt cycles or roughly
|
||||
; waitcnt*10ms. Just initialize wait for the specific amount
|
||||
; of time in 10ms intervals. Here is the general eqaution
|
||||
; for the number of clock cycles in the wait loop:
|
||||
; ((3 * ilcnt + 3) * olcnt + 3) * waitcnt + 13 + call
|
||||
;----------------------------------------------------------------
|
||||
Wait:
|
||||
push waitcnt ; Save wait register
|
||||
push ilcnt ; Save ilcnt register
|
||||
push olcnt ; Save olcnt register
|
||||
|
||||
Loop: ldi olcnt, 224 ; load olcnt register
|
||||
OLoop: ldi ilcnt, 237 ; load ilcnt register
|
||||
ILoop: dec ilcnt ; decrement ilcnt
|
||||
brne ILoop ; Continue Inner Loop
|
||||
dec olcnt ; decrement olcnt
|
||||
brne OLoop ; Continue Outer Loop
|
||||
dec waitcnt ; Decrement wait
|
||||
brne Loop ; Continue Wait loop
|
||||
|
||||
pop olcnt ; Restore olcnt register
|
||||
pop ilcnt ; Restore ilcnt register
|
||||
pop waitcnt ; Restore wait register
|
||||
ret ; Return from subroutine
|
||||
|
||||
;***********************************************************
|
||||
;* Stored Program Data
|
||||
;***********************************************************
|
||||
|
||||
;***********************************************************
|
||||
;* Additional Program Includes
|
||||
;***********************************************************
|
||||
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRAssembler</ToolchainName>
|
||||
<ProjectGuid>59B1D629-9DCC-43ed-A0FD-8AB0E4D622AB</ProjectGuid>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.obj</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<Language>ASSEMBLY</Language>
|
||||
<AssemblyName>Corwin_Perren_Lab8_robot_sourcecode</AssemblyName>
|
||||
<Name>Corwin_Perren_Lab8_robot_sourcecode</Name>
|
||||
<RootNamespace>Corwin_Perren_Lab8_robot_sourcecode</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<EntryFile>$(MSBuildProjectDirectory)\Corwin_Perren_Lab8_robot_sourcecode.asm</EntryFile>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress>0x20000000</RamSnippetAddress>
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue>exception_table</OverrideVtorValue>
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.40.0" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
<OutputType>Executable</OutputType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrAssembler>
|
||||
<avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\avrasm\inc</Value>
|
||||
</ListValues>
|
||||
</avrasm.assembler.general.AdditionalIncludeDirectories>
|
||||
<avrasm.assembler.general.IncludeFile>m128def.inc</avrasm.assembler.general.IncludeFile>
|
||||
</AvrAssembler>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Corwin_Perren_Lab8_robot_sourcecode.asm">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Assembler.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.2.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>bd3TUV9UtxpdYQkn+6MWPA==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/inc/m128def.inc</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\templates\main.asm</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>AVRASM</Condition>
|
||||
<FileContentHash>3ELbTGaJNgggk9/rZzYTAg==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>avrasm/templates/main.asm</Name>
|
||||
<SelectString>Main file (.asm)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.2.209</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -0,0 +1,27 @@
|
||||
:020000020000FC
|
||||
:0200000045C0F9
|
||||
:02000400A4C096
|
||||
:02000800BBC07B
|
||||
:020078003DC089
|
||||
:10008C000FEF0DBF00E10EBF00EF07BB00E001BB9F
|
||||
:10009C0003E002BB00E40093990003E00093980096
|
||||
:1000AC0008E900939A0002E000939B000EE0009395
|
||||
:1000BC009D000AE000936A0003E009BF40E648BBDC
|
||||
:1000CC000CD0552777277894FFCF00919B0005FF24
|
||||
:1000DC00FCCF05E500939C00089500919B0007FF61
|
||||
:1000EC00089500919C00F9CFF894733049F1009178
|
||||
:1000FC009C000535A1F4603019F0662755271FC008
|
||||
:10010C0000E908BB05E014E64ED00A95E1F703E0E0
|
||||
:10011C0008BF73957330A1F0E0DF48BB10C007FD3A
|
||||
:10012C0002C0502F0CC05A3151F4083F21F4CDDFDE
|
||||
:10013C0061E0552704C0402F440F48BB55277894E5
|
||||
:10014C001895F8947330A9F00F931F930FB70F9372
|
||||
:10015C0000E008BB14E627D000E208BB14E623D06D
|
||||
:10016C0048BB03E008BFB9DF0F910FBF1F910F9180
|
||||
:10017C0078941895F8947330A9F00F931F930FB7D8
|
||||
:10018C000F9300E008BB14E60ED000E408BB14E6A5
|
||||
:10019C000AD048BB03E008BFA0DF0F910FBF1F912F
|
||||
:1001AC000F91789418951F932F933F9330EE2DEE6B
|
||||
:1001BC002A95F1F73A95D9F71A95C1F73F912F91F6
|
||||
:0401CC001F910895E2
|
||||
:00000001FF
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,926 @@
|
||||
|
||||
AVRASM ver. 2.2.7 C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm Sun Nov 25 16:43:19 2018
|
||||
|
||||
|
||||
EQU SIGNATURE_000 0000001e
|
||||
EQU SIGNATURE_001 00000097
|
||||
EQU SIGNATURE_002 00000002
|
||||
EQU UCSR1C 0000009d
|
||||
EQU UDR1 0000009c
|
||||
EQU UCSR1A 0000009b
|
||||
EQU UCSR1B 0000009a
|
||||
EQU UBRR1H 00000098
|
||||
EQU UBRR1L 00000099
|
||||
EQU UCSR0C 00000095
|
||||
EQU UBRR0H 00000090
|
||||
EQU TCCR3C 0000008c
|
||||
EQU TCCR3A 0000008b
|
||||
EQU TCCR3B 0000008a
|
||||
EQU TCNT3L 00000088
|
||||
EQU TCNT3H 00000089
|
||||
EQU OCR3AL 00000086
|
||||
EQU OCR3AH 00000087
|
||||
EQU OCR3BL 00000084
|
||||
EQU OCR3BH 00000085
|
||||
EQU OCR3CL 00000082
|
||||
EQU OCR3CH 00000083
|
||||
EQU ICR3L 00000080
|
||||
EQU ICR3H 00000081
|
||||
EQU ETIMSK 0000007d
|
||||
EQU ETIFR 0000007c
|
||||
EQU TCCR1C 0000007a
|
||||
EQU OCR1CL 00000078
|
||||
EQU OCR1CH 00000079
|
||||
EQU TWCR 00000074
|
||||
EQU TWDR 00000073
|
||||
EQU TWAR 00000072
|
||||
EQU TWSR 00000071
|
||||
EQU TWBR 00000070
|
||||
EQU OSCCAL 0000006f
|
||||
EQU XMCRA 0000006d
|
||||
EQU XMCRB 0000006c
|
||||
EQU EICRA 0000006a
|
||||
EQU SPMCSR 00000068
|
||||
EQU PORTG 00000065
|
||||
EQU DDRG 00000064
|
||||
EQU PING 00000063
|
||||
EQU PORTF 00000062
|
||||
EQU DDRF 00000061
|
||||
EQU SREG 0000003f
|
||||
EQU SPL 0000003d
|
||||
EQU SPH 0000003e
|
||||
EQU XDIV 0000003c
|
||||
EQU RAMPZ 0000003b
|
||||
EQU EICRB 0000003a
|
||||
EQU EIMSK 00000039
|
||||
EQU EIFR 00000038
|
||||
EQU TIMSK 00000037
|
||||
EQU TIFR 00000036
|
||||
EQU MCUCR 00000035
|
||||
EQU MCUCSR 00000034
|
||||
EQU TCCR0 00000033
|
||||
EQU TCNT0 00000032
|
||||
EQU OCR0 00000031
|
||||
EQU ASSR 00000030
|
||||
EQU TCCR1A 0000002f
|
||||
EQU TCCR1B 0000002e
|
||||
EQU TCNT1L 0000002c
|
||||
EQU TCNT1H 0000002d
|
||||
EQU OCR1AL 0000002a
|
||||
EQU OCR1AH 0000002b
|
||||
EQU OCR1BL 00000028
|
||||
EQU OCR1BH 00000029
|
||||
EQU ICR1L 00000026
|
||||
EQU ICR1H 00000027
|
||||
EQU TCCR2 00000025
|
||||
EQU TCNT2 00000024
|
||||
EQU OCR2 00000023
|
||||
EQU OCDR 00000022
|
||||
EQU WDTCR 00000021
|
||||
EQU SFIOR 00000020
|
||||
EQU EEARL 0000001e
|
||||
EQU EEARH 0000001f
|
||||
EQU EEDR 0000001d
|
||||
EQU EECR 0000001c
|
||||
EQU PORTA 0000001b
|
||||
EQU DDRA 0000001a
|
||||
EQU PINA 00000019
|
||||
EQU PORTB 00000018
|
||||
EQU DDRB 00000017
|
||||
EQU PINB 00000016
|
||||
EQU PORTC 00000015
|
||||
EQU DDRC 00000014
|
||||
EQU PINC 00000013
|
||||
EQU PORTD 00000012
|
||||
EQU DDRD 00000011
|
||||
EQU PIND 00000010
|
||||
EQU SPDR 0000000f
|
||||
EQU SPSR 0000000e
|
||||
EQU SPCR 0000000d
|
||||
EQU UDR0 0000000c
|
||||
EQU UCSR0A 0000000b
|
||||
EQU UCSR0B 0000000a
|
||||
EQU UBRR0L 00000009
|
||||
EQU ACSR 00000008
|
||||
EQU ADMUX 00000007
|
||||
EQU ADCSRA 00000006
|
||||
EQU ADCH 00000005
|
||||
EQU ADCL 00000004
|
||||
EQU PORTE 00000003
|
||||
EQU DDRE 00000002
|
||||
EQU PINE 00000001
|
||||
EQU PINF 00000000
|
||||
EQU ACME 00000003
|
||||
EQU ACIS0 00000000
|
||||
EQU ACIS1 00000001
|
||||
EQU ACIC 00000002
|
||||
EQU ACIE 00000003
|
||||
EQU ACI 00000004
|
||||
EQU ACO 00000005
|
||||
EQU ACBG 00000006
|
||||
EQU ACD 00000007
|
||||
EQU SPDR0 00000000
|
||||
EQU SPDR1 00000001
|
||||
EQU SPDR2 00000002
|
||||
EQU SPDR3 00000003
|
||||
EQU SPDR4 00000004
|
||||
EQU SPDR5 00000005
|
||||
EQU SPDR6 00000006
|
||||
EQU SPDR7 00000007
|
||||
EQU SPI2X 00000000
|
||||
EQU WCOL 00000006
|
||||
EQU SPIF 00000007
|
||||
EQU SPR0 00000000
|
||||
EQU SPR1 00000001
|
||||
EQU CPHA 00000002
|
||||
EQU CPOL 00000003
|
||||
EQU MSTR 00000004
|
||||
EQU DORD 00000005
|
||||
EQU SPE 00000006
|
||||
EQU SPIE 00000007
|
||||
EQU I2BR 00000070
|
||||
EQU TWBR0 00000000
|
||||
EQU TWBR1 00000001
|
||||
EQU TWBR2 00000002
|
||||
EQU TWBR3 00000003
|
||||
EQU TWBR4 00000004
|
||||
EQU TWBR5 00000005
|
||||
EQU TWBR6 00000006
|
||||
EQU TWBR7 00000007
|
||||
EQU I2CR 00000074
|
||||
EQU TWIE 00000000
|
||||
EQU I2IE 00000000
|
||||
EQU TWEN 00000002
|
||||
EQU I2EN 00000002
|
||||
EQU ENI2C 00000002
|
||||
EQU TWWC 00000003
|
||||
EQU I2WC 00000003
|
||||
EQU TWSTO 00000004
|
||||
EQU I2STO 00000004
|
||||
EQU TWSTA 00000005
|
||||
EQU I2STA 00000005
|
||||
EQU TWEA 00000006
|
||||
EQU I2EA 00000006
|
||||
EQU TWINT 00000007
|
||||
EQU I2INT 00000007
|
||||
EQU I2SR 00000071
|
||||
EQU TWPS0 00000000
|
||||
EQU TWS0 00000000
|
||||
EQU I2GCE 00000000
|
||||
EQU TWPS1 00000001
|
||||
EQU TWS1 00000001
|
||||
EQU TWS3 00000003
|
||||
EQU I2S3 00000003
|
||||
EQU TWS4 00000004
|
||||
EQU I2S4 00000004
|
||||
EQU TWS5 00000005
|
||||
EQU I2S5 00000005
|
||||
EQU TWS6 00000006
|
||||
EQU I2S6 00000006
|
||||
EQU TWS7 00000007
|
||||
EQU I2S7 00000007
|
||||
EQU I2DR 00000073
|
||||
EQU TWD0 00000000
|
||||
EQU TWD1 00000001
|
||||
EQU TWD2 00000002
|
||||
EQU TWD3 00000003
|
||||
EQU TWD4 00000004
|
||||
EQU TWD5 00000005
|
||||
EQU TWD6 00000006
|
||||
EQU TWD7 00000007
|
||||
EQU I2AR 00000072
|
||||
EQU TWGCE 00000000
|
||||
EQU TWA0 00000001
|
||||
EQU TWA1 00000002
|
||||
EQU TWA2 00000003
|
||||
EQU TWA3 00000004
|
||||
EQU TWA4 00000005
|
||||
EQU TWA5 00000006
|
||||
EQU TWA6 00000007
|
||||
EQU UDR00 00000000
|
||||
EQU UDR01 00000001
|
||||
EQU UDR02 00000002
|
||||
EQU UDR03 00000003
|
||||
EQU UDR04 00000004
|
||||
EQU UDR05 00000005
|
||||
EQU UDR06 00000006
|
||||
EQU UDR07 00000007
|
||||
EQU MPCM0 00000000
|
||||
EQU U2X0 00000001
|
||||
EQU UPE0 00000002
|
||||
EQU DOR0 00000003
|
||||
EQU FE0 00000004
|
||||
EQU UDRE0 00000005
|
||||
EQU TXC0 00000006
|
||||
EQU RXC0 00000007
|
||||
EQU TXB80 00000000
|
||||
EQU RXB80 00000001
|
||||
EQU UCSZ02 00000002
|
||||
EQU UCSZ2 00000002
|
||||
EQU TXEN0 00000003
|
||||
EQU RXEN0 00000004
|
||||
EQU UDRIE0 00000005
|
||||
EQU TXCIE0 00000006
|
||||
EQU RXCIE0 00000007
|
||||
EQU UCPOL0 00000000
|
||||
EQU UCSZ00 00000001
|
||||
EQU UCSZ01 00000002
|
||||
EQU USBS0 00000003
|
||||
EQU UPM00 00000004
|
||||
EQU UPM01 00000005
|
||||
EQU UMSEL0 00000006
|
||||
EQU UBRR8 00000000
|
||||
EQU UBRR9 00000001
|
||||
EQU UBRR10 00000002
|
||||
EQU UBRR11 00000003
|
||||
EQU UBRR0 00000000
|
||||
EQU UBRR1 00000001
|
||||
EQU UBRR2 00000002
|
||||
EQU UBRR3 00000003
|
||||
EQU UBRR4 00000004
|
||||
EQU UBRR5 00000005
|
||||
EQU UBRR6 00000006
|
||||
EQU UBRR7 00000007
|
||||
EQU UDR10 00000000
|
||||
EQU UDR11 00000001
|
||||
EQU UDR12 00000002
|
||||
EQU UDR13 00000003
|
||||
EQU UDR14 00000004
|
||||
EQU UDR15 00000005
|
||||
EQU UDR16 00000006
|
||||
EQU UDR17 00000007
|
||||
EQU MPCM1 00000000
|
||||
EQU U2X1 00000001
|
||||
EQU UPE1 00000002
|
||||
EQU DOR1 00000003
|
||||
EQU FE1 00000004
|
||||
EQU UDRE1 00000005
|
||||
EQU TXC1 00000006
|
||||
EQU RXC1 00000007
|
||||
EQU TXB81 00000000
|
||||
EQU RXB81 00000001
|
||||
EQU UCSZ12 00000002
|
||||
EQU TXEN1 00000003
|
||||
EQU RXEN1 00000004
|
||||
EQU UDRIE1 00000005
|
||||
EQU TXCIE1 00000006
|
||||
EQU RXCIE1 00000007
|
||||
EQU UCPOL1 00000000
|
||||
EQU UCSZ10 00000001
|
||||
EQU UCSZ11 00000002
|
||||
EQU USBS1 00000003
|
||||
EQU UPM10 00000004
|
||||
EQU UPM11 00000005
|
||||
EQU UMSEL1 00000006
|
||||
EQU SREG_C 00000000
|
||||
EQU SREG_Z 00000001
|
||||
EQU SREG_N 00000002
|
||||
EQU SREG_V 00000003
|
||||
EQU SREG_S 00000004
|
||||
EQU SREG_H 00000005
|
||||
EQU SREG_T 00000006
|
||||
EQU SREG_I 00000007
|
||||
EQU IVCE 00000000
|
||||
EQU IVSEL 00000001
|
||||
EQU SM2 00000002
|
||||
EQU SM0 00000003
|
||||
EQU SM1 00000004
|
||||
EQU SE 00000005
|
||||
EQU SRW10 00000006
|
||||
EQU SRE 00000007
|
||||
EQU SRW11 00000001
|
||||
EQU SRW00 00000002
|
||||
EQU SRW01 00000003
|
||||
EQU SRL0 00000004
|
||||
EQU SRL1 00000005
|
||||
EQU SRL2 00000006
|
||||
EQU XMM0 00000000
|
||||
EQU XMM1 00000001
|
||||
EQU XMM2 00000002
|
||||
EQU XMBK 00000007
|
||||
EQU CAL0 00000000
|
||||
EQU CAL1 00000001
|
||||
EQU CAL2 00000002
|
||||
EQU CAL3 00000003
|
||||
EQU CAL4 00000004
|
||||
EQU CAL5 00000005
|
||||
EQU CAL6 00000006
|
||||
EQU CAL7 00000007
|
||||
EQU XDIV0 00000000
|
||||
EQU XDIV1 00000001
|
||||
EQU XDIV2 00000002
|
||||
EQU XDIV3 00000003
|
||||
EQU XDIV4 00000004
|
||||
EQU XDIV5 00000005
|
||||
EQU XDIV6 00000006
|
||||
EQU XDIVEN 00000007
|
||||
EQU PORF 00000000
|
||||
EQU EXTRF 00000001
|
||||
EQU BORF 00000002
|
||||
EQU WDRF 00000003
|
||||
EQU JTRF 00000004
|
||||
EQU JTD 00000007
|
||||
EQU RAMPZ0 00000000
|
||||
EQU SPMCR 00000068
|
||||
EQU SPMEN 00000000
|
||||
EQU PGERS 00000001
|
||||
EQU PGWRT 00000002
|
||||
EQU BLBSET 00000003
|
||||
EQU RWWSRE 00000004
|
||||
EQU ASRE 00000004
|
||||
EQU RWWSB 00000006
|
||||
EQU ASB 00000006
|
||||
EQU SPMIE 00000007
|
||||
EQU OCDR0 00000000
|
||||
EQU OCDR1 00000001
|
||||
EQU OCDR2 00000002
|
||||
EQU OCDR3 00000003
|
||||
EQU OCDR4 00000004
|
||||
EQU OCDR5 00000005
|
||||
EQU OCDR6 00000006
|
||||
EQU OCDR7 00000007
|
||||
EQU IDRD 00000007
|
||||
EQU PSR321 00000000
|
||||
EQU PSR1 00000000
|
||||
EQU PSR2 00000000
|
||||
EQU PSR3 00000000
|
||||
EQU PSR0 00000001
|
||||
EQU PUD 00000002
|
||||
EQU TSM 00000007
|
||||
EQU ISC00 00000000
|
||||
EQU ISC01 00000001
|
||||
EQU ISC10 00000002
|
||||
EQU ISC11 00000003
|
||||
EQU ISC20 00000004
|
||||
EQU ISC21 00000005
|
||||
EQU ISC30 00000006
|
||||
EQU ISC31 00000007
|
||||
EQU ISC40 00000000
|
||||
EQU ISC41 00000001
|
||||
EQU ISC50 00000002
|
||||
EQU ISC51 00000003
|
||||
EQU ISC60 00000004
|
||||
EQU ISC61 00000005
|
||||
EQU ISC70 00000006
|
||||
EQU ISC71 00000007
|
||||
EQU GICR 00000039
|
||||
EQU GIMSK 00000039
|
||||
EQU INT0 00000000
|
||||
EQU INT1 00000001
|
||||
EQU INT2 00000002
|
||||
EQU INT3 00000003
|
||||
EQU INT4 00000004
|
||||
EQU INT5 00000005
|
||||
EQU INT6 00000006
|
||||
EQU INT7 00000007
|
||||
EQU GIFR 00000038
|
||||
EQU INTF0 00000000
|
||||
EQU INTF1 00000001
|
||||
EQU INTF2 00000002
|
||||
EQU INTF3 00000003
|
||||
EQU INTF4 00000004
|
||||
EQU INTF5 00000005
|
||||
EQU INTF6 00000006
|
||||
EQU INTF7 00000007
|
||||
EQU EEDR0 00000000
|
||||
EQU EEDR1 00000001
|
||||
EQU EEDR2 00000002
|
||||
EQU EEDR3 00000003
|
||||
EQU EEDR4 00000004
|
||||
EQU EEDR5 00000005
|
||||
EQU EEDR6 00000006
|
||||
EQU EEDR7 00000007
|
||||
EQU EERE 00000000
|
||||
EQU EEWE 00000001
|
||||
EQU EEMWE 00000002
|
||||
EQU EERIE 00000003
|
||||
EQU PORTA0 00000000
|
||||
EQU PA0 00000000
|
||||
EQU PORTA1 00000001
|
||||
EQU PA1 00000001
|
||||
EQU PORTA2 00000002
|
||||
EQU PA2 00000002
|
||||
EQU PORTA3 00000003
|
||||
EQU PA3 00000003
|
||||
EQU PORTA4 00000004
|
||||
EQU PA4 00000004
|
||||
EQU PORTA5 00000005
|
||||
EQU PA5 00000005
|
||||
EQU PORTA6 00000006
|
||||
EQU PA6 00000006
|
||||
EQU PORTA7 00000007
|
||||
EQU PA7 00000007
|
||||
EQU DDA0 00000000
|
||||
EQU DDA1 00000001
|
||||
EQU DDA2 00000002
|
||||
EQU DDA3 00000003
|
||||
EQU DDA4 00000004
|
||||
EQU DDA5 00000005
|
||||
EQU DDA6 00000006
|
||||
EQU DDA7 00000007
|
||||
EQU PINA0 00000000
|
||||
EQU PINA1 00000001
|
||||
EQU PINA2 00000002
|
||||
EQU PINA3 00000003
|
||||
EQU PINA4 00000004
|
||||
EQU PINA5 00000005
|
||||
EQU PINA6 00000006
|
||||
EQU PINA7 00000007
|
||||
EQU PORTB0 00000000
|
||||
EQU PB0 00000000
|
||||
EQU PORTB1 00000001
|
||||
EQU PB1 00000001
|
||||
EQU PORTB2 00000002
|
||||
EQU PB2 00000002
|
||||
EQU PORTB3 00000003
|
||||
EQU PB3 00000003
|
||||
EQU PORTB4 00000004
|
||||
EQU PB4 00000004
|
||||
EQU PORTB5 00000005
|
||||
EQU PB5 00000005
|
||||
EQU PORTB6 00000006
|
||||
EQU PB6 00000006
|
||||
EQU PORTB7 00000007
|
||||
EQU PB7 00000007
|
||||
EQU DDB0 00000000
|
||||
EQU DDB1 00000001
|
||||
EQU DDB2 00000002
|
||||
EQU DDB3 00000003
|
||||
EQU DDB4 00000004
|
||||
EQU DDB5 00000005
|
||||
EQU DDB6 00000006
|
||||
EQU DDB7 00000007
|
||||
EQU PINB0 00000000
|
||||
EQU PINB1 00000001
|
||||
EQU PINB2 00000002
|
||||
EQU PINB3 00000003
|
||||
EQU PINB4 00000004
|
||||
EQU PINB5 00000005
|
||||
EQU PINB6 00000006
|
||||
EQU PINB7 00000007
|
||||
EQU PORTC0 00000000
|
||||
EQU PC0 00000000
|
||||
EQU PORTC1 00000001
|
||||
EQU PC1 00000001
|
||||
EQU PORTC2 00000002
|
||||
EQU PC2 00000002
|
||||
EQU PORTC3 00000003
|
||||
EQU PC3 00000003
|
||||
EQU PORTC4 00000004
|
||||
EQU PC4 00000004
|
||||
EQU PORTC5 00000005
|
||||
EQU PC5 00000005
|
||||
EQU PORTC6 00000006
|
||||
EQU PC6 00000006
|
||||
EQU PORTC7 00000007
|
||||
EQU PC7 00000007
|
||||
EQU DDC0 00000000
|
||||
EQU DDC1 00000001
|
||||
EQU DDC2 00000002
|
||||
EQU DDC3 00000003
|
||||
EQU DDC4 00000004
|
||||
EQU DDC5 00000005
|
||||
EQU DDC6 00000006
|
||||
EQU DDC7 00000007
|
||||
EQU PINC0 00000000
|
||||
EQU PINC1 00000001
|
||||
EQU PINC2 00000002
|
||||
EQU PINC3 00000003
|
||||
EQU PINC4 00000004
|
||||
EQU PINC5 00000005
|
||||
EQU PINC6 00000006
|
||||
EQU PINC7 00000007
|
||||
EQU PORTD0 00000000
|
||||
EQU PD0 00000000
|
||||
EQU PORTD1 00000001
|
||||
EQU PD1 00000001
|
||||
EQU PORTD2 00000002
|
||||
EQU PD2 00000002
|
||||
EQU PORTD3 00000003
|
||||
EQU PD3 00000003
|
||||
EQU PORTD4 00000004
|
||||
EQU PD4 00000004
|
||||
EQU PORTD5 00000005
|
||||
EQU PD5 00000005
|
||||
EQU PORTD6 00000006
|
||||
EQU PD6 00000006
|
||||
EQU PORTD7 00000007
|
||||
EQU PD7 00000007
|
||||
EQU DDD0 00000000
|
||||
EQU DDD1 00000001
|
||||
EQU DDD2 00000002
|
||||
EQU DDD3 00000003
|
||||
EQU DDD4 00000004
|
||||
EQU DDD5 00000005
|
||||
EQU DDD6 00000006
|
||||
EQU DDD7 00000007
|
||||
EQU PIND0 00000000
|
||||
EQU PIND1 00000001
|
||||
EQU PIND2 00000002
|
||||
EQU PIND3 00000003
|
||||
EQU PIND4 00000004
|
||||
EQU PIND5 00000005
|
||||
EQU PIND6 00000006
|
||||
EQU PIND7 00000007
|
||||
EQU PORTE0 00000000
|
||||
EQU PE0 00000000
|
||||
EQU PORTE1 00000001
|
||||
EQU PE1 00000001
|
||||
EQU PORTE2 00000002
|
||||
EQU PE2 00000002
|
||||
EQU PORTE3 00000003
|
||||
EQU PE3 00000003
|
||||
EQU PORTE4 00000004
|
||||
EQU PE4 00000004
|
||||
EQU PORTE5 00000005
|
||||
EQU PE5 00000005
|
||||
EQU PORTE6 00000006
|
||||
EQU PE6 00000006
|
||||
EQU PORTE7 00000007
|
||||
EQU PE7 00000007
|
||||
EQU DDE0 00000000
|
||||
EQU DDE1 00000001
|
||||
EQU DDE2 00000002
|
||||
EQU DDE3 00000003
|
||||
EQU DDE4 00000004
|
||||
EQU DDE5 00000005
|
||||
EQU DDE6 00000006
|
||||
EQU DDE7 00000007
|
||||
EQU PINE0 00000000
|
||||
EQU PINE1 00000001
|
||||
EQU PINE2 00000002
|
||||
EQU PINE3 00000003
|
||||
EQU PINE4 00000004
|
||||
EQU PINE5 00000005
|
||||
EQU PINE6 00000006
|
||||
EQU PINE7 00000007
|
||||
EQU PORTF0 00000000
|
||||
EQU PF0 00000000
|
||||
EQU PORTF1 00000001
|
||||
EQU PF1 00000001
|
||||
EQU PORTF2 00000002
|
||||
EQU PF2 00000002
|
||||
EQU PORTF3 00000003
|
||||
EQU PF3 00000003
|
||||
EQU PORTF4 00000004
|
||||
EQU PF4 00000004
|
||||
EQU PORTF5 00000005
|
||||
EQU PF5 00000005
|
||||
EQU PORTF6 00000006
|
||||
EQU PF6 00000006
|
||||
EQU PORTF7 00000007
|
||||
EQU PF7 00000007
|
||||
EQU DDF0 00000000
|
||||
EQU DDF1 00000001
|
||||
EQU DDF2 00000002
|
||||
EQU DDF3 00000003
|
||||
EQU DDF4 00000004
|
||||
EQU DDF5 00000005
|
||||
EQU DDF6 00000006
|
||||
EQU DDF7 00000007
|
||||
EQU PINF0 00000000
|
||||
EQU PINF1 00000001
|
||||
EQU PINF2 00000002
|
||||
EQU PINF3 00000003
|
||||
EQU PINF4 00000004
|
||||
EQU PINF5 00000005
|
||||
EQU PINF6 00000006
|
||||
EQU PINF7 00000007
|
||||
EQU PORTG0 00000000
|
||||
EQU PG0 00000000
|
||||
EQU PORTG1 00000001
|
||||
EQU PG1 00000001
|
||||
EQU PORTG2 00000002
|
||||
EQU PG2 00000002
|
||||
EQU PORTG3 00000003
|
||||
EQU PG3 00000003
|
||||
EQU PORTG4 00000004
|
||||
EQU PG4 00000004
|
||||
EQU DDG0 00000000
|
||||
EQU DDG1 00000001
|
||||
EQU DDG2 00000002
|
||||
EQU DDG3 00000003
|
||||
EQU DDG4 00000004
|
||||
EQU PING0 00000000
|
||||
EQU PING1 00000001
|
||||
EQU PING2 00000002
|
||||
EQU PING3 00000003
|
||||
EQU PING4 00000004
|
||||
EQU CS00 00000000
|
||||
EQU CS01 00000001
|
||||
EQU CS02 00000002
|
||||
EQU WGM01 00000003
|
||||
EQU CTC0 00000003
|
||||
EQU COM00 00000004
|
||||
EQU COM01 00000005
|
||||
EQU WGM00 00000006
|
||||
EQU PWM0 00000006
|
||||
EQU FOC0 00000007
|
||||
EQU TCNT0_0 00000000
|
||||
EQU TCNT0_1 00000001
|
||||
EQU TCNT0_2 00000002
|
||||
EQU TCNT0_3 00000003
|
||||
EQU TCNT0_4 00000004
|
||||
EQU TCNT0_5 00000005
|
||||
EQU TCNT0_6 00000006
|
||||
EQU TCNT0_7 00000007
|
||||
EQU OCR0_0 00000000
|
||||
EQU OCR0_1 00000001
|
||||
EQU OCR0_2 00000002
|
||||
EQU OCR0_3 00000003
|
||||
EQU OCR0_4 00000004
|
||||
EQU OCR0_5 00000005
|
||||
EQU OCR0_6 00000006
|
||||
EQU OCR0_7 00000007
|
||||
EQU TCR0UB 00000000
|
||||
EQU OCR0UB 00000001
|
||||
EQU TCN0UB 00000002
|
||||
EQU AS0 00000003
|
||||
EQU TOIE0 00000000
|
||||
EQU OCIE0 00000001
|
||||
EQU TOV0 00000000
|
||||
EQU OCF0 00000001
|
||||
EQU TOIE1 00000002
|
||||
EQU OCIE1B 00000003
|
||||
EQU OCIE1A 00000004
|
||||
EQU TICIE1 00000005
|
||||
EQU OCIE1C 00000000
|
||||
EQU TOV1 00000002
|
||||
EQU OCF1B 00000003
|
||||
EQU OCF1A 00000004
|
||||
EQU ICF1 00000005
|
||||
EQU OCF1C 00000000
|
||||
EQU WGM10 00000000
|
||||
EQU PWM10 00000000
|
||||
EQU WGM11 00000001
|
||||
EQU PWM11 00000001
|
||||
EQU COM1C0 00000002
|
||||
EQU COM1C1 00000003
|
||||
EQU COM1B0 00000004
|
||||
EQU COM1B1 00000005
|
||||
EQU COM1A0 00000006
|
||||
EQU COM1A1 00000007
|
||||
EQU CS10 00000000
|
||||
EQU CS11 00000001
|
||||
EQU CS12 00000002
|
||||
EQU WGM12 00000003
|
||||
EQU CTC10 00000003
|
||||
EQU WGM13 00000004
|
||||
EQU CTC11 00000004
|
||||
EQU ICES1 00000006
|
||||
EQU ICNC1 00000007
|
||||
EQU FOC1C 00000005
|
||||
EQU FOC1B 00000006
|
||||
EQU FOC1A 00000007
|
||||
EQU CS20 00000000
|
||||
EQU CS21 00000001
|
||||
EQU CS22 00000002
|
||||
EQU WGM21 00000003
|
||||
EQU CTC2 00000003
|
||||
EQU COM20 00000004
|
||||
EQU COM21 00000005
|
||||
EQU WGM20 00000006
|
||||
EQU PWM2 00000006
|
||||
EQU FOC2 00000007
|
||||
EQU TCNT2_0 00000000
|
||||
EQU TCNT2_1 00000001
|
||||
EQU TCNT2_2 00000002
|
||||
EQU TCNT2_3 00000003
|
||||
EQU TCNT2_4 00000004
|
||||
EQU TCNT2_5 00000005
|
||||
EQU TCNT2_6 00000006
|
||||
EQU TCNT2_7 00000007
|
||||
EQU OCR2_0 00000000
|
||||
EQU OCR2_1 00000001
|
||||
EQU OCR2_2 00000002
|
||||
EQU OCR2_3 00000003
|
||||
EQU OCR2_4 00000004
|
||||
EQU OCR2_5 00000005
|
||||
EQU OCR2_6 00000006
|
||||
EQU OCR2_7 00000007
|
||||
EQU TOIE2 00000006
|
||||
EQU OCIE2 00000007
|
||||
EQU TOV2 00000006
|
||||
EQU OCF2 00000007
|
||||
EQU OCIE3C 00000001
|
||||
EQU TOIE3 00000002
|
||||
EQU OCIE3B 00000003
|
||||
EQU OCIE3A 00000004
|
||||
EQU TICIE3 00000005
|
||||
EQU OCF3C 00000001
|
||||
EQU TOV3 00000002
|
||||
EQU OCF3B 00000003
|
||||
EQU OCF3A 00000004
|
||||
EQU ICF3 00000005
|
||||
EQU WGM30 00000000
|
||||
EQU PWM30 00000000
|
||||
EQU WGM31 00000001
|
||||
EQU PWM31 00000001
|
||||
EQU COM3C0 00000002
|
||||
EQU COM3C1 00000003
|
||||
EQU COM3B0 00000004
|
||||
EQU COM3B1 00000005
|
||||
EQU COM3A0 00000006
|
||||
EQU COM3A1 00000007
|
||||
EQU CS30 00000000
|
||||
EQU CS31 00000001
|
||||
EQU CS32 00000002
|
||||
EQU WGM32 00000003
|
||||
EQU CTC30 00000003
|
||||
EQU WGM33 00000004
|
||||
EQU CTC31 00000004
|
||||
EQU ICES3 00000006
|
||||
EQU ICNC3 00000007
|
||||
EQU FOC3C 00000005
|
||||
EQU FOC3B 00000006
|
||||
EQU FOC3A 00000007
|
||||
EQU TCN3L0 00000000
|
||||
EQU TCN3L1 00000001
|
||||
EQU TCN3L2 00000002
|
||||
EQU TCN3L3 00000003
|
||||
EQU TCN3L4 00000004
|
||||
EQU TCN3L5 00000005
|
||||
EQU TCN3L6 00000006
|
||||
EQU TCN3L7 00000007
|
||||
EQU WDTCSR 00000021
|
||||
EQU WDP0 00000000
|
||||
EQU WDP1 00000001
|
||||
EQU WDP2 00000002
|
||||
EQU WDE 00000003
|
||||
EQU WDCE 00000004
|
||||
EQU WDTOE 00000004
|
||||
EQU MUX0 00000000
|
||||
EQU MUX1 00000001
|
||||
EQU MUX2 00000002
|
||||
EQU MUX3 00000003
|
||||
EQU MUX4 00000004
|
||||
EQU ADLAR 00000005
|
||||
EQU REFS0 00000006
|
||||
EQU REFS1 00000007
|
||||
EQU ADCSR 00000006
|
||||
EQU ADPS0 00000000
|
||||
EQU ADPS1 00000001
|
||||
EQU ADPS2 00000002
|
||||
EQU ADIE 00000003
|
||||
EQU ADIF 00000004
|
||||
EQU ADFR 00000005
|
||||
EQU ADSC 00000006
|
||||
EQU ADEN 00000007
|
||||
EQU ADCH0 00000000
|
||||
EQU ADCH1 00000001
|
||||
EQU ADCH2 00000002
|
||||
EQU ADCH3 00000003
|
||||
EQU ADCH4 00000004
|
||||
EQU ADCH5 00000005
|
||||
EQU ADCH6 00000006
|
||||
EQU ADCH7 00000007
|
||||
EQU ADCL0 00000000
|
||||
EQU ADCL1 00000001
|
||||
EQU ADCL2 00000002
|
||||
EQU ADCL3 00000003
|
||||
EQU ADCL4 00000004
|
||||
EQU ADCL5 00000005
|
||||
EQU ADCL6 00000006
|
||||
EQU ADCL7 00000007
|
||||
EQU LB1 00000000
|
||||
EQU LB2 00000001
|
||||
EQU BLB01 00000002
|
||||
EQU BLB02 00000003
|
||||
EQU BLB11 00000004
|
||||
EQU BLB12 00000005
|
||||
EQU CKSEL0 00000000
|
||||
EQU CKSEL1 00000001
|
||||
EQU CKSEL2 00000002
|
||||
EQU CKSEL3 00000003
|
||||
EQU SUT0 00000004
|
||||
EQU SUT1 00000005
|
||||
EQU BODEN 00000006
|
||||
EQU BODLEVEL 00000007
|
||||
EQU BOOTRST 00000000
|
||||
EQU BOOTSZ0 00000001
|
||||
EQU BOOTSZ1 00000002
|
||||
EQU EESAVE 00000003
|
||||
EQU CKOPT 00000004
|
||||
EQU SPIEN 00000005
|
||||
EQU JTAGEN 00000006
|
||||
EQU OCDEN 00000007
|
||||
EQU WDTON 00000000
|
||||
EQU M103C 00000001
|
||||
DEF XH r27
|
||||
DEF XL r26
|
||||
DEF YH r29
|
||||
DEF YL r28
|
||||
DEF ZH r31
|
||||
DEF ZL r30
|
||||
EQU FLASHEND 0000ffff
|
||||
EQU IOEND 000000ff
|
||||
EQU SRAM_START 00000100
|
||||
EQU SRAM_SIZE 00001000
|
||||
EQU RAMEND 000010ff
|
||||
EQU XRAMEND 0000ffff
|
||||
EQU E2END 00000fff
|
||||
EQU EEPROMEND 00000fff
|
||||
EQU EEADRBITS 0000000c
|
||||
EQU NRWW_START_ADDR 0000f000
|
||||
EQU NRWW_STOP_ADDR 0000ffff
|
||||
EQU RWW_START_ADDR 00000000
|
||||
EQU RWW_STOP_ADDR 0000efff
|
||||
EQU PAGESIZE 00000080
|
||||
EQU FIRSTBOOTSTART 0000fe00
|
||||
EQU SECONDBOOTSTART 0000fc00
|
||||
EQU THIRDBOOTSTART 0000f800
|
||||
EQU FOURTHBOOTSTART 0000f000
|
||||
EQU SMALLBOOTSTART 0000fe00
|
||||
EQU LARGEBOOTSTART 0000f000
|
||||
EQU INT0addr 00000002
|
||||
EQU INT1addr 00000004
|
||||
EQU INT2addr 00000006
|
||||
EQU INT3addr 00000008
|
||||
EQU INT4addr 0000000a
|
||||
EQU INT5addr 0000000c
|
||||
EQU INT6addr 0000000e
|
||||
EQU INT7addr 00000010
|
||||
EQU OC2addr 00000012
|
||||
EQU OVF2addr 00000014
|
||||
EQU ICP1addr 00000016
|
||||
EQU OC1Aaddr 00000018
|
||||
EQU OC1Baddr 0000001a
|
||||
EQU OVF1addr 0000001c
|
||||
EQU OC0addr 0000001e
|
||||
EQU OVF0addr 00000020
|
||||
EQU SPIaddr 00000022
|
||||
EQU URXC0addr 00000024
|
||||
EQU UDRE0addr 00000026
|
||||
EQU UTXC0addr 00000028
|
||||
EQU ADCCaddr 0000002a
|
||||
EQU ERDYaddr 0000002c
|
||||
EQU ACIaddr 0000002e
|
||||
EQU OC1Caddr 00000030
|
||||
EQU ICP3addr 00000032
|
||||
EQU OC3Aaddr 00000034
|
||||
EQU OC3Baddr 00000036
|
||||
EQU OC3Caddr 00000038
|
||||
EQU OVF3addr 0000003a
|
||||
EQU URXC1addr 0000003c
|
||||
EQU UDRE1addr 0000003e
|
||||
EQU UTXC1addr 00000040
|
||||
EQU TWIaddr 00000042
|
||||
EQU SPMRaddr 00000044
|
||||
EQU INT_VECTORS_SIZE 00000046
|
||||
DEF mpr r16
|
||||
DEF waitcnt r17
|
||||
DEF ilcnt r18
|
||||
DEF olcnt r19
|
||||
DEF cmd_reg r20
|
||||
DEF addr_reg r21
|
||||
DEF freeze_sent_reg r22
|
||||
DEF freeze_count_reg r23
|
||||
EQU WTime 00000064
|
||||
EQU WskrR 00000000
|
||||
EQU WskrL 00000001
|
||||
EQU RXD1 00000002
|
||||
EQU EngEnR 00000004
|
||||
EQU EngEnL 00000007
|
||||
EQU EngDirR 00000005
|
||||
EQU EngDirL 00000006
|
||||
EQU BotAddress 0000001a
|
||||
EQU MovFwd 00000060
|
||||
EQU MovBck 00000000
|
||||
EQU TurnR 00000040
|
||||
EQU TurnL 00000020
|
||||
EQU Halt 00000090
|
||||
EQU MovFwdCmd 000000b0
|
||||
EQU MovBckCmd 00000080
|
||||
EQU TurnRCmd 000000a0
|
||||
EQU TurnLCmd 00000090
|
||||
EQU HaltCmd 000000c8
|
||||
EQU FreezeCmd 000000f8
|
||||
EQU FreezeOthersCmd 00000055
|
||||
EQU ubrr_low 00000040
|
||||
EQU ubrr_high 00000003
|
||||
EQU InterruptsFallingEdge 0000000a
|
||||
EQU InterruptMasksEnabled 00000003
|
||||
EQU InterruptMasksDisabled 00000000
|
||||
EQU InterruptFlagRegisterClear 00000003
|
||||
EQU cmd_addr_bit 00000007
|
||||
EQU freezes_to_perm_halt 00000003
|
||||
CSEG INIT 00000046
|
||||
CSEG HitRight 000000a7
|
||||
CSEG HitLeft 000000c0
|
||||
CSEG RX1_DATA_RECEIVED 0000007a
|
||||
CSEG USART_Flush 00000073
|
||||
CSEG MAIN 0000006a
|
||||
CSEG SendFreezeOthers 0000006b
|
||||
CSEG RX1_DATA_RECV_END_NO_INT 000000a6
|
||||
CSEG RX1_DATA_RECV_ADDR 00000095
|
||||
CSEG RX1_PROCESS_FREEZE 00000086
|
||||
CSEG RX1_DATA_RECV_END 000000a5
|
||||
CSEG RX1_FREEZE_LOOP 00000089
|
||||
CSEG Wait 000000d9
|
||||
CSEG RX1_DATA_RECV_COMMAND 00000099
|
||||
CSEG RX1_REG_COMMAND 000000a1
|
||||
CSEG HitRightEnd 000000bf
|
||||
CSEG HitLeftEnd 000000d8
|
||||
CSEG Loop 000000dc
|
||||
CSEG OLoop 000000dd
|
||||
CSEG ILoop 000000de
|
||||
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
<ASSEMBLER_INFO>
|
||||
<VERSION>2.2.7</VERSION>
|
||||
<DEVICE>"ATmega128"</DEVICE>
|
||||
<WORKING_DIR>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Debug</WORKING_DIR>
|
||||
<INCLUDE_PATH>
|
||||
<DIR>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc</DIR>
|
||||
<DIR>C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avrassembler\Include</DIR>
|
||||
<DIR></DIR>
|
||||
</INCLUDE_PATH>
|
||||
<SOURCE_FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</SOURCE_FILE>
|
||||
<INCLUDED_FILES>
|
||||
<FILE>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\avrasm\inc\m128def.inc</FILE>
|
||||
</INCLUDED_FILES>
|
||||
<OBJECT_FILES>
|
||||
<FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Debug\Corwin_Perren_Lab8_robot_sourcecode.obj</FILE>
|
||||
</OBJECT_FILES>
|
||||
<HEX_FILES>
|
||||
<FILE>Corwin_Perren_Lab8_robot_sourcecode.hex</FILE>
|
||||
</HEX_FILES>
|
||||
<OUTPUT_FILES>
|
||||
<FILE>Corwin_Perren_Lab8_robot_sourcecode.map</FILE>
|
||||
<FILE>Corwin_Perren_Lab8_robot_sourcecode.lss</FILE>
|
||||
</OUTPUT_FILES>
|
||||
<LABELS>
|
||||
<INIT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>117</LINE></INIT>
|
||||
<HitRight><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>306</LINE></HitRight>
|
||||
<HitLeft><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>351</LINE></HitLeft>
|
||||
<RX1_DATA_RECEIVED><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>219</LINE></RX1_DATA_RECEIVED>
|
||||
<USART_Flush><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>208</LINE></USART_Flush>
|
||||
<MAIN><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>185</LINE></MAIN>
|
||||
<SendFreezeOthers><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>195</LINE></SendFreezeOthers>
|
||||
<RX1_DATA_RECV_END_NO_INT><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>299</LINE></RX1_DATA_RECV_END_NO_INT>
|
||||
<RX1_DATA_RECV_ADDR><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>266</LINE></RX1_DATA_RECV_ADDR>
|
||||
<RX1_PROCESS_FREEZE><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>240</LINE></RX1_PROCESS_FREEZE>
|
||||
<RX1_DATA_RECV_END><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>296</LINE></RX1_DATA_RECV_END>
|
||||
<RX1_FREEZE_LOOP><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>246</LINE></RX1_FREEZE_LOOP>
|
||||
<Wait><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>400</LINE></Wait>
|
||||
<RX1_DATA_RECV_COMMAND><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>274</LINE></RX1_DATA_RECV_COMMAND>
|
||||
<RX1_REG_COMMAND><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>288</LINE></RX1_REG_COMMAND>
|
||||
<HitRightEnd><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>344</LINE></HitRightEnd>
|
||||
<HitLeftEnd><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>389</LINE></HitLeftEnd>
|
||||
<Loop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>405</LINE></Loop>
|
||||
<OLoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>406</LINE></OLoop>
|
||||
<ILoop><FILE>C:\Users\caperren\Github\ECE_375\Labs\Lab 8\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode\Corwin_Perren_Lab8_robot_sourcecode.asm</FILE><LINE>407</LINE></ILoop>
|
||||
</LABELS>
|
||||
</ASSEMBLER_INFO>
|
||||
Reference in New Issue
Block a user