First commit
This commit is contained in:
commit
1304211773
511
Makefile
Normal file
511
Makefile
Normal file
@ -0,0 +1,511 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#----------------------------------------------------------------------------
|
||||
# WinAVR Makefile Template written by Eric B. Weddington, Jörg Wunsch, et al.
|
||||
#
|
||||
# Released to the Public Domain
|
||||
#
|
||||
# Additional material for this makefile was written by:
|
||||
# Peter Fleury
|
||||
# Tim Henigan
|
||||
# Colin O'Flynn
|
||||
# Reiner Patommel
|
||||
# Markus Pfaff
|
||||
# Sander Pool
|
||||
# Frederik Rouleau
|
||||
#
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device, using avrdude.
|
||||
# Please customize the avrdude settings below first!
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# MCU name
|
||||
MCU = atmega162
|
||||
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
F_CPU = 8000000
|
||||
|
||||
|
||||
# Output format. (can be srec, ihex, binary)
|
||||
FORMAT = ihex
|
||||
|
||||
|
||||
# Target file name (without extension).
|
||||
TARGET = RoboMI
|
||||
|
||||
|
||||
# List C source files here. (C dependencies are automatically generated.)
|
||||
SRC = RoboMI.c #lcdDOG.c spiMaster.c usart0.c usart1.c roboMSP.c rfID.c
|
||||
#$(TARGET).c
|
||||
|
||||
|
||||
# List Assembler source files here.
|
||||
# Make them always end in a capital .S. Files ending in a lowercase .s
|
||||
# will not be considered source files but generated files (assembler
|
||||
# output from the compiler), and will be deleted upon "make clean"!
|
||||
# Even though the DOS/Win* filesystem matches both .s and .S the same,
|
||||
# it will preserve the spelling of the filenames, and gcc itself does
|
||||
# care about how the name is spelled on its command-line.
|
||||
ASRC =
|
||||
|
||||
|
||||
# Optimization level, can be [0, 1, 2, 3, s].
|
||||
# 0 = turn off optimization. s = optimize for size.
|
||||
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
|
||||
OPT = s
|
||||
|
||||
|
||||
# Debugging format.
|
||||
# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
|
||||
# AVR Studio 4.10 requires dwarf-2.
|
||||
# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
|
||||
DEBUG = dwarf-2
|
||||
|
||||
|
||||
# List any extra directories to look for include files here.
|
||||
# Each directory must be seperated by a space.
|
||||
# Use forward slashes for directory separators.
|
||||
# For a directory that has spaces, enclose it in quotes.
|
||||
EXTRAINCDIRS = /media/CM/Projects/cmAvrLibC
|
||||
|
||||
|
||||
# Compiler flag to set the C Standard level.
|
||||
# c89 = "ANSI" C
|
||||
# gnu89 = c89 plus GCC extensions
|
||||
# c99 = ISO C99 standard (not yet fully implemented)
|
||||
# gnu99 = c99 plus GCC extensions
|
||||
CSTANDARD = -std=gnu99
|
||||
|
||||
|
||||
# Place -D or -U options here
|
||||
CDEFS = -DF_CPU=$(F_CPU)UL
|
||||
|
||||
|
||||
# Place -I options here
|
||||
CINCS =
|
||||
|
||||
|
||||
|
||||
#---------------- Compiler Options ----------------
|
||||
# -g*: generate debugging information
|
||||
# -O*: optimization level
|
||||
# -f...: tuning, see GCC manual and avr-libc documentation
|
||||
# -Wall...: warning level
|
||||
# -Wa,...: tell GCC to pass this to the assembler.
|
||||
# -adhlns...: create assembler listing
|
||||
CFLAGS = -g$(DEBUG)
|
||||
CFLAGS += $(CDEFS) $(CINCS)
|
||||
CFLAGS += -O$(OPT)
|
||||
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
|
||||
CFLAGS += -Wall -Wstrict-prototypes
|
||||
CFLAGS += -Wa,-adhlns=$(<:.c=.lst)
|
||||
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
|
||||
CFLAGS += $(CSTANDARD)
|
||||
|
||||
|
||||
#---------------- Assembler Options ----------------
|
||||
# -Wa,...: tell GCC to pass this to the assembler.
|
||||
# -ahlms: create listing
|
||||
# -gstabs: have the assembler create line number information; note that
|
||||
# for use in COFF files, additional information about filenames
|
||||
# and function names needs to be present in the assembler source
|
||||
# files -- see avr-libc docs [FIXME: not yet described there]
|
||||
# -listing-cont-lines: Sets the maximum number of continuation lines of hex
|
||||
# dump that will be displayed for a given single line of source input.
|
||||
ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs,--listing-cont-lines=100
|
||||
|
||||
|
||||
#---------------- Library Options ----------------
|
||||
# Minimalistic printf version
|
||||
PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
|
||||
|
||||
# Floating point printf version (requires MATH_LIB = -lm below)
|
||||
PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
|
||||
|
||||
# If this is left blank, then it will use the Standard printf version.
|
||||
PRINTF_LIB =
|
||||
#PRINTF_LIB = $(PRINTF_LIB_MIN)
|
||||
#PRINTF_LIB = $(PRINTF_LIB_FLOAT)
|
||||
|
||||
|
||||
# Minimalistic scanf version
|
||||
SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
|
||||
|
||||
# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
|
||||
SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
|
||||
|
||||
# If this is left blank, then it will use the Standard scanf version.
|
||||
SCANF_LIB =
|
||||
#SCANF_LIB = $(SCANF_LIB_MIN)
|
||||
#SCANF_LIB = $(SCANF_LIB_FLOAT)
|
||||
|
||||
|
||||
MATH_LIB = -lm
|
||||
|
||||
CM_LIB = /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a
|
||||
|
||||
|
||||
#---------------- External Memory Options ----------------
|
||||
|
||||
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
|
||||
# used for variables (.data/.bss) and heap (malloc()).
|
||||
#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
|
||||
|
||||
# 64 KB of external RAM, starting after internal RAM (ATmega128!),
|
||||
# only used for heap (malloc()).
|
||||
#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
|
||||
|
||||
EXTMEMOPTS =
|
||||
|
||||
|
||||
|
||||
#---------------- Linker Options ----------------
|
||||
# -Wl,...: tell GCC to pass this to linker.
|
||||
# -Map: create map file
|
||||
# --cref: add cross reference to map file
|
||||
LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
|
||||
LDFLAGS += $(EXTMEMOPTS)
|
||||
LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) $(CM_LIB)
|
||||
|
||||
|
||||
|
||||
#---------------- Programming Options (avrdude) ----------------
|
||||
|
||||
# Programming hardware: alf avr910 avrisp bascom bsd
|
||||
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
|
||||
#
|
||||
# Type: avrdude -c ?
|
||||
# to get a full listing.
|
||||
#
|
||||
AVRDUDE_PROGRAMMER = stk500
|
||||
|
||||
# com1 = serial port. Use lpt1 to connect to parallel port.
|
||||
AVRDUDE_PORT = com1 # programmer connected to serial device
|
||||
|
||||
AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
|
||||
#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
|
||||
|
||||
|
||||
# Uncomment the following if you want avrdude's erase cycle counter.
|
||||
# Note that this counter needs to be initialized first using -Yn,
|
||||
# see avrdude manual.
|
||||
#AVRDUDE_ERASE_COUNTER = -y
|
||||
|
||||
# Uncomment the following if you do /not/ wish a verification to be
|
||||
# performed after programming the device.
|
||||
#AVRDUDE_NO_VERIFY = -V
|
||||
|
||||
# Increase verbosity level. Please use this when submitting bug
|
||||
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
|
||||
# to submit bug reports.
|
||||
#AVRDUDE_VERBOSE = -v -v
|
||||
|
||||
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
|
||||
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
|
||||
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
|
||||
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
|
||||
|
||||
|
||||
|
||||
#---------------- Debugging Options ----------------
|
||||
|
||||
# For simulavr only - target MCU frequency.
|
||||
DEBUG_MFREQ = $(F_CPU)
|
||||
|
||||
# Set the DEBUG_UI to either gdb or insight.
|
||||
# DEBUG_UI = gdb
|
||||
DEBUG_UI = insight
|
||||
|
||||
# Set the debugging back-end to either avarice, simulavr.
|
||||
DEBUG_BACKEND = avarice
|
||||
#DEBUG_BACKEND = simulavr
|
||||
|
||||
# GDB Init Filename.
|
||||
GDBINIT_FILE = __avr_gdbinit
|
||||
|
||||
# When using avarice settings for the JTAG
|
||||
JTAG_DEV = /dev/com1
|
||||
|
||||
# Debugging port used to communicate between GDB / avarice / simulavr.
|
||||
DEBUG_PORT = 4242
|
||||
|
||||
# Debugging host used to communicate between GDB / avarice / simulavr, normally
|
||||
# just set to localhost unless doing some sort of crazy debugging when
|
||||
# avarice is running on a different computer.
|
||||
DEBUG_HOST = localhost
|
||||
|
||||
|
||||
|
||||
#============================================================================
|
||||
|
||||
|
||||
# Define programs and commands.
|
||||
SHELL = sh
|
||||
CC = avr-gcc
|
||||
OBJCOPY = avr-objcopy
|
||||
OBJDUMP = avr-objdump
|
||||
SIZE = avr-size
|
||||
NM = avr-nm
|
||||
AVRDUDE = avrdude
|
||||
REMOVE = rm -f
|
||||
COPY = cp
|
||||
WINSHELL = cmd
|
||||
|
||||
|
||||
# Define Messages
|
||||
# English
|
||||
MSG_ERRORS_NONE = Errors: none
|
||||
MSG_BEGIN = -------- begin --------
|
||||
MSG_END = -------- end --------
|
||||
MSG_SIZE_BEFORE = Size before:
|
||||
MSG_SIZE_AFTER = Size after:
|
||||
MSG_COFF = Converting to AVR COFF:
|
||||
MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
|
||||
MSG_FLASH = Creating load file for Flash:
|
||||
MSG_EEPROM = Creating load file for EEPROM:
|
||||
MSG_EXTENDED_LISTING = Creating Extended Listing:
|
||||
MSG_SYMBOL_TABLE = Creating Symbol Table:
|
||||
MSG_LINKING = Linking:
|
||||
MSG_COMPILING = Compiling:
|
||||
MSG_ASSEMBLING = Assembling:
|
||||
MSG_CLEANING = Cleaning project:
|
||||
|
||||
|
||||
|
||||
|
||||
# Define all object files.
|
||||
OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
|
||||
|
||||
# Define all listing files.
|
||||
LST = $(SRC:.c=.lst) $(ASRC:.S=.lst)
|
||||
|
||||
|
||||
# Compiler flags to generate dependency files.
|
||||
GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
|
||||
|
||||
|
||||
# Combine all necessary flags and optional flags.
|
||||
# Add target processor to flags.
|
||||
ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
|
||||
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Default target.
|
||||
all: begin gccversion sizebefore build sizeafter end
|
||||
|
||||
build: elf hex eep lss sym
|
||||
|
||||
elf: $(TARGET).elf
|
||||
hex: $(TARGET).hex
|
||||
eep: $(TARGET).eep
|
||||
lss: $(TARGET).lss
|
||||
sym: $(TARGET).sym
|
||||
|
||||
|
||||
|
||||
# Eye candy.
|
||||
# AVR Studio 3.x does not check make's exit code but relies on
|
||||
# the following magic strings to be generated by the compile job.
|
||||
begin:
|
||||
@echo
|
||||
@echo $(MSG_BEGIN)
|
||||
|
||||
end:
|
||||
@echo $(MSG_END)
|
||||
@echo
|
||||
|
||||
|
||||
# Display size of file.
|
||||
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
|
||||
ELFSIZE = $(SIZE) --format=avr --mcu=$(MCU) $(TARGET).elf
|
||||
|
||||
sizebefore:
|
||||
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
|
||||
2>/dev/null; echo; fi
|
||||
|
||||
sizeafter:
|
||||
@if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
|
||||
2>/dev/null; echo; fi
|
||||
|
||||
|
||||
|
||||
# Display compiler version information.
|
||||
gccversion :
|
||||
@$(CC) --version
|
||||
|
||||
|
||||
|
||||
# Program the device.
|
||||
program: $(TARGET).hex $(TARGET).eep
|
||||
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
|
||||
|
||||
|
||||
# Generate avr-gdb config/init file which does the following:
|
||||
# define the reset signal, load the target file, connect to target, and set
|
||||
# a breakpoint at main().
|
||||
gdb-config:
|
||||
@$(REMOVE) $(GDBINIT_FILE)
|
||||
@echo define reset >> $(GDBINIT_FILE)
|
||||
@echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
|
||||
@echo end >> $(GDBINIT_FILE)
|
||||
@echo file $(TARGET).elf >> $(GDBINIT_FILE)
|
||||
@echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)
|
||||
ifeq ($(DEBUG_BACKEND),simulavr)
|
||||
@echo load >> $(GDBINIT_FILE)
|
||||
endif
|
||||
@echo break main >> $(GDBINIT_FILE)
|
||||
|
||||
debug: gdb-config $(TARGET).elf
|
||||
ifeq ($(DEBUG_BACKEND), avarice)
|
||||
@echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
|
||||
@$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
|
||||
$(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
|
||||
@$(WINSHELL) /c pause
|
||||
|
||||
else
|
||||
@$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
|
||||
$(DEBUG_MFREQ) --port $(DEBUG_PORT)
|
||||
endif
|
||||
@$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
|
||||
|
||||
|
||||
|
||||
|
||||
# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
|
||||
COFFCONVERT=$(OBJCOPY) --debugging \
|
||||
--change-section-address .data-0x800000 \
|
||||
--change-section-address .bss-0x800000 \
|
||||
--change-section-address .noinit-0x800000 \
|
||||
--change-section-address .eeprom-0x810000
|
||||
|
||||
|
||||
coff: $(TARGET).elf
|
||||
@echo
|
||||
@echo $(MSG_COFF) $(TARGET).cof
|
||||
$(COFFCONVERT) -O coff-avr $< $(TARGET).cof
|
||||
|
||||
|
||||
extcoff: $(TARGET).elf
|
||||
@echo
|
||||
@echo $(MSG_EXTENDED_COFF) $(TARGET).cof
|
||||
$(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
|
||||
|
||||
|
||||
|
||||
# Create final output files (.hex, .eep) from ELF output file.
|
||||
%.hex: %.elf
|
||||
@echo
|
||||
@echo $(MSG_FLASH) $@
|
||||
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
|
||||
|
||||
%.eep: %.elf
|
||||
@echo
|
||||
@echo $(MSG_EEPROM) $@
|
||||
-$(OBJCOPY) -j .eeprom --set-section-flags .eeprom=alloc,load \
|
||||
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
|
||||
|
||||
# Create extended listing file from ELF output file.
|
||||
%.lss: %.elf
|
||||
@echo
|
||||
@echo $(MSG_EXTENDED_LISTING) $@
|
||||
$(OBJDUMP) -h -S $< > $@
|
||||
|
||||
# Create a symbol table from ELF output file.
|
||||
%.sym: %.elf
|
||||
@echo
|
||||
@echo $(MSG_SYMBOL_TABLE) $@
|
||||
$(NM) -n $< > $@
|
||||
|
||||
|
||||
|
||||
# Link: create ELF output file from object files.
|
||||
.SECONDARY : $(TARGET).elf
|
||||
.PRECIOUS : $(OBJ)
|
||||
%.elf: $(OBJ)
|
||||
@echo
|
||||
@echo $(MSG_LINKING) $@
|
||||
$(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
|
||||
|
||||
|
||||
# Compile: create object files from C source files.
|
||||
%.o : %.c
|
||||
@echo
|
||||
@echo $(MSG_COMPILING) $<
|
||||
$(CC) -c $(ALL_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
# Compile: create assembler files from C source files.
|
||||
%.s : %.c
|
||||
$(CC) -S $(ALL_CFLAGS) $< -o $@
|
||||
|
||||
|
||||
# Assemble: create object files from assembler source files.
|
||||
%.o : %.S
|
||||
@echo
|
||||
@echo $(MSG_ASSEMBLING) $<
|
||||
$(CC) -c $(ALL_ASFLAGS) $< -o $@
|
||||
|
||||
# Create preprocessed source for use in sending a bug report.
|
||||
%.i : %.c
|
||||
$(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@
|
||||
|
||||
|
||||
# Target: clean project.
|
||||
clean: begin clean_list end
|
||||
|
||||
clean_list :
|
||||
@echo
|
||||
@echo $(MSG_CLEANING)
|
||||
$(REMOVE) $(TARGET).hex
|
||||
$(REMOVE) $(TARGET).eep
|
||||
$(REMOVE) $(TARGET).cof
|
||||
$(REMOVE) $(TARGET).elf
|
||||
$(REMOVE) $(TARGET).map
|
||||
$(REMOVE) $(TARGET).sym
|
||||
$(REMOVE) $(TARGET).lss
|
||||
$(REMOVE) $(OBJ)
|
||||
$(REMOVE) $(LST)
|
||||
$(REMOVE) $(SRC:.c=.s)
|
||||
$(REMOVE) $(SRC:.c=.d)
|
||||
$(REMOVE) $(SRC:.c=.i)
|
||||
$(REMOVE) .dep/*
|
||||
|
||||
|
||||
|
||||
# Include the dependency files.
|
||||
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
|
||||
|
||||
|
||||
# Listing of phony targets.
|
||||
.PHONY : all begin finish end sizebefore sizeafter gccversion \
|
||||
build elf hex eep lss sym coff extcoff \
|
||||
clean clean_list program debug gdb-config
|
||||
|
||||
1
RoboMI.aps
Normal file
1
RoboMI.aps
Normal file
@ -0,0 +1 @@
|
||||
<AVRStudio><MANAGEMENT><ProjectName>RoboMI</ProjectName><Created>09-Mar-2006 21:51:49</Created><LastEdit>15-Apr-2006 16:05:27</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>09-Mar-2006 21:51:49</Created><Version>4</Version><Build>4, 12, 0, 462</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\RoboMI.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>D:\-Project-\RoboContest06\roboMSI_robot_v01\C\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAG ICE</CURRENT_TARGET><CURRENT_PART>ATmega162</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><Item>51</Item><Item>191</Item><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0><Variables>roboMSPbuffer</Variables><Variables>servoCounter</Variables></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><modules><module></module></modules><Triggers><trigger clsid="{113824F1-C410-4699-A25E-867CC860C28E}" enabled="0" boundTo="0" hitCount="1" updateAndContinue="0" line="125" file="D:\-Project-\cmAvrLibC\ping.c" token=" TCCR3B |= (1<<CS31); // Start timer (prescaler set to fc/8) " offset="0"/><trigger clsid="{113824F1-C410-4699-A25E-867CC860C28E}" enabled="0" boundTo="0" hitCount="1" updateAndContinue="0" line="133" file="D:\-Project-\cmAvrLibC\ping.c" token=" TCCR3B &= ~(1<<CS31); // Stop timer" offset="0"/></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>D:\-Project-\RoboContest06\roboMSI_robot_v01\C\RoboMI.c</SOURCEFILE><OTHERFILE>default\RoboMI.lss</OTHERFILE><OTHERFILE>default\RoboMI.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega162</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>RoboMI.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS/><INCDIRS><INCLUDE>D:\-Project-\cmAvrLibC\</INCLUDE></INCDIRS><LIBDIRS><LIBDIR>D:\-Project-\cmAvrLibC</LIBDIR></LIBDIRS><LIBS><LIB>libcmAvrLibC.a</LIB></LIBS><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=16000000UL -Os -fsigned-char</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\Program Files\WinAVR\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\Program Files\WinAVR\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><JTAG_ICE><BAUDRATE>115200</BAUDRATE><OCD_FREQUENCY>250000</OCD_FREQUENCY><PRESERVE_EEPROM>0</PRESERVE_EEPROM><RUN_TIMERS>0</RUN_TIMERS><REPROGRAM>0</REPROGRAM><EXT_RESET>0</EXT_RESET><RESTORE>1</RESTORE><DAISY_CHAIN>0</DAISY_CHAIN><DEVS_BEFORE>0</DEVS_BEFORE><DEVS_AFTER>0</DEVS_AFTER><INSTRBITS_BEFORE>0</INSTRBITS_BEFORE><INSTRBITS_AFTER>0</INSTRBITS_AFTER><NOJTAGIN_RUNMODE>0</NOJTAGIN_RUNMODE><BREAKON_CHANGEOFFLOW>0</BREAKON_CHANGEOFFLOW><ALLOW_BREAKINSTR>0</ALLOW_BREAKINSTR><PRINT_BREAKCAUSE>1</PRINT_BREAKCAUSE><ENTRY_FUNCTION>main</ENTRY_FUNCTION><STOPIF_ENTRYFUNC_NOTFOUND>1</STOPIF_ENTRYFUNC_NOTFOUND><PRINT_BREAKWARNING>1</PRINT_BREAKWARNING><CURRENT_BUILDTIME>-655172</CURRENT_BUILDTIME></JTAG_ICE><Files><File00000><FileId>00000</FileId><FileName>RoboMI.c</FileName><Status>259</Status></File00000><File00001><FileId>00001</FileId><FileName>D:\-Project-\cmAvrLibC\rfID.c</FileName><Status>258</Status></File00001><File00002><FileId>00002</FileId><FileName>D:\-Project-\cmAvrLibC\lcdDOG.c</FileName><Status>258</Status></File00002><File00003><FileId>00003</FileId><FileName>D:\-Project-\cmAvrLibC\roboMSP.c</FileName><Status>258</Status></File00003><File00004><FileId>00004</FileId><FileName>D:\-Project-\cmAvrLibC\spiMaster.c</FileName><Status>258</Status></File00004><File00005><FileId>00005</FileId><FileName>D:\-Project-\cmAvrLibC\ping.c</FileName><Status>258</Status></File00005></Files><Workspace><File00000><Position>-1 72 716 697</Position><LineCol>1278 0</LineCol><State>Maximized</State></File00000></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>
|
||||
1358
RoboMI.c
Normal file
1358
RoboMI.c
Normal file
@ -0,0 +1,1358 @@
|
||||
/*================================================================================================
|
||||
|
||||
CMtec RoboMSI (MasterSlaveInterface) copyright 2005 v1.0 (2006-02-21)
|
||||
|
||||
Name: Christoffer Martinsson
|
||||
E-mail: cm@cmtec.se
|
||||
|
||||
|
||||
================================================================================================*/
|
||||
//#define F_CPU 8000000UL //internal 8MHz
|
||||
//#define F_CPU 16000000UL
|
||||
|
||||
#include <util/delay.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <avr/eeprom.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#include <lcdDOG.h>
|
||||
#include <rfID.h>
|
||||
#include <roboMSP.h>
|
||||
#include <ping.h>
|
||||
|
||||
// Time defenitions for servo generator
|
||||
#define SERVO_TIMER 0xEE
|
||||
#define SERVO_POS_RIGHT_90 67 //31
|
||||
#define SERVO_POS_RIGHT_45 103 //49
|
||||
#define SERVO_POS_CENTER 140 //68
|
||||
#define SERVO_POS_LEFT_45 174 //86
|
||||
#define SERVO_POS_LEFT_90 208 //104
|
||||
|
||||
#define SERVO_POS_MOTOR_STOP 119 //68
|
||||
#define SERVO_POS_MOTOR_FW 133//130 //68
|
||||
#define SERVO_POS_MOTOR_RE 108//111 //68
|
||||
#define SERVO_POS_MOTOR_FW_SOFT 127 //68
|
||||
#define SERVO_POS_MOTOR_RE_SOFT 114 //68
|
||||
#define SERVO_POS_MOTOR_FW_FAST 134//139//133 //68
|
||||
#define SERVO_POS_MOTOR_RE_FAST 104//105//108 //68
|
||||
|
||||
// Formula = X * 13 (X = distance in mm)
|
||||
#define DISTANCE_TO_STOP 5500UL
|
||||
#define DISTANCE_ONE_METER 6000UL
|
||||
#define DISTANCE_TWO_METER 26400UL
|
||||
|
||||
// Port defenitions for servo generator
|
||||
#define SERVO_PING PC1
|
||||
#define SERVO_MOTOR_LEFT PC0
|
||||
#define SERVO_MOTOR_RIGHT PC2
|
||||
#define SERVO_PORT PORTC
|
||||
// Variables for servo generator
|
||||
uint8_t servoPing = SERVO_POS_CENTER;
|
||||
uint8_t servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
uint8_t servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
uint8_t servoCounter = 0;
|
||||
|
||||
uint8_t servoMotorLeftReg = SERVO_POS_MOTOR_STOP;
|
||||
uint8_t servoMotorRightReg = SERVO_POS_MOTOR_STOP;
|
||||
|
||||
// Time definitions for Program Timer
|
||||
#define PROG_TIMER 0xBFFF // 14ms //0xB1DF // 20ms
|
||||
// Variables for Program Timer
|
||||
uint8_t progCounterPing = 0;
|
||||
uint8_t progCounterPPM = 0;
|
||||
|
||||
uint8_t progCounter = 0;
|
||||
uint8_t progTimer = 0;
|
||||
uint8_t progPosition = 0;
|
||||
uint8_t progDoUpdate = 0;
|
||||
|
||||
uint16_t tempDistance = 0;
|
||||
uint16_t tempDistanceToWall = 0;
|
||||
uint16_t tempLastDistanceToWall = 0;
|
||||
uint16_t tempLeftDistance = 0;
|
||||
uint16_t tempRightDistance = 0;
|
||||
|
||||
// Variables for main program
|
||||
uint8_t roboActive = 0;
|
||||
uint8_t rfEnable = 0;
|
||||
|
||||
uint8_t switchOneCheck = 0;
|
||||
uint8_t switchTwoCheck = 0;
|
||||
|
||||
uint8_t regulatorMode = 0;
|
||||
uint8_t regulatorTimer = 0;
|
||||
uint8_t regulatorCounter = 0;
|
||||
uint8_t regulatorMeasureCounter = 0;
|
||||
|
||||
const char menuTable[][49] PROGMEM =
|
||||
{
|
||||
" CMtec "
|
||||
"roboCrawler v1.1"
|
||||
" ",
|
||||
|
||||
" mode 1: "
|
||||
" Follow wall at "
|
||||
" a distance(1m) ",
|
||||
|
||||
" mode 2: "
|
||||
" Drive and void "
|
||||
" any walls ",
|
||||
|
||||
" mode 3: "
|
||||
"Measure distance"
|
||||
" forward ",
|
||||
|
||||
" mode RF: "
|
||||
" RF actived and "
|
||||
"waiting for com.",
|
||||
};
|
||||
|
||||
void checkCommunication(void);
|
||||
void showDistanceOnLCD(uint16_t distance, uint8_t mode, uint8_t position);
|
||||
/*================================================================================================
|
||||
Functions
|
||||
================================================================================================*/
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
initIO
|
||||
|
||||
Description: Initialise I/O
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void initIO (void){
|
||||
|
||||
TCCR1B = (1<<CS11); // Timer1 prescaler = fc/8
|
||||
|
||||
TCNT1H = (uint8_t)(PROG_TIMER>>8);
|
||||
TCNT1L = (uint8_t)(PROG_TIMER);
|
||||
|
||||
TCNT2 = SERVO_TIMER;
|
||||
|
||||
TIMSK |= (1<<TOIE1)|(1<<TOIE2); // Timer1 interrupt enable
|
||||
DDRC |= (1<<PC0)|(1<<PC1)|(1<<PC2);
|
||||
|
||||
DDRA &= ~((1<<PA4)|(1<<PA5)|(1<<PA6)|(1<<PA7)); // Configuration button pins as input
|
||||
PORTA |= (1<<PA4)|(1<<PA5)|(1<<PA6)|(1<<PA7); // Pull-up on configuration button pins
|
||||
|
||||
progPosition = 0;
|
||||
}
|
||||
/*================================================================================================
|
||||
Interrupt
|
||||
================================================================================================*/
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
SIG_OVERFLOW1
|
||||
|
||||
Description: Timer1 overflow interrupt. Used as program timer
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
ISR (TIMER1_OVF_vect)
|
||||
{
|
||||
// Program for update PPM pulses to all servos
|
||||
if (++progCounterPPM >= 2)
|
||||
{
|
||||
// Start for servo PPM pulses
|
||||
servoCounter = 0;
|
||||
SERVO_PORT |= (1<<SERVO_PING)|(1<<SERVO_MOTOR_LEFT)|(1<<SERVO_MOTOR_RIGHT);
|
||||
TCCR2 |= (1<<CS21); // Timer2 start (prescaler = fc/8)
|
||||
progCounterPPM = 0;
|
||||
}
|
||||
|
||||
// Trigg program routine
|
||||
progDoUpdate = 1;
|
||||
|
||||
// Set timer value
|
||||
TCNT1H = (uint8_t)(PROG_TIMER>>8);
|
||||
TCNT1L = (uint8_t)(PROG_TIMER);
|
||||
}
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
SIG_OVERFLOW2
|
||||
|
||||
Description: Timer1 overflow interrupt. Used as servo (PPM) timer
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
ISR (TIMER2_OVF_vect)
|
||||
{
|
||||
uint8_t done = 1;
|
||||
|
||||
// Check each servo output if pulselength is reached
|
||||
if(servoCounter >= servoPing)
|
||||
SERVO_PORT &= ~(1<<SERVO_PING);
|
||||
else
|
||||
{
|
||||
done = 0;
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
}
|
||||
|
||||
if(servoCounter >= servoMotorLeft)
|
||||
SERVO_PORT &= ~(1<<SERVO_MOTOR_LEFT);
|
||||
else
|
||||
{
|
||||
done = 0;
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
}
|
||||
|
||||
if(servoCounter >= servoMotorRight)
|
||||
SERVO_PORT &= ~(1<<SERVO_MOTOR_RIGHT);
|
||||
else
|
||||
{
|
||||
done = 0;
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
}
|
||||
|
||||
if(done)
|
||||
TCCR2 &= ~(1<<CS21); // Timer1 stop
|
||||
else
|
||||
{
|
||||
servoCounter++;
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
asm volatile("NOP");
|
||||
}
|
||||
TCNT2 = SERVO_TIMER;
|
||||
}
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
activateRobot
|
||||
|
||||
Description:
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void activateRobot(uint8_t mode)
|
||||
{
|
||||
lcdSetLayout(0);
|
||||
lcdWriteStringP(menuTable[mode]);
|
||||
|
||||
progTimer = 200;
|
||||
|
||||
roboActive = mode;
|
||||
}
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
deactivateRobot
|
||||
|
||||
Description:
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void deactivateRobot(void)
|
||||
{
|
||||
roboActive = 0;
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
|
||||
rfIdDisable();
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
updateProgram
|
||||
|
||||
Description:
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void updateProgram(void)
|
||||
{
|
||||
// Check radio communication
|
||||
if(rfEnable)
|
||||
checkCommunication();
|
||||
|
||||
// Program for robot AI
|
||||
if (roboActive == 1)
|
||||
{
|
||||
// Program(2) for random RFID serach
|
||||
if (++progCounter >= progTimer)
|
||||
{
|
||||
switch (progPosition)
|
||||
{
|
||||
case 0:
|
||||
// Kör frammåt
|
||||
lcdClearDisplay();
|
||||
lcdSetLayout(1);
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: FORWARD ");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
|
||||
progTimer = 20;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// Kör frammåt till dess att avståndet mot väggen är 1meter
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
|
||||
pingSendPing();
|
||||
progTimer = 4;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
|
||||
if(tempDistance < DISTANCE_ONE_METER)
|
||||
{
|
||||
showDistanceOnLCD(0,0,2);
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
}
|
||||
else
|
||||
{
|
||||
showDistanceOnLCD(tempDistance-DISTANCE_ONE_METER,0,2);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// Bromsa (backa något)
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: STOP ");
|
||||
// Stop and breake
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE;
|
||||
|
||||
progTimer = 40;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// Stanna
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
|
||||
progTimer = 1;
|
||||
regulatorMeasureCounter = 0;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// Vrid servo 45grader vänster (från centrum)
|
||||
servoPing = SERVO_POS_LEFT_45;
|
||||
progTimer = 20;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// Mät och spara avstånd
|
||||
pingSendPing();
|
||||
progTimer = 4;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
tempLeftDistance = pingGetDistance();
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
// Vrid servo 45grader höger (från centrum)
|
||||
servoPing = SERVO_POS_RIGHT_45;
|
||||
progTimer = 40;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
// Mät och spara avstånd
|
||||
pingSendPing();
|
||||
progTimer = 4;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
tempRightDistance = pingGetDistance();
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
|
||||
if(tempLeftDistance > tempRightDistance)
|
||||
{
|
||||
regulatorMode = 0; // Mäter åt höger
|
||||
}
|
||||
else
|
||||
{
|
||||
regulatorMode = 1; // Mäter åt vänster
|
||||
}
|
||||
|
||||
progTimer = 50;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
// Mät och spara avstånd
|
||||
pingSendPing();
|
||||
progTimer = 4;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Align to wall ");
|
||||
tempLastDistanceToWall = pingGetDistance();
|
||||
tempDistanceToWall = tempLastDistanceToWall;
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
// Reglera in sig vinkerät mot väggen
|
||||
// Vrider sig ett steg
|
||||
if (regulatorMode == 0) // Tittar höger
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
progTimer = 7;
|
||||
}
|
||||
else if (regulatorMode == 1) // Tittar vänster
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
progTimer = 7;
|
||||
}
|
||||
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 11:
|
||||
// Reglera in sig vinkerät mot väggen
|
||||
// Kontrollerar avstånd
|
||||
pingSendPing();
|
||||
progTimer = 4;
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
|
||||
if(tempDistance > tempLastDistanceToWall)
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString(" ^-- (1m) --^ ");
|
||||
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
}
|
||||
else
|
||||
progPosition--;
|
||||
|
||||
tempLastDistanceToWall = tempDistance;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
// Reglera in position 1meter från väggen
|
||||
pingSendPing();
|
||||
progTimer = 4;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
|
||||
if(tempDistance > DISTANCE_ONE_METER)
|
||||
showDistanceOnLCD((tempDistance-DISTANCE_ONE_METER),0,2);
|
||||
else
|
||||
showDistanceOnLCD((DISTANCE_ONE_METER-tempDistance),1,2);
|
||||
|
||||
if(tempDistance < (DISTANCE_ONE_METER - 200))
|
||||
{
|
||||
// Kör frammåt (öka hastigheten långsamt)
|
||||
if(servoMotorLeft > SERVO_POS_MOTOR_RE_SOFT)
|
||||
{
|
||||
servoMotorLeft--;
|
||||
servoMotorRight--;
|
||||
}
|
||||
|
||||
regulatorMeasureCounter = 0;
|
||||
}
|
||||
else if(tempDistance > (DISTANCE_ONE_METER + 200))
|
||||
{
|
||||
// Kör bakåt (öka hastigheten långsamt)
|
||||
if(servoMotorLeft < SERVO_POS_MOTOR_FW_SOFT)
|
||||
{
|
||||
servoMotorLeft++;
|
||||
servoMotorRight++;
|
||||
|
||||
}
|
||||
|
||||
regulatorMeasureCounter = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
|
||||
if(++regulatorMeasureCounter == 5)
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Posistion locked");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
tempDistanceToWall = tempDistance;
|
||||
progTimer = 50;
|
||||
regulatorMeasureCounter = 0;
|
||||
progPosition++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 13:
|
||||
// Vrider 90grader
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
|
||||
if(tempLeftDistance > tempRightDistance)
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: Turn < ");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoPing = SERVO_POS_RIGHT_90;
|
||||
regulatorMode = 0; // Mäter åt höger
|
||||
progTimer = 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: Turn > ");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoPing = SERVO_POS_LEFT_90;
|
||||
regulatorMode = 1; // Mäter åt vänster
|
||||
progTimer = 50;
|
||||
}
|
||||
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 14:
|
||||
// Stanna
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
|
||||
progTimer = 10;
|
||||
regulatorTimer = 2;
|
||||
progPosition++;
|
||||
progPosition++;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 15:
|
||||
// Kör frammåt
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: FORWARD ");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
|
||||
progTimer = 20;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 16:
|
||||
// Kör frammåt
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
|
||||
progTimer = 10;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 17:
|
||||
// Mäter avstånd
|
||||
pingSendPing();
|
||||
progTimer = 3;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 18:
|
||||
// Reglerar 1meter från väggen
|
||||
if(++regulatorCounter >= regulatorTimer)
|
||||
{
|
||||
progPosition++;
|
||||
progTimer = 1;
|
||||
regulatorCounter = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t calculateProgTimer = 0;
|
||||
if (regulatorMode == 0) // Tittar höger
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString(" ]--- (1m) --->|");
|
||||
|
||||
if(tempDistance > DISTANCE_ONE_METER)
|
||||
showDistanceOnLCD((tempDistance-DISTANCE_ONE_METER),3,2);
|
||||
else
|
||||
showDistanceOnLCD((DISTANCE_ONE_METER-tempDistance),2,2);
|
||||
|
||||
if((tempDistance < tempLastDistanceToWall) && (tempDistance < (DISTANCE_ONE_METER -1000)))
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
|
||||
calculateProgTimer = ((DISTANCE_ONE_METER - tempDistance)/40);
|
||||
|
||||
if(calculateProgTimer < 15)
|
||||
progTimer = calculateProgTimer;
|
||||
else
|
||||
progTimer = 15;
|
||||
|
||||
}
|
||||
else if((tempDistance < tempLastDistanceToWall) && (tempDistance < (DISTANCE_ONE_METER -10)))
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
|
||||
progTimer = 5;
|
||||
|
||||
}
|
||||
else if((tempDistance > tempLastDistanceToWall) && (tempDistance > (DISTANCE_ONE_METER+1000)))
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
|
||||
calculateProgTimer = ((tempDistance - DISTANCE_ONE_METER)/40);
|
||||
|
||||
if(calculateProgTimer < 15)
|
||||
progTimer = calculateProgTimer;
|
||||
else
|
||||
progTimer = 15;
|
||||
|
||||
}
|
||||
else if((tempDistance > tempLastDistanceToWall) && (tempDistance > (DISTANCE_ONE_METER+10)))
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
|
||||
progTimer = 5;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
progTimer = 4;
|
||||
}
|
||||
}
|
||||
|
||||
else if (regulatorMode == 1) // Tittar vänster
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("|<--- (1m) ---[ ");
|
||||
|
||||
if(tempDistance > DISTANCE_ONE_METER)
|
||||
showDistanceOnLCD((tempDistance-DISTANCE_ONE_METER),2,2);
|
||||
else
|
||||
showDistanceOnLCD((DISTANCE_ONE_METER-tempDistance),3,2);
|
||||
|
||||
if((tempDistance < tempLastDistanceToWall) && (tempDistance < (DISTANCE_ONE_METER-1000)))
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
|
||||
calculateProgTimer = ((DISTANCE_ONE_METER - tempDistance)/40);
|
||||
|
||||
if(calculateProgTimer < 15)
|
||||
progTimer = calculateProgTimer;
|
||||
else
|
||||
progTimer = 15;
|
||||
|
||||
}
|
||||
else if((tempDistance < tempLastDistanceToWall) && (tempDistance < (DISTANCE_ONE_METER-10)))
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
|
||||
progTimer = 5;
|
||||
|
||||
}
|
||||
else if((tempDistance > tempLastDistanceToWall) && (tempDistance > (DISTANCE_ONE_METER +1000)))
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
|
||||
calculateProgTimer = ((tempDistance - DISTANCE_ONE_METER)/40);
|
||||
|
||||
if(calculateProgTimer < 15)
|
||||
progTimer = calculateProgTimer;
|
||||
else
|
||||
progTimer = 15;
|
||||
}
|
||||
else if((tempDistance > tempLastDistanceToWall) && (tempDistance > (DISTANCE_ONE_METER +10)))
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
|
||||
progTimer = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
progTimer = 4;
|
||||
}
|
||||
}
|
||||
tempLastDistanceToWall = tempDistance;
|
||||
progPosition--;
|
||||
progPosition--;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 19:
|
||||
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
|
||||
progTimer = 35;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 20:
|
||||
|
||||
progTimer = 3;
|
||||
pingSendPing();
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
|
||||
if(tempDistance < DISTANCE_ONE_METER)
|
||||
{
|
||||
showDistanceOnLCD(0,0,1);
|
||||
progPosition = 2;
|
||||
}
|
||||
else if (tempDistance < (DISTANCE_ONE_METER*2))
|
||||
{
|
||||
showDistanceOnLCD(tempDistance-DISTANCE_ONE_METER,0,1);
|
||||
regulatorTimer = 2;
|
||||
progPosition++;
|
||||
}
|
||||
else
|
||||
{
|
||||
showDistanceOnLCD(tempDistance-DISTANCE_ONE_METER,0,1);
|
||||
regulatorTimer = 10;
|
||||
progPosition++;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 21:
|
||||
|
||||
if (regulatorMode == 0) // Tittar höger
|
||||
{
|
||||
servoPing = SERVO_POS_RIGHT_90;
|
||||
}
|
||||
else
|
||||
{
|
||||
servoPing = SERVO_POS_LEFT_90;
|
||||
}
|
||||
|
||||
progTimer = 5;
|
||||
progPosition = 15;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
progCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Program for robot AI
|
||||
if (roboActive == 2)
|
||||
{
|
||||
// Program(2) for random RFID serach
|
||||
if (++progCounter >= progTimer)
|
||||
{
|
||||
|
||||
switch (progPosition)
|
||||
{
|
||||
case 0:
|
||||
|
||||
lcdClearDisplay();
|
||||
lcdSetLayout(1);
|
||||
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: FORWARD ");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
|
||||
progTimer = 20;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
|
||||
pingSendPing();
|
||||
progTimer = 3;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
|
||||
if(tempDistance < DISTANCE_TO_STOP)
|
||||
{
|
||||
showDistanceOnLCD(0,0,2);
|
||||
progPosition++;
|
||||
}
|
||||
else
|
||||
{
|
||||
showDistanceOnLCD(tempDistance-DISTANCE_TO_STOP,0,2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: STOP ");
|
||||
|
||||
// Stop and breake
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE;
|
||||
|
||||
progTimer = 50;
|
||||
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
|
||||
progTimer = 2;
|
||||
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
servoPing = SERVO_POS_LEFT_45;
|
||||
|
||||
progTimer = 20;
|
||||
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
pingSendPing();
|
||||
progTimer = 4;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
tempLeftDistance = pingGetDistance();
|
||||
progTimer = 20;
|
||||
progPosition++;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
servoPing = SERVO_POS_RIGHT_45;
|
||||
|
||||
progTimer = 40;
|
||||
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
pingSendPing();
|
||||
progTimer = 4;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
tempRightDistance = pingGetDistance();
|
||||
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
|
||||
if((tempLeftDistance < DISTANCE_TO_STOP )
|
||||
&& (tempRightDistance < DISTANCE_TO_STOP))
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: Turn <<< ");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
progTimer = 70;
|
||||
}
|
||||
else if(tempLeftDistance > tempRightDistance)
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: Turn < ");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
progTimer = 40;
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Drive: Turn > ");
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
progTimer = 40;
|
||||
}
|
||||
|
||||
progPosition++;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
|
||||
progTimer = 10;
|
||||
progPosition = 1;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
progCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (roboActive == 3)
|
||||
{
|
||||
// Program(2) for random RFID serach
|
||||
if (++progCounter >= progTimer)
|
||||
{
|
||||
|
||||
switch (progPosition)
|
||||
{
|
||||
case 0:
|
||||
|
||||
lcdClearDisplay();
|
||||
lcdSetLayout(1);
|
||||
lcdSetPos(0x00);
|
||||
lcdWriteString("Servo: forward ");
|
||||
lcdSetPos(0x10);
|
||||
lcdWriteString("Distance: ");
|
||||
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
pingSendPing();
|
||||
progTimer = 10;
|
||||
|
||||
if(pingGetReady())
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
lcdSetPos(0x1A);
|
||||
lcdWriteHexAsDecimal(tempDistance);
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
progCounter = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
showDistanceOnLCD
|
||||
|
||||
Description:
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void showDistanceOnLCD(uint16_t distance, uint8_t mode, uint8_t position)
|
||||
{
|
||||
if(position == 1)
|
||||
lcdSetPos(0x00);
|
||||
else if(position == 2)
|
||||
lcdSetPos(0x10);
|
||||
else if(position == 3)
|
||||
lcdSetPos(0x20);
|
||||
|
||||
if(mode == 0) // Both arrow pointing in
|
||||
{
|
||||
if(distance > 32000)
|
||||
{
|
||||
lcdWriteString(" ");
|
||||
}
|
||||
else if(distance > 16000)
|
||||
{
|
||||
lcdWriteString("> <");
|
||||
}
|
||||
else if(distance > 8000)
|
||||
{
|
||||
lcdWriteString(">> <<");
|
||||
}
|
||||
else if(distance > 4000)
|
||||
{
|
||||
lcdWriteString(">>> <<<");
|
||||
}
|
||||
else if(distance > 2000)
|
||||
{
|
||||
lcdWriteString(">>>> <<<<");
|
||||
}
|
||||
else if(distance > 1000)
|
||||
{
|
||||
lcdWriteString(">>>>> <<<<<");
|
||||
}
|
||||
else if(distance > 500)
|
||||
{
|
||||
lcdWriteString(">>>>>> <<<<<<");
|
||||
}
|
||||
else if(distance > 100)
|
||||
{
|
||||
lcdWriteString(">>>>>>> <<<<<<<");
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdWriteString(">>>>>>>[]<<<<<<<");
|
||||
}
|
||||
}
|
||||
else if(mode == 1) // Both arrow pointing Out
|
||||
{
|
||||
if(distance > 32000)
|
||||
{
|
||||
lcdWriteString(" ");
|
||||
}
|
||||
else if(distance > 16000)
|
||||
{
|
||||
lcdWriteString(" < > ");
|
||||
}
|
||||
else if(distance > 8000)
|
||||
{
|
||||
lcdWriteString(" << >> ");
|
||||
}
|
||||
else if(distance > 4000)
|
||||
{
|
||||
lcdWriteString(" <<< >>> ");
|
||||
}
|
||||
else if(distance > 2000)
|
||||
{
|
||||
lcdWriteString(" <<<< >>>> ");
|
||||
}
|
||||
else if(distance > 1000)
|
||||
{
|
||||
lcdWriteString(" <<<<< >>>>> ");
|
||||
}
|
||||
else if(distance > 500)
|
||||
{
|
||||
lcdWriteString(" <<<<<< >>>>>> ");
|
||||
}
|
||||
else if(distance > 100)
|
||||
{
|
||||
lcdWriteString("<<<<<<< >>>>>>>");
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdWriteString("<<<<<<<[]>>>>>>>");
|
||||
}
|
||||
}
|
||||
else if(mode == 2) // Left arrow pointing out.
|
||||
{
|
||||
if(distance > 6400)
|
||||
{
|
||||
lcdWriteString("<<<<<<< ");
|
||||
}
|
||||
else if(distance > 3200)
|
||||
{
|
||||
lcdWriteString(" <<<<<< ");
|
||||
}
|
||||
else if(distance > 1600)
|
||||
{
|
||||
lcdWriteString(" <<<<< ");
|
||||
}
|
||||
else if(distance > 800)
|
||||
{
|
||||
lcdWriteString(" <<<< ");
|
||||
}
|
||||
else if(distance > 400)
|
||||
{
|
||||
lcdWriteString(" <<< ");
|
||||
}
|
||||
else if(distance > 200)
|
||||
{
|
||||
lcdWriteString(" << ");
|
||||
}
|
||||
else if(distance > 30)
|
||||
{
|
||||
lcdWriteString(" < ");
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdWriteString(" [] ");
|
||||
}
|
||||
}
|
||||
else if(mode == 3) // Right arrow pointing out.
|
||||
{
|
||||
if(distance > 6400)
|
||||
{
|
||||
lcdWriteString(" >>>>>>>");
|
||||
}
|
||||
else if(distance > 3200)
|
||||
{
|
||||
lcdWriteString(" >>>>>> ");
|
||||
}
|
||||
else if(distance > 1600)
|
||||
{
|
||||
lcdWriteString(" >>>>> ");
|
||||
}
|
||||
else if(distance > 800)
|
||||
{
|
||||
lcdWriteString(" >>>> ");
|
||||
}
|
||||
else if(distance > 400)
|
||||
{
|
||||
lcdWriteString(" >>> ");
|
||||
}
|
||||
else if(distance > 200)
|
||||
{
|
||||
lcdWriteString(" >> ");
|
||||
}
|
||||
else if(distance > 30)
|
||||
{
|
||||
lcdWriteString(" > ");
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdWriteString(" [] ");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
checkCommunication
|
||||
|
||||
Description: Check for incoming data packets.
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void checkCommunication(void){
|
||||
|
||||
|
||||
if (rfIdGetTagPresent())
|
||||
{
|
||||
uint8_t *tempPointer = rfIdGetTag();
|
||||
|
||||
lcdSetPos(0x13);
|
||||
lcdWriteString(tempPointer);
|
||||
roboMSPSetData(tempPointer);
|
||||
|
||||
}
|
||||
|
||||
switch (roboMSPGetActiveStatus())
|
||||
{
|
||||
case ACTIVATE_P1:
|
||||
activateRobot(1);
|
||||
rfIdEnable();
|
||||
break;
|
||||
|
||||
case ACTIVATE_P2:
|
||||
activateRobot(2);
|
||||
rfIdEnable();
|
||||
break;
|
||||
|
||||
case DEACTIVATE:
|
||||
deactivateRobot();
|
||||
break;
|
||||
|
||||
case ACK:
|
||||
rfIdClearBuffer();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
/*================================================================================================
|
||||
Main
|
||||
================================================================================================*/
|
||||
int main (void){
|
||||
|
||||
cli(); // Disable global interrupt
|
||||
|
||||
initIO();
|
||||
lcdInit();
|
||||
rfIdInit();
|
||||
roboMSPInit();
|
||||
pingInit();
|
||||
|
||||
lcdSetIntensity(50);
|
||||
lcdSetLayout(2);
|
||||
lcdWriteStringP(menuTable[0]);
|
||||
|
||||
rfIdDisable();
|
||||
roboMSPDisable();
|
||||
|
||||
sei(); // Enable global interrupt
|
||||
|
||||
while(1){
|
||||
|
||||
if(progDoUpdate)
|
||||
{
|
||||
progDoUpdate = 0;
|
||||
updateProgram();
|
||||
}
|
||||
|
||||
// Active-mode 1 (left switch lower position)
|
||||
if (!bit_is_set(PINA,PA4))
|
||||
{
|
||||
if(switchOneCheck)
|
||||
{
|
||||
activateRobot(3);
|
||||
switchOneCheck = 0;
|
||||
}
|
||||
}
|
||||
// Active-mode 2 (left switch middle position)
|
||||
else if ((bit_is_set(PINA,PA5)) && (bit_is_set(PINA,PA4)))
|
||||
{
|
||||
if(!switchOneCheck)
|
||||
{
|
||||
deactivateRobot();
|
||||
rfEnable = 0;
|
||||
switchOneCheck = 1;
|
||||
main();
|
||||
}
|
||||
}
|
||||
// Active-mode 3 (left switch upper position)
|
||||
else if (!bit_is_set(PINA,PA5))
|
||||
{
|
||||
if(switchOneCheck)
|
||||
{
|
||||
lcdSetLayout(0);
|
||||
lcdWriteStringP(menuTable[4]);
|
||||
rfEnable = 1;
|
||||
rfIdEnable();
|
||||
roboMSPEnable();
|
||||
switchOneCheck = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Active-mode 1 (left switch lower position)
|
||||
if (!bit_is_set(PINA,PA6))
|
||||
{
|
||||
if(switchTwoCheck)
|
||||
{
|
||||
activateRobot(1);
|
||||
switchTwoCheck = 0;
|
||||
}
|
||||
}
|
||||
// Active-mode 2 (left switch middle position)
|
||||
else if ((bit_is_set(PINA,PA7)) && (bit_is_set(PINA,PA6)))
|
||||
{
|
||||
if(!switchTwoCheck)
|
||||
{
|
||||
deactivateRobot();
|
||||
rfEnable = 0;
|
||||
switchTwoCheck = 1;
|
||||
main();
|
||||
}
|
||||
}
|
||||
// Active-mode 3 (left switch upper position)
|
||||
else if (!bit_is_set(PINA,PA7))
|
||||
{
|
||||
if(switchTwoCheck)
|
||||
{
|
||||
activateRobot(2);
|
||||
switchTwoCheck = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return (0);
|
||||
}
|
||||
/*================================================================================================
|
||||
End
|
||||
================================================================================================*/
|
||||
|
||||
1
RoboMI.eep
Normal file
1
RoboMI.eep
Normal file
@ -0,0 +1 @@
|
||||
:00000001FF
|
||||
BIN
RoboMI.elf
Normal file
BIN
RoboMI.elf
Normal file
Binary file not shown.
441
RoboMI.hex
Normal file
441
RoboMI.hex
Normal file
@ -0,0 +1,441 @@
|
||||
:100000000C94C9000C94AC0B0C94E6000C94E60024
|
||||
:100010000C94E6000C94E6000C94E6000C94E600C8
|
||||
:100020000C94E6000C94E6000C94E6000C9423017A
|
||||
:100030000C94E6000C94E6000C94E6000C94FF008F
|
||||
:100040000C94E6000C94E6000C94E6000C94710904
|
||||
:100050000C94890A0C94E6000C94E6000C94E600DB
|
||||
:100060000C94E6000C94E6000C94E6000C94E60078
|
||||
:10007000C102C702EE02FC02080310032103290398
|
||||
:100080003A0353036F038503BD032A0460046C0421
|
||||
:100090007C048604980473058005B4052020202084
|
||||
:1000A00020434D746563202020202020726F626FF2
|
||||
:1000B000437261776C65722076312E3120202020CA
|
||||
:1000C0002020202020202020202020200020202050
|
||||
:1000D00020206D6F646520313A2020202020466F5B
|
||||
:1000E0006C6C6F772077616C6C20617420206120CC
|
||||
:1000F00064697374616E636528316D292000202066
|
||||
:100100002020206D6F646520323A2020202020447A
|
||||
:100110007269766520616E6420766F6964202020A4
|
||||
:1001200020616E792077616C6C7320202020002084
|
||||
:10013000202020206D6F646520333A202020204D40
|
||||
:100140006561737572652064697374616E6365209F
|
||||
:10015000202020666F7277617264202020202000AA
|
||||
:10016000202020206D6F64652052463A20202020F8
|
||||
:10017000205246206163746976656420616E642054
|
||||
:1001800077616974696E6720666F7220636F6D2E88
|
||||
:10019000000011241FBECFEFD4E0DEBFCDBF14E0BE
|
||||
:1001A000A0E0B1E0EAE4F8E102C005900D92AA32C5
|
||||
:1001B000B107D9F714E0AAE2B4E001C01D92A53658
|
||||
:1001C000B107E1F70E9418070C94240C0C9400006E
|
||||
:1001D00082E08EBD8FEB8DBD8FEF8CBD8EEE83BD2B
|
||||
:1001E00089B7846889BF84B3876084BB8AB38F7002
|
||||
:1001F0008ABB8BB3806F8BBB10922F0408951F9224
|
||||
:100200000F920FB60F9211248F9380912C048F5F61
|
||||
:1002100080932C04823050F010922A0485B38760BA
|
||||
:1002200085BB87B5826087BD10922C0481E08093E6
|
||||
:1002300030048FEB8DBD8FEF8CBD8F910F900FBE73
|
||||
:100240000F901F9018951F920F920FB60F921124C6
|
||||
:100250002F938F939F9390912A0480910304981772
|
||||
:1002600018F0A99821E002C0000020E08091040469
|
||||
:10027000981710F0A89802C0000020E080910504B3
|
||||
:10028000981720F0AA98222319F406C0000004C091
|
||||
:1002900087B58D7F87BD05C09F5F90932A040000BE
|
||||
:1002A00000008EEE83BD9F918F912F910F900FBE16
|
||||
:1002B0000F901F9018951F93182F80E00E94A80799
|
||||
:1002C00081E3189FC001112484569F4F0E942D087E
|
||||
:1002D00088EC80932E0410933B041F910895109294
|
||||
:1002E0003B0487E780930404809305048CE88093A3
|
||||
:1002F00003040E94BB0908951F93CF93DF93EC0181
|
||||
:10030000162F413011F480E007C0423011F480E133
|
||||
:1003100003C0433019F480E20E94D3071123B9F5DA
|
||||
:100320008DE7C130D807C8F58EE3C138D80718F07B
|
||||
:1003300081E191E0CAC08FE1C134D80718F082E2B0
|
||||
:1003400091E0C3C08FE0C13AD80718F083E391E091
|
||||
:10035000BCC087E0C13DD80718F084E491E0B5C087
|
||||
:1003600083E0C93ED80718F085E591E0AEC081E092
|
||||
:10037000C53FD80718F086E691E0A7C0C536D1057D
|
||||
:1003800018F087E791E0A1C088E891E09EC01130A5
|
||||
:10039000D1F58DE7C130D80718F080E091E095C025
|
||||
:1003A0008EE3C138D80718F089E991E08EC08FE15B
|
||||
:1003B000C134D80718F08AEA91E087C08FE0C13ACB
|
||||
:1003C000D80718F08BEB91E080C087E0C13DD807DB
|
||||
:1003D00018F08CEC91E079C083E0C93ED80718F0A2
|
||||
:1003E0008DED91E072C081E0C53FD80718F08EEE28
|
||||
:1003F00091E06BC0C536D10518F08FEF91E065C074
|
||||
:1004000080E192E062C0123071F589E1C130D80715
|
||||
:1004100018F081E292E059C08CE0C138D80718F09A
|
||||
:1004200082E392E052C086E0C134D80718F083E43A
|
||||
:1004300092E04BC083E0C132D80718F084E592E027
|
||||
:1004400044C081E0C139D80718F085E692E03DC08C
|
||||
:10045000C93CD10518F086E792E037C06F9798F154
|
||||
:1004600087E892E032C0133091F589E1C130D807B6
|
||||
:1004700018F089EA92E029C08CE0C138D80718F05A
|
||||
:100480008AEB92E022C086E0C134D80718F08BECEA
|
||||
:1004900092E01BC083E0C132D80718F08CED92E0E7
|
||||
:1004A00014C081E0C139D80718F08DEE92E00DC07C
|
||||
:1004B000C93CD10518F08EEF92E007C06F9718F095
|
||||
:1004C0008FE093E002C088E992E00E943B08DF9150
|
||||
:1004D000CF911F9108950F931F930E946D09882358
|
||||
:1004E00061F00E9464098C0183E10E94D307C80176
|
||||
:1004F0000E943B08C8010E94130A0E94C30983306E
|
||||
:1005000061F0843018F4823099F405C0843059F0D9
|
||||
:10051000853071F40BC081E001C082E00E945B0174
|
||||
:100520000E94BF0905C00E946F0102C00E946909B4
|
||||
:100530001F910F9108951F9380913C04882311F01F
|
||||
:100540000E946B0280913B04813009F01EC38091B0
|
||||
:100550002D048F5F80932D0490912E04891708F449
|
||||
:1005600014C380912F04E82FF0E0E631F10508F084
|
||||
:100570000AC3E85CFF4FEE0FFF1F0590F491E02DDA
|
||||
:1005800009940E94DF0781E00E94A807A5C18FE7B8
|
||||
:1005900080930404809305040E948C0B84E0809374
|
||||
:1005A0002E040E94A70B882309F4EDC20E94A00B21
|
||||
:1005B000909332048093310427E18037920738F416
|
||||
:1005C00042E060E080E090E00E947C01AFC142E048
|
||||
:1005D00060E0805797410E947C01D5C280E00E9474
|
||||
:1005E000D30781E393E00E943B088CE680930404E8
|
||||
:1005F0008093050488E27DC187E78093040480939B
|
||||
:10060000050481E080932E041092420484E0B9C274
|
||||
:100610008EEA8093030484E180932E0485E0B1C2C6
|
||||
:100620000E948C0B84E080932E040E94A70B8823E9
|
||||
:1006300009F4A9C20E94A00B909338048093370458
|
||||
:1006400075C187E68093030488E280932E0487E0D7
|
||||
:1006500098C20E948C0B84E080932E040E94A70B0A
|
||||
:10066000882309F490C20E94A00B90933A048093CF
|
||||
:1006700039045CC18CE880930304209137043091E5
|
||||
:1006800038048091390490913A048217930718F442
|
||||
:1006900010923F0403C081E080933F0482E3809383
|
||||
:1006A0002E0489E06EC20E948C0B84E080932E049D
|
||||
:1006B0000E94A70B882309F466C280E00E94D3073A
|
||||
:1006C00082E493E00E943B080E94A00B90933604C2
|
||||
:1006D00080933504909334048093330427C1809130
|
||||
:1006E0003F04882329F486E88093040488E606C042
|
||||
:1006F000813049F488E68093040486E880930504F9
|
||||
:1007000087E080932E048BE03CC20E948C0B84E037
|
||||
:1007100080932E0487E780930404809305040E944D
|
||||
:10072000A70B882309F42FC20E94A00B90933204D8
|
||||
:10073000809331042091350430913604281739070D
|
||||
:1007400070F480E00E94D30783E593E00E943B08A9
|
||||
:1007500081E080932E0480912F048F5F03C08091ED
|
||||
:100760002F04815080932F048091310490913204A2
|
||||
:10077000909336048093350406C20E948C0B84E06B
|
||||
:1007800080932E040E94A70B882309F4FCC10E94C9
|
||||
:10079000A00B9C01909332048093310447E1813790
|
||||
:1007A000940728F042E060E08057974106C042E09D
|
||||
:1007B00061E080E797E1821B930B0E947C018091AE
|
||||
:1007C00031049091320426E1883A920758F48091DE
|
||||
:1007D00004048337B0F081508093040480910504B1
|
||||
:1007E00081500DC08953984178F0809104048F376F
|
||||
:1007F00040F48F5F80930404809105048F5F8093A1
|
||||
:10080000050410924204BFC117E71093040410932B
|
||||
:100810000504809142048F5F80934204853009F083
|
||||
:10082000B2C180E00E94D30784E693E00E943B08B7
|
||||
:1008300010930404109305048091310490913204C4
|
||||
:10084000909334048093330482E380932E041092B7
|
||||
:10085000420486C18CE880930304209137043091D0
|
||||
:1008600038048091390490913A048217930798F4E0
|
||||
:1008700080E00E94D30785E793E00E943B0888E66A
|
||||
:100880008093040486E88093050483E48093030442
|
||||
:1008900010923F0413C080E00E94D30784E893E0E5
|
||||
:1008A0000E943B0886E88093040488E68093050450
|
||||
:1008B00080ED8093030481E080933F0482E319C0BC
|
||||
:1008C00087E780930404809305048AE080932E04D4
|
||||
:1008D00082E08093400418C080E00E94D30780E249
|
||||
:1008E00093E00E943B0886E880930404809305040B
|
||||
:1008F00084E180932E0434C18FE7809304048093B5
|
||||
:1009000005048AE080932E0481E13BC10E948C0B98
|
||||
:1009100083E080932E040E94A70B882309F433C13F
|
||||
:100920000E94A00B909332048093310481E0E1CFC8
|
||||
:10093000809141048F5F8093410490914004891716
|
||||
:1009400048F083E180932F0481E080932E0410927D
|
||||
:10095000410419C180913F04882309F047C00E94D7
|
||||
:10096000D30783E993E00E943B0820913104309142
|
||||
:10097000320487E12137380730F042E063E0C901F3
|
||||
:100980008057974106C042E062E080E797E1821B12
|
||||
:10099000930B0E947C01609131047091320480912C
|
||||
:1009A0003504909136046817790770F423E16838AC
|
||||
:1009B000720728F488E68093040486E84AC06656E5
|
||||
:1009C000774108F07CC073C08617970708F077C09E
|
||||
:1009D0008BE16935780728F086E88093040488E67F
|
||||
:1009E0004EC06B57774108F46AC039C0813009F0B6
|
||||
:1009F0006EC080E00E94D30784EA93E00E943B0827
|
||||
:100A0000209131043091320447E12137340730F02E
|
||||
:100A100042E062E0C9018057974106C042E063E0CE
|
||||
:100A200080E797E1821B930B0E947C016091310467
|
||||
:100A300070913204809135049091360468177907DB
|
||||
:100A400098F483E16838780738F486E880930404E2
|
||||
:100A500088E68093050426C06656774180F586E8CF
|
||||
:100A60008093040488E627C08617970740F54BE17A
|
||||
:100A700069357407C8F088E68093040486E880939B
|
||||
:100A8000050480E090E0605777418040904028E284
|
||||
:100A900030E040E050E00E94E70B2F3018F4209344
|
||||
:100AA0002E0415C08FE011C06B57774140F088E6E7
|
||||
:100AB0008093040486E88093050485E006C08FE7F0
|
||||
:100AC000809304048093050484E080932E04809135
|
||||
:100AD00031049091320490933604809335048091D0
|
||||
:100AE0002F0482504EC08CE88093030487E78093E4
|
||||
:100AF00004048093050483E280932E0484E141C0C2
|
||||
:100B000083E080932E040E948C0B0E94A70B882305
|
||||
:100B1000D1F10E94A00B909332048093310427E11D
|
||||
:100B20008037920740F441E060E080E090E00E946E
|
||||
:100B30007C0182E026C09C0120573741805E9E42A6
|
||||
:100B400038F441E060E0C9010E947C0182E006C007
|
||||
:100B500041E060E0C9010E947C018AE0809340048A
|
||||
:100B600080912F048F5F0DC080913F04882311F482
|
||||
:100B700083E401C080ED8093030485E080932E041C
|
||||
:100B80008FE080932F0410922D0420913B0422309B
|
||||
:100B900009F001C180912D048F5F80932D04909105
|
||||
:100BA0002E04891708F4F7C080912F04843009F4CB
|
||||
:100BB00068C0853050F4813011F18130C8F0823046
|
||||
:100BC00059F1833009F0E5C04EC0873009F47CC08C
|
||||
:100BD000883038F4853009F45DC0863009F0D9C01A
|
||||
:100BE00061C0883009F478C0893009F0D2C0C6C02D
|
||||
:100BF0000E94DF0781E00E94A80781E0B9C080E081
|
||||
:100C00000E94D30780E293E00E943B0886E880932D
|
||||
:100C100004048093050456C08FE7809304048093F6
|
||||
:100C200005040E948C0B83E080932E040E94A70B86
|
||||
:100C3000882309F4AEC00E94A00B909332048093E5
|
||||
:100C4000310425E18C37920738F442E060E080E01F
|
||||
:100C500090E00E947C018EC042E060E08C5795419C
|
||||
:100C60000E947C0196C080E00E94D30781E393E05C
|
||||
:100C70000E943B088CE6809304048093050482E381
|
||||
:100C800077C087E7809304048093050420932E04A3
|
||||
:100C900085E07DC08EEA8093030484E180932E0476
|
||||
:100CA00086E075C00E948C0B84E080932E040E9425
|
||||
:100CB000A70B882309F46DC00E94A00B9093380401
|
||||
:100CC0008093370484E154C087E68093030488E26C
|
||||
:100CD00080932E0488E05BC00E948C0B84E080939C
|
||||
:100CE0002E040E94A70B882309F453C00E94A00B76
|
||||
:100CF0009C0190933A04809339048CE88093030418
|
||||
:100D0000809137049091380445E18C37940798F42A
|
||||
:100D100045E12C37340778F480E00E94D30785EB57
|
||||
:100D200093E00E943B0888E68093040486E8809361
|
||||
:100D3000050486E41DC02817390760F480E00E948E
|
||||
:100D4000D30786EC93E00E943B0888E68093040476
|
||||
:100D500086E80BC080E00E94D30787ED93E00E94F5
|
||||
:100D60003B0886E88093040488E68093050488E2C3
|
||||
:100D700080932E0480912F048F5F09C087E78093B2
|
||||
:100D80000404809305048AE080932E0481E080931C
|
||||
:100D90002F0410922D0480913B04833009F046C04B
|
||||
:100DA00080912D048F5F80932D0490912E048917DC
|
||||
:100DB000E8F180912F04882319F08130A9F51CC037
|
||||
:100DC0000E94DF0781E00E94A80780E00E94D3070D
|
||||
:100DD00088EE93E00E943B0880E10E94D30788EFF1
|
||||
:100DE00093E00E943B0881E080932E0480912F04C1
|
||||
:100DF0008F5F80932F0418C00E948C0B8AE0809331
|
||||
:100E00002E040E94A70B882379F00E94A00B9093D8
|
||||
:100E10003204809331048AE10E94D3078091310427
|
||||
:100E2000909132040E94800810922D041F91089521
|
||||
:100E3000CF93DF93F8940E94E8000E9440090E943B
|
||||
:100E4000B0090E94300A0E94AB0B82E30E9499070E
|
||||
:100E500082E00E94A8078CE990E00E942D080E9481
|
||||
:100E6000BB090E94420A7894C0E6D1E08091300428
|
||||
:100E7000882321F0109230040E949B02CC9908C074
|
||||
:100E800080913D04882359F183E00E945B0125C0D5
|
||||
:100E9000CD9B10C0CC9B0EC080913D048823F9F4FB
|
||||
:100EA0000E946F0110923C0481E080933D040E94F7
|
||||
:100EB000180715C0CD9913C080913D04882379F09F
|
||||
:100EC00080E00E94A807CE010E942D0881E0809357
|
||||
:100ED0003C040E94BF090E94450A10923D04CE992D
|
||||
:100EE00006C080913E04882309F281E01BC0CF9B9D
|
||||
:100EF00011C0CE9B0FC080913E04882309F0B6CF6D
|
||||
:100F00000E946F0110923C0481E080933E040E9495
|
||||
:100F10001807ACCFCF99AACF80913E04882309F45B
|
||||
:100F2000A5CF82E00E945B0110923E049FCF9927DB
|
||||
:100F3000089581BF08951F93182F0E94F90A80E039
|
||||
:100F40000E94FC0AC198812F0E94EF0A1F91089508
|
||||
:100F5000813051F0813018F08230F9F412C089E309
|
||||
:100F60000E949B078DE10AC089E30E949B078CE1E8
|
||||
:100F70000E949B078EE30E949B0780E10E949B07D3
|
||||
:100F8000089589E30E949B078CE10E949B078EE3F2
|
||||
:100F90000E949B0788E10E949B0708958F708067DD
|
||||
:100FA0000E949B07089580680E949B07089582E035
|
||||
:100FB0000E949B0780E49FE10197F1F7089581E08B
|
||||
:100FC0000E949B0780E49FE10197F1F70895882331
|
||||
:100FD00031F0813049F480914304816003C08091F5
|
||||
:100FE00043048E7F809343048091430488600E9471
|
||||
:100FF0009B070895882331F0813049F480914304A0
|
||||
:10100000826003C0809143048D7F8093430480916C
|
||||
:10101000430488600E949B070895882331F0813043
|
||||
:1010200049F480914304846003C0809143048B7F22
|
||||
:10103000809343048091430488600E949B07089535
|
||||
:101040001F93182F0E94F90A80E00E94FC0AC19A9F
|
||||
:10105000812F0E94EF0A1F910895CF93DF93EC0137
|
||||
:1010600002C00E942008FE01219684918823C9F7BE
|
||||
:10107000DF91CF910895CF93DF93EC0102C00E94DE
|
||||
:10108000200889918823D9F7DF91CF910895CF93D4
|
||||
:10109000DF93CDB7DEB727970FB6F894DEBF0FBE4C
|
||||
:1010A000CDBFBC0180E3898388E78A83FE01339644
|
||||
:1010B0004CE050E033E0CB01042E02C096958795BA
|
||||
:1010C0000A94E2F7282F2F708F7090700A9710F013
|
||||
:1010D000295C01C020632083445050403F5F31961B
|
||||
:1010E000373049F71F82CE0101960E943B082796B0
|
||||
:1010F0000FB6F894DEBF0FBECDBFDF91CF9108953C
|
||||
:101100008F929F92AF92BF92CF92DF92EF92FF9217
|
||||
:101110000F931F93CF93DF93CDB7DEB725970FB60D
|
||||
:10112000F894DEBF0FBECDBF8C01DE011196E8E062
|
||||
:10113000F4E085E001900D928150E1F7C80160E193
|
||||
:1011400077E20E94D30BFB01E62E262F332780E1A6
|
||||
:1011500097E2289F6001299FD00C389FD00C112462
|
||||
:10116000C8018C199D0968EE73E00E94D30BF62E1E
|
||||
:10117000262F332788EE93E0289F4001299F900C6B
|
||||
:10118000389F900C112494012C0D3D1DC801821B29
|
||||
:10119000930B64E670E00E94D30B462F84E6689FB1
|
||||
:1011A000500111242A0D3B1DC801821B930B6AE0DC
|
||||
:1011B00070E00E94D30BEE2311F430E004C08E2FB8
|
||||
:1011C0008063898331E0FF2011F4EE2039F0FE01C5
|
||||
:1011D000E30FF11D8F2D806381833F5F442321F452
|
||||
:1011E000FF2011F4EE2039F0FE01E30FF11D842FF2
|
||||
:1011F000806381833F5F662331F4442321F4FF2021
|
||||
:1012000011F4EE2039F0FE01E30FF11D862F80630B
|
||||
:1012100081833F5FAE014F5F5F4FFA01E30FF11D26
|
||||
:10122000202F2C1928192A198AE0689FC00111243F
|
||||
:10123000281B20632083232F04C0AE0FBF1F80E232
|
||||
:101240008C932F5FDA01E22FFF272530B0F3E40FF4
|
||||
:10125000F51F1082CA010E943B0825960FB6F8942C
|
||||
:10126000DEBF0FBECDBFDF91CF911F910F91FF90D9
|
||||
:10127000EF90DF90CF90BF90AF909F908F900895A8
|
||||
:101280000E94060B87B3836087BB83B78A6683BFE0
|
||||
:1012900080E00E94A80780E50E949B078CE60E94E0
|
||||
:1012A0009B0786E00E949B0781E00E940D0880E07A
|
||||
:1012B0000E94FA0780E00E94E70786E00E94CE07BE
|
||||
:1012C0000E94DF0711BE08951092450486E494E061
|
||||
:1012D00008951092440495980895809145049927A3
|
||||
:1012E00008951F920F920FB60F9211242F933F93E0
|
||||
:1012F0004F935F936F937F938F939F93AF93BF931E
|
||||
:10130000EF93FF930E94300B90914404992331F4A2
|
||||
:101310008A30A9F481E08093440411C09B3048F4E2
|
||||
:10132000E92FFF27EB5BFB4F80839F5F9093440483
|
||||
:1013300006C09B3021F4959A81E080934504FF918B
|
||||
:10134000EF91BF91AF919F918F917F916F915F913D
|
||||
:101350004F913F912F910F900FBE0F901F901895B6
|
||||
:101360000E943D0B80E699E00E94100B109244040D
|
||||
:101370008D9A959808950E943B0B959A089595989B
|
||||
:101380000E94390B089580910E0410920E04992743
|
||||
:101390000895BC0140E050E020E030E0FB01E20FA6
|
||||
:1013A000F31F8081480F511D2F5F3F4F2C303105B7
|
||||
:1013B000A9F7842F992708951F931091620486E559
|
||||
:1013C00094E00E94C909181751F580915704992794
|
||||
:1013D0008F709070892B19F5809158048234B1F088
|
||||
:1013E000833428F4803261F08134C9F40CC0843431
|
||||
:1013F00099F0843470F08A3F91F485E090E011C058
|
||||
:1014000081E090E00EC082E090E00BC083E090E0CD
|
||||
:1014100008C084E090E005C086E090E002C080E073
|
||||
:1014200090E01F910895DC01E1E1F4E08D9181935A
|
||||
:1014300084E0EB31F807D1F7CF010C970E94C9097E
|
||||
:1014400080931B0481E08093540408958091530499
|
||||
:10145000992708951092520481E0809355040895CD
|
||||
:101460000E947D0B80E895E20E944C0B8C9A1092B2
|
||||
:10147000520481E0809355041092540484E08093D8
|
||||
:101480000E0408950E94790B08950E94750B08952B
|
||||
:10149000CF93DF93949A80E49CE9FC013197F1F7B4
|
||||
:1014A000FC013197F1F7FC013197F1F70197F1F762
|
||||
:1014B00080E00E94710B80E00E94710B80E00E942E
|
||||
:1014C000710B80915404882351F0CFE0D4E08991CE
|
||||
:1014D0000E94710B84E0CC31D80751F0F8CFCCE1F9
|
||||
:1014E000D4E089910E94710B84E0C932D807C9F712
|
||||
:1014F00080E00E94710B80E00E94710B80E00E94EE
|
||||
:10150000710B949880E89EE30197F1F7DF91CF91FA
|
||||
:1015100008951F920F920FB60F9211242F933F93AD
|
||||
:101520004F935F936F937F938F939F93AF93BF93EB
|
||||
:10153000EF93FF930E946C0B90915204992341F416
|
||||
:101540008A3081F48093560481E0809352040AC06B
|
||||
:101550009D3040F4E92FFF27EA5AFB4F80839F5FBD
|
||||
:1015600090935204809152048D3041F50E94420ABA
|
||||
:1015700078940E94DC09809353048330A1F0843076
|
||||
:1015800028F4813051F08230A9F40DC0853071F01B
|
||||
:10159000853040F0863071F406C080930E040E94BE
|
||||
:1015A000480A08C084E080930E0404C080930E04AF
|
||||
:1015B00010925404109252040E94450AFF91EF9138
|
||||
:1015C000BF91AF919F918F917F916F915F914F915B
|
||||
:1015D0003F912F910F900FBE0F901F9018958FB9CC
|
||||
:1015E000779BFECF08958FB19927089568986998E1
|
||||
:1015F00008956898699A089521E030E002C0220FAA
|
||||
:10160000331F8A95E2F720952BBB089587B3806B33
|
||||
:1016100087BBC69AD09AD89A8DB181658DB9089545
|
||||
:101620009C0194E0220F331F9A95E1F74427552738
|
||||
:1016300060E074E284EF90E00E94090C2150304099
|
||||
:1016400040405040BB2757FDBA95A52F942F832FBC
|
||||
:101650002F5F3F4F4F4F5F4F80BD215029B90895F5
|
||||
:101660005F9BFECF8CB1992708955D9BFECF8CB90F
|
||||
:101670000895579A089557980895899A8AB1886964
|
||||
:101680008AB90895FC0104C05D9BFECF8CB93196E8
|
||||
:1016900080818823C9F708959C0194E0220F331FAD
|
||||
:1016A0009A95E1F74427552760E074E284EF90E0D3
|
||||
:1016B0000E94090C2150304040405040BB2757FD4C
|
||||
:1016C000BA95A52F942F832F2F5F3F4F4F4F5F4F1A
|
||||
:1016D0008CBF215020B90895179BFECF83B1992765
|
||||
:1016E0000895159BFECF83B9089581B1806981B9B2
|
||||
:1016F000089581B18F7681B90895BB9A81B18869C7
|
||||
:1017000081B90895FC0104C0159BFECF83B93196C1
|
||||
:1017100080818823C9F70895F89480916404882310
|
||||
:1017200069F48A9A929A8AE08A95F1F792988A984F
|
||||
:1017300085B7836085BF8BB780648BBF789408952D
|
||||
:10174000109264048091880090918900089580919E
|
||||
:1017500064049927089508951F920F920FB60F926F
|
||||
:1017600011248F9305B600FE0DC0109289001092CF
|
||||
:10177000880085B78E7F85BF80918A0082608093C4
|
||||
:101780008A000BC080918A008D7F80938A0081E05F
|
||||
:10179000809364048BB78F7B8BBF8F910F900FBEAC
|
||||
:1017A0000F901F901895AA1BBB1B51E107C0AA1FE1
|
||||
:1017B000BB1FA617B70710F0A61BB70B881F991FF2
|
||||
:1017C0005A95A9F780959095BC01CD010895A1E2A5
|
||||
:1017D0001A2EAA1BBB1BFD010DC0AA1FBB1FEE1FAB
|
||||
:1017E000FF1FA217B307E407F50720F0A21BB30BF6
|
||||
:1017F000E40BF50B661F771F881F991F1A9469F772
|
||||
:1018000060957095809590959B01AC01BD01CF01CD
|
||||
:10181000089597FB092E05260ED057FD04D0D7DF7B
|
||||
:101820000AD0001C38F450954095309521953F4FD3
|
||||
:101830004F4F5F4F0895F6F790958095709561959D
|
||||
:0A1840007F4F8F4F9F4F0895FFCF99
|
||||
:10184A00202020202020202020202020202020208E
|
||||
:10185A00003E202020202020202020202020202080
|
||||
:10186A003C003E3E20202020202020202020202036
|
||||
:10187A003C3C003E3E3E20202020202020202020EC
|
||||
:10188A003C3C3C003E3E3E3E2020202020202020A2
|
||||
:10189A003C3C3C3C003E3E3E3E3E20202020202058
|
||||
:1018AA003C3C3C3C3C003E3E3E3E3E3E202020200E
|
||||
:1018BA003C3C3C3C3C3C003E3E3E3E3E3E3E2020C4
|
||||
:1018CA003C3C3C3C3C3C3C003E3E3E3E3E3E3E5B5D
|
||||
:1018DA005D3C3C3C3C3C3C3C002020202020203C01
|
||||
:1018EA0020203E2020202020200020202020203CD4
|
||||
:1018FA003C20203E3E202020202000202020203C8A
|
||||
:10190A003C3C20203E3E3E20202020002020203C3F
|
||||
:10191A003C3C3C20203E3E3E3E2020200020203CF5
|
||||
:10192A003C3C3C3C20203E3E3E3E3E202000203CAB
|
||||
:10193A003C3C3C3C3C20203E3E3E3E3E3E20003C61
|
||||
:10194A003C3C3C3C3C3C20203E3E3E3E3E3E3E0033
|
||||
:10195A003C3C3C3C3C3C3C5B5D3E3E3E3E3E3E3E6F
|
||||
:10196A00003C3C3C3C3C3C3C2020202020202020C9
|
||||
:10197A002000203C3C3C3C3C3C20202020202020D5
|
||||
:10198A0020200020203C3C3C3C3C202020202020E1
|
||||
:10199A00202020002020203C3C3C3C2020202020ED
|
||||
:1019AA002020202000202020203C3C3C20202020F9
|
||||
:1019BA0020202020200020202020203C3C20202005
|
||||
:1019CA00202020202020002020202020203C202011
|
||||
:1019DA002020202020202000202020202020205BE2
|
||||
:1019EA005D202020202020200020202020202020D0
|
||||
:1019FA0020203E3E3E3E3E3E3E002020202020202B
|
||||
:101A0A002020203E3E3E3E3E3E2000202020202038
|
||||
:101A1A00202020203E3E3E3E3E2020002020202046
|
||||
:101A2A0020202020203E3E3E3E2020200020202054
|
||||
:101A3A002020202020203E3E3E2020202000202062
|
||||
:101A4A00202020202020203E3E2020202020002070
|
||||
:101A5A0020202020202020203E202020202020007E
|
||||
:101A6A0044726976653A20464F52574152442020C3
|
||||
:101A7A000044726976653A2053544F502020202042
|
||||
:101A8A002000416C69676E20746F2077616C6C204E
|
||||
:101A9A0020200020205E2D2D2028316D29202D2D7B
|
||||
:101AAA005E202000506F73697374696F6E206C6FCB
|
||||
:101ABA00636B65640044726976653A205475726E88
|
||||
:101ACA00203C200044726976653A205475726E2073
|
||||
:101ADA003E2000205D2D2D2D2028316D29202D2D11
|
||||
:101AEA002D3E7C007C3C2D2D2D2028316D29202D6A
|
||||
:101AFA002D2D5B200044726976653A205475726E0A
|
||||
:101B0A00203C3C3C200044726976653A2054757248
|
||||
:101B1A006E203C2020200044726976653A20547574
|
||||
:101B2A00726E203E20202000536572766F3A20663E
|
||||
:101B3A006F7277617264200044697374616E6365C1
|
||||
:101B4A003A20008C77777777202020202000040A1B
|
||||
:101B5A004030000000000000000000000A803055FC
|
||||
:0A1B6A005555555555555555B70012
|
||||
:00000001FF
|
||||
4643
RoboMI.lss
Normal file
4643
RoboMI.lss
Normal file
@ -0,0 +1,4643 @@
|
||||
|
||||
RoboMI.elf: file format elf32-avr
|
||||
|
||||
Sections:
|
||||
Idx Name Size VMA LMA File off Algn
|
||||
0 .data 0000032a 00800100 0000184a 000018be 2**0
|
||||
CONTENTS, ALLOC, LOAD, DATA
|
||||
1 .text 0000184a 00000000 00000000 00000074 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
2 .bss 0000003b 0080042a 00001b74 00001be8 2**0
|
||||
ALLOC
|
||||
3 .stab 00002f4c 00000000 00000000 00001be8 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
4 .stabstr 0000132e 00000000 00000000 00004b34 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
5 .debug_aranges 00000020 00000000 00000000 00005e62 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
6 .debug_pubnames 00000299 00000000 00000000 00005e82 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
7 .debug_info 000003ff 00000000 00000000 0000611b 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
8 .debug_abbrev 0000013e 00000000 00000000 0000651a 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
9 .debug_line 00000f52 00000000 00000000 00006658 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
10 .debug_frame 000000a0 00000000 00000000 000075ac 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
11 .debug_str 000002dc 00000000 00000000 0000764c 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
12 .debug_loc 000000ab 00000000 00000000 00007928 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <__vectors>:
|
||||
0: 0c 94 c9 00 jmp 0x192 ; 0x192 <__ctors_end>
|
||||
4: 0c 94 ac 0b jmp 0x1758 ; 0x1758 <__vector_1>
|
||||
8: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
c: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
10: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
14: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
18: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
1c: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
20: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
24: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
28: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
2c: 0c 94 23 01 jmp 0x246 ; 0x246 <__vector_11>
|
||||
30: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
34: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
38: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
3c: 0c 94 ff 00 jmp 0x1fe ; 0x1fe <__vector_15>
|
||||
40: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
44: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
48: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
4c: 0c 94 71 09 jmp 0x12e2 ; 0x12e2 <__vector_19>
|
||||
50: 0c 94 89 0a jmp 0x1512 ; 0x1512 <__vector_20>
|
||||
54: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
58: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
5c: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
60: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
64: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
68: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
6c: 0c 94 e6 00 jmp 0x1cc ; 0x1cc <__bad_interrupt>
|
||||
70: c1 02 muls r28, r17
|
||||
72: c7 02 muls r28, r23
|
||||
74: ee 02 muls r30, r30
|
||||
76: fc 02 muls r31, r28
|
||||
78: 08 03 fmul r16, r16
|
||||
7a: 10 03 mulsu r17, r16
|
||||
7c: 21 03 mulsu r18, r17
|
||||
7e: 29 03 fmul r18, r17
|
||||
80: 3a 03 fmul r19, r18
|
||||
82: 53 03 mulsu r21, r19
|
||||
84: 6f 03 fmul r22, r23
|
||||
86: 85 03 fmuls r16, r21
|
||||
88: bd 03 fmulsu r19, r21
|
||||
8a: 2a 04 cpc r2, r10
|
||||
8c: 60 04 cpc r6, r0
|
||||
8e: 6c 04 cpc r6, r12
|
||||
90: 7c 04 cpc r7, r12
|
||||
92: 86 04 cpc r8, r6
|
||||
94: 98 04 cpc r9, r8
|
||||
96: 73 05 cpc r23, r3
|
||||
98: 80 05 cpc r24, r0
|
||||
9a: b4 05 cpc r27, r4
|
||||
|
||||
0000009c <menuTable>:
|
||||
9c: 20 20 20 20 20 43 4d 74 65 63 20 20 20 20 20 20 CMtec
|
||||
ac: 72 6f 62 6f 43 72 61 77 6c 65 72 20 76 31 2e 31 roboCrawler v1.1
|
||||
bc: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
|
||||
cc: 00 20 20 20 20 20 6d 6f 64 65 20 31 3a 20 20 20 . mode 1:
|
||||
dc: 20 20 46 6f 6c 6c 6f 77 20 77 61 6c 6c 20 61 74 Follow wall at
|
||||
ec: 20 20 61 20 64 69 73 74 61 6e 63 65 28 31 6d 29 a distance(1m)
|
||||
fc: 20 00 20 20 20 20 20 6d 6f 64 65 20 32 3a 20 20 . mode 2:
|
||||
10c: 20 20 20 44 72 69 76 65 20 61 6e 64 20 76 6f 69 Drive and voi
|
||||
11c: 64 20 20 20 20 61 6e 79 20 77 61 6c 6c 73 20 20 d any walls
|
||||
12c: 20 20 00 20 20 20 20 20 6d 6f 64 65 20 33 3a 20 . mode 3:
|
||||
13c: 20 20 20 4d 65 61 73 75 72 65 20 64 69 73 74 61 Measure dista
|
||||
14c: 6e 63 65 20 20 20 20 66 6f 72 77 61 72 64 20 20 nce forward
|
||||
15c: 20 20 20 00 20 20 20 20 6d 6f 64 65 20 52 46 3a . mode RF:
|
||||
16c: 20 20 20 20 20 52 46 20 61 63 74 69 76 65 64 20 RF actived
|
||||
17c: 61 6e 64 20 77 61 69 74 69 6e 67 20 66 6f 72 20 and waiting for
|
||||
18c: 63 6f 6d 2e 00 00 com...
|
||||
|
||||
00000192 <__ctors_end>:
|
||||
192: 11 24 eor r1, r1
|
||||
194: 1f be out 0x3f, r1 ; 63
|
||||
196: cf ef ldi r28, 0xFF ; 255
|
||||
198: d4 e0 ldi r29, 0x04 ; 4
|
||||
19a: de bf out 0x3e, r29 ; 62
|
||||
19c: cd bf out 0x3d, r28 ; 61
|
||||
|
||||
0000019e <__do_copy_data>:
|
||||
19e: 14 e0 ldi r17, 0x04 ; 4
|
||||
1a0: a0 e0 ldi r26, 0x00 ; 0
|
||||
1a2: b1 e0 ldi r27, 0x01 ; 1
|
||||
1a4: ea e4 ldi r30, 0x4A ; 74
|
||||
1a6: f8 e1 ldi r31, 0x18 ; 24
|
||||
1a8: 02 c0 rjmp .+4 ; 0x1ae <.do_copy_data_start>
|
||||
|
||||
000001aa <.do_copy_data_loop>:
|
||||
1aa: 05 90 lpm r0, Z+
|
||||
1ac: 0d 92 st X+, r0
|
||||
|
||||
000001ae <.do_copy_data_start>:
|
||||
1ae: aa 32 cpi r26, 0x2A ; 42
|
||||
1b0: b1 07 cpc r27, r17
|
||||
1b2: d9 f7 brne .-10 ; 0x1aa <.do_copy_data_loop>
|
||||
|
||||
000001b4 <__do_clear_bss>:
|
||||
1b4: 14 e0 ldi r17, 0x04 ; 4
|
||||
1b6: aa e2 ldi r26, 0x2A ; 42
|
||||
1b8: b4 e0 ldi r27, 0x04 ; 4
|
||||
1ba: 01 c0 rjmp .+2 ; 0x1be <.do_clear_bss_start>
|
||||
|
||||
000001bc <.do_clear_bss_loop>:
|
||||
1bc: 1d 92 st X+, r1
|
||||
|
||||
000001be <.do_clear_bss_start>:
|
||||
1be: a5 36 cpi r26, 0x65 ; 101
|
||||
1c0: b1 07 cpc r27, r17
|
||||
1c2: e1 f7 brne .-8 ; 0x1bc <.do_clear_bss_loop>
|
||||
1c4: 0e 94 18 07 call 0xe30 ; 0xe30 <main>
|
||||
1c8: 0c 94 24 0c jmp 0x1848 ; 0x1848 <_exit>
|
||||
|
||||
000001cc <__bad_interrupt>:
|
||||
1cc: 0c 94 00 00 jmp 0 ; 0x0 <__heap_end>
|
||||
|
||||
000001d0 <initIO>:
|
||||
|
||||
Description: Initialise I/O
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void initIO (void){
|
||||
1d0: 82 e0 ldi r24, 0x02 ; 2
|
||||
1d2: 8e bd out 0x2e, r24 ; 46
|
||||
|
||||
TCCR1B = (1<<CS11); // Timer1 prescaler = fc/8
|
||||
|
||||
TCNT1H = (uint8_t)(PROG_TIMER>>8);
|
||||
1d4: 8f eb ldi r24, 0xBF ; 191
|
||||
1d6: 8d bd out 0x2d, r24 ; 45
|
||||
TCNT1L = (uint8_t)(PROG_TIMER);
|
||||
1d8: 8f ef ldi r24, 0xFF ; 255
|
||||
1da: 8c bd out 0x2c, r24 ; 44
|
||||
|
||||
TCNT2 = SERVO_TIMER;
|
||||
1dc: 8e ee ldi r24, 0xEE ; 238
|
||||
1de: 83 bd out 0x23, r24 ; 35
|
||||
|
||||
TIMSK |= (1<<TOIE1)|(1<<TOIE2); // Timer1 interrupt enable
|
||||
1e0: 89 b7 in r24, 0x39 ; 57
|
||||
1e2: 84 68 ori r24, 0x84 ; 132
|
||||
1e4: 89 bf out 0x39, r24 ; 57
|
||||
DDRC |= (1<<PC0)|(1<<PC1)|(1<<PC2);
|
||||
1e6: 84 b3 in r24, 0x14 ; 20
|
||||
1e8: 87 60 ori r24, 0x07 ; 7
|
||||
1ea: 84 bb out 0x14, r24 ; 20
|
||||
|
||||
DDRA &= ~((1<<PA4)|(1<<PA5)|(1<<PA6)|(1<<PA7)); // Configuration button pins as input
|
||||
1ec: 8a b3 in r24, 0x1a ; 26
|
||||
1ee: 8f 70 andi r24, 0x0F ; 15
|
||||
1f0: 8a bb out 0x1a, r24 ; 26
|
||||
PORTA |= (1<<PA4)|(1<<PA5)|(1<<PA6)|(1<<PA7); // Pull-up on configuration button pins
|
||||
1f2: 8b b3 in r24, 0x1b ; 27
|
||||
1f4: 80 6f ori r24, 0xF0 ; 240
|
||||
1f6: 8b bb out 0x1b, r24 ; 27
|
||||
|
||||
progPosition = 0;
|
||||
1f8: 10 92 2f 04 sts 0x042F, r1
|
||||
1fc: 08 95 ret
|
||||
|
||||
000001fe <__vector_15>:
|
||||
Description: Timer1 overflow interrupt. Used as program timer
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
ISR (TIMER1_OVF_vect)
|
||||
{
|
||||
1fe: 1f 92 push r1
|
||||
200: 0f 92 push r0
|
||||
202: 0f b6 in r0, 0x3f ; 63
|
||||
204: 0f 92 push r0
|
||||
206: 11 24 eor r1, r1
|
||||
208: 8f 93 push r24
|
||||
// Program for update PPM pulses to all servos
|
||||
if (++progCounterPPM >= 2)
|
||||
20a: 80 91 2c 04 lds r24, 0x042C
|
||||
20e: 8f 5f subi r24, 0xFF ; 255
|
||||
210: 80 93 2c 04 sts 0x042C, r24
|
||||
214: 82 30 cpi r24, 0x02 ; 2
|
||||
216: 50 f0 brcs .+20 ; 0x22c <__vector_15+0x2e>
|
||||
{
|
||||
// Start for servo PPM pulses
|
||||
servoCounter = 0;
|
||||
218: 10 92 2a 04 sts 0x042A, r1
|
||||
SERVO_PORT |= (1<<SERVO_PING)|(1<<SERVO_MOTOR_LEFT)|(1<<SERVO_MOTOR_RIGHT);
|
||||
21c: 85 b3 in r24, 0x15 ; 21
|
||||
21e: 87 60 ori r24, 0x07 ; 7
|
||||
220: 85 bb out 0x15, r24 ; 21
|
||||
TCCR2 |= (1<<CS21); // Timer2 start (prescaler = fc/8)
|
||||
222: 87 b5 in r24, 0x27 ; 39
|
||||
224: 82 60 ori r24, 0x02 ; 2
|
||||
226: 87 bd out 0x27, r24 ; 39
|
||||
progCounterPPM = 0;
|
||||
228: 10 92 2c 04 sts 0x042C, r1
|
||||
}
|
||||
|
||||
// Trigg program routine
|
||||
progDoUpdate = 1;
|
||||
22c: 81 e0 ldi r24, 0x01 ; 1
|
||||
22e: 80 93 30 04 sts 0x0430, r24
|
||||
|
||||
// Set timer value
|
||||
TCNT1H = (uint8_t)(PROG_TIMER>>8);
|
||||
232: 8f eb ldi r24, 0xBF ; 191
|
||||
234: 8d bd out 0x2d, r24 ; 45
|
||||
TCNT1L = (uint8_t)(PROG_TIMER);
|
||||
236: 8f ef ldi r24, 0xFF ; 255
|
||||
238: 8c bd out 0x2c, r24 ; 44
|
||||
23a: 8f 91 pop r24
|
||||
23c: 0f 90 pop r0
|
||||
23e: 0f be out 0x3f, r0 ; 63
|
||||
240: 0f 90 pop r0
|
||||
242: 1f 90 pop r1
|
||||
244: 18 95 reti
|
||||
|
||||
00000246 <__vector_11>:
|
||||
Description: Timer1 overflow interrupt. Used as servo (PPM) timer
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
ISR (TIMER2_OVF_vect)
|
||||
{
|
||||
246: 1f 92 push r1
|
||||
248: 0f 92 push r0
|
||||
24a: 0f b6 in r0, 0x3f ; 63
|
||||
24c: 0f 92 push r0
|
||||
24e: 11 24 eor r1, r1
|
||||
250: 2f 93 push r18
|
||||
252: 8f 93 push r24
|
||||
254: 9f 93 push r25
|
||||
uint8_t done = 1;
|
||||
|
||||
// Check each servo output if pulselength is reached
|
||||
if(servoCounter >= servoPing)
|
||||
256: 90 91 2a 04 lds r25, 0x042A
|
||||
25a: 80 91 03 04 lds r24, 0x0403
|
||||
25e: 98 17 cp r25, r24
|
||||
260: 18 f0 brcs .+6 ; 0x268 <__vector_11+0x22>
|
||||
SERVO_PORT &= ~(1<<SERVO_PING);
|
||||
262: a9 98 cbi 0x15, 1 ; 21
|
||||
264: 21 e0 ldi r18, 0x01 ; 1
|
||||
266: 02 c0 rjmp .+4 ; 0x26c <__vector_11+0x26>
|
||||
else
|
||||
{
|
||||
done = 0;
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
268: 00 00 nop
|
||||
26a: 20 e0 ldi r18, 0x00 ; 0
|
||||
}
|
||||
|
||||
if(servoCounter >= servoMotorLeft)
|
||||
26c: 80 91 04 04 lds r24, 0x0404
|
||||
270: 98 17 cp r25, r24
|
||||
272: 10 f0 brcs .+4 ; 0x278 <__vector_11+0x32>
|
||||
SERVO_PORT &= ~(1<<SERVO_MOTOR_LEFT);
|
||||
274: a8 98 cbi 0x15, 0 ; 21
|
||||
276: 02 c0 rjmp .+4 ; 0x27c <__vector_11+0x36>
|
||||
else
|
||||
{
|
||||
done = 0;
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
278: 00 00 nop
|
||||
27a: 20 e0 ldi r18, 0x00 ; 0
|
||||
}
|
||||
|
||||
if(servoCounter >= servoMotorRight)
|
||||
27c: 80 91 05 04 lds r24, 0x0405
|
||||
280: 98 17 cp r25, r24
|
||||
282: 20 f0 brcs .+8 ; 0x28c <__vector_11+0x46>
|
||||
SERVO_PORT &= ~(1<<SERVO_MOTOR_RIGHT);
|
||||
284: aa 98 cbi 0x15, 2 ; 21
|
||||
{
|
||||
done = 0;
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
}
|
||||
|
||||
if(done)
|
||||
286: 22 23 and r18, r18
|
||||
288: 19 f4 brne .+6 ; 0x290 <__vector_11+0x4a>
|
||||
28a: 06 c0 rjmp .+12 ; 0x298 <__vector_11+0x52>
|
||||
if(servoCounter >= servoMotorRight)
|
||||
SERVO_PORT &= ~(1<<SERVO_MOTOR_RIGHT);
|
||||
else
|
||||
{
|
||||
done = 0;
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
28c: 00 00 nop
|
||||
28e: 04 c0 rjmp .+8 ; 0x298 <__vector_11+0x52>
|
||||
}
|
||||
|
||||
if(done)
|
||||
TCCR2 &= ~(1<<CS21); // Timer1 stop
|
||||
290: 87 b5 in r24, 0x27 ; 39
|
||||
292: 8d 7f andi r24, 0xFD ; 253
|
||||
294: 87 bd out 0x27, r24 ; 39
|
||||
296: 05 c0 rjmp .+10 ; 0x2a2 <__vector_11+0x5c>
|
||||
else
|
||||
{
|
||||
servoCounter++;
|
||||
298: 9f 5f subi r25, 0xFF ; 255
|
||||
29a: 90 93 2a 04 sts 0x042A, r25
|
||||
asm volatile("NOP"); // Correction for constant interrupt length
|
||||
29e: 00 00 nop
|
||||
asm volatile("NOP");
|
||||
2a0: 00 00 nop
|
||||
}
|
||||
TCNT2 = SERVO_TIMER;
|
||||
2a2: 8e ee ldi r24, 0xEE ; 238
|
||||
2a4: 83 bd out 0x23, r24 ; 35
|
||||
2a6: 9f 91 pop r25
|
||||
2a8: 8f 91 pop r24
|
||||
2aa: 2f 91 pop r18
|
||||
2ac: 0f 90 pop r0
|
||||
2ae: 0f be out 0x3f, r0 ; 63
|
||||
2b0: 0f 90 pop r0
|
||||
2b2: 1f 90 pop r1
|
||||
2b4: 18 95 reti
|
||||
|
||||
000002b6 <activateRobot>:
|
||||
Description:
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void activateRobot(uint8_t mode)
|
||||
{
|
||||
2b6: 1f 93 push r17
|
||||
2b8: 18 2f mov r17, r24
|
||||
lcdSetLayout(0);
|
||||
2ba: 80 e0 ldi r24, 0x00 ; 0
|
||||
2bc: 0e 94 a8 07 call 0xf50 ; 0xf50 <lcdSetLayout>
|
||||
lcdWriteStringP(menuTable[mode]);
|
||||
2c0: 81 e3 ldi r24, 0x31 ; 49
|
||||
2c2: 18 9f mul r17, r24
|
||||
2c4: c0 01 movw r24, r0
|
||||
2c6: 11 24 eor r1, r1
|
||||
2c8: 84 56 subi r24, 0x64 ; 100
|
||||
2ca: 9f 4f sbci r25, 0xFF ; 255
|
||||
2cc: 0e 94 2d 08 call 0x105a ; 0x105a <lcdWriteStringP>
|
||||
|
||||
progTimer = 200;
|
||||
2d0: 88 ec ldi r24, 0xC8 ; 200
|
||||
2d2: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
roboActive = mode;
|
||||
2d6: 10 93 3b 04 sts 0x043B, r17
|
||||
2da: 1f 91 pop r17
|
||||
2dc: 08 95 ret
|
||||
|
||||
000002de <deactivateRobot>:
|
||||
Description:
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void deactivateRobot(void)
|
||||
{
|
||||
2de: 10 92 3b 04 sts 0x043B, r1
|
||||
roboActive = 0;
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
2e2: 87 e7 ldi r24, 0x77 ; 119
|
||||
2e4: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
2e8: 80 93 05 04 sts 0x0405, r24
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
2ec: 8c e8 ldi r24, 0x8C ; 140
|
||||
2ee: 80 93 03 04 sts 0x0403, r24
|
||||
|
||||
rfIdDisable();
|
||||
2f2: 0e 94 bb 09 call 0x1376 ; 0x1376 <rfIdDisable>
|
||||
2f6: 08 95 ret
|
||||
|
||||
000002f8 <showDistanceOnLCD>:
|
||||
Description:
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void showDistanceOnLCD(uint16_t distance, uint8_t mode, uint8_t position)
|
||||
{
|
||||
2f8: 1f 93 push r17
|
||||
2fa: cf 93 push r28
|
||||
2fc: df 93 push r29
|
||||
2fe: ec 01 movw r28, r24
|
||||
300: 16 2f mov r17, r22
|
||||
if(position == 1)
|
||||
302: 41 30 cpi r20, 0x01 ; 1
|
||||
304: 11 f4 brne .+4 ; 0x30a <showDistanceOnLCD+0x12>
|
||||
lcdSetPos(0x00);
|
||||
306: 80 e0 ldi r24, 0x00 ; 0
|
||||
308: 07 c0 rjmp .+14 ; 0x318 <showDistanceOnLCD+0x20>
|
||||
else if(position == 2)
|
||||
30a: 42 30 cpi r20, 0x02 ; 2
|
||||
30c: 11 f4 brne .+4 ; 0x312 <showDistanceOnLCD+0x1a>
|
||||
lcdSetPos(0x10);
|
||||
30e: 80 e1 ldi r24, 0x10 ; 16
|
||||
310: 03 c0 rjmp .+6 ; 0x318 <showDistanceOnLCD+0x20>
|
||||
else if(position == 3)
|
||||
312: 43 30 cpi r20, 0x03 ; 3
|
||||
314: 19 f4 brne .+6 ; 0x31c <showDistanceOnLCD+0x24>
|
||||
lcdSetPos(0x20);
|
||||
316: 80 e2 ldi r24, 0x20 ; 32
|
||||
318: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
|
||||
if(mode == 0) // Both arrow pointing in
|
||||
31c: 11 23 and r17, r17
|
||||
31e: b9 f5 brne .+110 ; 0x38e <showDistanceOnLCD+0x96>
|
||||
{
|
||||
if(distance > 32000)
|
||||
320: 8d e7 ldi r24, 0x7D ; 125
|
||||
322: c1 30 cpi r28, 0x01 ; 1
|
||||
324: d8 07 cpc r29, r24
|
||||
326: c8 f5 brcc .+114 ; 0x39a <showDistanceOnLCD+0xa2>
|
||||
{
|
||||
lcdWriteString(" ");
|
||||
}
|
||||
else if(distance > 16000)
|
||||
328: 8e e3 ldi r24, 0x3E ; 62
|
||||
32a: c1 38 cpi r28, 0x81 ; 129
|
||||
32c: d8 07 cpc r29, r24
|
||||
32e: 18 f0 brcs .+6 ; 0x336 <showDistanceOnLCD+0x3e>
|
||||
{
|
||||
lcdWriteString("> <");
|
||||
330: 81 e1 ldi r24, 0x11 ; 17
|
||||
332: 91 e0 ldi r25, 0x01 ; 1
|
||||
334: ca c0 rjmp .+404 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 8000)
|
||||
336: 8f e1 ldi r24, 0x1F ; 31
|
||||
338: c1 34 cpi r28, 0x41 ; 65
|
||||
33a: d8 07 cpc r29, r24
|
||||
33c: 18 f0 brcs .+6 ; 0x344 <showDistanceOnLCD+0x4c>
|
||||
{
|
||||
lcdWriteString(">> <<");
|
||||
33e: 82 e2 ldi r24, 0x22 ; 34
|
||||
340: 91 e0 ldi r25, 0x01 ; 1
|
||||
342: c3 c0 rjmp .+390 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 4000)
|
||||
344: 8f e0 ldi r24, 0x0F ; 15
|
||||
346: c1 3a cpi r28, 0xA1 ; 161
|
||||
348: d8 07 cpc r29, r24
|
||||
34a: 18 f0 brcs .+6 ; 0x352 <showDistanceOnLCD+0x5a>
|
||||
{
|
||||
lcdWriteString(">>> <<<");
|
||||
34c: 83 e3 ldi r24, 0x33 ; 51
|
||||
34e: 91 e0 ldi r25, 0x01 ; 1
|
||||
350: bc c0 rjmp .+376 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 2000)
|
||||
352: 87 e0 ldi r24, 0x07 ; 7
|
||||
354: c1 3d cpi r28, 0xD1 ; 209
|
||||
356: d8 07 cpc r29, r24
|
||||
358: 18 f0 brcs .+6 ; 0x360 <showDistanceOnLCD+0x68>
|
||||
{
|
||||
lcdWriteString(">>>> <<<<");
|
||||
35a: 84 e4 ldi r24, 0x44 ; 68
|
||||
35c: 91 e0 ldi r25, 0x01 ; 1
|
||||
35e: b5 c0 rjmp .+362 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 1000)
|
||||
360: 83 e0 ldi r24, 0x03 ; 3
|
||||
362: c9 3e cpi r28, 0xE9 ; 233
|
||||
364: d8 07 cpc r29, r24
|
||||
366: 18 f0 brcs .+6 ; 0x36e <showDistanceOnLCD+0x76>
|
||||
{
|
||||
lcdWriteString(">>>>> <<<<<");
|
||||
368: 85 e5 ldi r24, 0x55 ; 85
|
||||
36a: 91 e0 ldi r25, 0x01 ; 1
|
||||
36c: ae c0 rjmp .+348 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 500)
|
||||
36e: 81 e0 ldi r24, 0x01 ; 1
|
||||
370: c5 3f cpi r28, 0xF5 ; 245
|
||||
372: d8 07 cpc r29, r24
|
||||
374: 18 f0 brcs .+6 ; 0x37c <showDistanceOnLCD+0x84>
|
||||
{
|
||||
lcdWriteString(">>>>>> <<<<<<");
|
||||
376: 86 e6 ldi r24, 0x66 ; 102
|
||||
378: 91 e0 ldi r25, 0x01 ; 1
|
||||
37a: a7 c0 rjmp .+334 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 100)
|
||||
37c: c5 36 cpi r28, 0x65 ; 101
|
||||
37e: d1 05 cpc r29, r1
|
||||
380: 18 f0 brcs .+6 ; 0x388 <showDistanceOnLCD+0x90>
|
||||
{
|
||||
lcdWriteString(">>>>>>> <<<<<<<");
|
||||
382: 87 e7 ldi r24, 0x77 ; 119
|
||||
384: 91 e0 ldi r25, 0x01 ; 1
|
||||
386: a1 c0 rjmp .+322 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdWriteString(">>>>>>>[]<<<<<<<");
|
||||
388: 88 e8 ldi r24, 0x88 ; 136
|
||||
38a: 91 e0 ldi r25, 0x01 ; 1
|
||||
38c: 9e c0 rjmp .+316 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
}
|
||||
else if(mode == 1) // Both arrow pointing Out
|
||||
38e: 11 30 cpi r17, 0x01 ; 1
|
||||
390: d1 f5 brne .+116 ; 0x406 <showDistanceOnLCD+0x10e>
|
||||
{
|
||||
if(distance > 32000)
|
||||
392: 8d e7 ldi r24, 0x7D ; 125
|
||||
394: c1 30 cpi r28, 0x01 ; 1
|
||||
396: d8 07 cpc r29, r24
|
||||
398: 18 f0 brcs .+6 ; 0x3a0 <showDistanceOnLCD+0xa8>
|
||||
{
|
||||
lcdWriteString(" ");
|
||||
39a: 80 e0 ldi r24, 0x00 ; 0
|
||||
39c: 91 e0 ldi r25, 0x01 ; 1
|
||||
39e: 95 c0 rjmp .+298 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 16000)
|
||||
3a0: 8e e3 ldi r24, 0x3E ; 62
|
||||
3a2: c1 38 cpi r28, 0x81 ; 129
|
||||
3a4: d8 07 cpc r29, r24
|
||||
3a6: 18 f0 brcs .+6 ; 0x3ae <showDistanceOnLCD+0xb6>
|
||||
{
|
||||
lcdWriteString(" < > ");
|
||||
3a8: 89 e9 ldi r24, 0x99 ; 153
|
||||
3aa: 91 e0 ldi r25, 0x01 ; 1
|
||||
3ac: 8e c0 rjmp .+284 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 8000)
|
||||
3ae: 8f e1 ldi r24, 0x1F ; 31
|
||||
3b0: c1 34 cpi r28, 0x41 ; 65
|
||||
3b2: d8 07 cpc r29, r24
|
||||
3b4: 18 f0 brcs .+6 ; 0x3bc <showDistanceOnLCD+0xc4>
|
||||
{
|
||||
lcdWriteString(" << >> ");
|
||||
3b6: 8a ea ldi r24, 0xAA ; 170
|
||||
3b8: 91 e0 ldi r25, 0x01 ; 1
|
||||
3ba: 87 c0 rjmp .+270 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 4000)
|
||||
3bc: 8f e0 ldi r24, 0x0F ; 15
|
||||
3be: c1 3a cpi r28, 0xA1 ; 161
|
||||
3c0: d8 07 cpc r29, r24
|
||||
3c2: 18 f0 brcs .+6 ; 0x3ca <showDistanceOnLCD+0xd2>
|
||||
{
|
||||
lcdWriteString(" <<< >>> ");
|
||||
3c4: 8b eb ldi r24, 0xBB ; 187
|
||||
3c6: 91 e0 ldi r25, 0x01 ; 1
|
||||
3c8: 80 c0 rjmp .+256 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 2000)
|
||||
3ca: 87 e0 ldi r24, 0x07 ; 7
|
||||
3cc: c1 3d cpi r28, 0xD1 ; 209
|
||||
3ce: d8 07 cpc r29, r24
|
||||
3d0: 18 f0 brcs .+6 ; 0x3d8 <showDistanceOnLCD+0xe0>
|
||||
{
|
||||
lcdWriteString(" <<<< >>>> ");
|
||||
3d2: 8c ec ldi r24, 0xCC ; 204
|
||||
3d4: 91 e0 ldi r25, 0x01 ; 1
|
||||
3d6: 79 c0 rjmp .+242 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 1000)
|
||||
3d8: 83 e0 ldi r24, 0x03 ; 3
|
||||
3da: c9 3e cpi r28, 0xE9 ; 233
|
||||
3dc: d8 07 cpc r29, r24
|
||||
3de: 18 f0 brcs .+6 ; 0x3e6 <showDistanceOnLCD+0xee>
|
||||
{
|
||||
lcdWriteString(" <<<<< >>>>> ");
|
||||
3e0: 8d ed ldi r24, 0xDD ; 221
|
||||
3e2: 91 e0 ldi r25, 0x01 ; 1
|
||||
3e4: 72 c0 rjmp .+228 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 500)
|
||||
3e6: 81 e0 ldi r24, 0x01 ; 1
|
||||
3e8: c5 3f cpi r28, 0xF5 ; 245
|
||||
3ea: d8 07 cpc r29, r24
|
||||
3ec: 18 f0 brcs .+6 ; 0x3f4 <showDistanceOnLCD+0xfc>
|
||||
{
|
||||
lcdWriteString(" <<<<<< >>>>>> ");
|
||||
3ee: 8e ee ldi r24, 0xEE ; 238
|
||||
3f0: 91 e0 ldi r25, 0x01 ; 1
|
||||
3f2: 6b c0 rjmp .+214 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 100)
|
||||
3f4: c5 36 cpi r28, 0x65 ; 101
|
||||
3f6: d1 05 cpc r29, r1
|
||||
3f8: 18 f0 brcs .+6 ; 0x400 <showDistanceOnLCD+0x108>
|
||||
{
|
||||
lcdWriteString("<<<<<<< >>>>>>>");
|
||||
3fa: 8f ef ldi r24, 0xFF ; 255
|
||||
3fc: 91 e0 ldi r25, 0x01 ; 1
|
||||
3fe: 65 c0 rjmp .+202 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdWriteString("<<<<<<<[]>>>>>>>");
|
||||
400: 80 e1 ldi r24, 0x10 ; 16
|
||||
402: 92 e0 ldi r25, 0x02 ; 2
|
||||
404: 62 c0 rjmp .+196 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
}
|
||||
else if(mode == 2) // Left arrow pointing out.
|
||||
406: 12 30 cpi r17, 0x02 ; 2
|
||||
408: 71 f5 brne .+92 ; 0x466 <showDistanceOnLCD+0x16e>
|
||||
{
|
||||
if(distance > 6400)
|
||||
40a: 89 e1 ldi r24, 0x19 ; 25
|
||||
40c: c1 30 cpi r28, 0x01 ; 1
|
||||
40e: d8 07 cpc r29, r24
|
||||
410: 18 f0 brcs .+6 ; 0x418 <showDistanceOnLCD+0x120>
|
||||
{
|
||||
lcdWriteString("<<<<<<< ");
|
||||
412: 81 e2 ldi r24, 0x21 ; 33
|
||||
414: 92 e0 ldi r25, 0x02 ; 2
|
||||
416: 59 c0 rjmp .+178 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 3200)
|
||||
418: 8c e0 ldi r24, 0x0C ; 12
|
||||
41a: c1 38 cpi r28, 0x81 ; 129
|
||||
41c: d8 07 cpc r29, r24
|
||||
41e: 18 f0 brcs .+6 ; 0x426 <showDistanceOnLCD+0x12e>
|
||||
{
|
||||
lcdWriteString(" <<<<<< ");
|
||||
420: 82 e3 ldi r24, 0x32 ; 50
|
||||
422: 92 e0 ldi r25, 0x02 ; 2
|
||||
424: 52 c0 rjmp .+164 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 1600)
|
||||
426: 86 e0 ldi r24, 0x06 ; 6
|
||||
428: c1 34 cpi r28, 0x41 ; 65
|
||||
42a: d8 07 cpc r29, r24
|
||||
42c: 18 f0 brcs .+6 ; 0x434 <showDistanceOnLCD+0x13c>
|
||||
{
|
||||
lcdWriteString(" <<<<< ");
|
||||
42e: 83 e4 ldi r24, 0x43 ; 67
|
||||
430: 92 e0 ldi r25, 0x02 ; 2
|
||||
432: 4b c0 rjmp .+150 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 800)
|
||||
434: 83 e0 ldi r24, 0x03 ; 3
|
||||
436: c1 32 cpi r28, 0x21 ; 33
|
||||
438: d8 07 cpc r29, r24
|
||||
43a: 18 f0 brcs .+6 ; 0x442 <showDistanceOnLCD+0x14a>
|
||||
{
|
||||
lcdWriteString(" <<<< ");
|
||||
43c: 84 e5 ldi r24, 0x54 ; 84
|
||||
43e: 92 e0 ldi r25, 0x02 ; 2
|
||||
440: 44 c0 rjmp .+136 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 400)
|
||||
442: 81 e0 ldi r24, 0x01 ; 1
|
||||
444: c1 39 cpi r28, 0x91 ; 145
|
||||
446: d8 07 cpc r29, r24
|
||||
448: 18 f0 brcs .+6 ; 0x450 <showDistanceOnLCD+0x158>
|
||||
{
|
||||
lcdWriteString(" <<< ");
|
||||
44a: 85 e6 ldi r24, 0x65 ; 101
|
||||
44c: 92 e0 ldi r25, 0x02 ; 2
|
||||
44e: 3d c0 rjmp .+122 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 200)
|
||||
450: c9 3c cpi r28, 0xC9 ; 201
|
||||
452: d1 05 cpc r29, r1
|
||||
454: 18 f0 brcs .+6 ; 0x45c <showDistanceOnLCD+0x164>
|
||||
{
|
||||
lcdWriteString(" << ");
|
||||
456: 86 e7 ldi r24, 0x76 ; 118
|
||||
458: 92 e0 ldi r25, 0x02 ; 2
|
||||
45a: 37 c0 rjmp .+110 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 30)
|
||||
45c: 6f 97 sbiw r28, 0x1f ; 31
|
||||
45e: 98 f1 brcs .+102 ; 0x4c6 <showDistanceOnLCD+0x1ce>
|
||||
{
|
||||
lcdWriteString(" < ");
|
||||
460: 87 e8 ldi r24, 0x87 ; 135
|
||||
462: 92 e0 ldi r25, 0x02 ; 2
|
||||
464: 32 c0 rjmp .+100 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
else
|
||||
{
|
||||
lcdWriteString(" [] ");
|
||||
}
|
||||
}
|
||||
else if(mode == 3) // Right arrow pointing out.
|
||||
466: 13 30 cpi r17, 0x03 ; 3
|
||||
468: 91 f5 brne .+100 ; 0x4ce <showDistanceOnLCD+0x1d6>
|
||||
{
|
||||
if(distance > 6400)
|
||||
46a: 89 e1 ldi r24, 0x19 ; 25
|
||||
46c: c1 30 cpi r28, 0x01 ; 1
|
||||
46e: d8 07 cpc r29, r24
|
||||
470: 18 f0 brcs .+6 ; 0x478 <showDistanceOnLCD+0x180>
|
||||
{
|
||||
lcdWriteString(" >>>>>>>");
|
||||
472: 89 ea ldi r24, 0xA9 ; 169
|
||||
474: 92 e0 ldi r25, 0x02 ; 2
|
||||
476: 29 c0 rjmp .+82 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 3200)
|
||||
478: 8c e0 ldi r24, 0x0C ; 12
|
||||
47a: c1 38 cpi r28, 0x81 ; 129
|
||||
47c: d8 07 cpc r29, r24
|
||||
47e: 18 f0 brcs .+6 ; 0x486 <showDistanceOnLCD+0x18e>
|
||||
{
|
||||
lcdWriteString(" >>>>>> ");
|
||||
480: 8a eb ldi r24, 0xBA ; 186
|
||||
482: 92 e0 ldi r25, 0x02 ; 2
|
||||
484: 22 c0 rjmp .+68 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 1600)
|
||||
486: 86 e0 ldi r24, 0x06 ; 6
|
||||
488: c1 34 cpi r28, 0x41 ; 65
|
||||
48a: d8 07 cpc r29, r24
|
||||
48c: 18 f0 brcs .+6 ; 0x494 <showDistanceOnLCD+0x19c>
|
||||
{
|
||||
lcdWriteString(" >>>>> ");
|
||||
48e: 8b ec ldi r24, 0xCB ; 203
|
||||
490: 92 e0 ldi r25, 0x02 ; 2
|
||||
492: 1b c0 rjmp .+54 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 800)
|
||||
494: 83 e0 ldi r24, 0x03 ; 3
|
||||
496: c1 32 cpi r28, 0x21 ; 33
|
||||
498: d8 07 cpc r29, r24
|
||||
49a: 18 f0 brcs .+6 ; 0x4a2 <showDistanceOnLCD+0x1aa>
|
||||
{
|
||||
lcdWriteString(" >>>> ");
|
||||
49c: 8c ed ldi r24, 0xDC ; 220
|
||||
49e: 92 e0 ldi r25, 0x02 ; 2
|
||||
4a0: 14 c0 rjmp .+40 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 400)
|
||||
4a2: 81 e0 ldi r24, 0x01 ; 1
|
||||
4a4: c1 39 cpi r28, 0x91 ; 145
|
||||
4a6: d8 07 cpc r29, r24
|
||||
4a8: 18 f0 brcs .+6 ; 0x4b0 <showDistanceOnLCD+0x1b8>
|
||||
{
|
||||
lcdWriteString(" >>> ");
|
||||
4aa: 8d ee ldi r24, 0xED ; 237
|
||||
4ac: 92 e0 ldi r25, 0x02 ; 2
|
||||
4ae: 0d c0 rjmp .+26 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 200)
|
||||
4b0: c9 3c cpi r28, 0xC9 ; 201
|
||||
4b2: d1 05 cpc r29, r1
|
||||
4b4: 18 f0 brcs .+6 ; 0x4bc <showDistanceOnLCD+0x1c4>
|
||||
{
|
||||
lcdWriteString(" >> ");
|
||||
4b6: 8e ef ldi r24, 0xFE ; 254
|
||||
4b8: 92 e0 ldi r25, 0x02 ; 2
|
||||
4ba: 07 c0 rjmp .+14 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else if(distance > 30)
|
||||
4bc: 6f 97 sbiw r28, 0x1f ; 31
|
||||
4be: 18 f0 brcs .+6 ; 0x4c6 <showDistanceOnLCD+0x1ce>
|
||||
{
|
||||
lcdWriteString(" > ");
|
||||
4c0: 8f e0 ldi r24, 0x0F ; 15
|
||||
4c2: 93 e0 ldi r25, 0x03 ; 3
|
||||
4c4: 02 c0 rjmp .+4 ; 0x4ca <showDistanceOnLCD+0x1d2>
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdWriteString(" [] ");
|
||||
4c6: 88 e9 ldi r24, 0x98 ; 152
|
||||
4c8: 92 e0 ldi r25, 0x02 ; 2
|
||||
4ca: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
4ce: df 91 pop r29
|
||||
4d0: cf 91 pop r28
|
||||
4d2: 1f 91 pop r17
|
||||
4d4: 08 95 ret
|
||||
|
||||
000004d6 <checkCommunication>:
|
||||
|
||||
Description: Check for incoming data packets.
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void checkCommunication(void){
|
||||
4d6: 0f 93 push r16
|
||||
4d8: 1f 93 push r17
|
||||
|
||||
|
||||
if (rfIdGetTagPresent())
|
||||
4da: 0e 94 6d 09 call 0x12da ; 0x12da <rfIdGetTagPresent>
|
||||
4de: 88 23 and r24, r24
|
||||
4e0: 61 f0 breq .+24 ; 0x4fa <checkCommunication+0x24>
|
||||
{
|
||||
uint8_t *tempPointer = rfIdGetTag();
|
||||
4e2: 0e 94 64 09 call 0x12c8 ; 0x12c8 <rfIdGetTag>
|
||||
4e6: 8c 01 movw r16, r24
|
||||
|
||||
lcdSetPos(0x13);
|
||||
4e8: 83 e1 ldi r24, 0x13 ; 19
|
||||
4ea: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString(tempPointer);
|
||||
4ee: c8 01 movw r24, r16
|
||||
4f0: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
roboMSPSetData(tempPointer);
|
||||
4f4: c8 01 movw r24, r16
|
||||
4f6: 0e 94 13 0a call 0x1426 ; 0x1426 <roboMSPSetData>
|
||||
|
||||
}
|
||||
|
||||
switch (roboMSPGetActiveStatus())
|
||||
4fa: 0e 94 c3 09 call 0x1386 ; 0x1386 <roboMSPGetActiveStatus>
|
||||
4fe: 83 30 cpi r24, 0x03 ; 3
|
||||
500: 61 f0 breq .+24 ; 0x51a <__stack+0x1b>
|
||||
502: 84 30 cpi r24, 0x04 ; 4
|
||||
504: 18 f4 brcc .+6 ; 0x50c <__stack+0xd>
|
||||
506: 82 30 cpi r24, 0x02 ; 2
|
||||
508: 99 f4 brne .+38 ; 0x530 <__stack+0x31>
|
||||
50a: 05 c0 rjmp .+10 ; 0x516 <__stack+0x17>
|
||||
50c: 84 30 cpi r24, 0x04 ; 4
|
||||
50e: 59 f0 breq .+22 ; 0x526 <__stack+0x27>
|
||||
510: 85 30 cpi r24, 0x05 ; 5
|
||||
512: 71 f4 brne .+28 ; 0x530 <__stack+0x31>
|
||||
514: 0b c0 rjmp .+22 ; 0x52c <__stack+0x2d>
|
||||
{
|
||||
case ACTIVATE_P1:
|
||||
activateRobot(1);
|
||||
516: 81 e0 ldi r24, 0x01 ; 1
|
||||
518: 01 c0 rjmp .+2 ; 0x51c <__stack+0x1d>
|
||||
rfIdEnable();
|
||||
break;
|
||||
|
||||
case ACTIVATE_P2:
|
||||
activateRobot(2);
|
||||
51a: 82 e0 ldi r24, 0x02 ; 2
|
||||
51c: 0e 94 5b 01 call 0x2b6 ; 0x2b6 <activateRobot>
|
||||
rfIdEnable();
|
||||
520: 0e 94 bf 09 call 0x137e ; 0x137e <rfIdEnable>
|
||||
524: 05 c0 rjmp .+10 ; 0x530 <__stack+0x31>
|
||||
break;
|
||||
|
||||
case DEACTIVATE:
|
||||
deactivateRobot();
|
||||
526: 0e 94 6f 01 call 0x2de ; 0x2de <deactivateRobot>
|
||||
52a: 02 c0 rjmp .+4 ; 0x530 <__stack+0x31>
|
||||
break;
|
||||
|
||||
case ACK:
|
||||
rfIdClearBuffer();
|
||||
52c: 0e 94 69 09 call 0x12d2 ; 0x12d2 <rfIdClearBuffer>
|
||||
530: 1f 91 pop r17
|
||||
532: 0f 91 pop r16
|
||||
534: 08 95 ret
|
||||
|
||||
00000536 <updateProgram>:
|
||||
Description:
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void updateProgram(void)
|
||||
{
|
||||
536: 1f 93 push r17
|
||||
// Check radio communication
|
||||
if(rfEnable)
|
||||
538: 80 91 3c 04 lds r24, 0x043C
|
||||
53c: 88 23 and r24, r24
|
||||
53e: 11 f0 breq .+4 ; 0x544 <updateProgram+0xe>
|
||||
checkCommunication();
|
||||
540: 0e 94 6b 02 call 0x4d6 ; 0x4d6 <checkCommunication>
|
||||
|
||||
// Program for robot AI
|
||||
if (roboActive == 1)
|
||||
544: 80 91 3b 04 lds r24, 0x043B
|
||||
548: 81 30 cpi r24, 0x01 ; 1
|
||||
54a: 09 f0 breq .+2 ; 0x54e <updateProgram+0x18>
|
||||
54c: 1e c3 rjmp .+1596 ; 0xb8a <updateProgram+0x654>
|
||||
{
|
||||
// Program(2) for random RFID serach
|
||||
if (++progCounter >= progTimer)
|
||||
54e: 80 91 2d 04 lds r24, 0x042D
|
||||
552: 8f 5f subi r24, 0xFF ; 255
|
||||
554: 80 93 2d 04 sts 0x042D, r24
|
||||
558: 90 91 2e 04 lds r25, 0x042E
|
||||
55c: 89 17 cp r24, r25
|
||||
55e: 08 f4 brcc .+2 ; 0x562 <updateProgram+0x2c>
|
||||
560: 14 c3 rjmp .+1576 ; 0xb8a <updateProgram+0x654>
|
||||
{
|
||||
switch (progPosition)
|
||||
562: 80 91 2f 04 lds r24, 0x042F
|
||||
566: e8 2f mov r30, r24
|
||||
568: f0 e0 ldi r31, 0x00 ; 0
|
||||
56a: e6 31 cpi r30, 0x16 ; 22
|
||||
56c: f1 05 cpc r31, r1
|
||||
56e: 08 f0 brcs .+2 ; 0x572 <updateProgram+0x3c>
|
||||
570: 0a c3 rjmp .+1556 ; 0xb86 <updateProgram+0x650>
|
||||
572: e8 5c subi r30, 0xC8 ; 200
|
||||
574: ff 4f sbci r31, 0xFF ; 255
|
||||
576: ee 0f add r30, r30
|
||||
578: ff 1f adc r31, r31
|
||||
57a: 05 90 lpm r0, Z+
|
||||
57c: f4 91 lpm r31, Z
|
||||
57e: e0 2d mov r30, r0
|
||||
580: 09 94 ijmp
|
||||
{
|
||||
case 0:
|
||||
// Kör frammåt
|
||||
lcdClearDisplay();
|
||||
582: 0e 94 df 07 call 0xfbe ; 0xfbe <lcdClearDisplay>
|
||||
lcdSetLayout(1);
|
||||
586: 81 e0 ldi r24, 0x01 ; 1
|
||||
588: 0e 94 a8 07 call 0xf50 ; 0xf50 <lcdSetLayout>
|
||||
58c: a5 c1 rjmp .+842 ; 0x8d8 <updateProgram+0x3a2>
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
// Kör frammåt till dess att avståndet mot väggen är 1meter
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
58e: 8f e7 ldi r24, 0x7F ; 127
|
||||
590: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
594: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
pingSendPing();
|
||||
598: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 4;
|
||||
59c: 84 e0 ldi r24, 0x04 ; 4
|
||||
59e: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
5a2: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
5a6: 88 23 and r24, r24
|
||||
5a8: 09 f4 brne .+2 ; 0x5ac <updateProgram+0x76>
|
||||
5aa: ed c2 rjmp .+1498 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
5ac: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
5b0: 90 93 32 04 sts 0x0432, r25
|
||||
5b4: 80 93 31 04 sts 0x0431, r24
|
||||
|
||||
if(tempDistance < DISTANCE_ONE_METER)
|
||||
5b8: 27 e1 ldi r18, 0x17 ; 23
|
||||
5ba: 80 37 cpi r24, 0x70 ; 112
|
||||
5bc: 92 07 cpc r25, r18
|
||||
5be: 38 f4 brcc .+14 ; 0x5ce <updateProgram+0x98>
|
||||
{
|
||||
showDistanceOnLCD(0,0,2);
|
||||
5c0: 42 e0 ldi r20, 0x02 ; 2
|
||||
5c2: 60 e0 ldi r22, 0x00 ; 0
|
||||
5c4: 80 e0 ldi r24, 0x00 ; 0
|
||||
5c6: 90 e0 ldi r25, 0x00 ; 0
|
||||
5c8: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
5cc: af c1 rjmp .+862 ; 0x92c <updateProgram+0x3f6>
|
||||
progTimer = 1;
|
||||
progPosition++;
|
||||
}
|
||||
else
|
||||
{
|
||||
showDistanceOnLCD(tempDistance-DISTANCE_ONE_METER,0,2);
|
||||
5ce: 42 e0 ldi r20, 0x02 ; 2
|
||||
5d0: 60 e0 ldi r22, 0x00 ; 0
|
||||
5d2: 80 57 subi r24, 0x70 ; 112
|
||||
5d4: 97 41 sbci r25, 0x17 ; 23
|
||||
5d6: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
5da: d5 c2 rjmp .+1450 ; 0xb86 <updateProgram+0x650>
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
// Bromsa (backa något)
|
||||
lcdSetPos(0x00);
|
||||
5dc: 80 e0 ldi r24, 0x00 ; 0
|
||||
5de: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: STOP ");
|
||||
5e2: 81 e3 ldi r24, 0x31 ; 49
|
||||
5e4: 93 e0 ldi r25, 0x03 ; 3
|
||||
5e6: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
// Stop and breake
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE;
|
||||
5ea: 8c e6 ldi r24, 0x6C ; 108
|
||||
5ec: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE;
|
||||
5f0: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 40;
|
||||
5f4: 88 e2 ldi r24, 0x28 ; 40
|
||||
5f6: 7d c1 rjmp .+762 ; 0x8f2 <updateProgram+0x3bc>
|
||||
break;
|
||||
|
||||
case 3:
|
||||
// Stanna
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
5f8: 87 e7 ldi r24, 0x77 ; 119
|
||||
5fa: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
5fe: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 1;
|
||||
602: 81 e0 ldi r24, 0x01 ; 1
|
||||
604: 80 93 2e 04 sts 0x042E, r24
|
||||
regulatorMeasureCounter = 0;
|
||||
608: 10 92 42 04 sts 0x0442, r1
|
||||
progPosition++;
|
||||
60c: 84 e0 ldi r24, 0x04 ; 4
|
||||
60e: b9 c2 rjmp .+1394 ; 0xb82 <updateProgram+0x64c>
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
// Vrid servo 45grader vänster (från centrum)
|
||||
servoPing = SERVO_POS_LEFT_45;
|
||||
610: 8e ea ldi r24, 0xAE ; 174
|
||||
612: 80 93 03 04 sts 0x0403, r24
|
||||
progTimer = 20;
|
||||
616: 84 e1 ldi r24, 0x14 ; 20
|
||||
618: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition++;
|
||||
61c: 85 e0 ldi r24, 0x05 ; 5
|
||||
61e: b1 c2 rjmp .+1378 ; 0xb82 <updateProgram+0x64c>
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
// Mät och spara avstånd
|
||||
pingSendPing();
|
||||
620: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 4;
|
||||
624: 84 e0 ldi r24, 0x04 ; 4
|
||||
626: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
62a: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
62e: 88 23 and r24, r24
|
||||
630: 09 f4 brne .+2 ; 0x634 <updateProgram+0xfe>
|
||||
632: a9 c2 rjmp .+1362 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
tempLeftDistance = pingGetDistance();
|
||||
634: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
638: 90 93 38 04 sts 0x0438, r25
|
||||
63c: 80 93 37 04 sts 0x0437, r24
|
||||
640: 75 c1 rjmp .+746 ; 0x92c <updateProgram+0x3f6>
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
// Vrid servo 45grader höger (från centrum)
|
||||
servoPing = SERVO_POS_RIGHT_45;
|
||||
642: 87 e6 ldi r24, 0x67 ; 103
|
||||
644: 80 93 03 04 sts 0x0403, r24
|
||||
progTimer = 40;
|
||||
648: 88 e2 ldi r24, 0x28 ; 40
|
||||
64a: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition++;
|
||||
64e: 87 e0 ldi r24, 0x07 ; 7
|
||||
650: 98 c2 rjmp .+1328 ; 0xb82 <updateProgram+0x64c>
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
// Mät och spara avstånd
|
||||
pingSendPing();
|
||||
652: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 4;
|
||||
656: 84 e0 ldi r24, 0x04 ; 4
|
||||
658: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
65c: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
660: 88 23 and r24, r24
|
||||
662: 09 f4 brne .+2 ; 0x666 <updateProgram+0x130>
|
||||
664: 90 c2 rjmp .+1312 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
tempRightDistance = pingGetDistance();
|
||||
666: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
66a: 90 93 3a 04 sts 0x043A, r25
|
||||
66e: 80 93 39 04 sts 0x0439, r24
|
||||
672: 5c c1 rjmp .+696 ; 0x92c <updateProgram+0x3f6>
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
674: 8c e8 ldi r24, 0x8C ; 140
|
||||
676: 80 93 03 04 sts 0x0403, r24
|
||||
|
||||
if(tempLeftDistance > tempRightDistance)
|
||||
67a: 20 91 37 04 lds r18, 0x0437
|
||||
67e: 30 91 38 04 lds r19, 0x0438
|
||||
682: 80 91 39 04 lds r24, 0x0439
|
||||
686: 90 91 3a 04 lds r25, 0x043A
|
||||
68a: 82 17 cp r24, r18
|
||||
68c: 93 07 cpc r25, r19
|
||||
68e: 18 f4 brcc .+6 ; 0x696 <updateProgram+0x160>
|
||||
{
|
||||
regulatorMode = 0; // Mäter åt höger
|
||||
690: 10 92 3f 04 sts 0x043F, r1
|
||||
694: 03 c0 rjmp .+6 ; 0x69c <updateProgram+0x166>
|
||||
}
|
||||
else
|
||||
{
|
||||
regulatorMode = 1; // Mäter åt vänster
|
||||
696: 81 e0 ldi r24, 0x01 ; 1
|
||||
698: 80 93 3f 04 sts 0x043F, r24
|
||||
}
|
||||
|
||||
progTimer = 50;
|
||||
69c: 82 e3 ldi r24, 0x32 ; 50
|
||||
69e: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition++;
|
||||
6a2: 89 e0 ldi r24, 0x09 ; 9
|
||||
6a4: 6e c2 rjmp .+1244 ; 0xb82 <updateProgram+0x64c>
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
// Mät och spara avstånd
|
||||
pingSendPing();
|
||||
6a6: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 4;
|
||||
6aa: 84 e0 ldi r24, 0x04 ; 4
|
||||
6ac: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
6b0: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
6b4: 88 23 and r24, r24
|
||||
6b6: 09 f4 brne .+2 ; 0x6ba <updateProgram+0x184>
|
||||
6b8: 66 c2 rjmp .+1228 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
6ba: 80 e0 ldi r24, 0x00 ; 0
|
||||
6bc: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Align to wall ");
|
||||
6c0: 82 e4 ldi r24, 0x42 ; 66
|
||||
6c2: 93 e0 ldi r25, 0x03 ; 3
|
||||
6c4: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
tempLastDistanceToWall = pingGetDistance();
|
||||
6c8: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
6cc: 90 93 36 04 sts 0x0436, r25
|
||||
6d0: 80 93 35 04 sts 0x0435, r24
|
||||
tempDistanceToWall = tempLastDistanceToWall;
|
||||
6d4: 90 93 34 04 sts 0x0434, r25
|
||||
6d8: 80 93 33 04 sts 0x0433, r24
|
||||
6dc: 27 c1 rjmp .+590 ; 0x92c <updateProgram+0x3f6>
|
||||
break;
|
||||
|
||||
case 10:
|
||||
// Reglera in sig vinkerät mot väggen
|
||||
// Vrider sig ett steg
|
||||
if (regulatorMode == 0) // Tittar höger
|
||||
6de: 80 91 3f 04 lds r24, 0x043F
|
||||
6e2: 88 23 and r24, r24
|
||||
6e4: 29 f4 brne .+10 ; 0x6f0 <updateProgram+0x1ba>
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
6e6: 86 e8 ldi r24, 0x86 ; 134
|
||||
6e8: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
6ec: 88 e6 ldi r24, 0x68 ; 104
|
||||
6ee: 06 c0 rjmp .+12 ; 0x6fc <updateProgram+0x1c6>
|
||||
progTimer = 7;
|
||||
}
|
||||
else if (regulatorMode == 1) // Tittar vänster
|
||||
6f0: 81 30 cpi r24, 0x01 ; 1
|
||||
6f2: 49 f4 brne .+18 ; 0x706 <updateProgram+0x1d0>
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
6f4: 88 e6 ldi r24, 0x68 ; 104
|
||||
6f6: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
6fa: 86 e8 ldi r24, 0x86 ; 134
|
||||
6fc: 80 93 05 04 sts 0x0405, r24
|
||||
progTimer = 7;
|
||||
700: 87 e0 ldi r24, 0x07 ; 7
|
||||
702: 80 93 2e 04 sts 0x042E, r24
|
||||
}
|
||||
|
||||
progPosition++;
|
||||
706: 8b e0 ldi r24, 0x0B ; 11
|
||||
708: 3c c2 rjmp .+1144 ; 0xb82 <updateProgram+0x64c>
|
||||
break;
|
||||
|
||||
case 11:
|
||||
// Reglera in sig vinkerät mot väggen
|
||||
// Kontrollerar avstånd
|
||||
pingSendPing();
|
||||
70a: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 4;
|
||||
70e: 84 e0 ldi r24, 0x04 ; 4
|
||||
710: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
714: 87 e7 ldi r24, 0x77 ; 119
|
||||
716: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
71a: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
if(pingGetReady())
|
||||
71e: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
722: 88 23 and r24, r24
|
||||
724: 09 f4 brne .+2 ; 0x728 <updateProgram+0x1f2>
|
||||
726: 2f c2 rjmp .+1118 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
728: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
72c: 90 93 32 04 sts 0x0432, r25
|
||||
730: 80 93 31 04 sts 0x0431, r24
|
||||
|
||||
if(tempDistance > tempLastDistanceToWall)
|
||||
734: 20 91 35 04 lds r18, 0x0435
|
||||
738: 30 91 36 04 lds r19, 0x0436
|
||||
73c: 28 17 cp r18, r24
|
||||
73e: 39 07 cpc r19, r25
|
||||
740: 70 f4 brcc .+28 ; 0x75e <updateProgram+0x228>
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
742: 80 e0 ldi r24, 0x00 ; 0
|
||||
744: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString(" ^-- (1m) --^ ");
|
||||
748: 83 e5 ldi r24, 0x53 ; 83
|
||||
74a: 93 e0 ldi r25, 0x03 ; 3
|
||||
74c: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
progTimer = 1;
|
||||
750: 81 e0 ldi r24, 0x01 ; 1
|
||||
752: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition++;
|
||||
756: 80 91 2f 04 lds r24, 0x042F
|
||||
75a: 8f 5f subi r24, 0xFF ; 255
|
||||
75c: 03 c0 rjmp .+6 ; 0x764 <updateProgram+0x22e>
|
||||
}
|
||||
else
|
||||
progPosition--;
|
||||
75e: 80 91 2f 04 lds r24, 0x042F
|
||||
762: 81 50 subi r24, 0x01 ; 1
|
||||
764: 80 93 2f 04 sts 0x042F, r24
|
||||
|
||||
tempLastDistanceToWall = tempDistance;
|
||||
768: 80 91 31 04 lds r24, 0x0431
|
||||
76c: 90 91 32 04 lds r25, 0x0432
|
||||
770: 90 93 36 04 sts 0x0436, r25
|
||||
774: 80 93 35 04 sts 0x0435, r24
|
||||
778: 06 c2 rjmp .+1036 ; 0xb86 <updateProgram+0x650>
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
// Reglera in position 1meter från väggen
|
||||
pingSendPing();
|
||||
77a: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 4;
|
||||
77e: 84 e0 ldi r24, 0x04 ; 4
|
||||
780: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
784: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
788: 88 23 and r24, r24
|
||||
78a: 09 f4 brne .+2 ; 0x78e <updateProgram+0x258>
|
||||
78c: fc c1 rjmp .+1016 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
78e: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
792: 9c 01 movw r18, r24
|
||||
794: 90 93 32 04 sts 0x0432, r25
|
||||
798: 80 93 31 04 sts 0x0431, r24
|
||||
|
||||
if(tempDistance > DISTANCE_ONE_METER)
|
||||
79c: 47 e1 ldi r20, 0x17 ; 23
|
||||
79e: 81 37 cpi r24, 0x71 ; 113
|
||||
7a0: 94 07 cpc r25, r20
|
||||
7a2: 28 f0 brcs .+10 ; 0x7ae <updateProgram+0x278>
|
||||
showDistanceOnLCD((tempDistance-DISTANCE_ONE_METER),0,2);
|
||||
7a4: 42 e0 ldi r20, 0x02 ; 2
|
||||
7a6: 60 e0 ldi r22, 0x00 ; 0
|
||||
7a8: 80 57 subi r24, 0x70 ; 112
|
||||
7aa: 97 41 sbci r25, 0x17 ; 23
|
||||
7ac: 06 c0 rjmp .+12 ; 0x7ba <updateProgram+0x284>
|
||||
else
|
||||
showDistanceOnLCD((DISTANCE_ONE_METER-tempDistance),1,2);
|
||||
7ae: 42 e0 ldi r20, 0x02 ; 2
|
||||
7b0: 61 e0 ldi r22, 0x01 ; 1
|
||||
7b2: 80 e7 ldi r24, 0x70 ; 112
|
||||
7b4: 97 e1 ldi r25, 0x17 ; 23
|
||||
7b6: 82 1b sub r24, r18
|
||||
7b8: 93 0b sbc r25, r19
|
||||
7ba: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
|
||||
if(tempDistance < (DISTANCE_ONE_METER - 200))
|
||||
7be: 80 91 31 04 lds r24, 0x0431
|
||||
7c2: 90 91 32 04 lds r25, 0x0432
|
||||
7c6: 26 e1 ldi r18, 0x16 ; 22
|
||||
7c8: 88 3a cpi r24, 0xA8 ; 168
|
||||
7ca: 92 07 cpc r25, r18
|
||||
7cc: 58 f4 brcc .+22 ; 0x7e4 <updateProgram+0x2ae>
|
||||
{
|
||||
// Kör frammåt (öka hastigheten långsamt)
|
||||
if(servoMotorLeft > SERVO_POS_MOTOR_RE_SOFT)
|
||||
7ce: 80 91 04 04 lds r24, 0x0404
|
||||
7d2: 83 37 cpi r24, 0x73 ; 115
|
||||
7d4: b0 f0 brcs .+44 ; 0x802 <updateProgram+0x2cc>
|
||||
{
|
||||
servoMotorLeft--;
|
||||
7d6: 81 50 subi r24, 0x01 ; 1
|
||||
7d8: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight--;
|
||||
7dc: 80 91 05 04 lds r24, 0x0405
|
||||
7e0: 81 50 subi r24, 0x01 ; 1
|
||||
7e2: 0d c0 rjmp .+26 ; 0x7fe <updateProgram+0x2c8>
|
||||
}
|
||||
|
||||
regulatorMeasureCounter = 0;
|
||||
}
|
||||
else if(tempDistance > (DISTANCE_ONE_METER + 200))
|
||||
7e4: 89 53 subi r24, 0x39 ; 57
|
||||
7e6: 98 41 sbci r25, 0x18 ; 24
|
||||
7e8: 78 f0 brcs .+30 ; 0x808 <updateProgram+0x2d2>
|
||||
{
|
||||
// Kör bakåt (öka hastigheten långsamt)
|
||||
if(servoMotorLeft < SERVO_POS_MOTOR_FW_SOFT)
|
||||
7ea: 80 91 04 04 lds r24, 0x0404
|
||||
7ee: 8f 37 cpi r24, 0x7F ; 127
|
||||
7f0: 40 f4 brcc .+16 ; 0x802 <updateProgram+0x2cc>
|
||||
{
|
||||
servoMotorLeft++;
|
||||
7f2: 8f 5f subi r24, 0xFF ; 255
|
||||
7f4: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight++;
|
||||
7f8: 80 91 05 04 lds r24, 0x0405
|
||||
7fc: 8f 5f subi r24, 0xFF ; 255
|
||||
7fe: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
}
|
||||
|
||||
regulatorMeasureCounter = 0;
|
||||
802: 10 92 42 04 sts 0x0442, r1
|
||||
806: bf c1 rjmp .+894 ; 0xb86 <updateProgram+0x650>
|
||||
}
|
||||
else
|
||||
{
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
808: 17 e7 ldi r17, 0x77 ; 119
|
||||
80a: 10 93 04 04 sts 0x0404, r17
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
80e: 10 93 05 04 sts 0x0405, r17
|
||||
|
||||
if(++regulatorMeasureCounter == 5)
|
||||
812: 80 91 42 04 lds r24, 0x0442
|
||||
816: 8f 5f subi r24, 0xFF ; 255
|
||||
818: 80 93 42 04 sts 0x0442, r24
|
||||
81c: 85 30 cpi r24, 0x05 ; 5
|
||||
81e: 09 f0 breq .+2 ; 0x822 <updateProgram+0x2ec>
|
||||
820: b2 c1 rjmp .+868 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
822: 80 e0 ldi r24, 0x00 ; 0
|
||||
824: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Posistion locked");
|
||||
828: 84 e6 ldi r24, 0x64 ; 100
|
||||
82a: 93 e0 ldi r25, 0x03 ; 3
|
||||
82c: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
830: 10 93 04 04 sts 0x0404, r17
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
834: 10 93 05 04 sts 0x0405, r17
|
||||
tempDistanceToWall = tempDistance;
|
||||
838: 80 91 31 04 lds r24, 0x0431
|
||||
83c: 90 91 32 04 lds r25, 0x0432
|
||||
840: 90 93 34 04 sts 0x0434, r25
|
||||
844: 80 93 33 04 sts 0x0433, r24
|
||||
progTimer = 50;
|
||||
848: 82 e3 ldi r24, 0x32 ; 50
|
||||
84a: 80 93 2e 04 sts 0x042E, r24
|
||||
regulatorMeasureCounter = 0;
|
||||
84e: 10 92 42 04 sts 0x0442, r1
|
||||
852: 86 c1 rjmp .+780 ; 0xb60 <updateProgram+0x62a>
|
||||
|
||||
break;
|
||||
|
||||
case 13:
|
||||
// Vrider 90grader
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
854: 8c e8 ldi r24, 0x8C ; 140
|
||||
856: 80 93 03 04 sts 0x0403, r24
|
||||
|
||||
if(tempLeftDistance > tempRightDistance)
|
||||
85a: 20 91 37 04 lds r18, 0x0437
|
||||
85e: 30 91 38 04 lds r19, 0x0438
|
||||
862: 80 91 39 04 lds r24, 0x0439
|
||||
866: 90 91 3a 04 lds r25, 0x043A
|
||||
86a: 82 17 cp r24, r18
|
||||
86c: 93 07 cpc r25, r19
|
||||
86e: 98 f4 brcc .+38 ; 0x896 <updateProgram+0x360>
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
870: 80 e0 ldi r24, 0x00 ; 0
|
||||
872: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: Turn < ");
|
||||
876: 85 e7 ldi r24, 0x75 ; 117
|
||||
878: 93 e0 ldi r25, 0x03 ; 3
|
||||
87a: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
87e: 88 e6 ldi r24, 0x68 ; 104
|
||||
880: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
884: 86 e8 ldi r24, 0x86 ; 134
|
||||
886: 80 93 05 04 sts 0x0405, r24
|
||||
servoPing = SERVO_POS_RIGHT_90;
|
||||
88a: 83 e4 ldi r24, 0x43 ; 67
|
||||
88c: 80 93 03 04 sts 0x0403, r24
|
||||
regulatorMode = 0; // Mäter åt höger
|
||||
890: 10 92 3f 04 sts 0x043F, r1
|
||||
894: 13 c0 rjmp .+38 ; 0x8bc <updateProgram+0x386>
|
||||
progTimer = 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
896: 80 e0 ldi r24, 0x00 ; 0
|
||||
898: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: Turn > ");
|
||||
89c: 84 e8 ldi r24, 0x84 ; 132
|
||||
89e: 93 e0 ldi r25, 0x03 ; 3
|
||||
8a0: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
8a4: 86 e8 ldi r24, 0x86 ; 134
|
||||
8a6: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
8aa: 88 e6 ldi r24, 0x68 ; 104
|
||||
8ac: 80 93 05 04 sts 0x0405, r24
|
||||
servoPing = SERVO_POS_LEFT_90;
|
||||
8b0: 80 ed ldi r24, 0xD0 ; 208
|
||||
8b2: 80 93 03 04 sts 0x0403, r24
|
||||
regulatorMode = 1; // Mäter åt vänster
|
||||
8b6: 81 e0 ldi r24, 0x01 ; 1
|
||||
8b8: 80 93 3f 04 sts 0x043F, r24
|
||||
progTimer = 50;
|
||||
8bc: 82 e3 ldi r24, 0x32 ; 50
|
||||
8be: 19 c0 rjmp .+50 ; 0x8f2 <updateProgram+0x3bc>
|
||||
|
||||
break;
|
||||
|
||||
case 14:
|
||||
// Stanna
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
8c0: 87 e7 ldi r24, 0x77 ; 119
|
||||
8c2: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
8c6: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 10;
|
||||
8ca: 8a e0 ldi r24, 0x0A ; 10
|
||||
8cc: 80 93 2e 04 sts 0x042E, r24
|
||||
regulatorTimer = 2;
|
||||
8d0: 82 e0 ldi r24, 0x02 ; 2
|
||||
8d2: 80 93 40 04 sts 0x0440, r24
|
||||
8d6: 18 c0 rjmp .+48 ; 0x908 <updateProgram+0x3d2>
|
||||
|
||||
break;
|
||||
|
||||
case 15:
|
||||
// Kör frammåt
|
||||
lcdSetPos(0x00);
|
||||
8d8: 80 e0 ldi r24, 0x00 ; 0
|
||||
8da: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: FORWARD ");
|
||||
8de: 80 e2 ldi r24, 0x20 ; 32
|
||||
8e0: 93 e0 ldi r25, 0x03 ; 3
|
||||
8e2: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
8e6: 86 e8 ldi r24, 0x86 ; 134
|
||||
8e8: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
8ec: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 20;
|
||||
8f0: 84 e1 ldi r24, 0x14 ; 20
|
||||
8f2: 80 93 2e 04 sts 0x042E, r24
|
||||
8f6: 34 c1 rjmp .+616 ; 0xb60 <updateProgram+0x62a>
|
||||
|
||||
break;
|
||||
|
||||
case 16:
|
||||
// Kör frammåt
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
8f8: 8f e7 ldi r24, 0x7F ; 127
|
||||
8fa: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
8fe: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 10;
|
||||
902: 8a e0 ldi r24, 0x0A ; 10
|
||||
904: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition++;
|
||||
908: 81 e1 ldi r24, 0x11 ; 17
|
||||
90a: 3b c1 rjmp .+630 ; 0xb82 <updateProgram+0x64c>
|
||||
|
||||
break;
|
||||
|
||||
case 17:
|
||||
// Mäter avstånd
|
||||
pingSendPing();
|
||||
90c: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 3;
|
||||
910: 83 e0 ldi r24, 0x03 ; 3
|
||||
912: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
916: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
91a: 88 23 and r24, r24
|
||||
91c: 09 f4 brne .+2 ; 0x920 <updateProgram+0x3ea>
|
||||
91e: 33 c1 rjmp .+614 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
920: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
924: 90 93 32 04 sts 0x0432, r25
|
||||
928: 80 93 31 04 sts 0x0431, r24
|
||||
progTimer = 1;
|
||||
92c: 81 e0 ldi r24, 0x01 ; 1
|
||||
92e: e1 cf rjmp .-62 ; 0x8f2 <updateProgram+0x3bc>
|
||||
|
||||
break;
|
||||
|
||||
case 18:
|
||||
// Reglerar 1meter från väggen
|
||||
if(++regulatorCounter >= regulatorTimer)
|
||||
930: 80 91 41 04 lds r24, 0x0441
|
||||
934: 8f 5f subi r24, 0xFF ; 255
|
||||
936: 80 93 41 04 sts 0x0441, r24
|
||||
93a: 90 91 40 04 lds r25, 0x0440
|
||||
93e: 89 17 cp r24, r25
|
||||
940: 48 f0 brcs .+18 ; 0x954 <updateProgram+0x41e>
|
||||
{
|
||||
progPosition++;
|
||||
942: 83 e1 ldi r24, 0x13 ; 19
|
||||
944: 80 93 2f 04 sts 0x042F, r24
|
||||
progTimer = 1;
|
||||
948: 81 e0 ldi r24, 0x01 ; 1
|
||||
94a: 80 93 2e 04 sts 0x042E, r24
|
||||
regulatorCounter = 0;
|
||||
94e: 10 92 41 04 sts 0x0441, r1
|
||||
952: 19 c1 rjmp .+562 ; 0xb86 <updateProgram+0x650>
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t calculateProgTimer = 0;
|
||||
if (regulatorMode == 0) // Tittar höger
|
||||
954: 80 91 3f 04 lds r24, 0x043F
|
||||
958: 88 23 and r24, r24
|
||||
95a: 09 f0 breq .+2 ; 0x95e <updateProgram+0x428>
|
||||
95c: 47 c0 rjmp .+142 ; 0x9ec <updateProgram+0x4b6>
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
95e: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString(" ]--- (1m) --->|");
|
||||
962: 83 e9 ldi r24, 0x93 ; 147
|
||||
964: 93 e0 ldi r25, 0x03 ; 3
|
||||
966: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
if(tempDistance > DISTANCE_ONE_METER)
|
||||
96a: 20 91 31 04 lds r18, 0x0431
|
||||
96e: 30 91 32 04 lds r19, 0x0432
|
||||
972: 87 e1 ldi r24, 0x17 ; 23
|
||||
974: 21 37 cpi r18, 0x71 ; 113
|
||||
976: 38 07 cpc r19, r24
|
||||
978: 30 f0 brcs .+12 ; 0x986 <updateProgram+0x450>
|
||||
showDistanceOnLCD((tempDistance-DISTANCE_ONE_METER),3,2);
|
||||
97a: 42 e0 ldi r20, 0x02 ; 2
|
||||
97c: 63 e0 ldi r22, 0x03 ; 3
|
||||
97e: c9 01 movw r24, r18
|
||||
980: 80 57 subi r24, 0x70 ; 112
|
||||
982: 97 41 sbci r25, 0x17 ; 23
|
||||
984: 06 c0 rjmp .+12 ; 0x992 <updateProgram+0x45c>
|
||||
else
|
||||
showDistanceOnLCD((DISTANCE_ONE_METER-tempDistance),2,2);
|
||||
986: 42 e0 ldi r20, 0x02 ; 2
|
||||
988: 62 e0 ldi r22, 0x02 ; 2
|
||||
98a: 80 e7 ldi r24, 0x70 ; 112
|
||||
98c: 97 e1 ldi r25, 0x17 ; 23
|
||||
98e: 82 1b sub r24, r18
|
||||
990: 93 0b sbc r25, r19
|
||||
992: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
|
||||
if((tempDistance < tempLastDistanceToWall) && (tempDistance < (DISTANCE_ONE_METER -1000)))
|
||||
996: 60 91 31 04 lds r22, 0x0431
|
||||
99a: 70 91 32 04 lds r23, 0x0432
|
||||
99e: 80 91 35 04 lds r24, 0x0435
|
||||
9a2: 90 91 36 04 lds r25, 0x0436
|
||||
9a6: 68 17 cp r22, r24
|
||||
9a8: 79 07 cpc r23, r25
|
||||
9aa: 70 f4 brcc .+28 ; 0x9c8 <updateProgram+0x492>
|
||||
9ac: 23 e1 ldi r18, 0x13 ; 19
|
||||
9ae: 68 38 cpi r22, 0x88 ; 136
|
||||
9b0: 72 07 cpc r23, r18
|
||||
9b2: 28 f4 brcc .+10 ; 0x9be <updateProgram+0x488>
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
9b4: 88 e6 ldi r24, 0x68 ; 104
|
||||
9b6: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
9ba: 86 e8 ldi r24, 0x86 ; 134
|
||||
9bc: 4a c0 rjmp .+148 ; 0xa52 <updateProgram+0x51c>
|
||||
progTimer = calculateProgTimer;
|
||||
else
|
||||
progTimer = 15;
|
||||
|
||||
}
|
||||
else if((tempDistance < tempLastDistanceToWall) && (tempDistance < (DISTANCE_ONE_METER -10)))
|
||||
9be: 66 56 subi r22, 0x66 ; 102
|
||||
9c0: 77 41 sbci r23, 0x17 ; 23
|
||||
9c2: 08 f0 brcs .+2 ; 0x9c6 <updateProgram+0x490>
|
||||
9c4: 7c c0 rjmp .+248 ; 0xabe <updateProgram+0x588>
|
||||
9c6: 73 c0 rjmp .+230 ; 0xaae <updateProgram+0x578>
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
|
||||
progTimer = 5;
|
||||
|
||||
}
|
||||
else if((tempDistance > tempLastDistanceToWall) && (tempDistance > (DISTANCE_ONE_METER+1000)))
|
||||
9c8: 86 17 cp r24, r22
|
||||
9ca: 97 07 cpc r25, r23
|
||||
9cc: 08 f0 brcs .+2 ; 0x9d0 <updateProgram+0x49a>
|
||||
9ce: 77 c0 rjmp .+238 ; 0xabe <updateProgram+0x588>
|
||||
9d0: 8b e1 ldi r24, 0x1B ; 27
|
||||
9d2: 69 35 cpi r22, 0x59 ; 89
|
||||
9d4: 78 07 cpc r23, r24
|
||||
9d6: 28 f0 brcs .+10 ; 0x9e2 <updateProgram+0x4ac>
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
9d8: 86 e8 ldi r24, 0x86 ; 134
|
||||
9da: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
9de: 88 e6 ldi r24, 0x68 ; 104
|
||||
9e0: 4e c0 rjmp .+156 ; 0xa7e <updateProgram+0x548>
|
||||
progTimer = calculateProgTimer;
|
||||
else
|
||||
progTimer = 15;
|
||||
|
||||
}
|
||||
else if((tempDistance > tempLastDistanceToWall) && (tempDistance > (DISTANCE_ONE_METER+10)))
|
||||
9e2: 6b 57 subi r22, 0x7B ; 123
|
||||
9e4: 77 41 sbci r23, 0x17 ; 23
|
||||
9e6: 08 f4 brcc .+2 ; 0x9ea <updateProgram+0x4b4>
|
||||
9e8: 6a c0 rjmp .+212 ; 0xabe <updateProgram+0x588>
|
||||
9ea: 39 c0 rjmp .+114 ; 0xa5e <updateProgram+0x528>
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
progTimer = 4;
|
||||
}
|
||||
}
|
||||
|
||||
else if (regulatorMode == 1) // Tittar vänster
|
||||
9ec: 81 30 cpi r24, 0x01 ; 1
|
||||
9ee: 09 f0 breq .+2 ; 0x9f2 <updateProgram+0x4bc>
|
||||
9f0: 6e c0 rjmp .+220 ; 0xace <updateProgram+0x598>
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
9f2: 80 e0 ldi r24, 0x00 ; 0
|
||||
9f4: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("|<--- (1m) ---[ ");
|
||||
9f8: 84 ea ldi r24, 0xA4 ; 164
|
||||
9fa: 93 e0 ldi r25, 0x03 ; 3
|
||||
9fc: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
if(tempDistance > DISTANCE_ONE_METER)
|
||||
a00: 20 91 31 04 lds r18, 0x0431
|
||||
a04: 30 91 32 04 lds r19, 0x0432
|
||||
a08: 47 e1 ldi r20, 0x17 ; 23
|
||||
a0a: 21 37 cpi r18, 0x71 ; 113
|
||||
a0c: 34 07 cpc r19, r20
|
||||
a0e: 30 f0 brcs .+12 ; 0xa1c <updateProgram+0x4e6>
|
||||
showDistanceOnLCD((tempDistance-DISTANCE_ONE_METER),2,2);
|
||||
a10: 42 e0 ldi r20, 0x02 ; 2
|
||||
a12: 62 e0 ldi r22, 0x02 ; 2
|
||||
a14: c9 01 movw r24, r18
|
||||
a16: 80 57 subi r24, 0x70 ; 112
|
||||
a18: 97 41 sbci r25, 0x17 ; 23
|
||||
a1a: 06 c0 rjmp .+12 ; 0xa28 <updateProgram+0x4f2>
|
||||
else
|
||||
showDistanceOnLCD((DISTANCE_ONE_METER-tempDistance),3,2);
|
||||
a1c: 42 e0 ldi r20, 0x02 ; 2
|
||||
a1e: 63 e0 ldi r22, 0x03 ; 3
|
||||
a20: 80 e7 ldi r24, 0x70 ; 112
|
||||
a22: 97 e1 ldi r25, 0x17 ; 23
|
||||
a24: 82 1b sub r24, r18
|
||||
a26: 93 0b sbc r25, r19
|
||||
a28: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
|
||||
if((tempDistance < tempLastDistanceToWall) && (tempDistance < (DISTANCE_ONE_METER-1000)))
|
||||
a2c: 60 91 31 04 lds r22, 0x0431
|
||||
a30: 70 91 32 04 lds r23, 0x0432
|
||||
a34: 80 91 35 04 lds r24, 0x0435
|
||||
a38: 90 91 36 04 lds r25, 0x0436
|
||||
a3c: 68 17 cp r22, r24
|
||||
a3e: 79 07 cpc r23, r25
|
||||
a40: 98 f4 brcc .+38 ; 0xa68 <updateProgram+0x532>
|
||||
a42: 83 e1 ldi r24, 0x13 ; 19
|
||||
a44: 68 38 cpi r22, 0x88 ; 136
|
||||
a46: 78 07 cpc r23, r24
|
||||
a48: 38 f4 brcc .+14 ; 0xa58 <updateProgram+0x522>
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
a4a: 86 e8 ldi r24, 0x86 ; 134
|
||||
a4c: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
a50: 88 e6 ldi r24, 0x68 ; 104
|
||||
a52: 80 93 05 04 sts 0x0405, r24
|
||||
a56: 26 c0 rjmp .+76 ; 0xaa4 <updateProgram+0x56e>
|
||||
progTimer = calculateProgTimer;
|
||||
else
|
||||
progTimer = 15;
|
||||
|
||||
}
|
||||
else if((tempDistance < tempLastDistanceToWall) && (tempDistance < (DISTANCE_ONE_METER-10)))
|
||||
a58: 66 56 subi r22, 0x66 ; 102
|
||||
a5a: 77 41 sbci r23, 0x17 ; 23
|
||||
a5c: 80 f5 brcc .+96 ; 0xabe <updateProgram+0x588>
|
||||
{
|
||||
// sväng höger
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
a5e: 86 e8 ldi r24, 0x86 ; 134
|
||||
a60: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
a64: 88 e6 ldi r24, 0x68 ; 104
|
||||
a66: 27 c0 rjmp .+78 ; 0xab6 <updateProgram+0x580>
|
||||
|
||||
progTimer = 5;
|
||||
|
||||
}
|
||||
else if((tempDistance > tempLastDistanceToWall) && (tempDistance > (DISTANCE_ONE_METER +1000)))
|
||||
a68: 86 17 cp r24, r22
|
||||
a6a: 97 07 cpc r25, r23
|
||||
a6c: 40 f5 brcc .+80 ; 0xabe <updateProgram+0x588>
|
||||
a6e: 4b e1 ldi r20, 0x1B ; 27
|
||||
a70: 69 35 cpi r22, 0x59 ; 89
|
||||
a72: 74 07 cpc r23, r20
|
||||
a74: c8 f0 brcs .+50 ; 0xaa8 <updateProgram+0x572>
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
a76: 88 e6 ldi r24, 0x68 ; 104
|
||||
a78: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
a7c: 86 e8 ldi r24, 0x86 ; 134
|
||||
a7e: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
calculateProgTimer = ((tempDistance - DISTANCE_ONE_METER)/40);
|
||||
a82: 80 e0 ldi r24, 0x00 ; 0
|
||||
a84: 90 e0 ldi r25, 0x00 ; 0
|
||||
a86: 60 57 subi r22, 0x70 ; 112
|
||||
a88: 77 41 sbci r23, 0x17 ; 23
|
||||
a8a: 80 40 sbci r24, 0x00 ; 0
|
||||
a8c: 90 40 sbci r25, 0x00 ; 0
|
||||
a8e: 28 e2 ldi r18, 0x28 ; 40
|
||||
a90: 30 e0 ldi r19, 0x00 ; 0
|
||||
a92: 40 e0 ldi r20, 0x00 ; 0
|
||||
a94: 50 e0 ldi r21, 0x00 ; 0
|
||||
a96: 0e 94 e7 0b call 0x17ce ; 0x17ce <__udivmodsi4>
|
||||
|
||||
if(calculateProgTimer < 15)
|
||||
a9a: 2f 30 cpi r18, 0x0F ; 15
|
||||
a9c: 18 f4 brcc .+6 ; 0xaa4 <updateProgram+0x56e>
|
||||
progTimer = calculateProgTimer;
|
||||
a9e: 20 93 2e 04 sts 0x042E, r18
|
||||
aa2: 15 c0 rjmp .+42 ; 0xace <updateProgram+0x598>
|
||||
else
|
||||
progTimer = 15;
|
||||
aa4: 8f e0 ldi r24, 0x0F ; 15
|
||||
aa6: 11 c0 rjmp .+34 ; 0xaca <updateProgram+0x594>
|
||||
}
|
||||
else if((tempDistance > tempLastDistanceToWall) && (tempDistance > (DISTANCE_ONE_METER +10)))
|
||||
aa8: 6b 57 subi r22, 0x7B ; 123
|
||||
aaa: 77 41 sbci r23, 0x17 ; 23
|
||||
aac: 40 f0 brcs .+16 ; 0xabe <updateProgram+0x588>
|
||||
{
|
||||
// sväng vänster
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
aae: 88 e6 ldi r24, 0x68 ; 104
|
||||
ab0: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
ab4: 86 e8 ldi r24, 0x86 ; 134
|
||||
ab6: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 5;
|
||||
aba: 85 e0 ldi r24, 0x05 ; 5
|
||||
abc: 06 c0 rjmp .+12 ; 0xaca <updateProgram+0x594>
|
||||
}
|
||||
else
|
||||
{
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
abe: 8f e7 ldi r24, 0x7F ; 127
|
||||
ac0: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
ac4: 80 93 05 04 sts 0x0405, r24
|
||||
progTimer = 4;
|
||||
ac8: 84 e0 ldi r24, 0x04 ; 4
|
||||
aca: 80 93 2e 04 sts 0x042E, r24
|
||||
}
|
||||
}
|
||||
tempLastDistanceToWall = tempDistance;
|
||||
ace: 80 91 31 04 lds r24, 0x0431
|
||||
ad2: 90 91 32 04 lds r25, 0x0432
|
||||
ad6: 90 93 36 04 sts 0x0436, r25
|
||||
ada: 80 93 35 04 sts 0x0435, r24
|
||||
progPosition--;
|
||||
ade: 80 91 2f 04 lds r24, 0x042F
|
||||
progPosition--;
|
||||
ae2: 82 50 subi r24, 0x02 ; 2
|
||||
ae4: 4e c0 rjmp .+156 ; 0xb82 <updateProgram+0x64c>
|
||||
|
||||
break;
|
||||
|
||||
case 19:
|
||||
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
ae6: 8c e8 ldi r24, 0x8C ; 140
|
||||
ae8: 80 93 03 04 sts 0x0403, r24
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
aec: 87 e7 ldi r24, 0x77 ; 119
|
||||
aee: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
af2: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 35;
|
||||
af6: 83 e2 ldi r24, 0x23 ; 35
|
||||
af8: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition++;
|
||||
afc: 84 e1 ldi r24, 0x14 ; 20
|
||||
afe: 41 c0 rjmp .+130 ; 0xb82 <updateProgram+0x64c>
|
||||
|
||||
break;
|
||||
|
||||
case 20:
|
||||
|
||||
progTimer = 3;
|
||||
b00: 83 e0 ldi r24, 0x03 ; 3
|
||||
b02: 80 93 2e 04 sts 0x042E, r24
|
||||
pingSendPing();
|
||||
b06: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
|
||||
if(pingGetReady())
|
||||
b0a: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
b0e: 88 23 and r24, r24
|
||||
b10: d1 f1 breq .+116 ; 0xb86 <updateProgram+0x650>
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
b12: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
b16: 90 93 32 04 sts 0x0432, r25
|
||||
b1a: 80 93 31 04 sts 0x0431, r24
|
||||
|
||||
if(tempDistance < DISTANCE_ONE_METER)
|
||||
b1e: 27 e1 ldi r18, 0x17 ; 23
|
||||
b20: 80 37 cpi r24, 0x70 ; 112
|
||||
b22: 92 07 cpc r25, r18
|
||||
b24: 40 f4 brcc .+16 ; 0xb36 <updateProgram+0x600>
|
||||
{
|
||||
showDistanceOnLCD(0,0,1);
|
||||
b26: 41 e0 ldi r20, 0x01 ; 1
|
||||
b28: 60 e0 ldi r22, 0x00 ; 0
|
||||
b2a: 80 e0 ldi r24, 0x00 ; 0
|
||||
b2c: 90 e0 ldi r25, 0x00 ; 0
|
||||
b2e: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
progPosition = 2;
|
||||
b32: 82 e0 ldi r24, 0x02 ; 2
|
||||
b34: 26 c0 rjmp .+76 ; 0xb82 <updateProgram+0x64c>
|
||||
b36: 9c 01 movw r18, r24
|
||||
b38: 20 57 subi r18, 0x70 ; 112
|
||||
b3a: 37 41 sbci r19, 0x17 ; 23
|
||||
}
|
||||
else if (tempDistance < (DISTANCE_ONE_METER*2))
|
||||
b3c: 80 5e subi r24, 0xE0 ; 224
|
||||
b3e: 9e 42 sbci r25, 0x2E ; 46
|
||||
b40: 38 f4 brcc .+14 ; 0xb50 <updateProgram+0x61a>
|
||||
{
|
||||
showDistanceOnLCD(tempDistance-DISTANCE_ONE_METER,0,1);
|
||||
b42: 41 e0 ldi r20, 0x01 ; 1
|
||||
b44: 60 e0 ldi r22, 0x00 ; 0
|
||||
b46: c9 01 movw r24, r18
|
||||
b48: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
regulatorTimer = 2;
|
||||
b4c: 82 e0 ldi r24, 0x02 ; 2
|
||||
b4e: 06 c0 rjmp .+12 ; 0xb5c <updateProgram+0x626>
|
||||
progPosition++;
|
||||
}
|
||||
else
|
||||
{
|
||||
showDistanceOnLCD(tempDistance-DISTANCE_ONE_METER,0,1);
|
||||
b50: 41 e0 ldi r20, 0x01 ; 1
|
||||
b52: 60 e0 ldi r22, 0x00 ; 0
|
||||
b54: c9 01 movw r24, r18
|
||||
b56: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
regulatorTimer = 10;
|
||||
b5a: 8a e0 ldi r24, 0x0A ; 10
|
||||
b5c: 80 93 40 04 sts 0x0440, r24
|
||||
progPosition++;
|
||||
b60: 80 91 2f 04 lds r24, 0x042F
|
||||
b64: 8f 5f subi r24, 0xFF ; 255
|
||||
b66: 0d c0 rjmp .+26 ; 0xb82 <updateProgram+0x64c>
|
||||
|
||||
break;
|
||||
|
||||
case 21:
|
||||
|
||||
if (regulatorMode == 0) // Tittar höger
|
||||
b68: 80 91 3f 04 lds r24, 0x043F
|
||||
b6c: 88 23 and r24, r24
|
||||
b6e: 11 f4 brne .+4 ; 0xb74 <updateProgram+0x63e>
|
||||
{
|
||||
servoPing = SERVO_POS_RIGHT_90;
|
||||
b70: 83 e4 ldi r24, 0x43 ; 67
|
||||
b72: 01 c0 rjmp .+2 ; 0xb76 <updateProgram+0x640>
|
||||
}
|
||||
else
|
||||
{
|
||||
servoPing = SERVO_POS_LEFT_90;
|
||||
b74: 80 ed ldi r24, 0xD0 ; 208
|
||||
b76: 80 93 03 04 sts 0x0403, r24
|
||||
}
|
||||
|
||||
progTimer = 5;
|
||||
b7a: 85 e0 ldi r24, 0x05 ; 5
|
||||
b7c: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition = 15;
|
||||
b80: 8f e0 ldi r24, 0x0F ; 15
|
||||
b82: 80 93 2f 04 sts 0x042F, r24
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
progCounter = 0;
|
||||
b86: 10 92 2d 04 sts 0x042D, r1
|
||||
}
|
||||
}
|
||||
|
||||
// Program for robot AI
|
||||
if (roboActive == 2)
|
||||
b8a: 20 91 3b 04 lds r18, 0x043B
|
||||
b8e: 22 30 cpi r18, 0x02 ; 2
|
||||
b90: 09 f0 breq .+2 ; 0xb94 <updateProgram+0x65e>
|
||||
b92: 01 c1 rjmp .+514 ; 0xd96 <updateProgram+0x860>
|
||||
{
|
||||
// Program(2) for random RFID serach
|
||||
if (++progCounter >= progTimer)
|
||||
b94: 80 91 2d 04 lds r24, 0x042D
|
||||
b98: 8f 5f subi r24, 0xFF ; 255
|
||||
b9a: 80 93 2d 04 sts 0x042D, r24
|
||||
b9e: 90 91 2e 04 lds r25, 0x042E
|
||||
ba2: 89 17 cp r24, r25
|
||||
ba4: 08 f4 brcc .+2 ; 0xba8 <updateProgram+0x672>
|
||||
ba6: f7 c0 rjmp .+494 ; 0xd96 <updateProgram+0x860>
|
||||
{
|
||||
|
||||
switch (progPosition)
|
||||
ba8: 80 91 2f 04 lds r24, 0x042F
|
||||
bac: 84 30 cpi r24, 0x04 ; 4
|
||||
bae: 09 f4 brne .+2 ; 0xbb2 <updateProgram+0x67c>
|
||||
bb0: 68 c0 rjmp .+208 ; 0xc82 <updateProgram+0x74c>
|
||||
bb2: 85 30 cpi r24, 0x05 ; 5
|
||||
bb4: 50 f4 brcc .+20 ; 0xbca <updateProgram+0x694>
|
||||
bb6: 81 30 cpi r24, 0x01 ; 1
|
||||
bb8: 11 f1 breq .+68 ; 0xbfe <updateProgram+0x6c8>
|
||||
bba: 81 30 cpi r24, 0x01 ; 1
|
||||
bbc: c8 f0 brcs .+50 ; 0xbf0 <updateProgram+0x6ba>
|
||||
bbe: 82 30 cpi r24, 0x02 ; 2
|
||||
bc0: 59 f1 breq .+86 ; 0xc18 <updateProgram+0x6e2>
|
||||
bc2: 83 30 cpi r24, 0x03 ; 3
|
||||
bc4: 09 f0 breq .+2 ; 0xbc8 <updateProgram+0x692>
|
||||
bc6: e5 c0 rjmp .+458 ; 0xd92 <updateProgram+0x85c>
|
||||
bc8: 4e c0 rjmp .+156 ; 0xc66 <updateProgram+0x730>
|
||||
bca: 87 30 cpi r24, 0x07 ; 7
|
||||
bcc: 09 f4 brne .+2 ; 0xbd0 <updateProgram+0x69a>
|
||||
bce: 7c c0 rjmp .+248 ; 0xcc8 <updateProgram+0x792>
|
||||
bd0: 88 30 cpi r24, 0x08 ; 8
|
||||
bd2: 38 f4 brcc .+14 ; 0xbe2 <updateProgram+0x6ac>
|
||||
bd4: 85 30 cpi r24, 0x05 ; 5
|
||||
bd6: 09 f4 brne .+2 ; 0xbda <updateProgram+0x6a4>
|
||||
bd8: 5d c0 rjmp .+186 ; 0xc94 <updateProgram+0x75e>
|
||||
bda: 86 30 cpi r24, 0x06 ; 6
|
||||
bdc: 09 f0 breq .+2 ; 0xbe0 <updateProgram+0x6aa>
|
||||
bde: d9 c0 rjmp .+434 ; 0xd92 <updateProgram+0x85c>
|
||||
be0: 61 c0 rjmp .+194 ; 0xca4 <updateProgram+0x76e>
|
||||
be2: 88 30 cpi r24, 0x08 ; 8
|
||||
be4: 09 f4 brne .+2 ; 0xbe8 <updateProgram+0x6b2>
|
||||
be6: 78 c0 rjmp .+240 ; 0xcd8 <updateProgram+0x7a2>
|
||||
be8: 89 30 cpi r24, 0x09 ; 9
|
||||
bea: 09 f0 breq .+2 ; 0xbee <updateProgram+0x6b8>
|
||||
bec: d2 c0 rjmp .+420 ; 0xd92 <updateProgram+0x85c>
|
||||
bee: c6 c0 rjmp .+396 ; 0xd7c <updateProgram+0x846>
|
||||
{
|
||||
case 0:
|
||||
|
||||
lcdClearDisplay();
|
||||
bf0: 0e 94 df 07 call 0xfbe ; 0xfbe <lcdClearDisplay>
|
||||
lcdSetLayout(1);
|
||||
bf4: 81 e0 ldi r24, 0x01 ; 1
|
||||
bf6: 0e 94 a8 07 call 0xf50 ; 0xf50 <lcdSetLayout>
|
||||
|
||||
progTimer = 1;
|
||||
bfa: 81 e0 ldi r24, 0x01 ; 1
|
||||
bfc: b9 c0 rjmp .+370 ; 0xd70 <updateProgram+0x83a>
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
lcdSetPos(0x00);
|
||||
bfe: 80 e0 ldi r24, 0x00 ; 0
|
||||
c00: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: FORWARD ");
|
||||
c04: 80 e2 ldi r24, 0x20 ; 32
|
||||
c06: 93 e0 ldi r25, 0x03 ; 3
|
||||
c08: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
c0c: 86 e8 ldi r24, 0x86 ; 134
|
||||
c0e: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
c12: 80 93 05 04 sts 0x0405, r24
|
||||
c16: 56 c0 rjmp .+172 ; 0xcc4 <updateProgram+0x78e>
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_SOFT;
|
||||
c18: 8f e7 ldi r24, 0x7F ; 127
|
||||
c1a: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_SOFT;
|
||||
c1e: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
pingSendPing();
|
||||
c22: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 3;
|
||||
c26: 83 e0 ldi r24, 0x03 ; 3
|
||||
c28: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
c2c: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
c30: 88 23 and r24, r24
|
||||
c32: 09 f4 brne .+2 ; 0xc36 <updateProgram+0x700>
|
||||
c34: ae c0 rjmp .+348 ; 0xd92 <updateProgram+0x85c>
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
c36: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
c3a: 90 93 32 04 sts 0x0432, r25
|
||||
c3e: 80 93 31 04 sts 0x0431, r24
|
||||
|
||||
if(tempDistance < DISTANCE_TO_STOP)
|
||||
c42: 25 e1 ldi r18, 0x15 ; 21
|
||||
c44: 8c 37 cpi r24, 0x7C ; 124
|
||||
c46: 92 07 cpc r25, r18
|
||||
c48: 38 f4 brcc .+14 ; 0xc58 <updateProgram+0x722>
|
||||
{
|
||||
showDistanceOnLCD(0,0,2);
|
||||
c4a: 42 e0 ldi r20, 0x02 ; 2
|
||||
c4c: 60 e0 ldi r22, 0x00 ; 0
|
||||
c4e: 80 e0 ldi r24, 0x00 ; 0
|
||||
c50: 90 e0 ldi r25, 0x00 ; 0
|
||||
c52: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
c56: 8e c0 rjmp .+284 ; 0xd74 <updateProgram+0x83e>
|
||||
progPosition++;
|
||||
}
|
||||
else
|
||||
{
|
||||
showDistanceOnLCD(tempDistance-DISTANCE_TO_STOP,0,2);
|
||||
c58: 42 e0 ldi r20, 0x02 ; 2
|
||||
c5a: 60 e0 ldi r22, 0x00 ; 0
|
||||
c5c: 8c 57 subi r24, 0x7C ; 124
|
||||
c5e: 95 41 sbci r25, 0x15 ; 21
|
||||
c60: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <showDistanceOnLCD>
|
||||
c64: 96 c0 rjmp .+300 ; 0xd92 <updateProgram+0x85c>
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
|
||||
lcdSetPos(0x00);
|
||||
c66: 80 e0 ldi r24, 0x00 ; 0
|
||||
c68: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: STOP ");
|
||||
c6c: 81 e3 ldi r24, 0x31 ; 49
|
||||
c6e: 93 e0 ldi r25, 0x03 ; 3
|
||||
c70: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
// Stop and breake
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE;
|
||||
c74: 8c e6 ldi r24, 0x6C ; 108
|
||||
c76: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE;
|
||||
c7a: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 50;
|
||||
c7e: 82 e3 ldi r24, 0x32 ; 50
|
||||
c80: 77 c0 rjmp .+238 ; 0xd70 <updateProgram+0x83a>
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
c82: 87 e7 ldi r24, 0x77 ; 119
|
||||
c84: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
c88: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 2;
|
||||
c8c: 20 93 2e 04 sts 0x042E, r18
|
||||
|
||||
progPosition++;
|
||||
c90: 85 e0 ldi r24, 0x05 ; 5
|
||||
c92: 7d c0 rjmp .+250 ; 0xd8e <updateProgram+0x858>
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
|
||||
servoPing = SERVO_POS_LEFT_45;
|
||||
c94: 8e ea ldi r24, 0xAE ; 174
|
||||
c96: 80 93 03 04 sts 0x0403, r24
|
||||
|
||||
progTimer = 20;
|
||||
c9a: 84 e1 ldi r24, 0x14 ; 20
|
||||
c9c: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
progPosition++;
|
||||
ca0: 86 e0 ldi r24, 0x06 ; 6
|
||||
ca2: 75 c0 rjmp .+234 ; 0xd8e <updateProgram+0x858>
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
|
||||
pingSendPing();
|
||||
ca4: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 4;
|
||||
ca8: 84 e0 ldi r24, 0x04 ; 4
|
||||
caa: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
cae: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
cb2: 88 23 and r24, r24
|
||||
cb4: 09 f4 brne .+2 ; 0xcb8 <updateProgram+0x782>
|
||||
cb6: 6d c0 rjmp .+218 ; 0xd92 <updateProgram+0x85c>
|
||||
{
|
||||
tempLeftDistance = pingGetDistance();
|
||||
cb8: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
cbc: 90 93 38 04 sts 0x0438, r25
|
||||
cc0: 80 93 37 04 sts 0x0437, r24
|
||||
progTimer = 20;
|
||||
cc4: 84 e1 ldi r24, 0x14 ; 20
|
||||
cc6: 54 c0 rjmp .+168 ; 0xd70 <updateProgram+0x83a>
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
|
||||
servoPing = SERVO_POS_RIGHT_45;
|
||||
cc8: 87 e6 ldi r24, 0x67 ; 103
|
||||
cca: 80 93 03 04 sts 0x0403, r24
|
||||
|
||||
progTimer = 40;
|
||||
cce: 88 e2 ldi r24, 0x28 ; 40
|
||||
cd0: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
progPosition++;
|
||||
cd4: 88 e0 ldi r24, 0x08 ; 8
|
||||
cd6: 5b c0 rjmp .+182 ; 0xd8e <updateProgram+0x858>
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
|
||||
pingSendPing();
|
||||
cd8: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 4;
|
||||
cdc: 84 e0 ldi r24, 0x04 ; 4
|
||||
cde: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
ce2: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
ce6: 88 23 and r24, r24
|
||||
ce8: 09 f4 brne .+2 ; 0xcec <updateProgram+0x7b6>
|
||||
cea: 53 c0 rjmp .+166 ; 0xd92 <updateProgram+0x85c>
|
||||
{
|
||||
tempRightDistance = pingGetDistance();
|
||||
cec: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
cf0: 9c 01 movw r18, r24
|
||||
cf2: 90 93 3a 04 sts 0x043A, r25
|
||||
cf6: 80 93 39 04 sts 0x0439, r24
|
||||
|
||||
servoPing = SERVO_POS_CENTER;
|
||||
cfa: 8c e8 ldi r24, 0x8C ; 140
|
||||
cfc: 80 93 03 04 sts 0x0403, r24
|
||||
|
||||
if((tempLeftDistance < DISTANCE_TO_STOP )
|
||||
d00: 80 91 37 04 lds r24, 0x0437
|
||||
d04: 90 91 38 04 lds r25, 0x0438
|
||||
d08: 45 e1 ldi r20, 0x15 ; 21
|
||||
d0a: 8c 37 cpi r24, 0x7C ; 124
|
||||
d0c: 94 07 cpc r25, r20
|
||||
d0e: 98 f4 brcc .+38 ; 0xd36 <updateProgram+0x800>
|
||||
d10: 45 e1 ldi r20, 0x15 ; 21
|
||||
d12: 2c 37 cpi r18, 0x7C ; 124
|
||||
d14: 34 07 cpc r19, r20
|
||||
d16: 78 f4 brcc .+30 ; 0xd36 <updateProgram+0x800>
|
||||
&& (tempRightDistance < DISTANCE_TO_STOP))
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
d18: 80 e0 ldi r24, 0x00 ; 0
|
||||
d1a: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: Turn <<< ");
|
||||
d1e: 85 eb ldi r24, 0xB5 ; 181
|
||||
d20: 93 e0 ldi r25, 0x03 ; 3
|
||||
d22: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
d26: 88 e6 ldi r24, 0x68 ; 104
|
||||
d28: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
d2c: 86 e8 ldi r24, 0x86 ; 134
|
||||
d2e: 80 93 05 04 sts 0x0405, r24
|
||||
progTimer = 70;
|
||||
d32: 86 e4 ldi r24, 0x46 ; 70
|
||||
d34: 1d c0 rjmp .+58 ; 0xd70 <updateProgram+0x83a>
|
||||
}
|
||||
else if(tempLeftDistance > tempRightDistance)
|
||||
d36: 28 17 cp r18, r24
|
||||
d38: 39 07 cpc r19, r25
|
||||
d3a: 60 f4 brcc .+24 ; 0xd54 <updateProgram+0x81e>
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
d3c: 80 e0 ldi r24, 0x00 ; 0
|
||||
d3e: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: Turn < ");
|
||||
d42: 86 ec ldi r24, 0xC6 ; 198
|
||||
d44: 93 e0 ldi r25, 0x03 ; 3
|
||||
d46: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_RE_FAST;
|
||||
d4a: 88 e6 ldi r24, 0x68 ; 104
|
||||
d4c: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_FW_FAST;
|
||||
d50: 86 e8 ldi r24, 0x86 ; 134
|
||||
d52: 0b c0 rjmp .+22 ; 0xd6a <updateProgram+0x834>
|
||||
progTimer = 40;
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdSetPos(0x00);
|
||||
d54: 80 e0 ldi r24, 0x00 ; 0
|
||||
d56: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Drive: Turn > ");
|
||||
d5a: 87 ed ldi r24, 0xD7 ; 215
|
||||
d5c: 93 e0 ldi r25, 0x03 ; 3
|
||||
d5e: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_FW_FAST;
|
||||
d62: 86 e8 ldi r24, 0x86 ; 134
|
||||
d64: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_RE_FAST;
|
||||
d68: 88 e6 ldi r24, 0x68 ; 104
|
||||
d6a: 80 93 05 04 sts 0x0405, r24
|
||||
progTimer = 40;
|
||||
d6e: 88 e2 ldi r24, 0x28 ; 40
|
||||
d70: 80 93 2e 04 sts 0x042E, r24
|
||||
}
|
||||
|
||||
progPosition++;
|
||||
d74: 80 91 2f 04 lds r24, 0x042F
|
||||
d78: 8f 5f subi r24, 0xFF ; 255
|
||||
d7a: 09 c0 rjmp .+18 ; 0xd8e <updateProgram+0x858>
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
|
||||
servoMotorLeft = SERVO_POS_MOTOR_STOP;
|
||||
d7c: 87 e7 ldi r24, 0x77 ; 119
|
||||
d7e: 80 93 04 04 sts 0x0404, r24
|
||||
servoMotorRight = SERVO_POS_MOTOR_STOP;
|
||||
d82: 80 93 05 04 sts 0x0405, r24
|
||||
|
||||
progTimer = 10;
|
||||
d86: 8a e0 ldi r24, 0x0A ; 10
|
||||
d88: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition = 1;
|
||||
d8c: 81 e0 ldi r24, 0x01 ; 1
|
||||
d8e: 80 93 2f 04 sts 0x042F, r24
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
progCounter = 0;
|
||||
d92: 10 92 2d 04 sts 0x042D, r1
|
||||
}
|
||||
}
|
||||
|
||||
if (roboActive == 3)
|
||||
d96: 80 91 3b 04 lds r24, 0x043B
|
||||
d9a: 83 30 cpi r24, 0x03 ; 3
|
||||
d9c: 09 f0 breq .+2 ; 0xda0 <updateProgram+0x86a>
|
||||
d9e: 46 c0 rjmp .+140 ; 0xe2c <updateProgram+0x8f6>
|
||||
{
|
||||
// Program(2) for random RFID serach
|
||||
if (++progCounter >= progTimer)
|
||||
da0: 80 91 2d 04 lds r24, 0x042D
|
||||
da4: 8f 5f subi r24, 0xFF ; 255
|
||||
da6: 80 93 2d 04 sts 0x042D, r24
|
||||
daa: 90 91 2e 04 lds r25, 0x042E
|
||||
dae: 89 17 cp r24, r25
|
||||
db0: e8 f1 brcs .+122 ; 0xe2c <updateProgram+0x8f6>
|
||||
{
|
||||
|
||||
switch (progPosition)
|
||||
db2: 80 91 2f 04 lds r24, 0x042F
|
||||
db6: 88 23 and r24, r24
|
||||
db8: 19 f0 breq .+6 ; 0xdc0 <updateProgram+0x88a>
|
||||
dba: 81 30 cpi r24, 0x01 ; 1
|
||||
dbc: a9 f5 brne .+106 ; 0xe28 <updateProgram+0x8f2>
|
||||
dbe: 1c c0 rjmp .+56 ; 0xdf8 <updateProgram+0x8c2>
|
||||
{
|
||||
case 0:
|
||||
|
||||
lcdClearDisplay();
|
||||
dc0: 0e 94 df 07 call 0xfbe ; 0xfbe <lcdClearDisplay>
|
||||
lcdSetLayout(1);
|
||||
dc4: 81 e0 ldi r24, 0x01 ; 1
|
||||
dc6: 0e 94 a8 07 call 0xf50 ; 0xf50 <lcdSetLayout>
|
||||
lcdSetPos(0x00);
|
||||
dca: 80 e0 ldi r24, 0x00 ; 0
|
||||
dcc: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Servo: forward ");
|
||||
dd0: 88 ee ldi r24, 0xE8 ; 232
|
||||
dd2: 93 e0 ldi r25, 0x03 ; 3
|
||||
dd4: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
lcdSetPos(0x10);
|
||||
dd8: 80 e1 ldi r24, 0x10 ; 16
|
||||
dda: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteString("Distance: ");
|
||||
dde: 88 ef ldi r24, 0xF8 ; 248
|
||||
de0: 93 e0 ldi r25, 0x03 ; 3
|
||||
de2: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
|
||||
progTimer = 1;
|
||||
de6: 81 e0 ldi r24, 0x01 ; 1
|
||||
de8: 80 93 2e 04 sts 0x042E, r24
|
||||
progPosition++;
|
||||
dec: 80 91 2f 04 lds r24, 0x042F
|
||||
df0: 8f 5f subi r24, 0xFF ; 255
|
||||
df2: 80 93 2f 04 sts 0x042F, r24
|
||||
df6: 18 c0 rjmp .+48 ; 0xe28 <updateProgram+0x8f2>
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
pingSendPing();
|
||||
df8: 0e 94 8c 0b call 0x1718 ; 0x1718 <pingSendPing>
|
||||
progTimer = 10;
|
||||
dfc: 8a e0 ldi r24, 0x0A ; 10
|
||||
dfe: 80 93 2e 04 sts 0x042E, r24
|
||||
|
||||
if(pingGetReady())
|
||||
e02: 0e 94 a7 0b call 0x174e ; 0x174e <pingGetReady>
|
||||
e06: 88 23 and r24, r24
|
||||
e08: 79 f0 breq .+30 ; 0xe28 <updateProgram+0x8f2>
|
||||
{
|
||||
|
||||
tempDistance = pingGetDistance();
|
||||
e0a: 0e 94 a0 0b call 0x1740 ; 0x1740 <pingGetDistance>
|
||||
e0e: 90 93 32 04 sts 0x0432, r25
|
||||
e12: 80 93 31 04 sts 0x0431, r24
|
||||
lcdSetPos(0x1A);
|
||||
e16: 8a e1 ldi r24, 0x1A ; 26
|
||||
e18: 0e 94 d3 07 call 0xfa6 ; 0xfa6 <lcdSetPos>
|
||||
lcdWriteHexAsDecimal(tempDistance);
|
||||
e1c: 80 91 31 04 lds r24, 0x0431
|
||||
e20: 90 91 32 04 lds r25, 0x0432
|
||||
e24: 0e 94 80 08 call 0x1100 ; 0x1100 <lcdWriteHexAsDecimal>
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
progCounter = 0;
|
||||
e28: 10 92 2d 04 sts 0x042D, r1
|
||||
e2c: 1f 91 pop r17
|
||||
e2e: 08 95 ret
|
||||
|
||||
00000e30 <main>:
|
||||
|
||||
}
|
||||
/*================================================================================================
|
||||
Main
|
||||
================================================================================================*/
|
||||
int main (void){
|
||||
e30: cf 93 push r28
|
||||
e32: df 93 push r29
|
||||
|
||||
cli(); // Disable global interrupt
|
||||
e34: f8 94 cli
|
||||
|
||||
initIO();
|
||||
e36: 0e 94 e8 00 call 0x1d0 ; 0x1d0 <initIO>
|
||||
lcdInit();
|
||||
e3a: 0e 94 40 09 call 0x1280 ; 0x1280 <lcdInit>
|
||||
rfIdInit();
|
||||
e3e: 0e 94 b0 09 call 0x1360 ; 0x1360 <rfIdInit>
|
||||
roboMSPInit();
|
||||
e42: 0e 94 30 0a call 0x1460 ; 0x1460 <roboMSPInit>
|
||||
pingInit();
|
||||
e46: 0e 94 ab 0b call 0x1756 ; 0x1756 <pingInit>
|
||||
|
||||
lcdSetIntensity(50);
|
||||
e4a: 82 e3 ldi r24, 0x32 ; 50
|
||||
e4c: 0e 94 99 07 call 0xf32 ; 0xf32 <lcdSetIntensity>
|
||||
lcdSetLayout(2);
|
||||
e50: 82 e0 ldi r24, 0x02 ; 2
|
||||
e52: 0e 94 a8 07 call 0xf50 ; 0xf50 <lcdSetLayout>
|
||||
lcdWriteStringP(menuTable[0]);
|
||||
e56: 8c e9 ldi r24, 0x9C ; 156
|
||||
e58: 90 e0 ldi r25, 0x00 ; 0
|
||||
e5a: 0e 94 2d 08 call 0x105a ; 0x105a <lcdWriteStringP>
|
||||
|
||||
rfIdDisable();
|
||||
e5e: 0e 94 bb 09 call 0x1376 ; 0x1376 <rfIdDisable>
|
||||
roboMSPDisable();
|
||||
e62: 0e 94 42 0a call 0x1484 ; 0x1484 <roboMSPDisable>
|
||||
|
||||
sei(); // Enable global interrupt
|
||||
e66: 78 94 sei
|
||||
e68: c0 e6 ldi r28, 0x60 ; 96
|
||||
e6a: d1 e0 ldi r29, 0x01 ; 1
|
||||
|
||||
while(1){
|
||||
|
||||
if(progDoUpdate)
|
||||
e6c: 80 91 30 04 lds r24, 0x0430
|
||||
e70: 88 23 and r24, r24
|
||||
e72: 21 f0 breq .+8 ; 0xe7c <main+0x4c>
|
||||
{
|
||||
progDoUpdate = 0;
|
||||
e74: 10 92 30 04 sts 0x0430, r1
|
||||
updateProgram();
|
||||
e78: 0e 94 9b 02 call 0x536 ; 0x536 <updateProgram>
|
||||
}
|
||||
|
||||
// Active-mode 1 (left switch lower position)
|
||||
if (!bit_is_set(PINA,PA4))
|
||||
e7c: cc 99 sbic 0x19, 4 ; 25
|
||||
e7e: 08 c0 rjmp .+16 ; 0xe90 <main+0x60>
|
||||
{
|
||||
if(switchOneCheck)
|
||||
e80: 80 91 3d 04 lds r24, 0x043D
|
||||
e84: 88 23 and r24, r24
|
||||
e86: 59 f1 breq .+86 ; 0xede <main+0xae>
|
||||
{
|
||||
activateRobot(3);
|
||||
e88: 83 e0 ldi r24, 0x03 ; 3
|
||||
e8a: 0e 94 5b 01 call 0x2b6 ; 0x2b6 <activateRobot>
|
||||
e8e: 25 c0 rjmp .+74 ; 0xeda <main+0xaa>
|
||||
switchOneCheck = 0;
|
||||
}
|
||||
}
|
||||
// Active-mode 2 (left switch middle position)
|
||||
else if ((bit_is_set(PINA,PA5)) && (bit_is_set(PINA,PA4)))
|
||||
e90: cd 9b sbis 0x19, 5 ; 25
|
||||
e92: 10 c0 rjmp .+32 ; 0xeb4 <main+0x84>
|
||||
e94: cc 9b sbis 0x19, 4 ; 25
|
||||
e96: 0e c0 rjmp .+28 ; 0xeb4 <main+0x84>
|
||||
{
|
||||
if(!switchOneCheck)
|
||||
e98: 80 91 3d 04 lds r24, 0x043D
|
||||
e9c: 88 23 and r24, r24
|
||||
e9e: f9 f4 brne .+62 ; 0xede <main+0xae>
|
||||
{
|
||||
deactivateRobot();
|
||||
ea0: 0e 94 6f 01 call 0x2de ; 0x2de <deactivateRobot>
|
||||
rfEnable = 0;
|
||||
ea4: 10 92 3c 04 sts 0x043C, r1
|
||||
switchOneCheck = 1;
|
||||
ea8: 81 e0 ldi r24, 0x01 ; 1
|
||||
eaa: 80 93 3d 04 sts 0x043D, r24
|
||||
main();
|
||||
eae: 0e 94 18 07 call 0xe30 ; 0xe30 <main>
|
||||
eb2: 15 c0 rjmp .+42 ; 0xede <main+0xae>
|
||||
}
|
||||
}
|
||||
// Active-mode 3 (left switch upper position)
|
||||
else if (!bit_is_set(PINA,PA5))
|
||||
eb4: cd 99 sbic 0x19, 5 ; 25
|
||||
eb6: 13 c0 rjmp .+38 ; 0xede <main+0xae>
|
||||
{
|
||||
if(switchOneCheck)
|
||||
eb8: 80 91 3d 04 lds r24, 0x043D
|
||||
ebc: 88 23 and r24, r24
|
||||
ebe: 79 f0 breq .+30 ; 0xede <main+0xae>
|
||||
{
|
||||
lcdSetLayout(0);
|
||||
ec0: 80 e0 ldi r24, 0x00 ; 0
|
||||
ec2: 0e 94 a8 07 call 0xf50 ; 0xf50 <lcdSetLayout>
|
||||
lcdWriteStringP(menuTable[4]);
|
||||
ec6: ce 01 movw r24, r28
|
||||
ec8: 0e 94 2d 08 call 0x105a ; 0x105a <lcdWriteStringP>
|
||||
rfEnable = 1;
|
||||
ecc: 81 e0 ldi r24, 0x01 ; 1
|
||||
ece: 80 93 3c 04 sts 0x043C, r24
|
||||
rfIdEnable();
|
||||
ed2: 0e 94 bf 09 call 0x137e ; 0x137e <rfIdEnable>
|
||||
roboMSPEnable();
|
||||
ed6: 0e 94 45 0a call 0x148a ; 0x148a <roboMSPEnable>
|
||||
switchOneCheck = 0;
|
||||
eda: 10 92 3d 04 sts 0x043D, r1
|
||||
}
|
||||
}
|
||||
|
||||
// Active-mode 1 (left switch lower position)
|
||||
if (!bit_is_set(PINA,PA6))
|
||||
ede: ce 99 sbic 0x19, 6 ; 25
|
||||
ee0: 06 c0 rjmp .+12 ; 0xeee <main+0xbe>
|
||||
{
|
||||
if(switchTwoCheck)
|
||||
ee2: 80 91 3e 04 lds r24, 0x043E
|
||||
ee6: 88 23 and r24, r24
|
||||
ee8: 09 f2 breq .-126 ; 0xe6c <main+0x3c>
|
||||
{
|
||||
activateRobot(1);
|
||||
eea: 81 e0 ldi r24, 0x01 ; 1
|
||||
eec: 1b c0 rjmp .+54 ; 0xf24 <main+0xf4>
|
||||
switchTwoCheck = 0;
|
||||
}
|
||||
}
|
||||
// Active-mode 2 (left switch middle position)
|
||||
else if ((bit_is_set(PINA,PA7)) && (bit_is_set(PINA,PA6)))
|
||||
eee: cf 9b sbis 0x19, 7 ; 25
|
||||
ef0: 11 c0 rjmp .+34 ; 0xf14 <main+0xe4>
|
||||
ef2: ce 9b sbis 0x19, 6 ; 25
|
||||
ef4: 0f c0 rjmp .+30 ; 0xf14 <main+0xe4>
|
||||
{
|
||||
if(!switchTwoCheck)
|
||||
ef6: 80 91 3e 04 lds r24, 0x043E
|
||||
efa: 88 23 and r24, r24
|
||||
efc: 09 f0 breq .+2 ; 0xf00 <main+0xd0>
|
||||
efe: b6 cf rjmp .-148 ; 0xe6c <main+0x3c>
|
||||
{
|
||||
deactivateRobot();
|
||||
f00: 0e 94 6f 01 call 0x2de ; 0x2de <deactivateRobot>
|
||||
rfEnable = 0;
|
||||
f04: 10 92 3c 04 sts 0x043C, r1
|
||||
switchTwoCheck = 1;
|
||||
f08: 81 e0 ldi r24, 0x01 ; 1
|
||||
f0a: 80 93 3e 04 sts 0x043E, r24
|
||||
main();
|
||||
f0e: 0e 94 18 07 call 0xe30 ; 0xe30 <main>
|
||||
f12: ac cf rjmp .-168 ; 0xe6c <main+0x3c>
|
||||
}
|
||||
}
|
||||
// Active-mode 3 (left switch upper position)
|
||||
else if (!bit_is_set(PINA,PA7))
|
||||
f14: cf 99 sbic 0x19, 7 ; 25
|
||||
f16: aa cf rjmp .-172 ; 0xe6c <main+0x3c>
|
||||
{
|
||||
if(switchTwoCheck)
|
||||
f18: 80 91 3e 04 lds r24, 0x043E
|
||||
f1c: 88 23 and r24, r24
|
||||
f1e: 09 f4 brne .+2 ; 0xf22 <main+0xf2>
|
||||
f20: a5 cf rjmp .-182 ; 0xe6c <main+0x3c>
|
||||
{
|
||||
activateRobot(2);
|
||||
f22: 82 e0 ldi r24, 0x02 ; 2
|
||||
f24: 0e 94 5b 01 call 0x2b6 ; 0x2b6 <activateRobot>
|
||||
switchTwoCheck = 0;
|
||||
f28: 10 92 3e 04 sts 0x043E, r1
|
||||
f2c: 9f cf rjmp .-194 ; 0xe6c <main+0x3c>
|
||||
|
||||
00000f2e <lcdEngToSwe>:
|
||||
data=0x83;
|
||||
break;
|
||||
}
|
||||
|
||||
return(data);
|
||||
}
|
||||
f2e: 99 27 eor r25, r25
|
||||
f30: 08 95 ret
|
||||
|
||||
00000f32 <lcdSetIntensity>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetIntensity (uint8_t intensity)
|
||||
{
|
||||
|
||||
OCR0 = intensity;
|
||||
f32: 81 bf out 0x31, r24 ; 49
|
||||
f34: 08 95 ret
|
||||
|
||||
00000f36 <lcdWriteIns>:
|
||||
|
||||
Input: cData
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteIns (uint8_t data)
|
||||
{
|
||||
f36: 1f 93 push r17
|
||||
f38: 18 2f mov r17, r24
|
||||
|
||||
spiSetLowSpeed();
|
||||
f3a: 0e 94 f9 0a call 0x15f2 ; 0x15f2 <spiSetLowSpeed>
|
||||
spiSelectDeviceIO(LCD_CS);
|
||||
f3e: 80 e0 ldi r24, 0x00 ; 0
|
||||
f40: 0e 94 fc 0a call 0x15f8 ; 0x15f8 <spiSelectDeviceIO>
|
||||
LCD_PORT &= ~(1<<LCD_RS);
|
||||
f44: c1 98 cbi 0x18, 1 ; 24
|
||||
spiWrite(data);
|
||||
f46: 81 2f mov r24, r17
|
||||
f48: 0e 94 ef 0a call 0x15de ; 0x15de <spiWrite>
|
||||
f4c: 1f 91 pop r17
|
||||
f4e: 08 95 ret
|
||||
|
||||
00000f50 <lcdSetLayout>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetLayout (uint8_t layoutType)
|
||||
{
|
||||
|
||||
switch(layoutType)
|
||||
f50: 81 30 cpi r24, 0x01 ; 1
|
||||
f52: 51 f0 breq .+20 ; 0xf68 <lcdSetLayout+0x18>
|
||||
f54: 81 30 cpi r24, 0x01 ; 1
|
||||
f56: 18 f0 brcs .+6 ; 0xf5e <lcdSetLayout+0xe>
|
||||
f58: 82 30 cpi r24, 0x02 ; 2
|
||||
f5a: f9 f4 brne .+62 ; 0xf9a <lcdSetLayout+0x4a>
|
||||
f5c: 12 c0 rjmp .+36 ; 0xf82 <lcdSetLayout+0x32>
|
||||
{
|
||||
case 0: // 3 lines
|
||||
lcdWriteIns(0x39);
|
||||
f5e: 89 e3 ldi r24, 0x39 ; 57
|
||||
f60: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x1D); // bias = 1/4 , 3 line mode
|
||||
f64: 8d e1 ldi r24, 0x1D ; 29
|
||||
f66: 0a c0 rjmp .+20 ; 0xf7c <lcdSetLayout+0x2c>
|
||||
break;
|
||||
|
||||
case 1: // 2 lines, Double font on lower position
|
||||
lcdWriteIns(0x39);
|
||||
f68: 89 e3 ldi r24, 0x39 ; 57
|
||||
f6a: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x1C); // bias = 1/4 , 2 line mode
|
||||
f6e: 8c e1 ldi r24, 0x1C ; 28
|
||||
f70: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x3E);
|
||||
f74: 8e e3 ldi r24, 0x3E ; 62
|
||||
f76: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x10);
|
||||
f7a: 80 e1 ldi r24, 0x10 ; 16
|
||||
f7c: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
f80: 08 95 ret
|
||||
break;
|
||||
|
||||
case 2: // 2 lines, Double font on upper position
|
||||
lcdWriteIns(0x39);
|
||||
f82: 89 e3 ldi r24, 0x39 ; 57
|
||||
f84: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x1C); // bias = 1/4 , 2 line mode
|
||||
f88: 8c e1 ldi r24, 0x1C ; 28
|
||||
f8a: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x3E);
|
||||
f8e: 8e e3 ldi r24, 0x3E ; 62
|
||||
f90: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x18);
|
||||
f94: 88 e1 ldi r24, 0x18 ; 24
|
||||
f96: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
f9a: 08 95 ret
|
||||
|
||||
00000f9c <lcdSetContrast>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetContrast (uint8_t contrastValue)
|
||||
{
|
||||
|
||||
lcdWriteIns(0x70|(0x0F & contrastValue));
|
||||
f9c: 8f 70 andi r24, 0x0F ; 15
|
||||
f9e: 80 67 ori r24, 0x70 ; 112
|
||||
fa0: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
fa4: 08 95 ret
|
||||
|
||||
00000fa6 <lcdSetPos>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetPos (uint8_t address)
|
||||
{
|
||||
|
||||
lcdWriteIns(0x80|address);
|
||||
fa6: 80 68 ori r24, 0x80 ; 128
|
||||
fa8: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
fac: 08 95 ret
|
||||
|
||||
00000fae <lcdReturnHome>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdReturnHome (void)
|
||||
{
|
||||
|
||||
lcdWriteIns(0x02);
|
||||
fae: 82 e0 ldi r24, 0x02 ; 2
|
||||
fb0: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
fb4: 80 e4 ldi r24, 0x40 ; 64
|
||||
fb6: 9f e1 ldi r25, 0x1F ; 31
|
||||
fb8: 01 97 sbiw r24, 0x01 ; 1
|
||||
fba: f1 f7 brne .-4 ; 0xfb8 <lcdReturnHome+0xa>
|
||||
fbc: 08 95 ret
|
||||
|
||||
00000fbe <lcdClearDisplay>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdClearDisplay (void)
|
||||
{
|
||||
|
||||
lcdWriteIns(0x01);
|
||||
fbe: 81 e0 ldi r24, 0x01 ; 1
|
||||
fc0: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
fc4: 80 e4 ldi r24, 0x40 ; 64
|
||||
fc6: 9f e1 ldi r25, 0x1F ; 31
|
||||
fc8: 01 97 sbiw r24, 0x01 ; 1
|
||||
fca: f1 f7 brne .-4 ; 0xfc8 <lcdClearDisplay+0xa>
|
||||
fcc: 08 95 ret
|
||||
|
||||
00000fce <lcdSetBlink>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetBlink (uint8_t value)
|
||||
{
|
||||
|
||||
switch (value)
|
||||
fce: 88 23 and r24, r24
|
||||
fd0: 31 f0 breq .+12 ; 0xfde <lcdSetBlink+0x10>
|
||||
fd2: 81 30 cpi r24, 0x01 ; 1
|
||||
fd4: 49 f4 brne .+18 ; 0xfe8 <lcdSetBlink+0x1a>
|
||||
{
|
||||
case ON:
|
||||
lcdTempReg |= 0x01;
|
||||
fd6: 80 91 43 04 lds r24, 0x0443
|
||||
fda: 81 60 ori r24, 0x01 ; 1
|
||||
fdc: 03 c0 rjmp .+6 ; 0xfe4 <lcdSetBlink+0x16>
|
||||
break;
|
||||
case OFF:
|
||||
lcdTempReg &= ~(0x01);
|
||||
fde: 80 91 43 04 lds r24, 0x0443
|
||||
fe2: 8e 7f andi r24, 0xFE ; 254
|
||||
fe4: 80 93 43 04 sts 0x0443, r24
|
||||
break;
|
||||
}
|
||||
|
||||
lcdWriteIns(0x08|lcdTempReg);
|
||||
fe8: 80 91 43 04 lds r24, 0x0443
|
||||
fec: 88 60 ori r24, 0x08 ; 8
|
||||
fee: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
ff2: 08 95 ret
|
||||
|
||||
00000ff4 <lcdSetCursor>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetCursor (uint8_t value)
|
||||
{
|
||||
|
||||
switch (value)
|
||||
ff4: 88 23 and r24, r24
|
||||
ff6: 31 f0 breq .+12 ; 0x1004 <lcdSetCursor+0x10>
|
||||
ff8: 81 30 cpi r24, 0x01 ; 1
|
||||
ffa: 49 f4 brne .+18 ; 0x100e <lcdSetCursor+0x1a>
|
||||
{
|
||||
case ON:
|
||||
lcdTempReg |= 0x02;
|
||||
ffc: 80 91 43 04 lds r24, 0x0443
|
||||
1000: 82 60 ori r24, 0x02 ; 2
|
||||
1002: 03 c0 rjmp .+6 ; 0x100a <lcdSetCursor+0x16>
|
||||
break;
|
||||
case OFF:
|
||||
lcdTempReg &= ~(0x02);
|
||||
1004: 80 91 43 04 lds r24, 0x0443
|
||||
1008: 8d 7f andi r24, 0xFD ; 253
|
||||
100a: 80 93 43 04 sts 0x0443, r24
|
||||
break;
|
||||
}
|
||||
|
||||
lcdWriteIns(0x08|lcdTempReg);
|
||||
100e: 80 91 43 04 lds r24, 0x0443
|
||||
1012: 88 60 ori r24, 0x08 ; 8
|
||||
1014: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
1018: 08 95 ret
|
||||
|
||||
0000101a <lcdSetDisplay>:
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetDisplay (uint8_t value)
|
||||
{
|
||||
|
||||
switch (value)
|
||||
101a: 88 23 and r24, r24
|
||||
101c: 31 f0 breq .+12 ; 0x102a <lcdSetDisplay+0x10>
|
||||
101e: 81 30 cpi r24, 0x01 ; 1
|
||||
1020: 49 f4 brne .+18 ; 0x1034 <lcdSetDisplay+0x1a>
|
||||
{
|
||||
case ON:
|
||||
lcdTempReg |= 0x04;
|
||||
1022: 80 91 43 04 lds r24, 0x0443
|
||||
1026: 84 60 ori r24, 0x04 ; 4
|
||||
1028: 03 c0 rjmp .+6 ; 0x1030 <lcdSetDisplay+0x16>
|
||||
break;
|
||||
case OFF:
|
||||
lcdTempReg &= ~(0x04);
|
||||
102a: 80 91 43 04 lds r24, 0x0443
|
||||
102e: 8b 7f andi r24, 0xFB ; 251
|
||||
1030: 80 93 43 04 sts 0x0443, r24
|
||||
break;
|
||||
}
|
||||
|
||||
lcdWriteIns(0x08|lcdTempReg);
|
||||
1034: 80 91 43 04 lds r24, 0x0443
|
||||
1038: 88 60 ori r24, 0x08 ; 8
|
||||
103a: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
103e: 08 95 ret
|
||||
|
||||
00001040 <lcdWriteChar>:
|
||||
|
||||
Input: cData
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteChar (uint8_t data)
|
||||
{
|
||||
1040: 1f 93 push r17
|
||||
1042: 18 2f mov r17, r24
|
||||
|
||||
spiSetLowSpeed();
|
||||
1044: 0e 94 f9 0a call 0x15f2 ; 0x15f2 <spiSetLowSpeed>
|
||||
spiSelectDeviceIO(LCD_CS);
|
||||
1048: 80 e0 ldi r24, 0x00 ; 0
|
||||
104a: 0e 94 fc 0a call 0x15f8 ; 0x15f8 <spiSelectDeviceIO>
|
||||
LCD_PORT |= (1<<LCD_RS);
|
||||
104e: c1 9a sbi 0x18, 1 ; 24
|
||||
spiWrite(lcdEngToSwe(data));
|
||||
1050: 81 2f mov r24, r17
|
||||
1052: 0e 94 ef 0a call 0x15de ; 0x15de <spiWrite>
|
||||
1056: 1f 91 pop r17
|
||||
1058: 08 95 ret
|
||||
|
||||
0000105a <lcdWriteStringP>:
|
||||
|
||||
Input: *stringPointer (int[])
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteStringP (const uint8_t *progmemStringPointer)
|
||||
{
|
||||
105a: cf 93 push r28
|
||||
105c: df 93 push r29
|
||||
105e: ec 01 movw r28, r24
|
||||
1060: 02 c0 rjmp .+4 ; 0x1066 <lcdWriteStringP+0xc>
|
||||
|
||||
register uint8_t c;
|
||||
|
||||
while((c = pgm_read_byte(progmemStringPointer++)))
|
||||
{
|
||||
lcdWriteChar(c);
|
||||
1062: 0e 94 20 08 call 0x1040 ; 0x1040 <lcdWriteChar>
|
||||
1066: fe 01 movw r30, r28
|
||||
void lcdWriteStringP (const uint8_t *progmemStringPointer)
|
||||
{
|
||||
|
||||
register uint8_t c;
|
||||
|
||||
while((c = pgm_read_byte(progmemStringPointer++)))
|
||||
1068: 21 96 adiw r28, 0x01 ; 1
|
||||
106a: 84 91 lpm r24, Z
|
||||
106c: 88 23 and r24, r24
|
||||
106e: c9 f7 brne .-14 ; 0x1062 <lcdWriteStringP+0x8>
|
||||
1070: df 91 pop r29
|
||||
1072: cf 91 pop r28
|
||||
1074: 08 95 ret
|
||||
|
||||
00001076 <lcdWriteString>:
|
||||
|
||||
Input: *stringPointer (int[])
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteString (const uint8_t *stringPointer)
|
||||
{
|
||||
1076: cf 93 push r28
|
||||
1078: df 93 push r29
|
||||
107a: ec 01 movw r28, r24
|
||||
107c: 02 c0 rjmp .+4 ; 0x1082 <lcdWriteString+0xc>
|
||||
|
||||
register uint8_t c;
|
||||
|
||||
while((c = *stringPointer++))
|
||||
{
|
||||
lcdWriteChar(c);
|
||||
107e: 0e 94 20 08 call 0x1040 ; 0x1040 <lcdWriteChar>
|
||||
void lcdWriteString (const uint8_t *stringPointer)
|
||||
{
|
||||
|
||||
register uint8_t c;
|
||||
|
||||
while((c = *stringPointer++))
|
||||
1082: 89 91 ld r24, Y+
|
||||
1084: 88 23 and r24, r24
|
||||
1086: d9 f7 brne .-10 ; 0x107e <lcdWriteString+0x8>
|
||||
1088: df 91 pop r29
|
||||
108a: cf 91 pop r28
|
||||
108c: 08 95 ret
|
||||
|
||||
0000108e <lcdWriteHex>:
|
||||
Description: Writes hex to LCD
|
||||
Input: hexValue
|
||||
Output: -
|
||||
----------------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteHex(uint16_t hexValue)
|
||||
{
|
||||
108e: cf 93 push r28
|
||||
1090: df 93 push r29
|
||||
1092: cd b7 in r28, 0x3d ; 61
|
||||
1094: de b7 in r29, 0x3e ; 62
|
||||
1096: 27 97 sbiw r28, 0x07 ; 7
|
||||
1098: 0f b6 in r0, 0x3f ; 63
|
||||
109a: f8 94 cli
|
||||
109c: de bf out 0x3e, r29 ; 62
|
||||
109e: 0f be out 0x3f, r0 ; 63
|
||||
10a0: cd bf out 0x3d, r28 ; 61
|
||||
10a2: bc 01 movw r22, r24
|
||||
uint8_t tempString[7];
|
||||
|
||||
uint8_t n=0;
|
||||
uint8_t i;
|
||||
|
||||
tempString[n] = '0';
|
||||
10a4: 80 e3 ldi r24, 0x30 ; 48
|
||||
10a6: 89 83 std Y+1, r24 ; 0x01
|
||||
n++;
|
||||
tempString[n] = 'x';
|
||||
10a8: 88 e7 ldi r24, 0x78 ; 120
|
||||
10aa: 8a 83 std Y+2, r24 ; 0x02
|
||||
10ac: fe 01 movw r30, r28
|
||||
10ae: 33 96 adiw r30, 0x03 ; 3
|
||||
10b0: 4c e0 ldi r20, 0x0C ; 12
|
||||
10b2: 50 e0 ldi r21, 0x00 ; 0
|
||||
10b4: 33 e0 ldi r19, 0x03 ; 3
|
||||
n++;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
|
||||
if(((hexValue>>(12-(i*4)))&0x000F)>0x0009)
|
||||
10b6: cb 01 movw r24, r22
|
||||
10b8: 04 2e mov r0, r20
|
||||
10ba: 02 c0 rjmp .+4 ; 0x10c0 <lcdWriteHex+0x32>
|
||||
10bc: 96 95 lsr r25
|
||||
10be: 87 95 ror r24
|
||||
10c0: 0a 94 dec r0
|
||||
10c2: e2 f7 brpl .-8 ; 0x10bc <lcdWriteHex+0x2e>
|
||||
10c4: 28 2f mov r18, r24
|
||||
10c6: 2f 70 andi r18, 0x0F ; 15
|
||||
10c8: 8f 70 andi r24, 0x0F ; 15
|
||||
10ca: 90 70 andi r25, 0x00 ; 0
|
||||
10cc: 0a 97 sbiw r24, 0x0a ; 10
|
||||
10ce: 10 f0 brcs .+4 ; 0x10d4 <lcdWriteHex+0x46>
|
||||
{
|
||||
tempString[n] = (((hexValue>>(12-(i*4)))&0x000F)+0x37);
|
||||
10d0: 29 5c subi r18, 0xC9 ; 201
|
||||
10d2: 01 c0 rjmp .+2 ; 0x10d6 <lcdWriteHex+0x48>
|
||||
n++;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempString[n] = (((hexValue>>(12-(i*4)))&0x000F)|0x30);
|
||||
10d4: 20 63 ori r18, 0x30 ; 48
|
||||
10d6: 20 83 st Z, r18
|
||||
10d8: 44 50 subi r20, 0x04 ; 4
|
||||
10da: 50 40 sbci r21, 0x00 ; 0
|
||||
10dc: 3f 5f subi r19, 0xFF ; 255
|
||||
10de: 31 96 adiw r30, 0x01 ; 1
|
||||
tempString[n] = '0';
|
||||
n++;
|
||||
tempString[n] = 'x';
|
||||
n++;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
10e0: 37 30 cpi r19, 0x07 ; 7
|
||||
10e2: 49 f7 brne .-46 ; 0x10b6 <lcdWriteHex+0x28>
|
||||
tempString[n] = (((hexValue>>(12-(i*4)))&0x000F)|0x30);
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
tempString[n] = '\0';
|
||||
10e4: 1f 82 std Y+7, r1 ; 0x07
|
||||
|
||||
lcdWriteString(tempString);
|
||||
10e6: ce 01 movw r24, r28
|
||||
10e8: 01 96 adiw r24, 0x01 ; 1
|
||||
10ea: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
10ee: 27 96 adiw r28, 0x07 ; 7
|
||||
10f0: 0f b6 in r0, 0x3f ; 63
|
||||
10f2: f8 94 cli
|
||||
10f4: de bf out 0x3e, r29 ; 62
|
||||
10f6: 0f be out 0x3f, r0 ; 63
|
||||
10f8: cd bf out 0x3d, r28 ; 61
|
||||
10fa: df 91 pop r29
|
||||
10fc: cf 91 pop r28
|
||||
10fe: 08 95 ret
|
||||
|
||||
00001100 <lcdWriteHexAsDecimal>:
|
||||
Description: Writes hex value as decimal to LCD
|
||||
Input: sensorValue
|
||||
Output: -
|
||||
----------------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteHexAsDecimal(uint16_t hexValue)
|
||||
{
|
||||
1100: 8f 92 push r8
|
||||
1102: 9f 92 push r9
|
||||
1104: af 92 push r10
|
||||
1106: bf 92 push r11
|
||||
1108: cf 92 push r12
|
||||
110a: df 92 push r13
|
||||
110c: ef 92 push r14
|
||||
110e: ff 92 push r15
|
||||
1110: 0f 93 push r16
|
||||
1112: 1f 93 push r17
|
||||
1114: cf 93 push r28
|
||||
1116: df 93 push r29
|
||||
1118: cd b7 in r28, 0x3d ; 61
|
||||
111a: de b7 in r29, 0x3e ; 62
|
||||
111c: 25 97 sbiw r28, 0x05 ; 5
|
||||
111e: 0f b6 in r0, 0x3f ; 63
|
||||
1120: f8 94 cli
|
||||
1122: de bf out 0x3e, r29 ; 62
|
||||
1124: 0f be out 0x3f, r0 ; 63
|
||||
1126: cd bf out 0x3d, r28 ; 61
|
||||
1128: 8c 01 movw r16, r24
|
||||
uint8_t tempString[5]={" "};
|
||||
112a: de 01 movw r26, r28
|
||||
112c: 11 96 adiw r26, 0x01 ; 1
|
||||
112e: e8 e0 ldi r30, 0x08 ; 8
|
||||
1130: f4 e0 ldi r31, 0x04 ; 4
|
||||
1132: 85 e0 ldi r24, 0x05 ; 5
|
||||
1134: 01 90 ld r0, Z+
|
||||
1136: 0d 92 st X+, r0
|
||||
1138: 81 50 subi r24, 0x01 ; 1
|
||||
113a: e1 f7 brne .-8 ; 0x1134 <lcdWriteHexAsDecimal+0x34>
|
||||
uint8_t secondDigit = 0;
|
||||
uint8_t thirdDigit = 0;
|
||||
uint8_t fourthDigit = 0;
|
||||
uint8_t fifthDigit = 0;
|
||||
|
||||
firstDigit = (hexValue/10000);
|
||||
113c: c8 01 movw r24, r16
|
||||
113e: 60 e1 ldi r22, 0x10 ; 16
|
||||
1140: 77 e2 ldi r23, 0x27 ; 39
|
||||
1142: 0e 94 d3 0b call 0x17a6 ; 0x17a6 <__udivmodhi4>
|
||||
1146: fb 01 movw r30, r22
|
||||
1148: e6 2e mov r14, r22
|
||||
secondDigit = ((hexValue-(firstDigit*10000))/1000);
|
||||
114a: 26 2f mov r18, r22
|
||||
114c: 33 27 eor r19, r19
|
||||
114e: 80 e1 ldi r24, 0x10 ; 16
|
||||
1150: 97 e2 ldi r25, 0x27 ; 39
|
||||
1152: 28 9f mul r18, r24
|
||||
1154: 60 01 movw r12, r0
|
||||
1156: 29 9f mul r18, r25
|
||||
1158: d0 0c add r13, r0
|
||||
115a: 38 9f mul r19, r24
|
||||
115c: d0 0c add r13, r0
|
||||
115e: 11 24 eor r1, r1
|
||||
1160: c8 01 movw r24, r16
|
||||
1162: 8c 19 sub r24, r12
|
||||
1164: 9d 09 sbc r25, r13
|
||||
1166: 68 ee ldi r22, 0xE8 ; 232
|
||||
1168: 73 e0 ldi r23, 0x03 ; 3
|
||||
116a: 0e 94 d3 0b call 0x17a6 ; 0x17a6 <__udivmodhi4>
|
||||
116e: f6 2e mov r15, r22
|
||||
thirdDigit = ((hexValue-(firstDigit*10000+(secondDigit*1000)))/100);
|
||||
1170: 26 2f mov r18, r22
|
||||
1172: 33 27 eor r19, r19
|
||||
1174: 88 ee ldi r24, 0xE8 ; 232
|
||||
1176: 93 e0 ldi r25, 0x03 ; 3
|
||||
1178: 28 9f mul r18, r24
|
||||
117a: 40 01 movw r8, r0
|
||||
117c: 29 9f mul r18, r25
|
||||
117e: 90 0c add r9, r0
|
||||
1180: 38 9f mul r19, r24
|
||||
1182: 90 0c add r9, r0
|
||||
1184: 11 24 eor r1, r1
|
||||
1186: 94 01 movw r18, r8
|
||||
1188: 2c 0d add r18, r12
|
||||
118a: 3d 1d adc r19, r13
|
||||
118c: c8 01 movw r24, r16
|
||||
118e: 82 1b sub r24, r18
|
||||
1190: 93 0b sbc r25, r19
|
||||
1192: 64 e6 ldi r22, 0x64 ; 100
|
||||
1194: 70 e0 ldi r23, 0x00 ; 0
|
||||
1196: 0e 94 d3 0b call 0x17a6 ; 0x17a6 <__udivmodhi4>
|
||||
119a: 46 2f mov r20, r22
|
||||
fourthDigit = ((hexValue-(firstDigit*10000+(secondDigit*1000)+(thirdDigit*100)))/10);
|
||||
119c: 84 e6 ldi r24, 0x64 ; 100
|
||||
119e: 68 9f mul r22, r24
|
||||
11a0: 50 01 movw r10, r0
|
||||
11a2: 11 24 eor r1, r1
|
||||
11a4: 2a 0d add r18, r10
|
||||
11a6: 3b 1d adc r19, r11
|
||||
11a8: c8 01 movw r24, r16
|
||||
11aa: 82 1b sub r24, r18
|
||||
11ac: 93 0b sbc r25, r19
|
||||
11ae: 6a e0 ldi r22, 0x0A ; 10
|
||||
11b0: 70 e0 ldi r23, 0x00 ; 0
|
||||
11b2: 0e 94 d3 0b call 0x17a6 ; 0x17a6 <__udivmodhi4>
|
||||
fifthDigit = (hexValue-(firstDigit*10000+(secondDigit*1000)+(thirdDigit*100)+(fourthDigit*10)));
|
||||
|
||||
uint8_t n = 0;
|
||||
|
||||
if(firstDigit)
|
||||
11b6: ee 23 and r30, r30
|
||||
11b8: 11 f4 brne .+4 ; 0x11be <lcdWriteHexAsDecimal+0xbe>
|
||||
11ba: 30 e0 ldi r19, 0x00 ; 0
|
||||
11bc: 04 c0 rjmp .+8 ; 0x11c6 <lcdWriteHexAsDecimal+0xc6>
|
||||
{
|
||||
tempString[n] = (0x30|firstDigit);
|
||||
11be: 8e 2f mov r24, r30
|
||||
11c0: 80 63 ori r24, 0x30 ; 48
|
||||
11c2: 89 83 std Y+1, r24 ; 0x01
|
||||
11c4: 31 e0 ldi r19, 0x01 ; 1
|
||||
n++;
|
||||
}
|
||||
if(secondDigit||firstDigit)
|
||||
11c6: ff 20 and r15, r15
|
||||
11c8: 11 f4 brne .+4 ; 0x11ce <lcdWriteHexAsDecimal+0xce>
|
||||
11ca: ee 20 and r14, r14
|
||||
11cc: 39 f0 breq .+14 ; 0x11dc <lcdWriteHexAsDecimal+0xdc>
|
||||
{
|
||||
tempString[n] = (0x30|secondDigit);
|
||||
11ce: fe 01 movw r30, r28
|
||||
11d0: e3 0f add r30, r19
|
||||
11d2: f1 1d adc r31, r1
|
||||
11d4: 8f 2d mov r24, r15
|
||||
11d6: 80 63 ori r24, 0x30 ; 48
|
||||
11d8: 81 83 std Z+1, r24 ; 0x01
|
||||
n++;
|
||||
11da: 3f 5f subi r19, 0xFF ; 255
|
||||
}
|
||||
if(thirdDigit||secondDigit||firstDigit)
|
||||
11dc: 44 23 and r20, r20
|
||||
11de: 21 f4 brne .+8 ; 0x11e8 <lcdWriteHexAsDecimal+0xe8>
|
||||
11e0: ff 20 and r15, r15
|
||||
11e2: 11 f4 brne .+4 ; 0x11e8 <lcdWriteHexAsDecimal+0xe8>
|
||||
11e4: ee 20 and r14, r14
|
||||
11e6: 39 f0 breq .+14 ; 0x11f6 <lcdWriteHexAsDecimal+0xf6>
|
||||
{
|
||||
tempString[n] = (0x30|thirdDigit);
|
||||
11e8: fe 01 movw r30, r28
|
||||
11ea: e3 0f add r30, r19
|
||||
11ec: f1 1d adc r31, r1
|
||||
11ee: 84 2f mov r24, r20
|
||||
11f0: 80 63 ori r24, 0x30 ; 48
|
||||
11f2: 81 83 std Z+1, r24 ; 0x01
|
||||
n++;
|
||||
11f4: 3f 5f subi r19, 0xFF ; 255
|
||||
}
|
||||
if(fourthDigit||thirdDigit||secondDigit||firstDigit)
|
||||
11f6: 66 23 and r22, r22
|
||||
11f8: 31 f4 brne .+12 ; 0x1206 <lcdWriteHexAsDecimal+0x106>
|
||||
11fa: 44 23 and r20, r20
|
||||
11fc: 21 f4 brne .+8 ; 0x1206 <lcdWriteHexAsDecimal+0x106>
|
||||
11fe: ff 20 and r15, r15
|
||||
1200: 11 f4 brne .+4 ; 0x1206 <lcdWriteHexAsDecimal+0x106>
|
||||
1202: ee 20 and r14, r14
|
||||
1204: 39 f0 breq .+14 ; 0x1214 <lcdWriteHexAsDecimal+0x114>
|
||||
{
|
||||
tempString[n] = (0x30|fourthDigit);
|
||||
1206: fe 01 movw r30, r28
|
||||
1208: e3 0f add r30, r19
|
||||
120a: f1 1d adc r31, r1
|
||||
120c: 86 2f mov r24, r22
|
||||
120e: 80 63 ori r24, 0x30 ; 48
|
||||
1210: 81 83 std Z+1, r24 ; 0x01
|
||||
n++;
|
||||
1212: 3f 5f subi r19, 0xFF ; 255
|
||||
}
|
||||
tempString[n] = (0x30|fifthDigit);
|
||||
1214: ae 01 movw r20, r28
|
||||
1216: 4f 5f subi r20, 0xFF ; 255
|
||||
1218: 5f 4f sbci r21, 0xFF ; 255
|
||||
121a: fa 01 movw r30, r20
|
||||
121c: e3 0f add r30, r19
|
||||
121e: f1 1d adc r31, r1
|
||||
1220: 20 2f mov r18, r16
|
||||
1222: 2c 19 sub r18, r12
|
||||
1224: 28 19 sub r18, r8
|
||||
1226: 2a 19 sub r18, r10
|
||||
1228: 8a e0 ldi r24, 0x0A ; 10
|
||||
122a: 68 9f mul r22, r24
|
||||
122c: c0 01 movw r24, r0
|
||||
122e: 11 24 eor r1, r1
|
||||
1230: 28 1b sub r18, r24
|
||||
1232: 20 63 ori r18, 0x30 ; 48
|
||||
1234: 20 83 st Z, r18
|
||||
n++;
|
||||
1236: 23 2f mov r18, r19
|
||||
1238: 04 c0 rjmp .+8 ; 0x1242 <lcdWriteHexAsDecimal+0x142>
|
||||
|
||||
while(n<5)
|
||||
{
|
||||
tempString[n] = ' ';
|
||||
123a: ae 0f add r26, r30
|
||||
123c: bf 1f adc r27, r31
|
||||
123e: 80 e2 ldi r24, 0x20 ; 32
|
||||
1240: 8c 93 st X, r24
|
||||
n++;
|
||||
1242: 2f 5f subi r18, 0xFF ; 255
|
||||
1244: da 01 movw r26, r20
|
||||
1246: e2 2f mov r30, r18
|
||||
1248: ff 27 eor r31, r31
|
||||
n++;
|
||||
}
|
||||
tempString[n] = (0x30|fifthDigit);
|
||||
n++;
|
||||
|
||||
while(n<5)
|
||||
124a: 25 30 cpi r18, 0x05 ; 5
|
||||
124c: b0 f3 brcs .-20 ; 0x123a <lcdWriteHexAsDecimal+0x13a>
|
||||
{
|
||||
tempString[n] = ' ';
|
||||
n++;
|
||||
}
|
||||
tempString[n] = '\0';
|
||||
124e: e4 0f add r30, r20
|
||||
1250: f5 1f adc r31, r21
|
||||
1252: 10 82 st Z, r1
|
||||
|
||||
lcdWriteString(tempString);
|
||||
1254: ca 01 movw r24, r20
|
||||
1256: 0e 94 3b 08 call 0x1076 ; 0x1076 <lcdWriteString>
|
||||
125a: 25 96 adiw r28, 0x05 ; 5
|
||||
125c: 0f b6 in r0, 0x3f ; 63
|
||||
125e: f8 94 cli
|
||||
1260: de bf out 0x3e, r29 ; 62
|
||||
1262: 0f be out 0x3f, r0 ; 63
|
||||
1264: cd bf out 0x3d, r28 ; 61
|
||||
1266: df 91 pop r29
|
||||
1268: cf 91 pop r28
|
||||
126a: 1f 91 pop r17
|
||||
126c: 0f 91 pop r16
|
||||
126e: ff 90 pop r15
|
||||
1270: ef 90 pop r14
|
||||
1272: df 90 pop r13
|
||||
1274: cf 90 pop r12
|
||||
1276: bf 90 pop r11
|
||||
1278: af 90 pop r10
|
||||
127a: 9f 90 pop r9
|
||||
127c: 8f 90 pop r8
|
||||
127e: 08 95 ret
|
||||
|
||||
00001280 <lcdInit>:
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdInit (void)
|
||||
{
|
||||
|
||||
spiInit();
|
||||
1280: 0e 94 06 0b call 0x160c ; 0x160c <spiInit>
|
||||
|
||||
//LCD I/O
|
||||
LCD_DDR |= (1<<LCD_BLED)|(1<<LCD_RS); // Set LCD related pins output
|
||||
1284: 87 b3 in r24, 0x17 ; 23
|
||||
1286: 83 60 ori r24, 0x03 ; 3
|
||||
1288: 87 bb out 0x17, r24 ; 23
|
||||
TCCR0 |= (1<<COM01)|(1<<WGM01)|(1<<WGM00)|(1<<CS01); // Timer0 set as fast PWM, set clock rate to fck/8
|
||||
128a: 83 b7 in r24, 0x33 ; 51
|
||||
128c: 8a 66 ori r24, 0x6A ; 106
|
||||
128e: 83 bf out 0x33, r24 ; 51
|
||||
|
||||
//LCD init
|
||||
lcdSetLayout(0);
|
||||
1290: 80 e0 ldi r24, 0x00 ; 0
|
||||
1292: 0e 94 a8 07 call 0xf50 ; 0xf50 <lcdSetLayout>
|
||||
|
||||
lcdWriteIns(0x50); // booster off, contrast C5, set C4
|
||||
1296: 80 e5 ldi r24, 0x50 ; 80
|
||||
1298: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x6C); // set voltage follower and gain
|
||||
129c: 8c e6 ldi r24, 0x6C ; 108
|
||||
129e: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
lcdWriteIns(0x06); // cursor auto-increment right
|
||||
12a2: 86 e0 ldi r24, 0x06 ; 6
|
||||
12a4: 0e 94 9b 07 call 0xf36 ; 0xf36 <lcdWriteIns>
|
||||
|
||||
lcdSetDisplay(ON);
|
||||
12a8: 81 e0 ldi r24, 0x01 ; 1
|
||||
12aa: 0e 94 0d 08 call 0x101a ; 0x101a <lcdSetDisplay>
|
||||
lcdSetCursor(OFF);
|
||||
12ae: 80 e0 ldi r24, 0x00 ; 0
|
||||
12b0: 0e 94 fa 07 call 0xff4 ; 0xff4 <lcdSetCursor>
|
||||
lcdSetBlink(OFF);
|
||||
12b4: 80 e0 ldi r24, 0x00 ; 0
|
||||
12b6: 0e 94 e7 07 call 0xfce ; 0xfce <lcdSetBlink>
|
||||
lcdSetContrast(6);
|
||||
12ba: 86 e0 ldi r24, 0x06 ; 6
|
||||
12bc: 0e 94 ce 07 call 0xf9c ; 0xf9c <lcdSetContrast>
|
||||
lcdClearDisplay();
|
||||
12c0: 0e 94 df 07 call 0xfbe ; 0xfbe <lcdClearDisplay>
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetIntensity (uint8_t intensity)
|
||||
{
|
||||
|
||||
OCR0 = intensity;
|
||||
12c4: 11 be out 0x31, r1 ; 49
|
||||
12c6: 08 95 ret
|
||||
|
||||
000012c8 <rfIdGetTag>:
|
||||
Input: -
|
||||
Return: pointer to rfIdTagBuffer
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
uint8_t* rfIdGetTag( void )
|
||||
{
|
||||
rfIdGotTag = 0;
|
||||
12c8: 10 92 45 04 sts 0x0445, r1
|
||||
//PORT_RFID |= (1<<RFID_ENABLE);
|
||||
return rfIdTagBuffer;
|
||||
}
|
||||
12cc: 86 e4 ldi r24, 0x46 ; 70
|
||||
12ce: 94 e0 ldi r25, 0x04 ; 4
|
||||
12d0: 08 95 ret
|
||||
|
||||
000012d2 <rfIdClearBuffer>:
|
||||
Input: -
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void rfIdClearBuffer( void )
|
||||
{
|
||||
rfIdByteCount = 0;
|
||||
12d2: 10 92 44 04 sts 0x0444, r1
|
||||
PORT_RFID &= ~(1<<RFID_ENABLE);
|
||||
12d6: 95 98 cbi 0x12, 5 ; 18
|
||||
12d8: 08 95 ret
|
||||
|
||||
000012da <rfIdGetTagPresent>:
|
||||
|
||||
Input: -
|
||||
Return: 1 if true, else 0
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
uint8_t rfIdGetTagPresent( void )
|
||||
{
|
||||
12da: 80 91 45 04 lds r24, 0x0445
|
||||
return rfIdGotTag;
|
||||
}
|
||||
12de: 99 27 eor r25, r25
|
||||
12e0: 08 95 ret
|
||||
|
||||
000012e2 <__vector_19>:
|
||||
Description: UART(0) Receive Complete Interrupt
|
||||
|
||||
Input: -
|
||||
Output: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
SIGNAL (SIG_USART0_RECV){
|
||||
12e2: 1f 92 push r1
|
||||
12e4: 0f 92 push r0
|
||||
12e6: 0f b6 in r0, 0x3f ; 63
|
||||
12e8: 0f 92 push r0
|
||||
12ea: 11 24 eor r1, r1
|
||||
12ec: 2f 93 push r18
|
||||
12ee: 3f 93 push r19
|
||||
12f0: 4f 93 push r20
|
||||
12f2: 5f 93 push r21
|
||||
12f4: 6f 93 push r22
|
||||
12f6: 7f 93 push r23
|
||||
12f8: 8f 93 push r24
|
||||
12fa: 9f 93 push r25
|
||||
12fc: af 93 push r26
|
||||
12fe: bf 93 push r27
|
||||
1300: ef 93 push r30
|
||||
1302: ff 93 push r31
|
||||
|
||||
uint8_t data = usart0Receive();
|
||||
1304: 0e 94 30 0b call 0x1660 ; 0x1660 <usart0Receive>
|
||||
|
||||
if (rfIdByteCount == 0)
|
||||
1308: 90 91 44 04 lds r25, 0x0444
|
||||
130c: 99 23 and r25, r25
|
||||
130e: 31 f4 brne .+12 ; 0x131c <__vector_19+0x3a>
|
||||
{
|
||||
if (data == START_BYTE)
|
||||
1310: 8a 30 cpi r24, 0x0A ; 10
|
||||
1312: a9 f4 brne .+42 ; 0x133e <__vector_19+0x5c>
|
||||
{
|
||||
rfIdByteCount++;
|
||||
1314: 81 e0 ldi r24, 0x01 ; 1
|
||||
1316: 80 93 44 04 sts 0x0444, r24
|
||||
131a: 11 c0 rjmp .+34 ; 0x133e <__vector_19+0x5c>
|
||||
}
|
||||
}
|
||||
else if (rfIdByteCount < 11)
|
||||
131c: 9b 30 cpi r25, 0x0B ; 11
|
||||
131e: 48 f4 brcc .+18 ; 0x1332 <__vector_19+0x50>
|
||||
{
|
||||
rfIdTagBuffer[rfIdByteCount - 1] = data;
|
||||
1320: e9 2f mov r30, r25
|
||||
1322: ff 27 eor r31, r31
|
||||
1324: eb 5b subi r30, 0xBB ; 187
|
||||
1326: fb 4f sbci r31, 0xFB ; 251
|
||||
1328: 80 83 st Z, r24
|
||||
rfIdByteCount++;
|
||||
132a: 9f 5f subi r25, 0xFF ; 255
|
||||
132c: 90 93 44 04 sts 0x0444, r25
|
||||
1330: 06 c0 rjmp .+12 ; 0x133e <__vector_19+0x5c>
|
||||
}
|
||||
else if (rfIdByteCount == 11)
|
||||
1332: 9b 30 cpi r25, 0x0B ; 11
|
||||
1334: 21 f4 brne .+8 ; 0x133e <__vector_19+0x5c>
|
||||
{
|
||||
PORT_RFID |= (1<<RFID_ENABLE);
|
||||
1336: 95 9a sbi 0x12, 5 ; 18
|
||||
rfIdGotTag = 1;
|
||||
1338: 81 e0 ldi r24, 0x01 ; 1
|
||||
133a: 80 93 45 04 sts 0x0445, r24
|
||||
133e: ff 91 pop r31
|
||||
1340: ef 91 pop r30
|
||||
1342: bf 91 pop r27
|
||||
1344: af 91 pop r26
|
||||
1346: 9f 91 pop r25
|
||||
1348: 8f 91 pop r24
|
||||
134a: 7f 91 pop r23
|
||||
134c: 6f 91 pop r22
|
||||
134e: 5f 91 pop r21
|
||||
1350: 4f 91 pop r20
|
||||
1352: 3f 91 pop r19
|
||||
1354: 2f 91 pop r18
|
||||
1356: 0f 90 pop r0
|
||||
1358: 0f be out 0x3f, r0 ; 63
|
||||
135a: 0f 90 pop r0
|
||||
135c: 1f 90 pop r1
|
||||
135e: 18 95 reti
|
||||
|
||||
00001360 <rfIdInit>:
|
||||
Input: -
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void rfIdInit(void)
|
||||
{
|
||||
usart0Init();
|
||||
1360: 0e 94 3d 0b call 0x167a ; 0x167a <usart0Init>
|
||||
usart0SetBaud(USART0_BAUD_RATE);
|
||||
1364: 80 e6 ldi r24, 0x60 ; 96
|
||||
1366: 99 e0 ldi r25, 0x09 ; 9
|
||||
1368: 0e 94 10 0b call 0x1620 ; 0x1620 <usart0SetBaud>
|
||||
rfIdByteCount = 0;
|
||||
136c: 10 92 44 04 sts 0x0444, r1
|
||||
|
||||
DDR_RFID |= (1<<RFID_ENABLE);
|
||||
1370: 8d 9a sbi 0x11, 5 ; 17
|
||||
PORT_RFID &= ~(1<<RFID_ENABLE);
|
||||
1372: 95 98 cbi 0x12, 5 ; 18
|
||||
1374: 08 95 ret
|
||||
|
||||
00001376 <rfIdDisable>:
|
||||
Input: -
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void rfIdDisable(void)
|
||||
{
|
||||
usart0RxIntDisable();
|
||||
1376: 0e 94 3b 0b call 0x1676 ; 0x1676 <usart0RxIntDisable>
|
||||
PORT_RFID |= (1<<RFID_ENABLE);
|
||||
137a: 95 9a sbi 0x12, 5 ; 18
|
||||
137c: 08 95 ret
|
||||
|
||||
0000137e <rfIdEnable>:
|
||||
Input: -
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void rfIdEnable(void)
|
||||
{
|
||||
PORT_RFID &= ~(1<<RFID_ENABLE);
|
||||
137e: 95 98 cbi 0x12, 5 ; 18
|
||||
usart0RxIntEnable();
|
||||
1380: 0e 94 39 0b call 0x1672 ; 0x1672 <usart0RxIntEnable>
|
||||
1384: 08 95 ret
|
||||
|
||||
00001386 <roboMSPGetActiveStatus>:
|
||||
uint8_t firstDigit = 0;
|
||||
uint8_t secondDigit = 0;
|
||||
uint8_t thirdDigit = 0;
|
||||
uint8_t fourthDigit = 0;
|
||||
uint8_t fifthDigit = 0;
|
||||
|
||||
1386: 80 91 0e 04 lds r24, 0x040E
|
||||
firstDigit = (hexValue/10000);
|
||||
138a: 10 92 0e 04 sts 0x040E, r1
|
||||
secondDigit = ((hexValue-(firstDigit*10000))/1000);
|
||||
thirdDigit = ((hexValue-(firstDigit*10000+(secondDigit*1000)))/100);
|
||||
138e: 99 27 eor r25, r25
|
||||
1390: 08 95 ret
|
||||
|
||||
00001392 <calculateChecksum>:
|
||||
|
||||
if(firstDigit)
|
||||
{
|
||||
tempString[n] = (0x30|firstDigit);
|
||||
n++;
|
||||
}
|
||||
1392: bc 01 movw r22, r24
|
||||
1394: 40 e0 ldi r20, 0x00 ; 0
|
||||
1396: 50 e0 ldi r21, 0x00 ; 0
|
||||
1398: 20 e0 ldi r18, 0x00 ; 0
|
||||
139a: 30 e0 ldi r19, 0x00 ; 0
|
||||
if(secondDigit||firstDigit)
|
||||
{
|
||||
tempString[n] = (0x30|secondDigit);
|
||||
n++;
|
||||
}
|
||||
if(thirdDigit||secondDigit||firstDigit)
|
||||
139c: fb 01 movw r30, r22
|
||||
139e: e2 0f add r30, r18
|
||||
13a0: f3 1f adc r31, r19
|
||||
13a2: 80 81 ld r24, Z
|
||||
13a4: 48 0f add r20, r24
|
||||
13a6: 51 1d adc r21, r1
|
||||
13a8: 2f 5f subi r18, 0xFF ; 255
|
||||
13aa: 3f 4f sbci r19, 0xFF ; 255
|
||||
n++;
|
||||
}
|
||||
if(secondDigit||firstDigit)
|
||||
{
|
||||
tempString[n] = (0x30|secondDigit);
|
||||
n++;
|
||||
13ac: 2c 30 cpi r18, 0x0C ; 12
|
||||
13ae: 31 05 cpc r19, r1
|
||||
13b0: a9 f7 brne .-22 ; 0x139c <calculateChecksum+0xa>
|
||||
{
|
||||
tempString[n] = (0x30|thirdDigit);
|
||||
n++;
|
||||
}
|
||||
if(fourthDigit||thirdDigit||secondDigit||firstDigit)
|
||||
{
|
||||
13b2: 84 2f mov r24, r20
|
||||
13b4: 99 27 eor r25, r25
|
||||
13b6: 08 95 ret
|
||||
|
||||
000013b8 <roboMSPValidatePacket>:
|
||||
|
||||
Input: data - char to correct
|
||||
Return: corrected char
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
uint8_t lcdEngToSwe (uint8_t data)
|
||||
{
|
||||
13b8: 1f 93 push r17
|
||||
|
||||
13ba: 10 91 62 04 lds r17, 0x0462
|
||||
13be: 86 e5 ldi r24, 0x56 ; 86
|
||||
13c0: 94 e0 ldi r25, 0x04 ; 4
|
||||
13c2: 0e 94 c9 09 call 0x1392 ; 0x1392 <calculateChecksum>
|
||||
13c6: 18 17 cp r17, r24
|
||||
13c8: 51 f5 brne .+84 ; 0x141e <roboMSPValidatePacket+0x66>
|
||||
switch(data)
|
||||
{
|
||||
13ca: 80 91 57 04 lds r24, 0x0457
|
||||
13ce: 99 27 eor r25, r25
|
||||
13d0: 8f 70 andi r24, 0x0F ; 15
|
||||
13d2: 90 70 andi r25, 0x00 ; 0
|
||||
13d4: 89 2b or r24, r25
|
||||
13d6: 19 f5 brne .+70 ; 0x141e <roboMSPValidatePacket+0x66>
|
||||
case 'Ö':
|
||||
data=0x99;
|
||||
13d8: 80 91 58 04 lds r24, 0x0458
|
||||
13dc: 82 34 cpi r24, 0x42 ; 66
|
||||
13de: b1 f0 breq .+44 ; 0x140c <roboMSPValidatePacket+0x54>
|
||||
13e0: 83 34 cpi r24, 0x43 ; 67
|
||||
13e2: 28 f4 brcc .+10 ; 0x13ee <roboMSPValidatePacket+0x36>
|
||||
13e4: 80 32 cpi r24, 0x20 ; 32
|
||||
13e6: 61 f0 breq .+24 ; 0x1400 <roboMSPValidatePacket+0x48>
|
||||
13e8: 81 34 cpi r24, 0x41 ; 65
|
||||
13ea: c9 f4 brne .+50 ; 0x141e <roboMSPValidatePacket+0x66>
|
||||
13ec: 0c c0 rjmp .+24 ; 0x1406 <roboMSPValidatePacket+0x4e>
|
||||
13ee: 84 34 cpi r24, 0x44 ; 68
|
||||
13f0: 99 f0 breq .+38 ; 0x1418 <roboMSPValidatePacket+0x60>
|
||||
13f2: 84 34 cpi r24, 0x44 ; 68
|
||||
13f4: 70 f0 brcs .+28 ; 0x1412 <roboMSPValidatePacket+0x5a>
|
||||
13f6: 8a 3f cpi r24, 0xFA ; 250
|
||||
13f8: 91 f4 brne .+36 ; 0x141e <roboMSPValidatePacket+0x66>
|
||||
13fa: 85 e0 ldi r24, 0x05 ; 5
|
||||
13fc: 90 e0 ldi r25, 0x00 ; 0
|
||||
13fe: 11 c0 rjmp .+34 ; 0x1422 <roboMSPValidatePacket+0x6a>
|
||||
1400: 81 e0 ldi r24, 0x01 ; 1
|
||||
1402: 90 e0 ldi r25, 0x00 ; 0
|
||||
1404: 0e c0 rjmp .+28 ; 0x1422 <roboMSPValidatePacket+0x6a>
|
||||
break;
|
||||
case 'ö':
|
||||
data=0x94;
|
||||
1406: 82 e0 ldi r24, 0x02 ; 2
|
||||
1408: 90 e0 ldi r25, 0x00 ; 0
|
||||
140a: 0b c0 rjmp .+22 ; 0x1422 <roboMSPValidatePacket+0x6a>
|
||||
break;
|
||||
case 'Ä':
|
||||
140c: 83 e0 ldi r24, 0x03 ; 3
|
||||
140e: 90 e0 ldi r25, 0x00 ; 0
|
||||
1410: 08 c0 rjmp .+16 ; 0x1422 <roboMSPValidatePacket+0x6a>
|
||||
data=0x8E;
|
||||
break;
|
||||
1412: 84 e0 ldi r24, 0x04 ; 4
|
||||
1414: 90 e0 ldi r25, 0x00 ; 0
|
||||
1416: 05 c0 rjmp .+10 ; 0x1422 <roboMSPValidatePacket+0x6a>
|
||||
case 'ä':
|
||||
data=0x84;
|
||||
1418: 86 e0 ldi r24, 0x06 ; 6
|
||||
141a: 90 e0 ldi r25, 0x00 ; 0
|
||||
141c: 02 c0 rjmp .+4 ; 0x1422 <roboMSPValidatePacket+0x6a>
|
||||
break;
|
||||
case 'Å':
|
||||
141e: 80 e0 ldi r24, 0x00 ; 0
|
||||
1420: 90 e0 ldi r25, 0x00 ; 0
|
||||
1422: 1f 91 pop r17
|
||||
1424: 08 95 ret
|
||||
|
||||
00001426 <roboMSPSetData>:
|
||||
Input: cIntensity
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetIntensity (uint8_t intensity)
|
||||
{
|
||||
|
||||
1426: dc 01 movw r26, r24
|
||||
1428: e1 e1 ldi r30, 0x11 ; 17
|
||||
142a: f4 e0 ldi r31, 0x04 ; 4
|
||||
OCR0 = intensity;
|
||||
|
||||
}
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
lcdWriteChar
|
||||
142c: 8d 91 ld r24, X+
|
||||
142e: 81 93 st Z+, r24
|
||||
void lcdSetIntensity (uint8_t intensity)
|
||||
{
|
||||
|
||||
OCR0 = intensity;
|
||||
|
||||
}
|
||||
1430: 84 e0 ldi r24, 0x04 ; 4
|
||||
1432: eb 31 cpi r30, 0x1B ; 27
|
||||
1434: f8 07 cpc r31, r24
|
||||
1436: d1 f7 brne .-12 ; 0x142c <roboMSPSetData+0x6>
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
lcdWriteChar
|
||||
|
||||
Description: Writes character data to LCD.
|
||||
|
||||
1438: cf 01 movw r24, r30
|
||||
143a: 0c 97 sbiw r24, 0x0c ; 12
|
||||
143c: 0e 94 c9 09 call 0x1392 ; 0x1392 <calculateChecksum>
|
||||
1440: 80 93 1b 04 sts 0x041B, r24
|
||||
Input: cData
|
||||
Return: -
|
||||
1444: 81 e0 ldi r24, 0x01 ; 1
|
||||
1446: 80 93 54 04 sts 0x0454, r24
|
||||
144a: 08 95 ret
|
||||
|
||||
0000144c <roboMSPGetCommand>:
|
||||
spiSelectDeviceIO(LCD_CS);
|
||||
LCD_PORT |= (1<<LCD_RS);
|
||||
spiWrite(lcdEngToSwe(data));
|
||||
|
||||
//_delay_us(20);
|
||||
//_delay_us(20);
|
||||
144c: 80 91 53 04 lds r24, 0x0453
|
||||
|
||||
}
|
||||
1450: 99 27 eor r25, r25
|
||||
1452: 08 95 ret
|
||||
|
||||
00001454 <roboMSPClearBuffer>:
|
||||
Input: cData
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteIns (uint8_t data)
|
||||
{
|
||||
|
||||
1454: 10 92 52 04 sts 0x0452, r1
|
||||
spiSetLowSpeed();
|
||||
1458: 81 e0 ldi r24, 0x01 ; 1
|
||||
145a: 80 93 55 04 sts 0x0455, r24
|
||||
145e: 08 95 ret
|
||||
|
||||
00001460 <roboMSPInit>:
|
||||
|
||||
Input: *stringPointer (int[])
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteStringP (const uint8_t *progmemStringPointer)
|
||||
{
|
||||
1460: 0e 94 7d 0b call 0x16fa ; 0x16fa <usart1Init>
|
||||
|
||||
1464: 80 e8 ldi r24, 0x80 ; 128
|
||||
1466: 95 e2 ldi r25, 0x25 ; 37
|
||||
1468: 0e 94 4c 0b call 0x1698 ; 0x1698 <usart1SetBaud>
|
||||
register uint8_t c;
|
||||
146c: 8c 9a sbi 0x11, 4 ; 17
|
||||
|
||||
while((c = pgm_read_byte(progmemStringPointer++)))
|
||||
146e: 10 92 52 04 sts 0x0452, r1
|
||||
{
|
||||
1472: 81 e0 ldi r24, 0x01 ; 1
|
||||
1474: 80 93 55 04 sts 0x0455, r24
|
||||
lcdWriteChar(c);
|
||||
1478: 10 92 54 04 sts 0x0454, r1
|
||||
}
|
||||
|
||||
147c: 84 e0 ldi r24, 0x04 ; 4
|
||||
147e: 80 93 0e 04 sts 0x040E, r24
|
||||
1482: 08 95 ret
|
||||
|
||||
00001484 <roboMSPDisable>:
|
||||
|
||||
register uint8_t c;
|
||||
|
||||
while((c = *stringPointer++))
|
||||
{
|
||||
lcdWriteChar(c);
|
||||
1484: 0e 94 79 0b call 0x16f2 ; 0x16f2 <usart1RxIntDisable>
|
||||
1488: 08 95 ret
|
||||
|
||||
0000148a <roboMSPEnable>:
|
||||
|
||||
}
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
lcdWriteString
|
||||
|
||||
Description: Writes a string of characters to LCD.
|
||||
148a: 0e 94 75 0b call 0x16ea ; 0x16ea <usart1RxIntEnable>
|
||||
148e: 08 95 ret
|
||||
|
||||
00001490 <roboMSPSendData>:
|
||||
n++;
|
||||
|
||||
while(n<5)
|
||||
{
|
||||
tempString[n] = ' ';
|
||||
n++;
|
||||
1490: cf 93 push r28
|
||||
1492: df 93 push r29
|
||||
}
|
||||
tempString[n] = '\0';
|
||||
|
||||
1494: 94 9a sbi 0x12, 4 ; 18
|
||||
1496: 80 e4 ldi r24, 0x40 ; 64
|
||||
1498: 9c e9 ldi r25, 0x9C ; 156
|
||||
149a: fc 01 movw r30, r24
|
||||
149c: 31 97 sbiw r30, 0x01 ; 1
|
||||
149e: f1 f7 brne .-4 ; 0x149c <roboMSPSendData+0xc>
|
||||
14a0: fc 01 movw r30, r24
|
||||
14a2: 31 97 sbiw r30, 0x01 ; 1
|
||||
14a4: f1 f7 brne .-4 ; 0x14a2 <roboMSPSendData+0x12>
|
||||
14a6: fc 01 movw r30, r24
|
||||
14a8: 31 97 sbiw r30, 0x01 ; 1
|
||||
14aa: f1 f7 brne .-4 ; 0x14a8 <roboMSPSendData+0x18>
|
||||
14ac: 01 97 sbiw r24, 0x01 ; 1
|
||||
14ae: f1 f7 brne .-4 ; 0x14ac <roboMSPSendData+0x1c>
|
||||
lcdWriteHex
|
||||
|
||||
Description: Writes hex to LCD
|
||||
Input: hexValue
|
||||
Output: -
|
||||
----------------------------------------------------------------------------------------------------------*/
|
||||
14b0: 80 e0 ldi r24, 0x00 ; 0
|
||||
14b2: 0e 94 71 0b call 0x16e2 ; 0x16e2 <usart1Send>
|
||||
void lcdWriteHex(uint16_t hexValue)
|
||||
14b6: 80 e0 ldi r24, 0x00 ; 0
|
||||
14b8: 0e 94 71 0b call 0x16e2 ; 0x16e2 <usart1Send>
|
||||
{
|
||||
14bc: 80 e0 ldi r24, 0x00 ; 0
|
||||
14be: 0e 94 71 0b call 0x16e2 ; 0x16e2 <usart1Send>
|
||||
uint8_t tempString[7];
|
||||
|
||||
uint8_t n=0;
|
||||
14c2: 80 91 54 04 lds r24, 0x0454
|
||||
14c6: 88 23 and r24, r24
|
||||
14c8: 51 f0 breq .+20 ; 0x14de <roboMSPSendData+0x4e>
|
||||
14ca: cf e0 ldi r28, 0x0F ; 15
|
||||
14cc: d4 e0 ldi r29, 0x04 ; 4
|
||||
uint8_t i;
|
||||
|
||||
tempString[n] = '0';
|
||||
n++;
|
||||
tempString[n] = 'x';
|
||||
14ce: 89 91 ld r24, Y+
|
||||
14d0: 0e 94 71 0b call 0x16e2 ; 0x16e2 <usart1Send>
|
||||
uint8_t tempString[7];
|
||||
|
||||
uint8_t n=0;
|
||||
uint8_t i;
|
||||
|
||||
tempString[n] = '0';
|
||||
14d4: 84 e0 ldi r24, 0x04 ; 4
|
||||
14d6: cc 31 cpi r28, 0x1C ; 28
|
||||
14d8: d8 07 cpc r29, r24
|
||||
14da: 51 f0 breq .+20 ; 0x14f0 <roboMSPSendData+0x60>
|
||||
14dc: f8 cf rjmp .-16 ; 0x14ce <roboMSPSendData+0x3e>
|
||||
14de: cc e1 ldi r28, 0x1C ; 28
|
||||
14e0: d4 e0 ldi r29, 0x04 ; 4
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
|
||||
if(((hexValue>>(12-(i*4)))&0x000F)>0x0009)
|
||||
{
|
||||
tempString[n] = (((hexValue>>(12-(i*4)))&0x000F)+0x37);
|
||||
14e2: 89 91 ld r24, Y+
|
||||
14e4: 0e 94 71 0b call 0x16e2 ; 0x16e2 <usart1Send>
|
||||
n++;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
|
||||
if(((hexValue>>(12-(i*4)))&0x000F)>0x0009)
|
||||
14e8: 84 e0 ldi r24, 0x04 ; 4
|
||||
14ea: c9 32 cpi r28, 0x29 ; 41
|
||||
14ec: d8 07 cpc r29, r24
|
||||
14ee: c9 f7 brne .-14 ; 0x14e2 <roboMSPSendData+0x52>
|
||||
tempString[n] = (((hexValue>>(12-(i*4)))&0x000F)+0x37);
|
||||
n++;
|
||||
}
|
||||
else
|
||||
{
|
||||
tempString[n] = (((hexValue>>(12-(i*4)))&0x000F)|0x30);
|
||||
14f0: 80 e0 ldi r24, 0x00 ; 0
|
||||
14f2: 0e 94 71 0b call 0x16e2 ; 0x16e2 <usart1Send>
|
||||
n++;
|
||||
14f6: 80 e0 ldi r24, 0x00 ; 0
|
||||
14f8: 0e 94 71 0b call 0x16e2 ; 0x16e2 <usart1Send>
|
||||
}
|
||||
14fc: 80 e0 ldi r24, 0x00 ; 0
|
||||
14fe: 0e 94 71 0b call 0x16e2 ; 0x16e2 <usart1Send>
|
||||
}
|
||||
|
||||
1502: 94 98 cbi 0x12, 4 ; 18
|
||||
1504: 80 e8 ldi r24, 0x80 ; 128
|
||||
1506: 9e e3 ldi r25, 0x3E ; 62
|
||||
1508: 01 97 sbiw r24, 0x01 ; 1
|
||||
150a: f1 f7 brne .-4 ; 0x1508 <roboMSPSendData+0x78>
|
||||
150c: df 91 pop r29
|
||||
150e: cf 91 pop r28
|
||||
1510: 08 95 ret
|
||||
|
||||
00001512 <__vector_20>:
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
void lcdSetDisplay (uint8_t value)
|
||||
{
|
||||
|
||||
switch (value)
|
||||
{
|
||||
1512: 1f 92 push r1
|
||||
1514: 0f 92 push r0
|
||||
1516: 0f b6 in r0, 0x3f ; 63
|
||||
1518: 0f 92 push r0
|
||||
151a: 11 24 eor r1, r1
|
||||
151c: 2f 93 push r18
|
||||
151e: 3f 93 push r19
|
||||
1520: 4f 93 push r20
|
||||
1522: 5f 93 push r21
|
||||
1524: 6f 93 push r22
|
||||
1526: 7f 93 push r23
|
||||
1528: 8f 93 push r24
|
||||
152a: 9f 93 push r25
|
||||
152c: af 93 push r26
|
||||
152e: bf 93 push r27
|
||||
1530: ef 93 push r30
|
||||
1532: ff 93 push r31
|
||||
case ON:
|
||||
1534: 0e 94 6c 0b call 0x16d8 ; 0x16d8 <usart1Receive>
|
||||
lcdTempReg |= 0x04;
|
||||
break;
|
||||
1538: 90 91 52 04 lds r25, 0x0452
|
||||
153c: 99 23 and r25, r25
|
||||
153e: 41 f4 brne .+16 ; 0x1550 <__vector_20+0x3e>
|
||||
case OFF:
|
||||
lcdTempReg &= ~(0x04);
|
||||
1540: 8a 30 cpi r24, 0x0A ; 10
|
||||
1542: 81 f4 brne .+32 ; 0x1564 <__vector_20+0x52>
|
||||
break;
|
||||
}
|
||||
1544: 80 93 56 04 sts 0x0456, r24
|
||||
|
||||
1548: 81 e0 ldi r24, 0x01 ; 1
|
||||
154a: 80 93 52 04 sts 0x0452, r24
|
||||
154e: 0a c0 rjmp .+20 ; 0x1564 <__vector_20+0x52>
|
||||
lcdWriteIns(0x08|lcdTempReg);
|
||||
|
||||
}
|
||||
1550: 9d 30 cpi r25, 0x0D ; 13
|
||||
1552: 40 f4 brcc .+16 ; 0x1564 <__vector_20+0x52>
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
lcdSetCursor
|
||||
1554: e9 2f mov r30, r25
|
||||
1556: ff 27 eor r31, r31
|
||||
1558: ea 5a subi r30, 0xAA ; 170
|
||||
155a: fb 4f sbci r31, 0xFB ; 251
|
||||
155c: 80 83 st Z, r24
|
||||
|
||||
155e: 9f 5f subi r25, 0xFF ; 255
|
||||
1560: 90 93 52 04 sts 0x0452, r25
|
||||
Description: Switch cursor on/off on LCD. Value: ON or OFF
|
||||
|
||||
1564: 80 91 52 04 lds r24, 0x0452
|
||||
1568: 8d 30 cpi r24, 0x0D ; 13
|
||||
156a: 41 f5 brne .+80 ; 0x15bc <__vector_20+0xaa>
|
||||
Input: value
|
||||
Return: -
|
||||
156c: 0e 94 42 0a call 0x1484 ; 0x1484 <roboMSPDisable>
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
1570: 78 94 sei
|
||||
void lcdSetCursor (uint8_t value)
|
||||
{
|
||||
1572: 0e 94 dc 09 call 0x13b8 ; 0x13b8 <roboMSPValidatePacket>
|
||||
1576: 80 93 53 04 sts 0x0453, r24
|
||||
|
||||
switch (value)
|
||||
157a: 83 30 cpi r24, 0x03 ; 3
|
||||
157c: a1 f0 breq .+40 ; 0x15a6 <__vector_20+0x94>
|
||||
157e: 84 30 cpi r24, 0x04 ; 4
|
||||
1580: 28 f4 brcc .+10 ; 0x158c <__vector_20+0x7a>
|
||||
1582: 81 30 cpi r24, 0x01 ; 1
|
||||
1584: 51 f0 breq .+20 ; 0x159a <__vector_20+0x88>
|
||||
1586: 82 30 cpi r24, 0x02 ; 2
|
||||
1588: a9 f4 brne .+42 ; 0x15b4 <__vector_20+0xa2>
|
||||
158a: 0d c0 rjmp .+26 ; 0x15a6 <__vector_20+0x94>
|
||||
158c: 85 30 cpi r24, 0x05 ; 5
|
||||
158e: 71 f0 breq .+28 ; 0x15ac <__vector_20+0x9a>
|
||||
1590: 85 30 cpi r24, 0x05 ; 5
|
||||
1592: 40 f0 brcs .+16 ; 0x15a4 <__vector_20+0x92>
|
||||
1594: 86 30 cpi r24, 0x06 ; 6
|
||||
1596: 71 f4 brne .+28 ; 0x15b4 <__vector_20+0xa2>
|
||||
1598: 06 c0 rjmp .+12 ; 0x15a6 <__vector_20+0x94>
|
||||
{
|
||||
case ON:
|
||||
lcdTempReg |= 0x02;
|
||||
159a: 80 93 0e 04 sts 0x040E, r24
|
||||
break;
|
||||
159e: 0e 94 48 0a call 0x1490 ; 0x1490 <roboMSPSendData>
|
||||
15a2: 08 c0 rjmp .+16 ; 0x15b4 <__vector_20+0xa2>
|
||||
|
||||
}
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
lcdSetBlink
|
||||
|
||||
Description: Switch blink on/off on LCD. Value: ON or OFF
|
||||
15a4: 84 e0 ldi r24, 0x04 ; 4
|
||||
|
||||
Input: value
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
15a6: 80 93 0e 04 sts 0x040E, r24
|
||||
15aa: 04 c0 rjmp .+8 ; 0x15b4 <__vector_20+0xa2>
|
||||
void lcdSetBlink (uint8_t value)
|
||||
{
|
||||
|
||||
switch (value)
|
||||
15ac: 80 93 0e 04 sts 0x040E, r24
|
||||
{
|
||||
15b0: 10 92 54 04 sts 0x0454, r1
|
||||
case ON:
|
||||
lcdTempReg |= 0x01;
|
||||
break;
|
||||
case OFF:
|
||||
15b4: 10 92 52 04 sts 0x0452, r1
|
||||
lcdTempReg &= ~(0x01);
|
||||
15b8: 0e 94 45 0a call 0x148a ; 0x148a <roboMSPEnable>
|
||||
15bc: ff 91 pop r31
|
||||
15be: ef 91 pop r30
|
||||
15c0: bf 91 pop r27
|
||||
15c2: af 91 pop r26
|
||||
15c4: 9f 91 pop r25
|
||||
15c6: 8f 91 pop r24
|
||||
15c8: 7f 91 pop r23
|
||||
15ca: 6f 91 pop r22
|
||||
15cc: 5f 91 pop r21
|
||||
15ce: 4f 91 pop r20
|
||||
15d0: 3f 91 pop r19
|
||||
15d2: 2f 91 pop r18
|
||||
15d4: 0f 90 pop r0
|
||||
15d6: 0f be out 0x3f, r0 ; 63
|
||||
15d8: 0f 90 pop r0
|
||||
15da: 1f 90 pop r1
|
||||
15dc: 18 95 reti
|
||||
|
||||
000015de <spiWrite>:
|
||||
Input: sensorValue
|
||||
Output: -
|
||||
----------------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteHexAsDecimal(uint16_t hexValue)
|
||||
{
|
||||
uint8_t tempString[5]={" "};
|
||||
15de: 8f b9 out 0x0f, r24 ; 15
|
||||
uint8_t firstDigit = 0;
|
||||
15e0: 77 9b sbis 0x0e, 7 ; 14
|
||||
15e2: fe cf rjmp .-4 ; 0x15e0 <spiWrite+0x2>
|
||||
15e4: 08 95 ret
|
||||
|
||||
000015e6 <spiReadIO>:
|
||||
secondDigit = ((hexValue-(firstDigit*10000))/1000);
|
||||
thirdDigit = ((hexValue-(firstDigit*10000+(secondDigit*1000)))/100);
|
||||
fourthDigit = ((hexValue-(firstDigit*10000+(secondDigit*1000)+(thirdDigit*100)))/10);
|
||||
fifthDigit = (hexValue-(firstDigit*10000+(secondDigit*1000)+(thirdDigit*100)+(fourthDigit*10)));
|
||||
|
||||
uint8_t n = 0;
|
||||
15e6: 8f b1 in r24, 0x0f ; 15
|
||||
|
||||
15e8: 99 27 eor r25, r25
|
||||
15ea: 08 95 ret
|
||||
|
||||
000015ec <spiSetHighSpeed>:
|
||||
if(secondDigit||firstDigit)
|
||||
{
|
||||
tempString[n] = (0x30|secondDigit);
|
||||
n++;
|
||||
}
|
||||
if(thirdDigit||secondDigit||firstDigit)
|
||||
15ec: 68 98 cbi 0x0d, 0 ; 13
|
||||
{
|
||||
15ee: 69 98 cbi 0x0d, 1 ; 13
|
||||
15f0: 08 95 ret
|
||||
|
||||
000015f2 <spiSetLowSpeed>:
|
||||
n++;
|
||||
}
|
||||
tempString[n] = (0x30|fifthDigit);
|
||||
n++;
|
||||
|
||||
while(n<5)
|
||||
15f2: 68 98 cbi 0x0d, 0 ; 13
|
||||
{
|
||||
15f4: 69 9a sbi 0x0d, 1 ; 13
|
||||
15f6: 08 95 ret
|
||||
|
||||
000015f8 <spiSelectDeviceIO>:
|
||||
}
|
||||
/*----------------------------------------------------------------------------------------------------------
|
||||
lcdWriteHex
|
||||
|
||||
Description: Writes hex to LCD
|
||||
Input: hexValue
|
||||
15f8: 21 e0 ldi r18, 0x01 ; 1
|
||||
15fa: 30 e0 ldi r19, 0x00 ; 0
|
||||
15fc: 02 c0 rjmp .+4 ; 0x1602 <spiSelectDeviceIO+0xa>
|
||||
15fe: 22 0f add r18, r18
|
||||
1600: 33 1f adc r19, r19
|
||||
1602: 8a 95 dec r24
|
||||
1604: e2 f7 brpl .-8 ; 0x15fe <spiSelectDeviceIO+0x6>
|
||||
1606: 20 95 com r18
|
||||
1608: 2b bb out 0x1b, r18 ; 27
|
||||
160a: 08 95 ret
|
||||
|
||||
0000160c <spiInit>:
|
||||
uint8_t i;
|
||||
|
||||
tempString[n] = '0';
|
||||
n++;
|
||||
tempString[n] = 'x';
|
||||
n++;
|
||||
160c: 87 b3 in r24, 0x17 ; 23
|
||||
160e: 80 6b ori r24, 0xB0 ; 176
|
||||
1610: 87 bb out 0x17, r24 ; 23
|
||||
|
||||
1612: c6 9a sbi 0x18, 6 ; 24
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
1614: d0 9a sbi 0x1a, 0 ; 26
|
||||
|
||||
1616: d8 9a sbi 0x1b, 0 ; 27
|
||||
if(((hexValue>>(12-(i*4)))&0x000F)>0x0009)
|
||||
{
|
||||
1618: 8d b1 in r24, 0x0d ; 13
|
||||
161a: 81 65 ori r24, 0x51 ; 81
|
||||
161c: 8d b9 out 0x0d, r24 ; 13
|
||||
161e: 08 95 ret
|
||||
|
||||
00001620 <usart0SetBaud>:
|
||||
================================================================================================*/
|
||||
/*----------------------------------------------------------------------------------------------------------
|
||||
lcdWriteHexAsDecimal
|
||||
|
||||
Description: Writes hex value as decimal to LCD
|
||||
Input: sensorValue
|
||||
1620: 9c 01 movw r18, r24
|
||||
1622: 94 e0 ldi r25, 0x04 ; 4
|
||||
1624: 22 0f add r18, r18
|
||||
1626: 33 1f adc r19, r19
|
||||
1628: 9a 95 dec r25
|
||||
162a: e1 f7 brne .-8 ; 0x1624 <usart0SetBaud+0x4>
|
||||
162c: 44 27 eor r20, r20
|
||||
162e: 55 27 eor r21, r21
|
||||
1630: 60 e0 ldi r22, 0x00 ; 0
|
||||
1632: 74 e2 ldi r23, 0x24 ; 36
|
||||
1634: 84 ef ldi r24, 0xF4 ; 244
|
||||
1636: 90 e0 ldi r25, 0x00 ; 0
|
||||
1638: 0e 94 09 0c call 0x1812 ; 0x1812 <__divmodsi4>
|
||||
163c: 21 50 subi r18, 0x01 ; 1
|
||||
163e: 30 40 sbci r19, 0x00 ; 0
|
||||
1640: 40 40 sbci r20, 0x00 ; 0
|
||||
1642: 50 40 sbci r21, 0x00 ; 0
|
||||
1644: bb 27 eor r27, r27
|
||||
1646: 57 fd sbrc r21, 7
|
||||
1648: ba 95 dec r27
|
||||
164a: a5 2f mov r26, r21
|
||||
164c: 94 2f mov r25, r20
|
||||
164e: 83 2f mov r24, r19
|
||||
1650: 2f 5f subi r18, 0xFF ; 255
|
||||
1652: 3f 4f sbci r19, 0xFF ; 255
|
||||
1654: 4f 4f sbci r20, 0xFF ; 255
|
||||
1656: 5f 4f sbci r21, 0xFF ; 255
|
||||
1658: 80 bd out 0x20, r24 ; 32
|
||||
Output: -
|
||||
165a: 21 50 subi r18, 0x01 ; 1
|
||||
165c: 29 b9 out 0x09, r18 ; 9
|
||||
165e: 08 95 ret
|
||||
|
||||
00001660 <usart0Receive>:
|
||||
uint8_t fourthDigit = 0;
|
||||
uint8_t fifthDigit = 0;
|
||||
|
||||
firstDigit = (hexValue/10000);
|
||||
secondDigit = ((hexValue-(firstDigit*10000))/1000);
|
||||
thirdDigit = ((hexValue-(firstDigit*10000+(secondDigit*1000)))/100);
|
||||
1660: 5f 9b sbis 0x0b, 7 ; 11
|
||||
1662: fe cf rjmp .-4 ; 0x1660 <usart0Receive>
|
||||
fourthDigit = ((hexValue-(firstDigit*10000+(secondDigit*1000)+(thirdDigit*100)))/10);
|
||||
fifthDigit = (hexValue-(firstDigit*10000+(secondDigit*1000)+(thirdDigit*100)+(fourthDigit*10)));
|
||||
1664: 8c b1 in r24, 0x0c ; 12
|
||||
|
||||
1666: 99 27 eor r25, r25
|
||||
1668: 08 95 ret
|
||||
|
||||
0000166a <usart0Send>:
|
||||
}
|
||||
if(secondDigit||firstDigit)
|
||||
{
|
||||
tempString[n] = (0x30|secondDigit);
|
||||
n++;
|
||||
}
|
||||
166a: 5d 9b sbis 0x0b, 5 ; 11
|
||||
166c: fe cf rjmp .-4 ; 0x166a <usart0Send>
|
||||
if(thirdDigit||secondDigit||firstDigit)
|
||||
{
|
||||
166e: 8c b9 out 0x0c, r24 ; 12
|
||||
1670: 08 95 ret
|
||||
|
||||
00001672 <usart0RxIntEnable>:
|
||||
Input: hexValue
|
||||
Output: -
|
||||
----------------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteHex(uint16_t hexValue)
|
||||
{
|
||||
uint8_t tempString[7];
|
||||
1672: 57 9a sbi 0x0a, 7 ; 10
|
||||
1674: 08 95 ret
|
||||
|
||||
00001676 <usart0RxIntDisable>:
|
||||
n++;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
|
||||
if(((hexValue>>(12-(i*4)))&0x000F)>0x0009)
|
||||
1676: 57 98 cbi 0x0a, 7 ; 10
|
||||
1678: 08 95 ret
|
||||
|
||||
0000167a <usart0Init>:
|
||||
}
|
||||
}
|
||||
|
||||
tempString[n] = '\0';
|
||||
|
||||
lcdWriteString(tempString);
|
||||
167a: 89 9a sbi 0x11, 1 ; 17
|
||||
}
|
||||
167c: 8a b1 in r24, 0x0a ; 10
|
||||
167e: 88 69 ori r24, 0x98 ; 152
|
||||
1680: 8a b9 out 0x0a, r24 ; 10
|
||||
1682: 08 95 ret
|
||||
|
||||
00001684 <usart0SendString>:
|
||||
tempString[n] = (0x30|fourthDigit);
|
||||
n++;
|
||||
}
|
||||
tempString[n] = (0x30|fifthDigit);
|
||||
n++;
|
||||
|
||||
1684: fc 01 movw r30, r24
|
||||
1686: 04 c0 rjmp .+8 ; 0x1690 <usart0SendString+0xc>
|
||||
}
|
||||
if(secondDigit||firstDigit)
|
||||
{
|
||||
tempString[n] = (0x30|secondDigit);
|
||||
n++;
|
||||
}
|
||||
1688: 5d 9b sbis 0x0b, 5 ; 11
|
||||
168a: fe cf rjmp .-4 ; 0x1688 <usart0SendString+0x4>
|
||||
if(thirdDigit||secondDigit||firstDigit)
|
||||
{
|
||||
168c: 8c b9 out 0x0c, r24 ; 12
|
||||
|
||||
while(n<5)
|
||||
{
|
||||
tempString[n] = ' ';
|
||||
n++;
|
||||
}
|
||||
168e: 31 96 adiw r30, 0x01 ; 1
|
||||
}
|
||||
tempString[n] = (0x30|fifthDigit);
|
||||
n++;
|
||||
|
||||
while(n<5)
|
||||
{
|
||||
1690: 80 81 ld r24, Z
|
||||
1692: 88 23 and r24, r24
|
||||
1694: c9 f7 brne .-14 ; 0x1688 <usart0SendString+0x4>
|
||||
1696: 08 95 ret
|
||||
|
||||
00001698 <usart1SetBaud>:
|
||||
static uint8_t lcdTempReg;
|
||||
/*================================================================================================
|
||||
Functions
|
||||
================================================================================================*/
|
||||
/*----------------------------------------------------------------------------------------------------------
|
||||
lcdWriteHexAsDecimal
|
||||
1698: 9c 01 movw r18, r24
|
||||
169a: 94 e0 ldi r25, 0x04 ; 4
|
||||
169c: 22 0f add r18, r18
|
||||
169e: 33 1f adc r19, r19
|
||||
16a0: 9a 95 dec r25
|
||||
16a2: e1 f7 brne .-8 ; 0x169c <usart1SetBaud+0x4>
|
||||
16a4: 44 27 eor r20, r20
|
||||
16a6: 55 27 eor r21, r21
|
||||
16a8: 60 e0 ldi r22, 0x00 ; 0
|
||||
16aa: 74 e2 ldi r23, 0x24 ; 36
|
||||
16ac: 84 ef ldi r24, 0xF4 ; 244
|
||||
16ae: 90 e0 ldi r25, 0x00 ; 0
|
||||
16b0: 0e 94 09 0c call 0x1812 ; 0x1812 <__divmodsi4>
|
||||
16b4: 21 50 subi r18, 0x01 ; 1
|
||||
16b6: 30 40 sbci r19, 0x00 ; 0
|
||||
16b8: 40 40 sbci r20, 0x00 ; 0
|
||||
16ba: 50 40 sbci r21, 0x00 ; 0
|
||||
16bc: bb 27 eor r27, r27
|
||||
16be: 57 fd sbrc r21, 7
|
||||
16c0: ba 95 dec r27
|
||||
16c2: a5 2f mov r26, r21
|
||||
16c4: 94 2f mov r25, r20
|
||||
16c6: 83 2f mov r24, r19
|
||||
16c8: 2f 5f subi r18, 0xFF ; 255
|
||||
16ca: 3f 4f sbci r19, 0xFF ; 255
|
||||
16cc: 4f 4f sbci r20, 0xFF ; 255
|
||||
16ce: 5f 4f sbci r21, 0xFF ; 255
|
||||
16d0: 8c bf out 0x3c, r24 ; 60
|
||||
|
||||
16d2: 21 50 subi r18, 0x01 ; 1
|
||||
16d4: 20 b9 out 0x00, r18 ; 0
|
||||
16d6: 08 95 ret
|
||||
|
||||
000016d8 <usart1Receive>:
|
||||
uint8_t firstDigit = 0;
|
||||
uint8_t secondDigit = 0;
|
||||
uint8_t thirdDigit = 0;
|
||||
uint8_t fourthDigit = 0;
|
||||
uint8_t fifthDigit = 0;
|
||||
|
||||
16d8: 17 9b sbis 0x02, 7 ; 2
|
||||
16da: fe cf rjmp .-4 ; 0x16d8 <usart1Receive>
|
||||
firstDigit = (hexValue/10000);
|
||||
secondDigit = ((hexValue-(firstDigit*10000))/1000);
|
||||
16dc: 83 b1 in r24, 0x03 ; 3
|
||||
thirdDigit = ((hexValue-(firstDigit*10000+(secondDigit*1000)))/100);
|
||||
16de: 99 27 eor r25, r25
|
||||
16e0: 08 95 ret
|
||||
|
||||
000016e2 <usart1Send>:
|
||||
{
|
||||
tempString[n] = (0x30|firstDigit);
|
||||
n++;
|
||||
}
|
||||
if(secondDigit||firstDigit)
|
||||
{
|
||||
16e2: 15 9b sbis 0x02, 5 ; 2
|
||||
16e4: fe cf rjmp .-4 ; 0x16e2 <usart1Send>
|
||||
tempString[n] = (0x30|secondDigit);
|
||||
n++;
|
||||
16e6: 83 b9 out 0x03, r24 ; 3
|
||||
16e8: 08 95 ret
|
||||
|
||||
000016ea <usart1RxIntEnable>:
|
||||
|
||||
Description: Writes hex to LCD
|
||||
Input: hexValue
|
||||
Output: -
|
||||
----------------------------------------------------------------------------------------------------------*/
|
||||
void lcdWriteHex(uint16_t hexValue)
|
||||
16ea: 81 b1 in r24, 0x01 ; 1
|
||||
16ec: 80 69 ori r24, 0x90 ; 144
|
||||
16ee: 81 b9 out 0x01, r24 ; 1
|
||||
16f0: 08 95 ret
|
||||
|
||||
000016f2 <usart1RxIntDisable>:
|
||||
n++;
|
||||
tempString[n] = 'x';
|
||||
n++;
|
||||
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
16f2: 81 b1 in r24, 0x01 ; 1
|
||||
16f4: 8f 76 andi r24, 0x6F ; 111
|
||||
16f6: 81 b9 out 0x01, r24 ; 1
|
||||
16f8: 08 95 ret
|
||||
|
||||
000016fa <usart1Init>:
|
||||
tempString[n] = (((hexValue>>(12-(i*4)))&0x000F)|0x30);
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
tempString[n] = '\0';
|
||||
16fa: bb 9a sbi 0x17, 3 ; 23
|
||||
|
||||
16fc: 81 b1 in r24, 0x01 ; 1
|
||||
16fe: 88 69 ori r24, 0x98 ; 152
|
||||
1700: 81 b9 out 0x01, r24 ; 1
|
||||
1702: 08 95 ret
|
||||
|
||||
00001704 <usart1SendString>:
|
||||
}
|
||||
if(fourthDigit||thirdDigit||secondDigit||firstDigit)
|
||||
{
|
||||
tempString[n] = (0x30|fourthDigit);
|
||||
n++;
|
||||
}
|
||||
1704: fc 01 movw r30, r24
|
||||
1706: 04 c0 rjmp .+8 ; 0x1710 <usart1SendString+0xc>
|
||||
{
|
||||
tempString[n] = (0x30|firstDigit);
|
||||
n++;
|
||||
}
|
||||
if(secondDigit||firstDigit)
|
||||
{
|
||||
1708: 15 9b sbis 0x02, 5 ; 2
|
||||
170a: fe cf rjmp .-4 ; 0x1708 <usart1SendString+0x4>
|
||||
tempString[n] = (0x30|secondDigit);
|
||||
n++;
|
||||
170c: 83 b9 out 0x03, r24 ; 3
|
||||
}
|
||||
tempString[n] = (0x30|fifthDigit);
|
||||
n++;
|
||||
|
||||
while(n<5)
|
||||
{
|
||||
170e: 31 96 adiw r30, 0x01 ; 1
|
||||
{
|
||||
tempString[n] = (0x30|fourthDigit);
|
||||
n++;
|
||||
}
|
||||
tempString[n] = (0x30|fifthDigit);
|
||||
n++;
|
||||
1710: 80 81 ld r24, Z
|
||||
1712: 88 23 and r24, r24
|
||||
1714: c9 f7 brne .-14 ; 0x1708 <usart1SendString+0x4>
|
||||
1716: 08 95 ret
|
||||
|
||||
00001718 <pingSendPing>:
|
||||
|
||||
Description: Gets pointer current TAG id
|
||||
|
||||
Input: -
|
||||
Return: pointer to rfIdTagBuffer
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
1718: f8 94 cli
|
||||
uint8_t* rfIdGetTag( void )
|
||||
{
|
||||
171a: 80 91 64 04 lds r24, 0x0464
|
||||
171e: 88 23 and r24, r24
|
||||
1720: 69 f4 brne .+26 ; 0x173c <pingSendPing+0x24>
|
||||
rfIdGotTag = 0;
|
||||
//PORT_RFID |= (1<<RFID_ENABLE);
|
||||
return rfIdTagBuffer;
|
||||
1722: 8a 9a sbi 0x11, 2 ; 17
|
||||
}
|
||||
1724: 92 9a sbi 0x12, 2 ; 18
|
||||
1726: 8a e0 ldi r24, 0x0A ; 10
|
||||
1728: 8a 95 dec r24
|
||||
172a: f1 f7 brne .-4 ; 0x1728 <pingSendPing+0x10>
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
rfIDClearBuffer
|
||||
|
||||
Description: Clearing current TAG-buffer
|
||||
172c: 92 98 cbi 0x12, 2 ; 18
|
||||
|
||||
172e: 8a 98 cbi 0x11, 2 ; 17
|
||||
Input: -
|
||||
Return: -
|
||||
1730: 85 b7 in r24, 0x35 ; 53
|
||||
1732: 83 60 ori r24, 0x03 ; 3
|
||||
1734: 85 bf out 0x35, r24 ; 53
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
1736: 8b b7 in r24, 0x3b ; 59
|
||||
1738: 80 64 ori r24, 0x40 ; 64
|
||||
173a: 8b bf out 0x3b, r24 ; 59
|
||||
void rfIdClearBuffer( void )
|
||||
{
|
||||
rfIdByteCount = 0;
|
||||
173c: 78 94 sei
|
||||
173e: 08 95 ret
|
||||
|
||||
00001740 <pingGetDistance>:
|
||||
Description: Returns if a TAG has been transfered to the TAG-buffer
|
||||
|
||||
Input: -
|
||||
Return: 1 if true, else 0
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
uint8_t rfIdGetTagPresent( void )
|
||||
1740: 10 92 64 04 sts 0x0464, r1
|
||||
{
|
||||
1744: 80 91 88 00 lds r24, 0x0088
|
||||
1748: 90 91 89 00 lds r25, 0x0089
|
||||
174c: 08 95 ret
|
||||
|
||||
0000174e <pingGetReady>:
|
||||
|
||||
Description: Enable incoming data
|
||||
|
||||
Input: -
|
||||
Return: -
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
174e: 80 91 64 04 lds r24, 0x0464
|
||||
void rfIdEnable(void)
|
||||
{
|
||||
1752: 99 27 eor r25, r25
|
||||
1754: 08 95 ret
|
||||
|
||||
00001756 <pingInit>:
|
||||
/*------------------------------------------------------------------------------------------------
|
||||
rfIdDisable
|
||||
|
||||
Description: Disable incoming data
|
||||
|
||||
Input: -
|
||||
1756: 08 95 ret
|
||||
|
||||
00001758 <__vector_1>:
|
||||
rfIdInit
|
||||
|
||||
Description: Initialize components
|
||||
|
||||
Input: -
|
||||
Return: -
|
||||
1758: 1f 92 push r1
|
||||
175a: 0f 92 push r0
|
||||
175c: 0f b6 in r0, 0x3f ; 63
|
||||
175e: 0f 92 push r0
|
||||
1760: 11 24 eor r1, r1
|
||||
1762: 8f 93 push r24
|
||||
------------------------------------------------------------------------------------------------*/
|
||||
1764: 05 b6 in r0, 0x35 ; 53
|
||||
1766: 00 fe sbrs r0, 0
|
||||
1768: 0d c0 rjmp .+26 ; 0x1784 <__vector_1+0x2c>
|
||||
void rfIdInit(void)
|
||||
{
|
||||
176a: 10 92 89 00 sts 0x0089, r1
|
||||
usart0Init();
|
||||
176e: 10 92 88 00 sts 0x0088, r1
|
||||
usart0SetBaud(USART0_BAUD_RATE);
|
||||
rfIdByteCount = 0;
|
||||
1772: 85 b7 in r24, 0x35 ; 53
|
||||
1774: 8e 7f andi r24, 0xFE ; 254
|
||||
1776: 85 bf out 0x35, r24 ; 53
|
||||
|
||||
1778: 80 91 8a 00 lds r24, 0x008A
|
||||
177c: 82 60 ori r24, 0x02 ; 2
|
||||
177e: 80 93 8a 00 sts 0x008A, r24
|
||||
1782: 0b c0 rjmp .+22 ; 0x179a <__vector_1+0x42>
|
||||
DDR_RFID |= (1<<RFID_ENABLE);
|
||||
PORT_RFID &= ~(1<<RFID_ENABLE);
|
||||
}
|
||||
/*================================================================================================
|
||||
1784: 80 91 8a 00 lds r24, 0x008A
|
||||
1788: 8d 7f andi r24, 0xFD ; 253
|
||||
178a: 80 93 8a 00 sts 0x008A, r24
|
||||
Interrupt
|
||||
178e: 81 e0 ldi r24, 0x01 ; 1
|
||||
1790: 80 93 64 04 sts 0x0464, r24
|
||||
================================================================================================*/
|
||||
1794: 8b b7 in r24, 0x3b ; 59
|
||||
1796: 8f 7b andi r24, 0xBF ; 191
|
||||
1798: 8b bf out 0x3b, r24 ; 59
|
||||
179a: 8f 91 pop r24
|
||||
179c: 0f 90 pop r0
|
||||
179e: 0f be out 0x3f, r0 ; 63
|
||||
17a0: 0f 90 pop r0
|
||||
17a2: 1f 90 pop r1
|
||||
17a4: 18 95 reti
|
||||
|
||||
000017a6 <__udivmodhi4>:
|
||||
17a6: aa 1b sub r26, r26
|
||||
17a8: bb 1b sub r27, r27
|
||||
17aa: 51 e1 ldi r21, 0x11 ; 17
|
||||
17ac: 07 c0 rjmp .+14 ; 0x17bc <__udivmodhi4_ep>
|
||||
|
||||
000017ae <__udivmodhi4_loop>:
|
||||
17ae: aa 1f adc r26, r26
|
||||
17b0: bb 1f adc r27, r27
|
||||
17b2: a6 17 cp r26, r22
|
||||
17b4: b7 07 cpc r27, r23
|
||||
17b6: 10 f0 brcs .+4 ; 0x17bc <__udivmodhi4_ep>
|
||||
17b8: a6 1b sub r26, r22
|
||||
17ba: b7 0b sbc r27, r23
|
||||
|
||||
000017bc <__udivmodhi4_ep>:
|
||||
17bc: 88 1f adc r24, r24
|
||||
17be: 99 1f adc r25, r25
|
||||
17c0: 5a 95 dec r21
|
||||
17c2: a9 f7 brne .-22 ; 0x17ae <__udivmodhi4_loop>
|
||||
17c4: 80 95 com r24
|
||||
17c6: 90 95 com r25
|
||||
17c8: bc 01 movw r22, r24
|
||||
17ca: cd 01 movw r24, r26
|
||||
17cc: 08 95 ret
|
||||
|
||||
000017ce <__udivmodsi4>:
|
||||
17ce: a1 e2 ldi r26, 0x21 ; 33
|
||||
17d0: 1a 2e mov r1, r26
|
||||
17d2: aa 1b sub r26, r26
|
||||
17d4: bb 1b sub r27, r27
|
||||
17d6: fd 01 movw r30, r26
|
||||
17d8: 0d c0 rjmp .+26 ; 0x17f4 <__udivmodsi4_ep>
|
||||
|
||||
000017da <__udivmodsi4_loop>:
|
||||
17da: aa 1f adc r26, r26
|
||||
17dc: bb 1f adc r27, r27
|
||||
17de: ee 1f adc r30, r30
|
||||
17e0: ff 1f adc r31, r31
|
||||
17e2: a2 17 cp r26, r18
|
||||
17e4: b3 07 cpc r27, r19
|
||||
17e6: e4 07 cpc r30, r20
|
||||
17e8: f5 07 cpc r31, r21
|
||||
17ea: 20 f0 brcs .+8 ; 0x17f4 <__udivmodsi4_ep>
|
||||
17ec: a2 1b sub r26, r18
|
||||
17ee: b3 0b sbc r27, r19
|
||||
17f0: e4 0b sbc r30, r20
|
||||
17f2: f5 0b sbc r31, r21
|
||||
|
||||
000017f4 <__udivmodsi4_ep>:
|
||||
17f4: 66 1f adc r22, r22
|
||||
17f6: 77 1f adc r23, r23
|
||||
17f8: 88 1f adc r24, r24
|
||||
17fa: 99 1f adc r25, r25
|
||||
17fc: 1a 94 dec r1
|
||||
17fe: 69 f7 brne .-38 ; 0x17da <__udivmodsi4_loop>
|
||||
1800: 60 95 com r22
|
||||
1802: 70 95 com r23
|
||||
1804: 80 95 com r24
|
||||
1806: 90 95 com r25
|
||||
1808: 9b 01 movw r18, r22
|
||||
180a: ac 01 movw r20, r24
|
||||
180c: bd 01 movw r22, r26
|
||||
180e: cf 01 movw r24, r30
|
||||
1810: 08 95 ret
|
||||
|
||||
00001812 <__divmodsi4>:
|
||||
1812: 97 fb bst r25, 7
|
||||
1814: 09 2e mov r0, r25
|
||||
1816: 05 26 eor r0, r21
|
||||
1818: 0e d0 rcall .+28 ; 0x1836 <__divmodsi4_neg1>
|
||||
181a: 57 fd sbrc r21, 7
|
||||
181c: 04 d0 rcall .+8 ; 0x1826 <__divmodsi4_neg2>
|
||||
181e: d7 df rcall .-82 ; 0x17ce <__udivmodsi4>
|
||||
1820: 0a d0 rcall .+20 ; 0x1836 <__divmodsi4_neg1>
|
||||
1822: 00 1c adc r0, r0
|
||||
1824: 38 f4 brcc .+14 ; 0x1834 <__divmodsi4_exit>
|
||||
|
||||
00001826 <__divmodsi4_neg2>:
|
||||
1826: 50 95 com r21
|
||||
1828: 40 95 com r20
|
||||
182a: 30 95 com r19
|
||||
182c: 21 95 neg r18
|
||||
182e: 3f 4f sbci r19, 0xFF ; 255
|
||||
1830: 4f 4f sbci r20, 0xFF ; 255
|
||||
1832: 5f 4f sbci r21, 0xFF ; 255
|
||||
|
||||
00001834 <__divmodsi4_exit>:
|
||||
1834: 08 95 ret
|
||||
|
||||
00001836 <__divmodsi4_neg1>:
|
||||
1836: f6 f7 brtc .-4 ; 0x1834 <__divmodsi4_exit>
|
||||
1838: 90 95 com r25
|
||||
183a: 80 95 com r24
|
||||
183c: 70 95 com r23
|
||||
183e: 61 95 neg r22
|
||||
1840: 7f 4f sbci r23, 0xFF ; 255
|
||||
1842: 8f 4f sbci r24, 0xFF ; 255
|
||||
1844: 9f 4f sbci r25, 0xFF ; 255
|
||||
1846: 08 95 ret
|
||||
|
||||
00001848 <_exit>:
|
||||
1848: ff cf rjmp .-2 ; 0x1848 <_exit>
|
||||
2593
RoboMI.lst
Normal file
2593
RoboMI.lst
Normal file
@ -0,0 +1,2593 @@
|
||||
1 .file "RoboMI.c"
|
||||
2 __SREG__ = 0x3f
|
||||
3 __SP_H__ = 0x3e
|
||||
4 __SP_L__ = 0x3d
|
||||
5 __tmp_reg__ = 0
|
||||
6 __zero_reg__ = 1
|
||||
7 .global __do_copy_data
|
||||
8 .global __do_clear_bss
|
||||
16 .Ltext0:
|
||||
17 .global initIO
|
||||
19 initIO:
|
||||
20 .LFB14:
|
||||
21 .LM1:
|
||||
22 /* prologue: frame size=0 */
|
||||
23 /* prologue end (size=0) */
|
||||
24 .LM2:
|
||||
25 0000 82E0 ldi r24,lo8(2)
|
||||
26 0002 8EBD out 78-0x20,r24
|
||||
27 .LM3:
|
||||
28 0004 8FEB ldi r24,lo8(-65)
|
||||
29 0006 8DBD out 77-0x20,r24
|
||||
30 .LM4:
|
||||
31 0008 8FEF ldi r24,lo8(-1)
|
||||
32 000a 8CBD out 76-0x20,r24
|
||||
33 .LM5:
|
||||
34 000c 8EEE ldi r24,lo8(-18)
|
||||
35 000e 83BD out 67-0x20,r24
|
||||
36 .LM6:
|
||||
37 0010 89B7 in r24,89-0x20
|
||||
38 0012 8468 ori r24,lo8(-124)
|
||||
39 0014 89BF out 89-0x20,r24
|
||||
40 .LM7:
|
||||
41 0016 84B3 in r24,52-0x20
|
||||
42 0018 8760 ori r24,lo8(7)
|
||||
43 001a 84BB out 52-0x20,r24
|
||||
44 .LM8:
|
||||
45 001c 8AB3 in r24,58-0x20
|
||||
46 001e 8F70 andi r24,lo8(15)
|
||||
47 0020 8ABB out 58-0x20,r24
|
||||
48 .LM9:
|
||||
49 0022 8BB3 in r24,59-0x20
|
||||
50 0024 806F ori r24,lo8(-16)
|
||||
51 0026 8BBB out 59-0x20,r24
|
||||
52 .LM10:
|
||||
53 0028 1092 0000 sts progPosition,__zero_reg__
|
||||
54 /* epilogue: frame size=0 */
|
||||
55 002c 0895 ret
|
||||
56 /* epilogue end (size=1) */
|
||||
57 /* function initIO size 23 (22) */
|
||||
58 .LFE14:
|
||||
60 .global __vector_15
|
||||
62 __vector_15:
|
||||
63 .LFB15:
|
||||
64 .LM11:
|
||||
65 /* prologue: frame size=0 */
|
||||
66 002e 1F92 push __zero_reg__
|
||||
67 0030 0F92 push __tmp_reg__
|
||||
68 0032 0FB6 in __tmp_reg__,__SREG__
|
||||
69 0034 0F92 push __tmp_reg__
|
||||
70 0036 1124 clr __zero_reg__
|
||||
71 0038 8F93 push r24
|
||||
72 /* prologue end (size=6) */
|
||||
73 .LM12:
|
||||
74 003a 8091 0000 lds r24,progCounterPPM
|
||||
75 003e 8F5F subi r24,lo8(-(1))
|
||||
76 0040 8093 0000 sts progCounterPPM,r24
|
||||
77 0044 8230 cpi r24,lo8(2)
|
||||
78 0046 00F0 brlo .L4
|
||||
79 .LM13:
|
||||
80 0048 1092 0000 sts servoCounter,__zero_reg__
|
||||
81 .LM14:
|
||||
82 004c 85B3 in r24,53-0x20
|
||||
83 004e 8760 ori r24,lo8(7)
|
||||
84 0050 85BB out 53-0x20,r24
|
||||
85 .LM15:
|
||||
86 0052 87B5 in r24,71-0x20
|
||||
87 0054 8260 ori r24,lo8(2)
|
||||
88 0056 87BD out 71-0x20,r24
|
||||
89 .LM16:
|
||||
90 0058 1092 0000 sts progCounterPPM,__zero_reg__
|
||||
91 .L4:
|
||||
92 .LM17:
|
||||
93 005c 81E0 ldi r24,lo8(1)
|
||||
94 005e 8093 0000 sts progDoUpdate,r24
|
||||
95 .LM18:
|
||||
96 0062 8FEB ldi r24,lo8(-65)
|
||||
97 0064 8DBD out 77-0x20,r24
|
||||
98 .LM19:
|
||||
99 0066 8FEF ldi r24,lo8(-1)
|
||||
100 0068 8CBD out 76-0x20,r24
|
||||
101 /* epilogue: frame size=0 */
|
||||
102 006a 8F91 pop r24
|
||||
103 006c 0F90 pop __tmp_reg__
|
||||
104 006e 0FBE out __SREG__,__tmp_reg__
|
||||
105 0070 0F90 pop __tmp_reg__
|
||||
106 0072 1F90 pop __zero_reg__
|
||||
107 0074 1895 reti
|
||||
108 /* epilogue end (size=6) */
|
||||
109 /* function __vector_15 size 36 (24) */
|
||||
110 .LFE15:
|
||||
112 .global __vector_11
|
||||
114 __vector_11:
|
||||
115 .LFB16:
|
||||
116 .LM20:
|
||||
117 /* prologue: frame size=0 */
|
||||
118 0076 1F92 push __zero_reg__
|
||||
119 0078 0F92 push __tmp_reg__
|
||||
120 007a 0FB6 in __tmp_reg__,__SREG__
|
||||
121 007c 0F92 push __tmp_reg__
|
||||
122 007e 1124 clr __zero_reg__
|
||||
123 0080 2F93 push r18
|
||||
124 0082 8F93 push r24
|
||||
125 0084 9F93 push r25
|
||||
126 /* prologue end (size=8) */
|
||||
127 .LM21:
|
||||
128 0086 9091 0000 lds r25,servoCounter
|
||||
129 008a 8091 0000 lds r24,servoPing
|
||||
130 008e 9817 cp r25,r24
|
||||
131 0090 00F0 brlo .L8
|
||||
132 .LM22:
|
||||
133 0092 A998 cbi 53-0x20,1
|
||||
134 0094 21E0 ldi r18,lo8(1)
|
||||
135 .LVL0:
|
||||
136 0096 00C0 rjmp .L10
|
||||
137 .LVL1:
|
||||
138 .L8:
|
||||
139 .LM23:
|
||||
140 /* #APP */
|
||||
141 0098 0000 NOP
|
||||
142 /* #NOAPP */
|
||||
143 009a 20E0 ldi r18,lo8(0)
|
||||
144 .LVL2:
|
||||
145 .L10:
|
||||
146 .LM24:
|
||||
147 009c 8091 0000 lds r24,servoMotorLeft
|
||||
148 00a0 9817 cp r25,r24
|
||||
149 00a2 00F0 brlo .L11
|
||||
150 .LM25:
|
||||
151 00a4 A898 cbi 53-0x20,0
|
||||
152 00a6 00C0 rjmp .L13
|
||||
153 .L11:
|
||||
154 .LM26:
|
||||
155 /* #APP */
|
||||
156 00a8 0000 NOP
|
||||
157 /* #NOAPP */
|
||||
158 00aa 20E0 ldi r18,lo8(0)
|
||||
159 .L13:
|
||||
160 .LM27:
|
||||
161 00ac 8091 0000 lds r24,servoMotorRight
|
||||
162 00b0 9817 cp r25,r24
|
||||
163 00b2 00F0 brlo .L14
|
||||
164 .LM28:
|
||||
165 00b4 AA98 cbi 53-0x20,2
|
||||
166 .LM29:
|
||||
167 00b6 2223 tst r18
|
||||
168 00b8 01F4 brne .L16
|
||||
169 00ba 00C0 rjmp .L17
|
||||
170 .L14:
|
||||
171 .LM30:
|
||||
172 /* #APP */
|
||||
173 00bc 0000 NOP
|
||||
174 /* #NOAPP */
|
||||
175 00be 00C0 rjmp .L17
|
||||
176 .L16:
|
||||
177 .LM31:
|
||||
178 00c0 87B5 in r24,71-0x20
|
||||
179 00c2 8D7F andi r24,lo8(-3)
|
||||
180 00c4 87BD out 71-0x20,r24
|
||||
181 00c6 00C0 rjmp .L18
|
||||
182 .L17:
|
||||
183 .LM32:
|
||||
184 00c8 9F5F subi r25,lo8(-(1))
|
||||
185 00ca 9093 0000 sts servoCounter,r25
|
||||
186 .LM33:
|
||||
187 /* #APP */
|
||||
188 00ce 0000 NOP
|
||||
189 .LM34:
|
||||
190 00d0 0000 NOP
|
||||
191 /* #NOAPP */
|
||||
192 .L18:
|
||||
193 .LM35:
|
||||
194 00d2 8EEE ldi r24,lo8(-18)
|
||||
195 00d4 83BD out 67-0x20,r24
|
||||
196 /* epilogue: frame size=0 */
|
||||
197 00d6 9F91 pop r25
|
||||
198 00d8 8F91 pop r24
|
||||
199 00da 2F91 pop r18
|
||||
200 00dc 0F90 pop __tmp_reg__
|
||||
201 00de 0FBE out __SREG__,__tmp_reg__
|
||||
202 00e0 0F90 pop __tmp_reg__
|
||||
203 00e2 1F90 pop __zero_reg__
|
||||
204 00e4 1895 reti
|
||||
205 /* epilogue end (size=8) */
|
||||
206 /* function __vector_11 size 61 (45) */
|
||||
207 .LFE16:
|
||||
209 .global activateRobot
|
||||
211 activateRobot:
|
||||
212 .LFB17:
|
||||
213 .LM36:
|
||||
214 /* prologue: frame size=0 */
|
||||
215 00e6 1F93 push r17
|
||||
216 /* prologue end (size=1) */
|
||||
217 .LVL3:
|
||||
218 00e8 182F mov r17,r24
|
||||
219 .LM37:
|
||||
220 00ea 80E0 ldi r24,lo8(0)
|
||||
221 .LVL4:
|
||||
222 00ec 0E94 0000 call lcdSetLayout
|
||||
223 .LM38:
|
||||
224 00f0 81E3 ldi r24,lo8(49)
|
||||
225 00f2 189F mul r17,r24
|
||||
226 00f4 C001 movw r24,r0
|
||||
227 00f6 1124 clr r1
|
||||
228 00f8 8050 subi r24,lo8(-(menuTable))
|
||||
229 00fa 9040 sbci r25,hi8(-(menuTable))
|
||||
230 00fc 0E94 0000 call lcdWriteStringP
|
||||
231 .LM39:
|
||||
232 0100 88EC ldi r24,lo8(-56)
|
||||
233 0102 8093 0000 sts progTimer,r24
|
||||
234 .LM40:
|
||||
235 0106 1093 0000 sts roboActive,r17
|
||||
236 /* epilogue: frame size=0 */
|
||||
237 010a 1F91 pop r17
|
||||
238 010c 0895 ret
|
||||
239 /* epilogue end (size=2) */
|
||||
240 /* function activateRobot size 20 (17) */
|
||||
241 .LFE17:
|
||||
243 .global deactivateRobot
|
||||
245 deactivateRobot:
|
||||
246 .LFB18:
|
||||
247 .LM41:
|
||||
248 /* prologue: frame size=0 */
|
||||
249 /* prologue end (size=0) */
|
||||
250 .LM42:
|
||||
251 010e 1092 0000 sts roboActive,__zero_reg__
|
||||
252 .LM43:
|
||||
253 0112 87E7 ldi r24,lo8(119)
|
||||
254 0114 8093 0000 sts servoMotorLeft,r24
|
||||
255 .LM44:
|
||||
256 0118 8093 0000 sts servoMotorRight,r24
|
||||
257 .LM45:
|
||||
258 011c 8CE8 ldi r24,lo8(-116)
|
||||
259 011e 8093 0000 sts servoPing,r24
|
||||
260 .LM46:
|
||||
261 0122 0E94 0000 call rfIdDisable
|
||||
262 /* epilogue: frame size=0 */
|
||||
263 0126 0895 ret
|
||||
264 /* epilogue end (size=1) */
|
||||
265 /* function deactivateRobot size 13 (12) */
|
||||
266 .LFE18:
|
||||
268 .data
|
||||
269 .LC0:
|
||||
270 0000 2020 2020 .string " "
|
||||
270 2020 2020
|
||||
270 2020 2020
|
||||
270 2020 2020
|
||||
270 00
|
||||
271 .LC1:
|
||||
272 0011 3E20 2020 .string "> <"
|
||||
272 2020 2020
|
||||
272 2020 2020
|
||||
272 2020 203C
|
||||
272 00
|
||||
273 .LC2:
|
||||
274 0022 3E3E 2020 .string ">> <<"
|
||||
274 2020 2020
|
||||
274 2020 2020
|
||||
274 2020 3C3C
|
||||
274 00
|
||||
275 .LC3:
|
||||
276 0033 3E3E 3E20 .string ">>> <<<"
|
||||
276 2020 2020
|
||||
276 2020 2020
|
||||
276 203C 3C3C
|
||||
276 00
|
||||
277 .LC4:
|
||||
278 0044 3E3E 3E3E .string ">>>> <<<<"
|
||||
278 2020 2020
|
||||
278 2020 2020
|
||||
278 3C3C 3C3C
|
||||
278 00
|
||||
279 .LC5:
|
||||
280 0055 3E3E 3E3E .string ">>>>> <<<<<"
|
||||
280 3E20 2020
|
||||
280 2020 203C
|
||||
280 3C3C 3C3C
|
||||
280 00
|
||||
281 .LC6:
|
||||
282 0066 3E3E 3E3E .string ">>>>>> <<<<<<"
|
||||
282 3E3E 2020
|
||||
282 2020 3C3C
|
||||
282 3C3C 3C3C
|
||||
282 00
|
||||
283 .LC7:
|
||||
284 0077 3E3E 3E3E .string ">>>>>>> <<<<<<<"
|
||||
284 3E3E 3E20
|
||||
284 203C 3C3C
|
||||
284 3C3C 3C3C
|
||||
284 00
|
||||
285 .LC8:
|
||||
286 0088 3E3E 3E3E .string ">>>>>>>[]<<<<<<<"
|
||||
286 3E3E 3E5B
|
||||
286 5D3C 3C3C
|
||||
286 3C3C 3C3C
|
||||
286 00
|
||||
287 .LC9:
|
||||
288 0099 2020 2020 .string " < > "
|
||||
288 2020 3C20
|
||||
288 203E 2020
|
||||
288 2020 2020
|
||||
288 00
|
||||
289 .LC10:
|
||||
290 00aa 2020 2020 .string " << >> "
|
||||
290 203C 3C20
|
||||
290 203E 3E20
|
||||
290 2020 2020
|
||||
290 00
|
||||
291 .LC11:
|
||||
292 00bb 2020 2020 .string " <<< >>> "
|
||||
292 3C3C 3C20
|
||||
292 203E 3E3E
|
||||
292 2020 2020
|
||||
292 00
|
||||
293 .LC12:
|
||||
294 00cc 2020 203C .string " <<<< >>>> "
|
||||
294 3C3C 3C20
|
||||
294 203E 3E3E
|
||||
294 3E20 2020
|
||||
294 00
|
||||
295 .LC13:
|
||||
296 00dd 2020 3C3C .string " <<<<< >>>>> "
|
||||
296 3C3C 3C20
|
||||
296 203E 3E3E
|
||||
296 3E3E 2020
|
||||
296 00
|
||||
297 .LC14:
|
||||
298 00ee 203C 3C3C .string " <<<<<< >>>>>> "
|
||||
298 3C3C 3C20
|
||||
298 203E 3E3E
|
||||
298 3E3E 3E20
|
||||
298 00
|
||||
299 .LC15:
|
||||
300 00ff 3C3C 3C3C .string "<<<<<<< >>>>>>>"
|
||||
300 3C3C 3C20
|
||||
300 203E 3E3E
|
||||
300 3E3E 3E3E
|
||||
300 00
|
||||
301 .LC16:
|
||||
302 0110 3C3C 3C3C .string "<<<<<<<[]>>>>>>>"
|
||||
302 3C3C 3C5B
|
||||
302 5D3E 3E3E
|
||||
302 3E3E 3E3E
|
||||
302 00
|
||||
303 .LC17:
|
||||
304 0121 3C3C 3C3C .string "<<<<<<< "
|
||||
304 3C3C 3C20
|
||||
304 2020 2020
|
||||
304 2020 2020
|
||||
304 00
|
||||
305 .LC18:
|
||||
306 0132 203C 3C3C .string " <<<<<< "
|
||||
306 3C3C 3C20
|
||||
306 2020 2020
|
||||
306 2020 2020
|
||||
306 00
|
||||
307 .LC19:
|
||||
308 0143 2020 3C3C .string " <<<<< "
|
||||
308 3C3C 3C20
|
||||
308 2020 2020
|
||||
308 2020 2020
|
||||
308 00
|
||||
309 .LC20:
|
||||
310 0154 2020 203C .string " <<<< "
|
||||
310 3C3C 3C20
|
||||
310 2020 2020
|
||||
310 2020 2020
|
||||
310 00
|
||||
311 .LC21:
|
||||
312 0165 2020 2020 .string " <<< "
|
||||
312 3C3C 3C20
|
||||
312 2020 2020
|
||||
312 2020 2020
|
||||
312 00
|
||||
313 .LC22:
|
||||
314 0176 2020 2020 .string " << "
|
||||
314 203C 3C20
|
||||
314 2020 2020
|
||||
314 2020 2020
|
||||
314 00
|
||||
315 .LC23:
|
||||
316 0187 2020 2020 .string " < "
|
||||
316 2020 3C20
|
||||
316 2020 2020
|
||||
316 2020 2020
|
||||
316 00
|
||||
317 .LC24:
|
||||
318 0198 2020 2020 .string " [] "
|
||||
318 2020 205B
|
||||
318 5D20 2020
|
||||
318 2020 2020
|
||||
318 00
|
||||
319 .LC25:
|
||||
320 01a9 2020 2020 .string " >>>>>>>"
|
||||
320 2020 2020
|
||||
320 203E 3E3E
|
||||
320 3E3E 3E3E
|
||||
320 00
|
||||
321 .LC26:
|
||||
322 01ba 2020 2020 .string " >>>>>> "
|
||||
322 2020 2020
|
||||
322 203E 3E3E
|
||||
322 3E3E 3E20
|
||||
322 00
|
||||
323 .LC27:
|
||||
324 01cb 2020 2020 .string " >>>>> "
|
||||
324 2020 2020
|
||||
324 203E 3E3E
|
||||
324 3E3E 2020
|
||||
324 00
|
||||
325 .LC28:
|
||||
326 01dc 2020 2020 .string " >>>> "
|
||||
326 2020 2020
|
||||
326 203E 3E3E
|
||||
326 3E20 2020
|
||||
326 00
|
||||
327 .LC29:
|
||||
328 01ed 2020 2020 .string " >>> "
|
||||
328 2020 2020
|
||||
328 203E 3E3E
|
||||
328 2020 2020
|
||||
328 00
|
||||
329 .LC30:
|
||||
330 01fe 2020 2020 .string " >> "
|
||||
330 2020 2020
|
||||
330 203E 3E20
|
||||
330 2020 2020
|
||||
330 00
|
||||
331 .LC31:
|
||||
332 020f 2020 2020 .string " > "
|
||||
332 2020 2020
|
||||
332 203E 2020
|
||||
332 2020 2020
|
||||
332 00
|
||||
333 .text
|
||||
334 .global showDistanceOnLCD
|
||||
336 showDistanceOnLCD:
|
||||
337 .LFB20:
|
||||
338 .LM47:
|
||||
339 /* prologue: frame size=0 */
|
||||
340 0128 1F93 push r17
|
||||
341 012a CF93 push r28
|
||||
342 012c DF93 push r29
|
||||
343 /* prologue end (size=3) */
|
||||
344 .LVL5:
|
||||
345 012e EC01 movw r28,r24
|
||||
346 0130 162F mov r17,r22
|
||||
347 .LM48:
|
||||
348 0132 4130 cpi r20,lo8(1)
|
||||
349 0134 01F4 brne .L25
|
||||
350 .LVL6:
|
||||
351 .LM49:
|
||||
352 0136 80E0 ldi r24,lo8(0)
|
||||
353 0138 00C0 rjmp .L100
|
||||
354 .LVL7:
|
||||
355 .L25:
|
||||
356 .LM50:
|
||||
357 013a 4230 cpi r20,lo8(2)
|
||||
358 013c 01F4 brne .L28
|
||||
359 .LM51:
|
||||
360 013e 80E1 ldi r24,lo8(16)
|
||||
361 0140 00C0 rjmp .L100
|
||||
362 .LVL8:
|
||||
363 .L28:
|
||||
364 .LM52:
|
||||
365 0142 4330 cpi r20,lo8(3)
|
||||
366 0144 01F4 brne .L27
|
||||
367 .LM53:
|
||||
368 0146 80E2 ldi r24,lo8(32)
|
||||
369 .L100:
|
||||
370 0148 0E94 0000 call lcdSetPos
|
||||
371 .LVL9:
|
||||
372 .L27:
|
||||
373 .LM54:
|
||||
374 014c 1123 tst r17
|
||||
375 014e 01F4 brne .L31
|
||||
376 .LM55:
|
||||
377 0150 8DE7 ldi r24,hi8(32001)
|
||||
378 0152 C130 cpi r28,lo8(32001)
|
||||
379 0154 D807 cpc r29,r24
|
||||
380 0156 00F4 brsh .L102
|
||||
381 .LM56:
|
||||
382 0158 8EE3 ldi r24,hi8(16001)
|
||||
383 015a C138 cpi r28,lo8(16001)
|
||||
384 015c D807 cpc r29,r24
|
||||
385 015e 00F0 brlo .L36
|
||||
386 .LM57:
|
||||
387 0160 80E0 ldi r24,lo8(.LC1)
|
||||
388 0162 90E0 ldi r25,hi8(.LC1)
|
||||
389 0164 00C0 rjmp .L101
|
||||
390 .L36:
|
||||
391 .LM58:
|
||||
392 0166 8FE1 ldi r24,hi8(8001)
|
||||
393 0168 C134 cpi r28,lo8(8001)
|
||||
394 016a D807 cpc r29,r24
|
||||
395 016c 00F0 brlo .L38
|
||||
396 .LM59:
|
||||
397 016e 80E0 ldi r24,lo8(.LC2)
|
||||
398 0170 90E0 ldi r25,hi8(.LC2)
|
||||
399 0172 00C0 rjmp .L101
|
||||
400 .L38:
|
||||
401 .LM60:
|
||||
402 0174 8FE0 ldi r24,hi8(4001)
|
||||
403 0176 C13A cpi r28,lo8(4001)
|
||||
404 0178 D807 cpc r29,r24
|
||||
405 017a 00F0 brlo .L40
|
||||
406 .LM61:
|
||||
407 017c 80E0 ldi r24,lo8(.LC3)
|
||||
408 017e 90E0 ldi r25,hi8(.LC3)
|
||||
409 0180 00C0 rjmp .L101
|
||||
410 .L40:
|
||||
411 .LM62:
|
||||
412 0182 87E0 ldi r24,hi8(2001)
|
||||
413 0184 C13D cpi r28,lo8(2001)
|
||||
414 0186 D807 cpc r29,r24
|
||||
415 0188 00F0 brlo .L42
|
||||
416 .LM63:
|
||||
417 018a 80E0 ldi r24,lo8(.LC4)
|
||||
418 018c 90E0 ldi r25,hi8(.LC4)
|
||||
419 018e 00C0 rjmp .L101
|
||||
420 .L42:
|
||||
421 .LM64:
|
||||
422 0190 83E0 ldi r24,hi8(1001)
|
||||
423 0192 C93E cpi r28,lo8(1001)
|
||||
424 0194 D807 cpc r29,r24
|
||||
425 0196 00F0 brlo .L44
|
||||
426 .LM65:
|
||||
427 0198 80E0 ldi r24,lo8(.LC5)
|
||||
428 019a 90E0 ldi r25,hi8(.LC5)
|
||||
429 019c 00C0 rjmp .L101
|
||||
430 .L44:
|
||||
431 .LM66:
|
||||
432 019e 81E0 ldi r24,hi8(501)
|
||||
433 01a0 C53F cpi r28,lo8(501)
|
||||
434 01a2 D807 cpc r29,r24
|
||||
435 01a4 00F0 brlo .L46
|
||||
436 .LM67:
|
||||
437 01a6 80E0 ldi r24,lo8(.LC6)
|
||||
438 01a8 90E0 ldi r25,hi8(.LC6)
|
||||
439 01aa 00C0 rjmp .L101
|
||||
440 .L46:
|
||||
441 .LM68:
|
||||
442 01ac C536 cpi r28,101
|
||||
443 01ae D105 cpc r29,__zero_reg__
|
||||
444 01b0 00F0 brlo .L48
|
||||
445 .LM69:
|
||||
446 01b2 80E0 ldi r24,lo8(.LC7)
|
||||
447 01b4 90E0 ldi r25,hi8(.LC7)
|
||||
448 01b6 00C0 rjmp .L101
|
||||
449 .L48:
|
||||
450 .LM70:
|
||||
451 01b8 80E0 ldi r24,lo8(.LC8)
|
||||
452 01ba 90E0 ldi r25,hi8(.LC8)
|
||||
453 01bc 00C0 rjmp .L101
|
||||
454 .LVL10:
|
||||
455 .L31:
|
||||
456 .LM71:
|
||||
457 01be 1130 cpi r17,lo8(1)
|
||||
458 01c0 01F4 brne .L50
|
||||
459 .LM72:
|
||||
460 01c2 8DE7 ldi r24,hi8(32001)
|
||||
461 01c4 C130 cpi r28,lo8(32001)
|
||||
462 01c6 D807 cpc r29,r24
|
||||
463 01c8 00F0 brlo .L52
|
||||
464 .L102:
|
||||
465 .LM73:
|
||||
466 01ca 80E0 ldi r24,lo8(.LC0)
|
||||
467 01cc 90E0 ldi r25,hi8(.LC0)
|
||||
468 01ce 00C0 rjmp .L101
|
||||
469 .L52:
|
||||
470 .LM74:
|
||||
471 01d0 8EE3 ldi r24,hi8(16001)
|
||||
472 01d2 C138 cpi r28,lo8(16001)
|
||||
473 01d4 D807 cpc r29,r24
|
||||
474 01d6 00F0 brlo .L54
|
||||
475 .LM75:
|
||||
476 01d8 80E0 ldi r24,lo8(.LC9)
|
||||
477 01da 90E0 ldi r25,hi8(.LC9)
|
||||
478 01dc 00C0 rjmp .L101
|
||||
479 .L54:
|
||||
480 .LM76:
|
||||
481 01de 8FE1 ldi r24,hi8(8001)
|
||||
482 01e0 C134 cpi r28,lo8(8001)
|
||||
483 01e2 D807 cpc r29,r24
|
||||
484 01e4 00F0 brlo .L56
|
||||
485 .LM77:
|
||||
486 01e6 80E0 ldi r24,lo8(.LC10)
|
||||
487 01e8 90E0 ldi r25,hi8(.LC10)
|
||||
488 01ea 00C0 rjmp .L101
|
||||
489 .L56:
|
||||
490 .LM78:
|
||||
491 01ec 8FE0 ldi r24,hi8(4001)
|
||||
492 01ee C13A cpi r28,lo8(4001)
|
||||
493 01f0 D807 cpc r29,r24
|
||||
494 01f2 00F0 brlo .L58
|
||||
495 .LM79:
|
||||
496 01f4 80E0 ldi r24,lo8(.LC11)
|
||||
497 01f6 90E0 ldi r25,hi8(.LC11)
|
||||
498 01f8 00C0 rjmp .L101
|
||||
499 .L58:
|
||||
500 .LM80:
|
||||
501 01fa 87E0 ldi r24,hi8(2001)
|
||||
502 01fc C13D cpi r28,lo8(2001)
|
||||
503 01fe D807 cpc r29,r24
|
||||
504 0200 00F0 brlo .L60
|
||||
505 .LM81:
|
||||
506 0202 80E0 ldi r24,lo8(.LC12)
|
||||
507 0204 90E0 ldi r25,hi8(.LC12)
|
||||
508 0206 00C0 rjmp .L101
|
||||
509 .L60:
|
||||
510 .LM82:
|
||||
511 0208 83E0 ldi r24,hi8(1001)
|
||||
512 020a C93E cpi r28,lo8(1001)
|
||||
513 020c D807 cpc r29,r24
|
||||
514 020e 00F0 brlo .L62
|
||||
515 .LM83:
|
||||
516 0210 80E0 ldi r24,lo8(.LC13)
|
||||
517 0212 90E0 ldi r25,hi8(.LC13)
|
||||
518 0214 00C0 rjmp .L101
|
||||
519 .L62:
|
||||
520 .LM84:
|
||||
521 0216 81E0 ldi r24,hi8(501)
|
||||
522 0218 C53F cpi r28,lo8(501)
|
||||
523 021a D807 cpc r29,r24
|
||||
524 021c 00F0 brlo .L64
|
||||
525 .LM85:
|
||||
526 021e 80E0 ldi r24,lo8(.LC14)
|
||||
527 0220 90E0 ldi r25,hi8(.LC14)
|
||||
528 0222 00C0 rjmp .L101
|
||||
529 .L64:
|
||||
530 .LM86:
|
||||
531 0224 C536 cpi r28,101
|
||||
532 0226 D105 cpc r29,__zero_reg__
|
||||
533 0228 00F0 brlo .L66
|
||||
534 .LM87:
|
||||
535 022a 80E0 ldi r24,lo8(.LC15)
|
||||
536 022c 90E0 ldi r25,hi8(.LC15)
|
||||
537 022e 00C0 rjmp .L101
|
||||
538 .L66:
|
||||
539 .LM88:
|
||||
540 0230 80E0 ldi r24,lo8(.LC16)
|
||||
541 0232 90E0 ldi r25,hi8(.LC16)
|
||||
542 0234 00C0 rjmp .L101
|
||||
543 .LVL11:
|
||||
544 .L50:
|
||||
545 .LM89:
|
||||
546 0236 1230 cpi r17,lo8(2)
|
||||
547 0238 01F4 brne .L68
|
||||
548 .LM90:
|
||||
549 023a 89E1 ldi r24,hi8(6401)
|
||||
550 023c C130 cpi r28,lo8(6401)
|
||||
551 023e D807 cpc r29,r24
|
||||
552 0240 00F0 brlo .L70
|
||||
553 .LM91:
|
||||
554 0242 80E0 ldi r24,lo8(.LC17)
|
||||
555 0244 90E0 ldi r25,hi8(.LC17)
|
||||
556 0246 00C0 rjmp .L101
|
||||
557 .L70:
|
||||
558 .LM92:
|
||||
559 0248 8CE0 ldi r24,hi8(3201)
|
||||
560 024a C138 cpi r28,lo8(3201)
|
||||
561 024c D807 cpc r29,r24
|
||||
562 024e 00F0 brlo .L72
|
||||
563 .LM93:
|
||||
564 0250 80E0 ldi r24,lo8(.LC18)
|
||||
565 0252 90E0 ldi r25,hi8(.LC18)
|
||||
566 0254 00C0 rjmp .L101
|
||||
567 .L72:
|
||||
568 .LM94:
|
||||
569 0256 86E0 ldi r24,hi8(1601)
|
||||
570 0258 C134 cpi r28,lo8(1601)
|
||||
571 025a D807 cpc r29,r24
|
||||
572 025c 00F0 brlo .L74
|
||||
573 .LM95:
|
||||
574 025e 80E0 ldi r24,lo8(.LC19)
|
||||
575 0260 90E0 ldi r25,hi8(.LC19)
|
||||
576 0262 00C0 rjmp .L101
|
||||
577 .L74:
|
||||
578 .LM96:
|
||||
579 0264 83E0 ldi r24,hi8(801)
|
||||
580 0266 C132 cpi r28,lo8(801)
|
||||
581 0268 D807 cpc r29,r24
|
||||
582 026a 00F0 brlo .L76
|
||||
583 .LM97:
|
||||
584 026c 80E0 ldi r24,lo8(.LC20)
|
||||
585 026e 90E0 ldi r25,hi8(.LC20)
|
||||
586 0270 00C0 rjmp .L101
|
||||
587 .L76:
|
||||
588 .LM98:
|
||||
589 0272 81E0 ldi r24,hi8(401)
|
||||
590 0274 C139 cpi r28,lo8(401)
|
||||
591 0276 D807 cpc r29,r24
|
||||
592 0278 00F0 brlo .L78
|
||||
593 .LM99:
|
||||
594 027a 80E0 ldi r24,lo8(.LC21)
|
||||
595 027c 90E0 ldi r25,hi8(.LC21)
|
||||
596 027e 00C0 rjmp .L101
|
||||
597 .L78:
|
||||
598 .LM100:
|
||||
599 0280 C93C cpi r28,201
|
||||
600 0282 D105 cpc r29,__zero_reg__
|
||||
601 0284 00F0 brlo .L80
|
||||
602 .LM101:
|
||||
603 0286 80E0 ldi r24,lo8(.LC22)
|
||||
604 0288 90E0 ldi r25,hi8(.LC22)
|
||||
605 028a 00C0 rjmp .L101
|
||||
606 .L80:
|
||||
607 .LM102:
|
||||
608 028c 6F97 sbiw r28,31
|
||||
609 028e 00F0 brlo .L97
|
||||
610 .LM103:
|
||||
611 0290 80E0 ldi r24,lo8(.LC23)
|
||||
612 0292 90E0 ldi r25,hi8(.LC23)
|
||||
613 0294 00C0 rjmp .L101
|
||||
614 .LVL12:
|
||||
615 .L68:
|
||||
616 .LM104:
|
||||
617 0296 1330 cpi r17,lo8(3)
|
||||
618 0298 01F4 brne .L99
|
||||
619 .LM105:
|
||||
620 029a 89E1 ldi r24,hi8(6401)
|
||||
621 029c C130 cpi r28,lo8(6401)
|
||||
622 029e D807 cpc r29,r24
|
||||
623 02a0 00F0 brlo .L85
|
||||
624 .LM106:
|
||||
625 02a2 80E0 ldi r24,lo8(.LC25)
|
||||
626 02a4 90E0 ldi r25,hi8(.LC25)
|
||||
627 02a6 00C0 rjmp .L101
|
||||
628 .L85:
|
||||
629 .LM107:
|
||||
630 02a8 8CE0 ldi r24,hi8(3201)
|
||||
631 02aa C138 cpi r28,lo8(3201)
|
||||
632 02ac D807 cpc r29,r24
|
||||
633 02ae 00F0 brlo .L87
|
||||
634 .LM108:
|
||||
635 02b0 80E0 ldi r24,lo8(.LC26)
|
||||
636 02b2 90E0 ldi r25,hi8(.LC26)
|
||||
637 02b4 00C0 rjmp .L101
|
||||
638 .L87:
|
||||
639 .LM109:
|
||||
640 02b6 86E0 ldi r24,hi8(1601)
|
||||
641 02b8 C134 cpi r28,lo8(1601)
|
||||
642 02ba D807 cpc r29,r24
|
||||
643 02bc 00F0 brlo .L89
|
||||
644 .LM110:
|
||||
645 02be 80E0 ldi r24,lo8(.LC27)
|
||||
646 02c0 90E0 ldi r25,hi8(.LC27)
|
||||
647 02c2 00C0 rjmp .L101
|
||||
648 .L89:
|
||||
649 .LM111:
|
||||
650 02c4 83E0 ldi r24,hi8(801)
|
||||
651 02c6 C132 cpi r28,lo8(801)
|
||||
652 02c8 D807 cpc r29,r24
|
||||
653 02ca 00F0 brlo .L91
|
||||
654 .LM112:
|
||||
655 02cc 80E0 ldi r24,lo8(.LC28)
|
||||
656 02ce 90E0 ldi r25,hi8(.LC28)
|
||||
657 02d0 00C0 rjmp .L101
|
||||
658 .L91:
|
||||
659 .LM113:
|
||||
660 02d2 81E0 ldi r24,hi8(401)
|
||||
661 02d4 C139 cpi r28,lo8(401)
|
||||
662 02d6 D807 cpc r29,r24
|
||||
663 02d8 00F0 brlo .L93
|
||||
664 .LM114:
|
||||
665 02da 80E0 ldi r24,lo8(.LC29)
|
||||
666 02dc 90E0 ldi r25,hi8(.LC29)
|
||||
667 02de 00C0 rjmp .L101
|
||||
668 .L93:
|
||||
669 .LM115:
|
||||
670 02e0 C93C cpi r28,201
|
||||
671 02e2 D105 cpc r29,__zero_reg__
|
||||
672 02e4 00F0 brlo .L95
|
||||
673 .LM116:
|
||||
674 02e6 80E0 ldi r24,lo8(.LC30)
|
||||
675 02e8 90E0 ldi r25,hi8(.LC30)
|
||||
676 02ea 00C0 rjmp .L101
|
||||
677 .L95:
|
||||
678 .LM117:
|
||||
679 02ec 6F97 sbiw r28,31
|
||||
680 02ee 00F0 brlo .L97
|
||||
681 .LM118:
|
||||
682 02f0 80E0 ldi r24,lo8(.LC31)
|
||||
683 02f2 90E0 ldi r25,hi8(.LC31)
|
||||
684 02f4 00C0 rjmp .L101
|
||||
685 .L97:
|
||||
686 .LM119:
|
||||
687 02f6 80E0 ldi r24,lo8(.LC24)
|
||||
688 02f8 90E0 ldi r25,hi8(.LC24)
|
||||
689 .L101:
|
||||
690 02fa 0E94 0000 call lcdWriteString
|
||||
691 .LVL13:
|
||||
692 .LVL14:
|
||||
693 .L99:
|
||||
694 /* epilogue: frame size=0 */
|
||||
695 02fe DF91 pop r29
|
||||
696 0300 CF91 pop r28
|
||||
697 0302 1F91 pop r17
|
||||
698 0304 0895 ret
|
||||
699 /* epilogue end (size=4) */
|
||||
700 /* function showDistanceOnLCD size 241 (234) */
|
||||
701 .LFE20:
|
||||
703 .global checkCommunication
|
||||
705 checkCommunication:
|
||||
706 .LFB21:
|
||||
707 .LM120:
|
||||
708 /* prologue: frame size=0 */
|
||||
709 0306 0F93 push r16
|
||||
710 0308 1F93 push r17
|
||||
711 /* prologue end (size=2) */
|
||||
712 .LM121:
|
||||
713 030a 0E94 0000 call rfIdGetTagPresent
|
||||
714 030e 8823 tst r24
|
||||
715 0310 01F0 breq .L104
|
||||
716 .LBB2:
|
||||
717 .LM122:
|
||||
718 0312 0E94 0000 call rfIdGetTag
|
||||
719 0316 8C01 movw r16,r24
|
||||
720 .LVL15:
|
||||
721 .LM123:
|
||||
722 0318 83E1 ldi r24,lo8(19)
|
||||
723 031a 0E94 0000 call lcdSetPos
|
||||
724 .LM124:
|
||||
725 031e C801 movw r24,r16
|
||||
726 0320 0E94 0000 call lcdWriteString
|
||||
727 .LM125:
|
||||
728 0324 C801 movw r24,r16
|
||||
729 0326 0E94 0000 call roboMSPSetData
|
||||
730 .L104:
|
||||
731 .LBE2:
|
||||
732 .LM126:
|
||||
733 032a 0E94 0000 call roboMSPGetActiveStatus
|
||||
734 032e 8330 cpi r24,lo8(3)
|
||||
735 0330 01F0 breq .L108
|
||||
736 0332 8430 cpi r24,lo8(4)
|
||||
737 0334 00F4 brsh .L111
|
||||
738 0336 8230 cpi r24,lo8(2)
|
||||
739 0338 01F4 brne .L112
|
||||
740 033a 00C0 rjmp .L107
|
||||
741 .L111:
|
||||
742 033c 8430 cpi r24,lo8(4)
|
||||
743 033e 01F0 breq .L109
|
||||
744 0340 8530 cpi r24,lo8(5)
|
||||
745 0342 01F4 brne .L112
|
||||
746 0344 00C0 rjmp .L110
|
||||
747 .L107:
|
||||
748 .LM127:
|
||||
749 0346 81E0 ldi r24,lo8(1)
|
||||
750 0348 00C0 rjmp .L113
|
||||
751 .L108:
|
||||
752 .LM128:
|
||||
753 034a 82E0 ldi r24,lo8(2)
|
||||
754 .L113:
|
||||
755 034c 0E94 0000 call activateRobot
|
||||
756 .LM129:
|
||||
757 0350 0E94 0000 call rfIdEnable
|
||||
758 0354 00C0 rjmp .L112
|
||||
759 .L109:
|
||||
760 .LM130:
|
||||
761 0356 0E94 0000 call deactivateRobot
|
||||
762 035a 00C0 rjmp .L112
|
||||
763 .L110:
|
||||
764 .LM131:
|
||||
765 035c 0E94 0000 call rfIdClearBuffer
|
||||
766 .L112:
|
||||
767 /* epilogue: frame size=0 */
|
||||
768 0360 1F91 pop r17
|
||||
769 0362 0F91 pop r16
|
||||
770 0364 0895 ret
|
||||
771 /* epilogue end (size=3) */
|
||||
772 /* function checkCommunication size 48 (43) */
|
||||
773 .LFE21:
|
||||
775 .data
|
||||
776 .LC32:
|
||||
777 0220 4472 6976 .string "Drive: FORWARD "
|
||||
777 653A 2046
|
||||
777 4F52 5741
|
||||
777 5244 2020
|
||||
777 00
|
||||
778 .LC33:
|
||||
779 0231 4472 6976 .string "Drive: STOP "
|
||||
779 653A 2053
|
||||
779 544F 5020
|
||||
779 2020 2020
|
||||
779 00
|
||||
780 .LC34:
|
||||
781 0242 416C 6967 .string "Align to wall "
|
||||
781 6E20 746F
|
||||
781 2077 616C
|
||||
781 6C20 2020
|
||||
781 00
|
||||
782 .LC35:
|
||||
783 0253 2020 5E2D .string " ^-- (1m) --^ "
|
||||
783 2D20 2831
|
||||
783 6D29 202D
|
||||
783 2D5E 2020
|
||||
783 00
|
||||
784 .LC36:
|
||||
785 0264 506F 7369 .string "Posistion locked"
|
||||
785 7374 696F
|
||||
785 6E20 6C6F
|
||||
785 636B 6564
|
||||
785 00
|
||||
786 .LC37:
|
||||
787 0275 4472 6976 .string "Drive: Turn < "
|
||||
787 653A 2054
|
||||
787 7572 6E20
|
||||
787 3C20 00
|
||||
788 .LC38:
|
||||
789 0284 4472 6976 .string "Drive: Turn > "
|
||||
789 653A 2054
|
||||
789 7572 6E20
|
||||
789 3E20 00
|
||||
790 .LC39:
|
||||
791 0293 205D 2D2D .string " ]--- (1m) --->|"
|
||||
791 2D20 2831
|
||||
791 6D29 202D
|
||||
791 2D2D 3E7C
|
||||
791 00
|
||||
792 .LC40:
|
||||
793 02a4 7C3C 2D2D .string "|<--- (1m) ---[ "
|
||||
793 2D20 2831
|
||||
793 6D29 202D
|
||||
793 2D2D 5B20
|
||||
793 00
|
||||
794 .LC41:
|
||||
795 02b5 4472 6976 .string "Drive: Turn <<< "
|
||||
795 653A 2054
|
||||
795 7572 6E20
|
||||
795 3C3C 3C20
|
||||
795 00
|
||||
796 .LC42:
|
||||
797 02c6 4472 6976 .string "Drive: Turn < "
|
||||
797 653A 2054
|
||||
797 7572 6E20
|
||||
797 3C20 2020
|
||||
797 00
|
||||
798 .LC43:
|
||||
799 02d7 4472 6976 .string "Drive: Turn > "
|
||||
799 653A 2054
|
||||
799 7572 6E20
|
||||
799 3E20 2020
|
||||
799 00
|
||||
800 .LC44:
|
||||
801 02e8 5365 7276 .string "Servo: forward "
|
||||
801 6F3A 2066
|
||||
801 6F72 7761
|
||||
801 7264 2000
|
||||
802 .LC45:
|
||||
803 02f8 4469 7374 .string "Distance: "
|
||||
803 616E 6365
|
||||
803 3A20 00
|
||||
804 .text
|
||||
805 .global updateProgram
|
||||
807 updateProgram:
|
||||
808 .LFB19:
|
||||
809 .LM132:
|
||||
810 /* prologue: frame size=0 */
|
||||
811 0366 1F93 push r17
|
||||
812 /* prologue end (size=1) */
|
||||
813 .LM133:
|
||||
814 0368 8091 0000 lds r24,rfEnable
|
||||
815 036c 8823 tst r24
|
||||
816 036e 01F0 breq .L115
|
||||
817 .LM134:
|
||||
818 0370 0E94 0000 call checkCommunication
|
||||
819 .L115:
|
||||
820 .LM135:
|
||||
821 0374 8091 0000 lds r24,roboActive
|
||||
822 0378 8130 cpi r24,lo8(1)
|
||||
823 037a 01F0 breq .+2
|
||||
824 037c 00C0 rjmp .L117
|
||||
825 .LM136:
|
||||
826 037e 8091 0000 lds r24,progCounter
|
||||
827 0382 8F5F subi r24,lo8(-(1))
|
||||
828 0384 8093 0000 sts progCounter,r24
|
||||
829 0388 9091 0000 lds r25,progTimer
|
||||
830 038c 8917 cp r24,r25
|
||||
831 038e 00F4 brsh .+2
|
||||
832 0390 00C0 rjmp .L117
|
||||
833 .LM137:
|
||||
834 0392 8091 0000 lds r24,progPosition
|
||||
835 0396 E82F mov r30,r24
|
||||
836 0398 F0E0 ldi r31,lo8(0)
|
||||
837 039a E631 cpi r30,22
|
||||
838 039c F105 cpc r31,__zero_reg__
|
||||
839 039e 00F0 brlo .+2
|
||||
840 03a0 00C0 rjmp .L120
|
||||
841 03a2 E050 subi r30,lo8(-(gs(.L143)))
|
||||
**** Warning:expression dangerous with linker stubs
|
||||
842 03a4 F040 sbci r31,hi8(-(gs(.L143)))
|
||||
**** Warning:expression dangerous with linker stubs
|
||||
843 03a6 EE0F lsl r30
|
||||
844 03a8 FF1F rol r31
|
||||
845 03aa 0590 lpm __tmp_reg__,Z+
|
||||
846 03ac F491 lpm r31,Z
|
||||
847 03ae E02D mov r30,__tmp_reg__
|
||||
848 03b0 0994 ijmp
|
||||
849 .data
|
||||
850 .section .progmem.gcc_sw_table, "a", @progbits
|
||||
851 .p2align 1
|
||||
852 .L143:
|
||||
853 .data
|
||||
854 .section .progmem.gcc_sw_table, "a", @progbits
|
||||
855 .p2align 1
|
||||
856 0000 0000 .word gs(.L121)
|
||||
857 0002 0000 .word gs(.L122)
|
||||
858 0004 0000 .word gs(.L123)
|
||||
859 0006 0000 .word gs(.L124)
|
||||
860 0008 0000 .word gs(.L125)
|
||||
861 000a 0000 .word gs(.L126)
|
||||
862 000c 0000 .word gs(.L127)
|
||||
863 000e 0000 .word gs(.L128)
|
||||
864 0010 0000 .word gs(.L129)
|
||||
865 0012 0000 .word gs(.L130)
|
||||
866 0014 0000 .word gs(.L131)
|
||||
867 0016 0000 .word gs(.L132)
|
||||
868 0018 0000 .word gs(.L133)
|
||||
869 001a 0000 .word gs(.L134)
|
||||
870 001c 0000 .word gs(.L135)
|
||||
871 001e 0000 .word gs(.L136)
|
||||
872 0020 0000 .word gs(.L137)
|
||||
873 0022 0000 .word gs(.L138)
|
||||
874 0024 0000 .word gs(.L139)
|
||||
875 0026 0000 .word gs(.L140)
|
||||
876 0028 0000 .word gs(.L141)
|
||||
877 002a 0000 .word gs(.L142)
|
||||
878 .text
|
||||
879 .L121:
|
||||
880 .LM138:
|
||||
881 03b2 0E94 0000 call lcdClearDisplay
|
||||
882 .LM139:
|
||||
883 03b6 81E0 ldi r24,lo8(1)
|
||||
884 03b8 0E94 0000 call lcdSetLayout
|
||||
885 03bc 00C0 rjmp .L136
|
||||
886 .L122:
|
||||
887 .LM140:
|
||||
888 03be 8FE7 ldi r24,lo8(127)
|
||||
889 03c0 8093 0000 sts servoMotorLeft,r24
|
||||
890 .LM141:
|
||||
891 03c4 8093 0000 sts servoMotorRight,r24
|
||||
892 .LM142:
|
||||
893 03c8 0E94 0000 call pingSendPing
|
||||
894 .LM143:
|
||||
895 03cc 84E0 ldi r24,lo8(4)
|
||||
896 03ce 8093 0000 sts progTimer,r24
|
||||
897 .LM144:
|
||||
898 03d2 0E94 0000 call pingGetReady
|
||||
899 03d6 8823 tst r24
|
||||
900 03d8 01F4 brne .+2
|
||||
901 03da 00C0 rjmp .L120
|
||||
902 .LM145:
|
||||
903 03dc 0E94 0000 call pingGetDistance
|
||||
904 03e0 9093 0000 sts (tempDistance)+1,r25
|
||||
905 03e4 8093 0000 sts tempDistance,r24
|
||||
906 .LM146:
|
||||
907 03e8 27E1 ldi r18,hi8(6000)
|
||||
908 03ea 8037 cpi r24,lo8(6000)
|
||||
909 03ec 9207 cpc r25,r18
|
||||
910 03ee 00F4 brsh .L145
|
||||
911 .LM147:
|
||||
912 03f0 42E0 ldi r20,lo8(2)
|
||||
913 03f2 60E0 ldi r22,lo8(0)
|
||||
914 03f4 80E0 ldi r24,lo8(0)
|
||||
915 03f6 90E0 ldi r25,hi8(0)
|
||||
916 03f8 0E94 0000 call showDistanceOnLCD
|
||||
917 03fc 00C0 rjmp .L283
|
||||
918 .L145:
|
||||
919 .LM148:
|
||||
920 03fe 42E0 ldi r20,lo8(2)
|
||||
921 0400 60E0 ldi r22,lo8(0)
|
||||
922 0402 8057 subi r24,lo8(-(-6000))
|
||||
923 0404 9741 sbci r25,hi8(-(-6000))
|
||||
924 0406 0E94 0000 call showDistanceOnLCD
|
||||
925 040a 00C0 rjmp .L120
|
||||
926 .L123:
|
||||
927 .LM149:
|
||||
928 040c 80E0 ldi r24,lo8(0)
|
||||
929 040e 0E94 0000 call lcdSetPos
|
||||
930 .LM150:
|
||||
931 0412 80E0 ldi r24,lo8(.LC33)
|
||||
932 0414 90E0 ldi r25,hi8(.LC33)
|
||||
933 0416 0E94 0000 call lcdWriteString
|
||||
934 .LM151:
|
||||
935 041a 8CE6 ldi r24,lo8(108)
|
||||
936 041c 8093 0000 sts servoMotorLeft,r24
|
||||
937 .LM152:
|
||||
938 0420 8093 0000 sts servoMotorRight,r24
|
||||
939 .LM153:
|
||||
940 0424 88E2 ldi r24,lo8(40)
|
||||
941 0426 00C0 rjmp .L280
|
||||
942 .L124:
|
||||
943 .LM154:
|
||||
944 0428 87E7 ldi r24,lo8(119)
|
||||
945 042a 8093 0000 sts servoMotorLeft,r24
|
||||
946 .LM155:
|
||||
947 042e 8093 0000 sts servoMotorRight,r24
|
||||
948 .LM156:
|
||||
949 0432 81E0 ldi r24,lo8(1)
|
||||
950 0434 8093 0000 sts progTimer,r24
|
||||
951 .LM157:
|
||||
952 0438 1092 0000 sts regulatorMeasureCounter,__zero_reg__
|
||||
953 .LM158:
|
||||
954 043c 84E0 ldi r24,lo8(4)
|
||||
955 043e 00C0 rjmp .L266
|
||||
956 .L125:
|
||||
957 .LM159:
|
||||
958 0440 8EEA ldi r24,lo8(-82)
|
||||
959 0442 8093 0000 sts servoPing,r24
|
||||
960 .LM160:
|
||||
961 0446 84E1 ldi r24,lo8(20)
|
||||
962 0448 8093 0000 sts progTimer,r24
|
||||
963 .LM161:
|
||||
964 044c 85E0 ldi r24,lo8(5)
|
||||
965 044e 00C0 rjmp .L266
|
||||
966 .L126:
|
||||
967 .LM162:
|
||||
968 0450 0E94 0000 call pingSendPing
|
||||
969 .LM163:
|
||||
970 0454 84E0 ldi r24,lo8(4)
|
||||
971 0456 8093 0000 sts progTimer,r24
|
||||
972 .LM164:
|
||||
973 045a 0E94 0000 call pingGetReady
|
||||
974 045e 8823 tst r24
|
||||
975 0460 01F4 brne .+2
|
||||
976 0462 00C0 rjmp .L120
|
||||
977 .LM165:
|
||||
978 0464 0E94 0000 call pingGetDistance
|
||||
979 0468 9093 0000 sts (tempLeftDistance)+1,r25
|
||||
980 046c 8093 0000 sts tempLeftDistance,r24
|
||||
981 0470 00C0 rjmp .L283
|
||||
982 .L127:
|
||||
983 .LM166:
|
||||
984 0472 87E6 ldi r24,lo8(103)
|
||||
985 0474 8093 0000 sts servoPing,r24
|
||||
986 .LM167:
|
||||
987 0478 88E2 ldi r24,lo8(40)
|
||||
988 047a 8093 0000 sts progTimer,r24
|
||||
989 .LM168:
|
||||
990 047e 87E0 ldi r24,lo8(7)
|
||||
991 0480 00C0 rjmp .L266
|
||||
992 .L128:
|
||||
993 .LM169:
|
||||
994 0482 0E94 0000 call pingSendPing
|
||||
995 .LM170:
|
||||
996 0486 84E0 ldi r24,lo8(4)
|
||||
997 0488 8093 0000 sts progTimer,r24
|
||||
998 .LM171:
|
||||
999 048c 0E94 0000 call pingGetReady
|
||||
1000 0490 8823 tst r24
|
||||
1001 0492 01F4 brne .+2
|
||||
1002 0494 00C0 rjmp .L120
|
||||
1003 .LM172:
|
||||
1004 0496 0E94 0000 call pingGetDistance
|
||||
1005 049a 9093 0000 sts (tempRightDistance)+1,r25
|
||||
1006 049e 8093 0000 sts tempRightDistance,r24
|
||||
1007 04a2 00C0 rjmp .L283
|
||||
1008 .L129:
|
||||
1009 .LM173:
|
||||
1010 04a4 8CE8 ldi r24,lo8(-116)
|
||||
1011 04a6 8093 0000 sts servoPing,r24
|
||||
1012 .LM174:
|
||||
1013 04aa 2091 0000 lds r18,tempLeftDistance
|
||||
1014 04ae 3091 0000 lds r19,(tempLeftDistance)+1
|
||||
1015 04b2 8091 0000 lds r24,tempRightDistance
|
||||
1016 04b6 9091 0000 lds r25,(tempRightDistance)+1
|
||||
1017 04ba 8217 cp r24,r18
|
||||
1018 04bc 9307 cpc r25,r19
|
||||
1019 04be 00F4 brsh .L149
|
||||
1020 .LM175:
|
||||
1021 04c0 1092 0000 sts regulatorMode,__zero_reg__
|
||||
1022 04c4 00C0 rjmp .L151
|
||||
1023 .L149:
|
||||
1024 .LM176:
|
||||
1025 04c6 81E0 ldi r24,lo8(1)
|
||||
1026 04c8 8093 0000 sts regulatorMode,r24
|
||||
1027 .L151:
|
||||
1028 .LM177:
|
||||
1029 04cc 82E3 ldi r24,lo8(50)
|
||||
1030 04ce 8093 0000 sts progTimer,r24
|
||||
1031 .LM178:
|
||||
1032 04d2 89E0 ldi r24,lo8(9)
|
||||
1033 04d4 00C0 rjmp .L266
|
||||
1034 .L130:
|
||||
1035 .LM179:
|
||||
1036 04d6 0E94 0000 call pingSendPing
|
||||
1037 .LM180:
|
||||
1038 04da 84E0 ldi r24,lo8(4)
|
||||
1039 04dc 8093 0000 sts progTimer,r24
|
||||
1040 .LM181:
|
||||
1041 04e0 0E94 0000 call pingGetReady
|
||||
1042 04e4 8823 tst r24
|
||||
1043 04e6 01F4 brne .+2
|
||||
1044 04e8 00C0 rjmp .L120
|
||||
1045 .LM182:
|
||||
1046 04ea 80E0 ldi r24,lo8(0)
|
||||
1047 04ec 0E94 0000 call lcdSetPos
|
||||
1048 .LM183:
|
||||
1049 04f0 80E0 ldi r24,lo8(.LC34)
|
||||
1050 04f2 90E0 ldi r25,hi8(.LC34)
|
||||
1051 04f4 0E94 0000 call lcdWriteString
|
||||
1052 .LM184:
|
||||
1053 04f8 0E94 0000 call pingGetDistance
|
||||
1054 04fc 9093 0000 sts (tempLastDistanceToWall)+1,r25
|
||||
1055 0500 8093 0000 sts tempLastDistanceToWall,r24
|
||||
1056 .LM185:
|
||||
1057 0504 9093 0000 sts (tempDistanceToWall)+1,r25
|
||||
1058 0508 8093 0000 sts tempDistanceToWall,r24
|
||||
1059 050c 00C0 rjmp .L283
|
||||
1060 .L131:
|
||||
1061 .LM186:
|
||||
1062 050e 8091 0000 lds r24,regulatorMode
|
||||
1063 0512 8823 tst r24
|
||||
1064 0514 01F4 brne .L153
|
||||
1065 .LM187:
|
||||
1066 0516 86E8 ldi r24,lo8(-122)
|
||||
1067 0518 8093 0000 sts servoMotorLeft,r24
|
||||
1068 .LM188:
|
||||
1069 051c 88E6 ldi r24,lo8(104)
|
||||
1070 051e 00C0 rjmp .L257
|
||||
1071 .L153:
|
||||
1072 .LM189:
|
||||
1073 0520 8130 cpi r24,lo8(1)
|
||||
1074 0522 01F4 brne .L155
|
||||
1075 .LM190:
|
||||
1076 0524 88E6 ldi r24,lo8(104)
|
||||
1077 0526 8093 0000 sts servoMotorLeft,r24
|
||||
1078 .LM191:
|
||||
1079 052a 86E8 ldi r24,lo8(-122)
|
||||
1080 .L257:
|
||||
1081 052c 8093 0000 sts servoMotorRight,r24
|
||||
1082 .LM192:
|
||||
1083 0530 87E0 ldi r24,lo8(7)
|
||||
1084 0532 8093 0000 sts progTimer,r24
|
||||
1085 .L155:
|
||||
1086 .LM193:
|
||||
1087 0536 8BE0 ldi r24,lo8(11)
|
||||
1088 0538 00C0 rjmp .L266
|
||||
1089 .L132:
|
||||
1090 .LM194:
|
||||
1091 053a 0E94 0000 call pingSendPing
|
||||
1092 .LM195:
|
||||
1093 053e 84E0 ldi r24,lo8(4)
|
||||
1094 0540 8093 0000 sts progTimer,r24
|
||||
1095 .LM196:
|
||||
1096 0544 87E7 ldi r24,lo8(119)
|
||||
1097 0546 8093 0000 sts servoMotorLeft,r24
|
||||
1098 .LM197:
|
||||
1099 054a 8093 0000 sts servoMotorRight,r24
|
||||
1100 .LM198:
|
||||
1101 054e 0E94 0000 call pingGetReady
|
||||
1102 0552 8823 tst r24
|
||||
1103 0554 01F4 brne .+2
|
||||
1104 0556 00C0 rjmp .L120
|
||||
1105 .LM199:
|
||||
1106 0558 0E94 0000 call pingGetDistance
|
||||
1107 055c 9093 0000 sts (tempDistance)+1,r25
|
||||
1108 0560 8093 0000 sts tempDistance,r24
|
||||
1109 .LM200:
|
||||
1110 0564 2091 0000 lds r18,tempLastDistanceToWall
|
||||
1111 0568 3091 0000 lds r19,(tempLastDistanceToWall)+1
|
||||
1112 056c 2817 cp r18,r24
|
||||
1113 056e 3907 cpc r19,r25
|
||||
1114 0570 00F4 brsh .L158
|
||||
1115 .LM201:
|
||||
1116 0572 80E0 ldi r24,lo8(0)
|
||||
1117 0574 0E94 0000 call lcdSetPos
|
||||
1118 .LM202:
|
||||
1119 0578 80E0 ldi r24,lo8(.LC35)
|
||||
1120 057a 90E0 ldi r25,hi8(.LC35)
|
||||
1121 057c 0E94 0000 call lcdWriteString
|
||||
1122 .LM203:
|
||||
1123 0580 81E0 ldi r24,lo8(1)
|
||||
1124 0582 8093 0000 sts progTimer,r24
|
||||
1125 .LM204:
|
||||
1126 0586 8091 0000 lds r24,progPosition
|
||||
1127 058a 8F5F subi r24,lo8(-(1))
|
||||
1128 058c 00C0 rjmp .L258
|
||||
1129 .L158:
|
||||
1130 .LM205:
|
||||
1131 058e 8091 0000 lds r24,progPosition
|
||||
1132 0592 8150 subi r24,lo8(-(-1))
|
||||
1133 .L258:
|
||||
1134 0594 8093 0000 sts progPosition,r24
|
||||
1135 .LM206:
|
||||
1136 0598 8091 0000 lds r24,tempDistance
|
||||
1137 059c 9091 0000 lds r25,(tempDistance)+1
|
||||
1138 05a0 9093 0000 sts (tempLastDistanceToWall)+1,r25
|
||||
1139 05a4 8093 0000 sts tempLastDistanceToWall,r24
|
||||
1140 05a8 00C0 rjmp .L120
|
||||
1141 .L133:
|
||||
1142 .LM207:
|
||||
1143 05aa 0E94 0000 call pingSendPing
|
||||
1144 .LM208:
|
||||
1145 05ae 84E0 ldi r24,lo8(4)
|
||||
1146 05b0 8093 0000 sts progTimer,r24
|
||||
1147 .LM209:
|
||||
1148 05b4 0E94 0000 call pingGetReady
|
||||
1149 05b8 8823 tst r24
|
||||
1150 05ba 01F4 brne .+2
|
||||
1151 05bc 00C0 rjmp .L120
|
||||
1152 .LM210:
|
||||
1153 05be 0E94 0000 call pingGetDistance
|
||||
1154 05c2 9C01 movw r18,r24
|
||||
1155 05c4 9093 0000 sts (tempDistance)+1,r25
|
||||
1156 05c8 8093 0000 sts tempDistance,r24
|
||||
1157 .LM211:
|
||||
1158 05cc 47E1 ldi r20,hi8(6001)
|
||||
1159 05ce 8137 cpi r24,lo8(6001)
|
||||
1160 05d0 9407 cpc r25,r20
|
||||
1161 05d2 00F0 brlo .L162
|
||||
1162 .LM212:
|
||||
1163 05d4 42E0 ldi r20,lo8(2)
|
||||
1164 05d6 60E0 ldi r22,lo8(0)
|
||||
1165 05d8 8057 subi r24,lo8(-(-6000))
|
||||
1166 05da 9741 sbci r25,hi8(-(-6000))
|
||||
1167 05dc 00C0 rjmp .L259
|
||||
1168 .L162:
|
||||
1169 .LM213:
|
||||
1170 05de 42E0 ldi r20,lo8(2)
|
||||
1171 05e0 61E0 ldi r22,lo8(1)
|
||||
1172 05e2 80E7 ldi r24,lo8(6000)
|
||||
1173 05e4 97E1 ldi r25,hi8(6000)
|
||||
1174 05e6 821B sub r24,r18
|
||||
1175 05e8 930B sbc r25,r19
|
||||
1176 .L259:
|
||||
1177 05ea 0E94 0000 call showDistanceOnLCD
|
||||
1178 .LM214:
|
||||
1179 05ee 8091 0000 lds r24,tempDistance
|
||||
1180 05f2 9091 0000 lds r25,(tempDistance)+1
|
||||
1181 05f6 26E1 ldi r18,hi8(5800)
|
||||
1182 05f8 883A cpi r24,lo8(5800)
|
||||
1183 05fa 9207 cpc r25,r18
|
||||
1184 05fc 00F4 brsh .L165
|
||||
1185 .LM215:
|
||||
1186 05fe 8091 0000 lds r24,servoMotorLeft
|
||||
1187 0602 8337 cpi r24,lo8(115)
|
||||
1188 0604 00F0 brlo .L171
|
||||
1189 .LM216:
|
||||
1190 0606 8150 subi r24,lo8(-(-1))
|
||||
1191 0608 8093 0000 sts servoMotorLeft,r24
|
||||
1192 .LM217:
|
||||
1193 060c 8091 0000 lds r24,servoMotorRight
|
||||
1194 0610 8150 subi r24,lo8(-(-1))
|
||||
1195 0612 00C0 rjmp .L269
|
||||
1196 .L165:
|
||||
1197 .LM218:
|
||||
1198 0614 8953 subi r24,lo8(6201)
|
||||
1199 0616 9841 sbci r25,hi8(6201)
|
||||
1200 0618 00F0 brlo .L169
|
||||
1201 .LM219:
|
||||
1202 061a 8091 0000 lds r24,servoMotorLeft
|
||||
1203 061e 8F37 cpi r24,lo8(127)
|
||||
1204 0620 00F4 brsh .L171
|
||||
1205 .LM220:
|
||||
1206 0622 8F5F subi r24,lo8(-(1))
|
||||
1207 0624 8093 0000 sts servoMotorLeft,r24
|
||||
1208 .LM221:
|
||||
1209 0628 8091 0000 lds r24,servoMotorRight
|
||||
1210 062c 8F5F subi r24,lo8(-(1))
|
||||
1211 .L269:
|
||||
1212 062e 8093 0000 sts servoMotorRight,r24
|
||||
1213 .L171:
|
||||
1214 .LM222:
|
||||
1215 0632 1092 0000 sts regulatorMeasureCounter,__zero_reg__
|
||||
1216 0636 00C0 rjmp .L120
|
||||
1217 .L169:
|
||||
1218 .LM223:
|
||||
1219 0638 17E7 ldi r17,lo8(119)
|
||||
1220 063a 1093 0000 sts servoMotorLeft,r17
|
||||
1221 .LM224:
|
||||
1222 063e 1093 0000 sts servoMotorRight,r17
|
||||
1223 .LM225:
|
||||
1224 0642 8091 0000 lds r24,regulatorMeasureCounter
|
||||
1225 0646 8F5F subi r24,lo8(-(1))
|
||||
1226 0648 8093 0000 sts regulatorMeasureCounter,r24
|
||||
1227 064c 8530 cpi r24,lo8(5)
|
||||
1228 064e 01F0 breq .+2
|
||||
1229 0650 00C0 rjmp .L120
|
||||
1230 .LM226:
|
||||
1231 0652 80E0 ldi r24,lo8(0)
|
||||
1232 0654 0E94 0000 call lcdSetPos
|
||||
1233 .LM227:
|
||||
1234 0658 80E0 ldi r24,lo8(.LC36)
|
||||
1235 065a 90E0 ldi r25,hi8(.LC36)
|
||||
1236 065c 0E94 0000 call lcdWriteString
|
||||
1237 .LM228:
|
||||
1238 0660 1093 0000 sts servoMotorLeft,r17
|
||||
1239 .LM229:
|
||||
1240 0664 1093 0000 sts servoMotorRight,r17
|
||||
1241 .LM230:
|
||||
1242 0668 8091 0000 lds r24,tempDistance
|
||||
1243 066c 9091 0000 lds r25,(tempDistance)+1
|
||||
1244 0670 9093 0000 sts (tempDistanceToWall)+1,r25
|
||||
1245 0674 8093 0000 sts tempDistanceToWall,r24
|
||||
1246 .LM231:
|
||||
1247 0678 82E3 ldi r24,lo8(50)
|
||||
1248 067a 8093 0000 sts progTimer,r24
|
||||
1249 .LM232:
|
||||
1250 067e 1092 0000 sts regulatorMeasureCounter,__zero_reg__
|
||||
1251 0682 00C0 rjmp .L272
|
||||
1252 .L134:
|
||||
1253 .LM233:
|
||||
1254 0684 8CE8 ldi r24,lo8(-116)
|
||||
1255 0686 8093 0000 sts servoPing,r24
|
||||
1256 .LM234:
|
||||
1257 068a 2091 0000 lds r18,tempLeftDistance
|
||||
1258 068e 3091 0000 lds r19,(tempLeftDistance)+1
|
||||
1259 0692 8091 0000 lds r24,tempRightDistance
|
||||
1260 0696 9091 0000 lds r25,(tempRightDistance)+1
|
||||
1261 069a 8217 cp r24,r18
|
||||
1262 069c 9307 cpc r25,r19
|
||||
1263 069e 00F4 brsh .L174
|
||||
1264 .LM235:
|
||||
1265 06a0 80E0 ldi r24,lo8(0)
|
||||
1266 06a2 0E94 0000 call lcdSetPos
|
||||
1267 .LM236:
|
||||
1268 06a6 80E0 ldi r24,lo8(.LC37)
|
||||
1269 06a8 90E0 ldi r25,hi8(.LC37)
|
||||
1270 06aa 0E94 0000 call lcdWriteString
|
||||
1271 .LM237:
|
||||
1272 06ae 88E6 ldi r24,lo8(104)
|
||||
1273 06b0 8093 0000 sts servoMotorLeft,r24
|
||||
1274 .LM238:
|
||||
1275 06b4 86E8 ldi r24,lo8(-122)
|
||||
1276 06b6 8093 0000 sts servoMotorRight,r24
|
||||
1277 .LM239:
|
||||
1278 06ba 83E4 ldi r24,lo8(67)
|
||||
1279 06bc 8093 0000 sts servoPing,r24
|
||||
1280 .LM240:
|
||||
1281 06c0 1092 0000 sts regulatorMode,__zero_reg__
|
||||
1282 06c4 00C0 rjmp .L260
|
||||
1283 .L174:
|
||||
1284 .LM241:
|
||||
1285 06c6 80E0 ldi r24,lo8(0)
|
||||
1286 06c8 0E94 0000 call lcdSetPos
|
||||
1287 .LM242:
|
||||
1288 06cc 80E0 ldi r24,lo8(.LC38)
|
||||
1289 06ce 90E0 ldi r25,hi8(.LC38)
|
||||
1290 06d0 0E94 0000 call lcdWriteString
|
||||
1291 .LM243:
|
||||
1292 06d4 86E8 ldi r24,lo8(-122)
|
||||
1293 06d6 8093 0000 sts servoMotorLeft,r24
|
||||
1294 .LM244:
|
||||
1295 06da 88E6 ldi r24,lo8(104)
|
||||
1296 06dc 8093 0000 sts servoMotorRight,r24
|
||||
1297 .LM245:
|
||||
1298 06e0 80ED ldi r24,lo8(-48)
|
||||
1299 06e2 8093 0000 sts servoPing,r24
|
||||
1300 .LM246:
|
||||
1301 06e6 81E0 ldi r24,lo8(1)
|
||||
1302 06e8 8093 0000 sts regulatorMode,r24
|
||||
1303 .L260:
|
||||
1304 .LM247:
|
||||
1305 06ec 82E3 ldi r24,lo8(50)
|
||||
1306 06ee 00C0 rjmp .L280
|
||||
1307 .L135:
|
||||
1308 .LM248:
|
||||
1309 06f0 87E7 ldi r24,lo8(119)
|
||||
1310 06f2 8093 0000 sts servoMotorLeft,r24
|
||||
1311 .LM249:
|
||||
1312 06f6 8093 0000 sts servoMotorRight,r24
|
||||
1313 .LM250:
|
||||
1314 06fa 8AE0 ldi r24,lo8(10)
|
||||
1315 06fc 8093 0000 sts progTimer,r24
|
||||
1316 .LM251:
|
||||
1317 0700 82E0 ldi r24,lo8(2)
|
||||
1318 0702 8093 0000 sts regulatorTimer,r24
|
||||
1319 0706 00C0 rjmp .L273
|
||||
1320 .L136:
|
||||
1321 .LM252:
|
||||
1322 0708 80E0 ldi r24,lo8(0)
|
||||
1323 070a 0E94 0000 call lcdSetPos
|
||||
1324 .LM253:
|
||||
1325 070e 80E0 ldi r24,lo8(.LC32)
|
||||
1326 0710 90E0 ldi r25,hi8(.LC32)
|
||||
1327 0712 0E94 0000 call lcdWriteString
|
||||
1328 .LM254:
|
||||
1329 0716 86E8 ldi r24,lo8(-122)
|
||||
1330 0718 8093 0000 sts servoMotorLeft,r24
|
||||
1331 .LM255:
|
||||
1332 071c 8093 0000 sts servoMotorRight,r24
|
||||
1333 .LM256:
|
||||
1334 0720 84E1 ldi r24,lo8(20)
|
||||
1335 .L280:
|
||||
1336 0722 8093 0000 sts progTimer,r24
|
||||
1337 0726 00C0 rjmp .L272
|
||||
1338 .L137:
|
||||
1339 .LM257:
|
||||
1340 0728 8FE7 ldi r24,lo8(127)
|
||||
1341 072a 8093 0000 sts servoMotorLeft,r24
|
||||
1342 .LM258:
|
||||
1343 072e 8093 0000 sts servoMotorRight,r24
|
||||
1344 .LM259:
|
||||
1345 0732 8AE0 ldi r24,lo8(10)
|
||||
1346 0734 8093 0000 sts progTimer,r24
|
||||
1347 .L273:
|
||||
1348 .LM260:
|
||||
1349 0738 81E1 ldi r24,lo8(17)
|
||||
1350 073a 00C0 rjmp .L266
|
||||
1351 .L138:
|
||||
1352 .LM261:
|
||||
1353 073c 0E94 0000 call pingSendPing
|
||||
1354 .LM262:
|
||||
1355 0740 83E0 ldi r24,lo8(3)
|
||||
1356 0742 8093 0000 sts progTimer,r24
|
||||
1357 .LM263:
|
||||
1358 0746 0E94 0000 call pingGetReady
|
||||
1359 074a 8823 tst r24
|
||||
1360 074c 01F4 brne .+2
|
||||
1361 074e 00C0 rjmp .L120
|
||||
1362 .LM264:
|
||||
1363 0750 0E94 0000 call pingGetDistance
|
||||
1364 0754 9093 0000 sts (tempDistance)+1,r25
|
||||
1365 0758 8093 0000 sts tempDistance,r24
|
||||
1366 .L283:
|
||||
1367 .LM265:
|
||||
1368 075c 81E0 ldi r24,lo8(1)
|
||||
1369 075e 00C0 rjmp .L280
|
||||
1370 .L139:
|
||||
1371 .LM266:
|
||||
1372 0760 8091 0000 lds r24,regulatorCounter
|
||||
1373 0764 8F5F subi r24,lo8(-(1))
|
||||
1374 0766 8093 0000 sts regulatorCounter,r24
|
||||
1375 076a 9091 0000 lds r25,regulatorTimer
|
||||
1376 076e 8917 cp r24,r25
|
||||
1377 0770 00F0 brlo .L178
|
||||
1378 .LM267:
|
||||
1379 0772 83E1 ldi r24,lo8(19)
|
||||
1380 0774 8093 0000 sts progPosition,r24
|
||||
1381 .LM268:
|
||||
1382 0778 81E0 ldi r24,lo8(1)
|
||||
1383 077a 8093 0000 sts progTimer,r24
|
||||
1384 .LM269:
|
||||
1385 077e 1092 0000 sts regulatorCounter,__zero_reg__
|
||||
1386 0782 00C0 rjmp .L120
|
||||
1387 .L178:
|
||||
1388 .LBB3:
|
||||
1389 .LM270:
|
||||
1390 0784 8091 0000 lds r24,regulatorMode
|
||||
1391 0788 8823 tst r24
|
||||
1392 078a 01F0 breq .+2
|
||||
1393 078c 00C0 rjmp .L180
|
||||
1394 .LM271:
|
||||
1395 078e 0E94 0000 call lcdSetPos
|
||||
1396 .LM272:
|
||||
1397 0792 80E0 ldi r24,lo8(.LC39)
|
||||
1398 0794 90E0 ldi r25,hi8(.LC39)
|
||||
1399 0796 0E94 0000 call lcdWriteString
|
||||
1400 .LM273:
|
||||
1401 079a 2091 0000 lds r18,tempDistance
|
||||
1402 079e 3091 0000 lds r19,(tempDistance)+1
|
||||
1403 07a2 87E1 ldi r24,hi8(6001)
|
||||
1404 07a4 2137 cpi r18,lo8(6001)
|
||||
1405 07a6 3807 cpc r19,r24
|
||||
1406 07a8 00F0 brlo .L182
|
||||
1407 .LM274:
|
||||
1408 07aa 42E0 ldi r20,lo8(2)
|
||||
1409 07ac 63E0 ldi r22,lo8(3)
|
||||
1410 07ae C901 movw r24,r18
|
||||
1411 07b0 8057 subi r24,lo8(-(-6000))
|
||||
1412 07b2 9741 sbci r25,hi8(-(-6000))
|
||||
1413 07b4 00C0 rjmp .L261
|
||||
1414 .L182:
|
||||
1415 .LM275:
|
||||
1416 07b6 42E0 ldi r20,lo8(2)
|
||||
1417 07b8 62E0 ldi r22,lo8(2)
|
||||
1418 07ba 80E7 ldi r24,lo8(6000)
|
||||
1419 07bc 97E1 ldi r25,hi8(6000)
|
||||
1420 07be 821B sub r24,r18
|
||||
1421 07c0 930B sbc r25,r19
|
||||
1422 .L261:
|
||||
1423 07c2 0E94 0000 call showDistanceOnLCD
|
||||
1424 .LM276:
|
||||
1425 07c6 6091 0000 lds r22,tempDistance
|
||||
1426 07ca 7091 0000 lds r23,(tempDistance)+1
|
||||
1427 07ce 8091 0000 lds r24,tempLastDistanceToWall
|
||||
1428 07d2 9091 0000 lds r25,(tempLastDistanceToWall)+1
|
||||
1429 07d6 6817 cp r22,r24
|
||||
1430 07d8 7907 cpc r23,r25
|
||||
1431 07da 00F4 brsh .L185
|
||||
1432 07dc 23E1 ldi r18,hi8(5000)
|
||||
1433 07de 6838 cpi r22,lo8(5000)
|
||||
1434 07e0 7207 cpc r23,r18
|
||||
1435 07e2 00F4 brsh .L187
|
||||
1436 .LM277:
|
||||
1437 07e4 88E6 ldi r24,lo8(104)
|
||||
1438 07e6 8093 0000 sts servoMotorLeft,r24
|
||||
1439 .LM278:
|
||||
1440 07ea 86E8 ldi r24,lo8(-122)
|
||||
1441 07ec 00C0 rjmp .L277
|
||||
1442 .L187:
|
||||
1443 .LM279:
|
||||
1444 07ee 6656 subi r22,lo8(5990)
|
||||
1445 07f0 7741 sbci r23,hi8(5990)
|
||||
1446 07f2 00F0 brlo .+2
|
||||
1447 07f4 00C0 rjmp .L206
|
||||
1448 07f6 00C0 rjmp .L278
|
||||
1449 .L185:
|
||||
1450 .LM280:
|
||||
1451 07f8 8617 cp r24,r22
|
||||
1452 07fa 9707 cpc r25,r23
|
||||
1453 07fc 00F0 brlo .+2
|
||||
1454 07fe 00C0 rjmp .L206
|
||||
1455 0800 8BE1 ldi r24,hi8(7001)
|
||||
1456 0802 6935 cpi r22,lo8(7001)
|
||||
1457 0804 7807 cpc r23,r24
|
||||
1458 0806 00F0 brlo .L193
|
||||
1459 .LM281:
|
||||
1460 0808 86E8 ldi r24,lo8(-122)
|
||||
1461 080a 8093 0000 sts servoMotorLeft,r24
|
||||
1462 .LM282:
|
||||
1463 080e 88E6 ldi r24,lo8(104)
|
||||
1464 0810 00C0 rjmp .L276
|
||||
1465 .L193:
|
||||
1466 .LM283:
|
||||
1467 0812 6B57 subi r22,lo8(6011)
|
||||
1468 0814 7741 sbci r23,hi8(6011)
|
||||
1469 0816 00F4 brsh .+2
|
||||
1470 0818 00C0 rjmp .L206
|
||||
1471 081a 00C0 rjmp .L279
|
||||
1472 .L180:
|
||||
1473 .LM284:
|
||||
1474 081c 8130 cpi r24,lo8(1)
|
||||
1475 081e 01F0 breq .+2
|
||||
1476 0820 00C0 rjmp .L189
|
||||
1477 .LM285:
|
||||
1478 0822 80E0 ldi r24,lo8(0)
|
||||
1479 0824 0E94 0000 call lcdSetPos
|
||||
1480 .LM286:
|
||||
1481 0828 80E0 ldi r24,lo8(.LC40)
|
||||
1482 082a 90E0 ldi r25,hi8(.LC40)
|
||||
1483 082c 0E94 0000 call lcdWriteString
|
||||
1484 .LM287:
|
||||
1485 0830 2091 0000 lds r18,tempDistance
|
||||
1486 0834 3091 0000 lds r19,(tempDistance)+1
|
||||
1487 0838 47E1 ldi r20,hi8(6001)
|
||||
1488 083a 2137 cpi r18,lo8(6001)
|
||||
1489 083c 3407 cpc r19,r20
|
||||
1490 083e 00F0 brlo .L199
|
||||
1491 .LM288:
|
||||
1492 0840 42E0 ldi r20,lo8(2)
|
||||
1493 0842 62E0 ldi r22,lo8(2)
|
||||
1494 0844 C901 movw r24,r18
|
||||
1495 0846 8057 subi r24,lo8(-(-6000))
|
||||
1496 0848 9741 sbci r25,hi8(-(-6000))
|
||||
1497 084a 00C0 rjmp .L262
|
||||
1498 .L199:
|
||||
1499 .LM289:
|
||||
1500 084c 42E0 ldi r20,lo8(2)
|
||||
1501 084e 63E0 ldi r22,lo8(3)
|
||||
1502 0850 80E7 ldi r24,lo8(6000)
|
||||
1503 0852 97E1 ldi r25,hi8(6000)
|
||||
1504 0854 821B sub r24,r18
|
||||
1505 0856 930B sbc r25,r19
|
||||
1506 .L262:
|
||||
1507 0858 0E94 0000 call showDistanceOnLCD
|
||||
1508 .LM290:
|
||||
1509 085c 6091 0000 lds r22,tempDistance
|
||||
1510 0860 7091 0000 lds r23,(tempDistance)+1
|
||||
1511 0864 8091 0000 lds r24,tempLastDistanceToWall
|
||||
1512 0868 9091 0000 lds r25,(tempLastDistanceToWall)+1
|
||||
1513 086c 6817 cp r22,r24
|
||||
1514 086e 7907 cpc r23,r25
|
||||
1515 0870 00F4 brsh .L202
|
||||
1516 0872 83E1 ldi r24,hi8(5000)
|
||||
1517 0874 6838 cpi r22,lo8(5000)
|
||||
1518 0876 7807 cpc r23,r24
|
||||
1519 0878 00F4 brsh .L204
|
||||
1520 .LM291:
|
||||
1521 087a 86E8 ldi r24,lo8(-122)
|
||||
1522 087c 8093 0000 sts servoMotorLeft,r24
|
||||
1523 .LM292:
|
||||
1524 0880 88E6 ldi r24,lo8(104)
|
||||
1525 .L277:
|
||||
1526 0882 8093 0000 sts servoMotorRight,r24
|
||||
1527 0886 00C0 rjmp .L211
|
||||
1528 .L204:
|
||||
1529 .LM293:
|
||||
1530 0888 6656 subi r22,lo8(5990)
|
||||
1531 088a 7741 sbci r23,hi8(5990)
|
||||
1532 088c 00F4 brsh .L206
|
||||
1533 .L279:
|
||||
1534 .LM294:
|
||||
1535 088e 86E8 ldi r24,lo8(-122)
|
||||
1536 0890 8093 0000 sts servoMotorLeft,r24
|
||||
1537 .LM295:
|
||||
1538 0894 88E6 ldi r24,lo8(104)
|
||||
1539 0896 00C0 rjmp .L271
|
||||
1540 .L202:
|
||||
1541 .LM296:
|
||||
1542 0898 8617 cp r24,r22
|
||||
1543 089a 9707 cpc r25,r23
|
||||
1544 089c 00F4 brsh .L206
|
||||
1545 089e 4BE1 ldi r20,hi8(7001)
|
||||
1546 08a0 6935 cpi r22,lo8(7001)
|
||||
1547 08a2 7407 cpc r23,r20
|
||||
1548 08a4 00F0 brlo .L209
|
||||
1549 .LM297:
|
||||
1550 08a6 88E6 ldi r24,lo8(104)
|
||||
1551 08a8 8093 0000 sts servoMotorLeft,r24
|
||||
1552 .LM298:
|
||||
1553 08ac 86E8 ldi r24,lo8(-122)
|
||||
1554 .L276:
|
||||
1555 08ae 8093 0000 sts servoMotorRight,r24
|
||||
1556 .LM299:
|
||||
1557 08b2 80E0 ldi r24,lo8(0)
|
||||
1558 08b4 90E0 ldi r25,hi8(0)
|
||||
1559 08b6 6057 subi r22,lo8(-(-6000))
|
||||
1560 08b8 7741 sbci r23,hi8(-(-6000))
|
||||
1561 08ba 8040 sbci r24,hlo8(-(-6000))
|
||||
1562 08bc 9040 sbci r25,hhi8(-(-6000))
|
||||
1563 08be 28E2 ldi r18,lo8(40)
|
||||
1564 08c0 30E0 ldi r19,hi8(40)
|
||||
1565 08c2 40E0 ldi r20,hlo8(40)
|
||||
1566 08c4 50E0 ldi r21,hhi8(40)
|
||||
1567 08c6 0E94 0000 call __udivmodsi4
|
||||
1568 .LM300:
|
||||
1569 08ca 2F30 cpi r18,lo8(15)
|
||||
1570 08cc 00F4 brsh .L211
|
||||
1571 .LM301:
|
||||
1572 08ce 2093 0000 sts progTimer,r18
|
||||
1573 08d2 00C0 rjmp .L189
|
||||
1574 .L211:
|
||||
1575 .LM302:
|
||||
1576 08d4 8FE0 ldi r24,lo8(15)
|
||||
1577 08d6 00C0 rjmp .L263
|
||||
1578 .L209:
|
||||
1579 .LM303:
|
||||
1580 08d8 6B57 subi r22,lo8(6011)
|
||||
1581 08da 7741 sbci r23,hi8(6011)
|
||||
1582 08dc 00F0 brlo .L206
|
||||
1583 .L278:
|
||||
1584 .LM304:
|
||||
1585 08de 88E6 ldi r24,lo8(104)
|
||||
1586 08e0 8093 0000 sts servoMotorLeft,r24
|
||||
1587 .LM305:
|
||||
1588 08e4 86E8 ldi r24,lo8(-122)
|
||||
1589 .L271:
|
||||
1590 08e6 8093 0000 sts servoMotorRight,r24
|
||||
1591 .LM306:
|
||||
1592 08ea 85E0 ldi r24,lo8(5)
|
||||
1593 08ec 00C0 rjmp .L263
|
||||
1594 .L206:
|
||||
1595 .LM307:
|
||||
1596 08ee 8FE7 ldi r24,lo8(127)
|
||||
1597 08f0 8093 0000 sts servoMotorLeft,r24
|
||||
1598 .LM308:
|
||||
1599 08f4 8093 0000 sts servoMotorRight,r24
|
||||
1600 .LM309:
|
||||
1601 08f8 84E0 ldi r24,lo8(4)
|
||||
1602 .L263:
|
||||
1603 08fa 8093 0000 sts progTimer,r24
|
||||
1604 .L189:
|
||||
1605 .LM310:
|
||||
1606 08fe 8091 0000 lds r24,tempDistance
|
||||
1607 0902 9091 0000 lds r25,(tempDistance)+1
|
||||
1608 0906 9093 0000 sts (tempLastDistanceToWall)+1,r25
|
||||
1609 090a 8093 0000 sts tempLastDistanceToWall,r24
|
||||
1610 .LM311:
|
||||
1611 090e 8091 0000 lds r24,progPosition
|
||||
1612 .LM312:
|
||||
1613 0912 8250 subi r24,lo8(-(-2))
|
||||
1614 0914 00C0 rjmp .L266
|
||||
1615 .L140:
|
||||
1616 .LBE3:
|
||||
1617 .LM313:
|
||||
1618 0916 8CE8 ldi r24,lo8(-116)
|
||||
1619 0918 8093 0000 sts servoPing,r24
|
||||
1620 .LM314:
|
||||
1621 091c 87E7 ldi r24,lo8(119)
|
||||
1622 091e 8093 0000 sts servoMotorLeft,r24
|
||||
1623 .LM315:
|
||||
1624 0922 8093 0000 sts servoMotorRight,r24
|
||||
1625 .LM316:
|
||||
1626 0926 83E2 ldi r24,lo8(35)
|
||||
1627 0928 8093 0000 sts progTimer,r24
|
||||
1628 .LM317:
|
||||
1629 092c 84E1 ldi r24,lo8(20)
|
||||
1630 092e 00C0 rjmp .L266
|
||||
1631 .L141:
|
||||
1632 .LM318:
|
||||
1633 0930 83E0 ldi r24,lo8(3)
|
||||
1634 0932 8093 0000 sts progTimer,r24
|
||||
1635 .LM319:
|
||||
1636 0936 0E94 0000 call pingSendPing
|
||||
1637 .LM320:
|
||||
1638 093a 0E94 0000 call pingGetReady
|
||||
1639 093e 8823 tst r24
|
||||
1640 0940 01F0 breq .L120
|
||||
1641 .LM321:
|
||||
1642 0942 0E94 0000 call pingGetDistance
|
||||
1643 0946 9093 0000 sts (tempDistance)+1,r25
|
||||
1644 094a 8093 0000 sts tempDistance,r24
|
||||
1645 .LM322:
|
||||
1646 094e 27E1 ldi r18,hi8(6000)
|
||||
1647 0950 8037 cpi r24,lo8(6000)
|
||||
1648 0952 9207 cpc r25,r18
|
||||
1649 0954 00F4 brsh .L215
|
||||
1650 .LM323:
|
||||
1651 0956 41E0 ldi r20,lo8(1)
|
||||
1652 0958 60E0 ldi r22,lo8(0)
|
||||
1653 095a 80E0 ldi r24,lo8(0)
|
||||
1654 095c 90E0 ldi r25,hi8(0)
|
||||
1655 095e 0E94 0000 call showDistanceOnLCD
|
||||
1656 .LM324:
|
||||
1657 0962 82E0 ldi r24,lo8(2)
|
||||
1658 0964 00C0 rjmp .L266
|
||||
1659 .L215:
|
||||
1660 0966 9C01 movw r18,r24
|
||||
1661 0968 2057 subi r18,lo8(-(-6000))
|
||||
1662 096a 3741 sbci r19,hi8(-(-6000))
|
||||
1663 .LM325:
|
||||
1664 096c 805E subi r24,lo8(12000)
|
||||
1665 096e 9E42 sbci r25,hi8(12000)
|
||||
1666 0970 00F4 brsh .L217
|
||||
1667 .LM326:
|
||||
1668 0972 41E0 ldi r20,lo8(1)
|
||||
1669 0974 60E0 ldi r22,lo8(0)
|
||||
1670 0976 C901 movw r24,r18
|
||||
1671 0978 0E94 0000 call showDistanceOnLCD
|
||||
1672 .LM327:
|
||||
1673 097c 82E0 ldi r24,lo8(2)
|
||||
1674 097e 00C0 rjmp .L281
|
||||
1675 .L217:
|
||||
1676 .LM328:
|
||||
1677 0980 41E0 ldi r20,lo8(1)
|
||||
1678 0982 60E0 ldi r22,lo8(0)
|
||||
1679 0984 C901 movw r24,r18
|
||||
1680 0986 0E94 0000 call showDistanceOnLCD
|
||||
1681 .LM329:
|
||||
1682 098a 8AE0 ldi r24,lo8(10)
|
||||
1683 .L281:
|
||||
1684 098c 8093 0000 sts regulatorTimer,r24
|
||||
1685 .L272:
|
||||
1686 .LM330:
|
||||
1687 0990 8091 0000 lds r24,progPosition
|
||||
1688 0994 8F5F subi r24,lo8(-(1))
|
||||
1689 0996 00C0 rjmp .L266
|
||||
1690 .L142:
|
||||
1691 .LM331:
|
||||
1692 0998 8091 0000 lds r24,regulatorMode
|
||||
1693 099c 8823 tst r24
|
||||
1694 099e 01F4 brne .L219
|
||||
1695 .LM332:
|
||||
1696 09a0 83E4 ldi r24,lo8(67)
|
||||
1697 09a2 00C0 rjmp .L265
|
||||
1698 .L219:
|
||||
1699 .LM333:
|
||||
1700 09a4 80ED ldi r24,lo8(-48)
|
||||
1701 .L265:
|
||||
1702 09a6 8093 0000 sts servoPing,r24
|
||||
1703 .LM334:
|
||||
1704 09aa 85E0 ldi r24,lo8(5)
|
||||
1705 09ac 8093 0000 sts progTimer,r24
|
||||
1706 .LM335:
|
||||
1707 09b0 8FE0 ldi r24,lo8(15)
|
||||
1708 .L266:
|
||||
1709 09b2 8093 0000 sts progPosition,r24
|
||||
1710 .L120:
|
||||
1711 .LM336:
|
||||
1712 09b6 1092 0000 sts progCounter,__zero_reg__
|
||||
1713 .L117:
|
||||
1714 .LM337:
|
||||
1715 09ba 2091 0000 lds r18,roboActive
|
||||
1716 09be 2230 cpi r18,lo8(2)
|
||||
1717 09c0 01F0 breq .+2
|
||||
1718 09c2 00C0 rjmp .L222
|
||||
1719 .LM338:
|
||||
1720 09c4 8091 0000 lds r24,progCounter
|
||||
1721 09c8 8F5F subi r24,lo8(-(1))
|
||||
1722 09ca 8093 0000 sts progCounter,r24
|
||||
1723 09ce 9091 0000 lds r25,progTimer
|
||||
1724 09d2 8917 cp r24,r25
|
||||
1725 09d4 00F4 brsh .+2
|
||||
1726 09d6 00C0 rjmp .L222
|
||||
1727 .LM339:
|
||||
1728 09d8 8091 0000 lds r24,progPosition
|
||||
1729 09dc 8430 cpi r24,lo8(4)
|
||||
1730 09de 01F4 brne .+2
|
||||
1731 09e0 00C0 rjmp .L230
|
||||
1732 09e2 8530 cpi r24,lo8(5)
|
||||
1733 09e4 00F4 brsh .L236
|
||||
1734 09e6 8130 cpi r24,lo8(1)
|
||||
1735 09e8 01F0 breq .L227
|
||||
1736 09ea 8130 cpi r24,lo8(1)
|
||||
1737 09ec 00F0 brlo .L226
|
||||
1738 09ee 8230 cpi r24,lo8(2)
|
||||
1739 09f0 01F0 breq .L228
|
||||
1740 09f2 8330 cpi r24,lo8(3)
|
||||
1741 09f4 01F0 breq .+2
|
||||
1742 09f6 00C0 rjmp .L225
|
||||
1743 09f8 00C0 rjmp .L229
|
||||
1744 .L236:
|
||||
1745 09fa 8730 cpi r24,lo8(7)
|
||||
1746 09fc 01F4 brne .+2
|
||||
1747 09fe 00C0 rjmp .L233
|
||||
1748 0a00 8830 cpi r24,lo8(8)
|
||||
1749 0a02 00F4 brsh .L237
|
||||
1750 0a04 8530 cpi r24,lo8(5)
|
||||
1751 0a06 01F4 brne .+2
|
||||
1752 0a08 00C0 rjmp .L231
|
||||
1753 0a0a 8630 cpi r24,lo8(6)
|
||||
1754 0a0c 01F0 breq .+2
|
||||
1755 0a0e 00C0 rjmp .L225
|
||||
1756 0a10 00C0 rjmp .L232
|
||||
1757 .L237:
|
||||
1758 0a12 8830 cpi r24,lo8(8)
|
||||
1759 0a14 01F4 brne .+2
|
||||
1760 0a16 00C0 rjmp .L234
|
||||
1761 0a18 8930 cpi r24,lo8(9)
|
||||
1762 0a1a 01F0 breq .+2
|
||||
1763 0a1c 00C0 rjmp .L225
|
||||
1764 0a1e 00C0 rjmp .L235
|
||||
1765 .L226:
|
||||
1766 .LM340:
|
||||
1767 0a20 0E94 0000 call lcdClearDisplay
|
||||
1768 .LM341:
|
||||
1769 0a24 81E0 ldi r24,lo8(1)
|
||||
1770 0a26 0E94 0000 call lcdSetLayout
|
||||
1771 .LM342:
|
||||
1772 0a2a 81E0 ldi r24,lo8(1)
|
||||
1773 0a2c 00C0 rjmp .L267
|
||||
1774 .L227:
|
||||
1775 .LM343:
|
||||
1776 0a2e 80E0 ldi r24,lo8(0)
|
||||
1777 0a30 0E94 0000 call lcdSetPos
|
||||
1778 .LM344:
|
||||
1779 0a34 80E0 ldi r24,lo8(.LC32)
|
||||
1780 0a36 90E0 ldi r25,hi8(.LC32)
|
||||
1781 0a38 0E94 0000 call lcdWriteString
|
||||
1782 .LM345:
|
||||
1783 0a3c 86E8 ldi r24,lo8(-122)
|
||||
1784 0a3e 8093 0000 sts servoMotorLeft,r24
|
||||
1785 .LM346:
|
||||
1786 0a42 8093 0000 sts servoMotorRight,r24
|
||||
1787 0a46 00C0 rjmp .L282
|
||||
1788 .L228:
|
||||
1789 .LM347:
|
||||
1790 0a48 8FE7 ldi r24,lo8(127)
|
||||
1791 0a4a 8093 0000 sts servoMotorLeft,r24
|
||||
1792 .LM348:
|
||||
1793 0a4e 8093 0000 sts servoMotorRight,r24
|
||||
1794 .LM349:
|
||||
1795 0a52 0E94 0000 call pingSendPing
|
||||
1796 .LM350:
|
||||
1797 0a56 83E0 ldi r24,lo8(3)
|
||||
1798 0a58 8093 0000 sts progTimer,r24
|
||||
1799 .LM351:
|
||||
1800 0a5c 0E94 0000 call pingGetReady
|
||||
1801 0a60 8823 tst r24
|
||||
1802 0a62 01F4 brne .+2
|
||||
1803 0a64 00C0 rjmp .L225
|
||||
1804 .LM352:
|
||||
1805 0a66 0E94 0000 call pingGetDistance
|
||||
1806 0a6a 9093 0000 sts (tempDistance)+1,r25
|
||||
1807 0a6e 8093 0000 sts tempDistance,r24
|
||||
1808 .LM353:
|
||||
1809 0a72 25E1 ldi r18,hi8(5500)
|
||||
1810 0a74 8C37 cpi r24,lo8(5500)
|
||||
1811 0a76 9207 cpc r25,r18
|
||||
1812 0a78 00F4 brsh .L239
|
||||
1813 .LM354:
|
||||
1814 0a7a 42E0 ldi r20,lo8(2)
|
||||
1815 0a7c 60E0 ldi r22,lo8(0)
|
||||
1816 0a7e 80E0 ldi r24,lo8(0)
|
||||
1817 0a80 90E0 ldi r25,hi8(0)
|
||||
1818 0a82 0E94 0000 call showDistanceOnLCD
|
||||
1819 0a86 00C0 rjmp .L275
|
||||
1820 .L239:
|
||||
1821 .LM355:
|
||||
1822 0a88 42E0 ldi r20,lo8(2)
|
||||
1823 0a8a 60E0 ldi r22,lo8(0)
|
||||
1824 0a8c 8C57 subi r24,lo8(-(-5500))
|
||||
1825 0a8e 9541 sbci r25,hi8(-(-5500))
|
||||
1826 0a90 0E94 0000 call showDistanceOnLCD
|
||||
1827 0a94 00C0 rjmp .L225
|
||||
1828 .L229:
|
||||
1829 .LM356:
|
||||
1830 0a96 80E0 ldi r24,lo8(0)
|
||||
1831 0a98 0E94 0000 call lcdSetPos
|
||||
1832 .LM357:
|
||||
1833 0a9c 80E0 ldi r24,lo8(.LC33)
|
||||
1834 0a9e 90E0 ldi r25,hi8(.LC33)
|
||||
1835 0aa0 0E94 0000 call lcdWriteString
|
||||
1836 .LM358:
|
||||
1837 0aa4 8CE6 ldi r24,lo8(108)
|
||||
1838 0aa6 8093 0000 sts servoMotorLeft,r24
|
||||
1839 .LM359:
|
||||
1840 0aaa 8093 0000 sts servoMotorRight,r24
|
||||
1841 .LM360:
|
||||
1842 0aae 82E3 ldi r24,lo8(50)
|
||||
1843 0ab0 00C0 rjmp .L267
|
||||
1844 .L230:
|
||||
1845 .LM361:
|
||||
1846 0ab2 87E7 ldi r24,lo8(119)
|
||||
1847 0ab4 8093 0000 sts servoMotorLeft,r24
|
||||
1848 .LM362:
|
||||
1849 0ab8 8093 0000 sts servoMotorRight,r24
|
||||
1850 .LM363:
|
||||
1851 0abc 2093 0000 sts progTimer,r18
|
||||
1852 .LM364:
|
||||
1853 0ac0 85E0 ldi r24,lo8(5)
|
||||
1854 0ac2 00C0 rjmp .L268
|
||||
1855 .L231:
|
||||
1856 .LM365:
|
||||
1857 0ac4 8EEA ldi r24,lo8(-82)
|
||||
1858 0ac6 8093 0000 sts servoPing,r24
|
||||
1859 .LM366:
|
||||
1860 0aca 84E1 ldi r24,lo8(20)
|
||||
1861 0acc 8093 0000 sts progTimer,r24
|
||||
1862 .LM367:
|
||||
1863 0ad0 86E0 ldi r24,lo8(6)
|
||||
1864 0ad2 00C0 rjmp .L268
|
||||
1865 .L232:
|
||||
1866 .LM368:
|
||||
1867 0ad4 0E94 0000 call pingSendPing
|
||||
1868 .LM369:
|
||||
1869 0ad8 84E0 ldi r24,lo8(4)
|
||||
1870 0ada 8093 0000 sts progTimer,r24
|
||||
1871 .LM370:
|
||||
1872 0ade 0E94 0000 call pingGetReady
|
||||
1873 0ae2 8823 tst r24
|
||||
1874 0ae4 01F4 brne .+2
|
||||
1875 0ae6 00C0 rjmp .L225
|
||||
1876 .LM371:
|
||||
1877 0ae8 0E94 0000 call pingGetDistance
|
||||
1878 0aec 9093 0000 sts (tempLeftDistance)+1,r25
|
||||
1879 0af0 8093 0000 sts tempLeftDistance,r24
|
||||
1880 .L282:
|
||||
1881 .LM372:
|
||||
1882 0af4 84E1 ldi r24,lo8(20)
|
||||
1883 0af6 00C0 rjmp .L267
|
||||
1884 .L233:
|
||||
1885 .LM373:
|
||||
1886 0af8 87E6 ldi r24,lo8(103)
|
||||
1887 0afa 8093 0000 sts servoPing,r24
|
||||
1888 .LM374:
|
||||
1889 0afe 88E2 ldi r24,lo8(40)
|
||||
1890 0b00 8093 0000 sts progTimer,r24
|
||||
1891 .LM375:
|
||||
1892 0b04 88E0 ldi r24,lo8(8)
|
||||
1893 0b06 00C0 rjmp .L268
|
||||
1894 .L234:
|
||||
1895 .LM376:
|
||||
1896 0b08 0E94 0000 call pingSendPing
|
||||
1897 .LM377:
|
||||
1898 0b0c 84E0 ldi r24,lo8(4)
|
||||
1899 0b0e 8093 0000 sts progTimer,r24
|
||||
1900 .LM378:
|
||||
1901 0b12 0E94 0000 call pingGetReady
|
||||
1902 0b16 8823 tst r24
|
||||
1903 0b18 01F4 brne .+2
|
||||
1904 0b1a 00C0 rjmp .L225
|
||||
1905 .LM379:
|
||||
1906 0b1c 0E94 0000 call pingGetDistance
|
||||
1907 0b20 9C01 movw r18,r24
|
||||
1908 0b22 9093 0000 sts (tempRightDistance)+1,r25
|
||||
1909 0b26 8093 0000 sts tempRightDistance,r24
|
||||
1910 .LM380:
|
||||
1911 0b2a 8CE8 ldi r24,lo8(-116)
|
||||
1912 0b2c 8093 0000 sts servoPing,r24
|
||||
1913 .LM381:
|
||||
1914 0b30 8091 0000 lds r24,tempLeftDistance
|
||||
1915 0b34 9091 0000 lds r25,(tempLeftDistance)+1
|
||||
1916 0b38 45E1 ldi r20,hi8(5500)
|
||||
1917 0b3a 8C37 cpi r24,lo8(5500)
|
||||
1918 0b3c 9407 cpc r25,r20
|
||||
1919 0b3e 00F4 brsh .L243
|
||||
1920 0b40 45E1 ldi r20,hi8(5500)
|
||||
1921 0b42 2C37 cpi r18,lo8(5500)
|
||||
1922 0b44 3407 cpc r19,r20
|
||||
1923 0b46 00F4 brsh .L243
|
||||
1924 .LM382:
|
||||
1925 0b48 80E0 ldi r24,lo8(0)
|
||||
1926 0b4a 0E94 0000 call lcdSetPos
|
||||
1927 .LM383:
|
||||
1928 0b4e 80E0 ldi r24,lo8(.LC41)
|
||||
1929 0b50 90E0 ldi r25,hi8(.LC41)
|
||||
1930 0b52 0E94 0000 call lcdWriteString
|
||||
1931 .LM384:
|
||||
1932 0b56 88E6 ldi r24,lo8(104)
|
||||
1933 0b58 8093 0000 sts servoMotorLeft,r24
|
||||
1934 .LM385:
|
||||
1935 0b5c 86E8 ldi r24,lo8(-122)
|
||||
1936 0b5e 8093 0000 sts servoMotorRight,r24
|
||||
1937 .LM386:
|
||||
1938 0b62 86E4 ldi r24,lo8(70)
|
||||
1939 0b64 00C0 rjmp .L267
|
||||
1940 .L243:
|
||||
1941 .LM387:
|
||||
1942 0b66 2817 cp r18,r24
|
||||
1943 0b68 3907 cpc r19,r25
|
||||
1944 0b6a 00F4 brsh .L247
|
||||
1945 .LM388:
|
||||
1946 0b6c 80E0 ldi r24,lo8(0)
|
||||
1947 0b6e 0E94 0000 call lcdSetPos
|
||||
1948 .LM389:
|
||||
1949 0b72 80E0 ldi r24,lo8(.LC42)
|
||||
1950 0b74 90E0 ldi r25,hi8(.LC42)
|
||||
1951 0b76 0E94 0000 call lcdWriteString
|
||||
1952 .LM390:
|
||||
1953 0b7a 88E6 ldi r24,lo8(104)
|
||||
1954 0b7c 8093 0000 sts servoMotorLeft,r24
|
||||
1955 .LM391:
|
||||
1956 0b80 86E8 ldi r24,lo8(-122)
|
||||
1957 0b82 00C0 rjmp .L274
|
||||
1958 .L247:
|
||||
1959 .LM392:
|
||||
1960 0b84 80E0 ldi r24,lo8(0)
|
||||
1961 0b86 0E94 0000 call lcdSetPos
|
||||
1962 .LM393:
|
||||
1963 0b8a 80E0 ldi r24,lo8(.LC43)
|
||||
1964 0b8c 90E0 ldi r25,hi8(.LC43)
|
||||
1965 0b8e 0E94 0000 call lcdWriteString
|
||||
1966 .LM394:
|
||||
1967 0b92 86E8 ldi r24,lo8(-122)
|
||||
1968 0b94 8093 0000 sts servoMotorLeft,r24
|
||||
1969 .LM395:
|
||||
1970 0b98 88E6 ldi r24,lo8(104)
|
||||
1971 .L274:
|
||||
1972 0b9a 8093 0000 sts servoMotorRight,r24
|
||||
1973 .LM396:
|
||||
1974 0b9e 88E2 ldi r24,lo8(40)
|
||||
1975 .L267:
|
||||
1976 0ba0 8093 0000 sts progTimer,r24
|
||||
1977 .L275:
|
||||
1978 .LM397:
|
||||
1979 0ba4 8091 0000 lds r24,progPosition
|
||||
1980 0ba8 8F5F subi r24,lo8(-(1))
|
||||
1981 0baa 00C0 rjmp .L268
|
||||
1982 .L235:
|
||||
1983 .LM398:
|
||||
1984 0bac 87E7 ldi r24,lo8(119)
|
||||
1985 0bae 8093 0000 sts servoMotorLeft,r24
|
||||
1986 .LM399:
|
||||
1987 0bb2 8093 0000 sts servoMotorRight,r24
|
||||
1988 .LM400:
|
||||
1989 0bb6 8AE0 ldi r24,lo8(10)
|
||||
1990 0bb8 8093 0000 sts progTimer,r24
|
||||
1991 .LM401:
|
||||
1992 0bbc 81E0 ldi r24,lo8(1)
|
||||
1993 .L268:
|
||||
1994 0bbe 8093 0000 sts progPosition,r24
|
||||
1995 .L225:
|
||||
1996 .LM402:
|
||||
1997 0bc2 1092 0000 sts progCounter,__zero_reg__
|
||||
1998 .L222:
|
||||
1999 .LM403:
|
||||
2000 0bc6 8091 0000 lds r24,roboActive
|
||||
2001 0bca 8330 cpi r24,lo8(3)
|
||||
2002 0bcc 01F0 breq .+2
|
||||
2003 0bce 00C0 rjmp .L256
|
||||
2004 .LM404:
|
||||
2005 0bd0 8091 0000 lds r24,progCounter
|
||||
2006 0bd4 8F5F subi r24,lo8(-(1))
|
||||
2007 0bd6 8093 0000 sts progCounter,r24
|
||||
2008 0bda 9091 0000 lds r25,progTimer
|
||||
2009 0bde 8917 cp r24,r25
|
||||
2010 0be0 00F0 brlo .L256
|
||||
2011 .LM405:
|
||||
2012 0be2 8091 0000 lds r24,progPosition
|
||||
2013 0be6 8823 tst r24
|
||||
2014 0be8 01F0 breq .L253
|
||||
2015 0bea 8130 cpi r24,lo8(1)
|
||||
2016 0bec 01F4 brne .L252
|
||||
2017 0bee 00C0 rjmp .L254
|
||||
2018 .L253:
|
||||
2019 .LM406:
|
||||
2020 0bf0 0E94 0000 call lcdClearDisplay
|
||||
2021 .LM407:
|
||||
2022 0bf4 81E0 ldi r24,lo8(1)
|
||||
2023 0bf6 0E94 0000 call lcdSetLayout
|
||||
2024 .LM408:
|
||||
2025 0bfa 80E0 ldi r24,lo8(0)
|
||||
2026 0bfc 0E94 0000 call lcdSetPos
|
||||
2027 .LM409:
|
||||
2028 0c00 80E0 ldi r24,lo8(.LC44)
|
||||
2029 0c02 90E0 ldi r25,hi8(.LC44)
|
||||
2030 0c04 0E94 0000 call lcdWriteString
|
||||
2031 .LM410:
|
||||
2032 0c08 80E1 ldi r24,lo8(16)
|
||||
2033 0c0a 0E94 0000 call lcdSetPos
|
||||
2034 .LM411:
|
||||
2035 0c0e 80E0 ldi r24,lo8(.LC45)
|
||||
2036 0c10 90E0 ldi r25,hi8(.LC45)
|
||||
2037 0c12 0E94 0000 call lcdWriteString
|
||||
2038 .LM412:
|
||||
2039 0c16 81E0 ldi r24,lo8(1)
|
||||
2040 0c18 8093 0000 sts progTimer,r24
|
||||
2041 .LM413:
|
||||
2042 0c1c 8091 0000 lds r24,progPosition
|
||||
2043 0c20 8F5F subi r24,lo8(-(1))
|
||||
2044 0c22 8093 0000 sts progPosition,r24
|
||||
2045 0c26 00C0 rjmp .L252
|
||||
2046 .L254:
|
||||
2047 .LM414:
|
||||
2048 0c28 0E94 0000 call pingSendPing
|
||||
2049 .LM415:
|
||||
2050 0c2c 8AE0 ldi r24,lo8(10)
|
||||
2051 0c2e 8093 0000 sts progTimer,r24
|
||||
2052 .LM416:
|
||||
2053 0c32 0E94 0000 call pingGetReady
|
||||
2054 0c36 8823 tst r24
|
||||
2055 0c38 01F0 breq .L252
|
||||
2056 .LM417:
|
||||
2057 0c3a 0E94 0000 call pingGetDistance
|
||||
2058 0c3e 9093 0000 sts (tempDistance)+1,r25
|
||||
2059 0c42 8093 0000 sts tempDistance,r24
|
||||
2060 .LM418:
|
||||
2061 0c46 8AE1 ldi r24,lo8(26)
|
||||
2062 0c48 0E94 0000 call lcdSetPos
|
||||
2063 .LM419:
|
||||
2064 0c4c 8091 0000 lds r24,tempDistance
|
||||
2065 0c50 9091 0000 lds r25,(tempDistance)+1
|
||||
2066 0c54 0E94 0000 call lcdWriteHexAsDecimal
|
||||
2067 .L252:
|
||||
2068 .LM420:
|
||||
2069 0c58 1092 0000 sts progCounter,__zero_reg__
|
||||
2070 .L256:
|
||||
2071 /* epilogue: frame size=0 */
|
||||
2072 0c5c 1F91 pop r17
|
||||
2073 0c5e 0895 ret
|
||||
2074 /* epilogue end (size=2) */
|
||||
2075 /* function updateProgram size 1177 (1174) */
|
||||
2076 .LFE19:
|
||||
2078 .global main
|
||||
2080 main:
|
||||
2081 .LFB22:
|
||||
2082 .LM421:
|
||||
2083 /* prologue: frame size=0 */
|
||||
2084 0c60 CF93 push r28
|
||||
2085 0c62 DF93 push r29
|
||||
2086 /* prologue end (size=2) */
|
||||
2087 .LM422:
|
||||
2088 /* #APP */
|
||||
2089 0c64 F894 cli
|
||||
2090 .LM423:
|
||||
2091 /* #NOAPP */
|
||||
2092 0c66 0E94 0000 call initIO
|
||||
2093 .LM424:
|
||||
2094 0c6a 0E94 0000 call lcdInit
|
||||
2095 .LM425:
|
||||
2096 0c6e 0E94 0000 call rfIdInit
|
||||
2097 .LM426:
|
||||
2098 0c72 0E94 0000 call roboMSPInit
|
||||
2099 .LM427:
|
||||
2100 0c76 0E94 0000 call pingInit
|
||||
2101 .LM428:
|
||||
2102 0c7a 82E3 ldi r24,lo8(50)
|
||||
2103 0c7c 0E94 0000 call lcdSetIntensity
|
||||
2104 .LM429:
|
||||
2105 0c80 82E0 ldi r24,lo8(2)
|
||||
2106 0c82 0E94 0000 call lcdSetLayout
|
||||
2107 .LM430:
|
||||
2108 0c86 80E0 ldi r24,lo8(menuTable)
|
||||
2109 0c88 90E0 ldi r25,hi8(menuTable)
|
||||
2110 0c8a 0E94 0000 call lcdWriteStringP
|
||||
2111 .LM431:
|
||||
2112 0c8e 0E94 0000 call rfIdDisable
|
||||
2113 .LM432:
|
||||
2114 0c92 0E94 0000 call roboMSPDisable
|
||||
2115 .LM433:
|
||||
2116 /* #APP */
|
||||
2117 0c96 7894 sei
|
||||
2118 /* #NOAPP */
|
||||
2119 0c98 C0E0 ldi r28,lo8(menuTable+196)
|
||||
2120 0c9a D0E0 ldi r29,hi8(menuTable+196)
|
||||
2121 .L313:
|
||||
2122 .LM434:
|
||||
2123 0c9c 8091 0000 lds r24,progDoUpdate
|
||||
2124 0ca0 8823 tst r24
|
||||
2125 0ca2 01F0 breq .L286
|
||||
2126 .LM435:
|
||||
2127 0ca4 1092 0000 sts progDoUpdate,__zero_reg__
|
||||
2128 .LM436:
|
||||
2129 0ca8 0E94 0000 call updateProgram
|
||||
2130 .L286:
|
||||
2131 .LM437:
|
||||
2132 0cac CC99 sbic 57-0x20,4
|
||||
2133 0cae 00C0 rjmp .L288
|
||||
2134 .LM438:
|
||||
2135 0cb0 8091 0000 lds r24,switchOneCheck
|
||||
2136 0cb4 8823 tst r24
|
||||
2137 0cb6 01F0 breq .L290
|
||||
2138 .LM439:
|
||||
2139 0cb8 83E0 ldi r24,lo8(3)
|
||||
2140 0cba 0E94 0000 call activateRobot
|
||||
2141 0cbe 00C0 rjmp .L312
|
||||
2142 .L288:
|
||||
2143 .LM440:
|
||||
2144 0cc0 CD9B sbis 57-0x20,5
|
||||
2145 0cc2 00C0 rjmp .L292
|
||||
2146 0cc4 CC9B sbis 57-0x20,4
|
||||
2147 0cc6 00C0 rjmp .L292
|
||||
2148 .LM441:
|
||||
2149 0cc8 8091 0000 lds r24,switchOneCheck
|
||||
2150 0ccc 8823 tst r24
|
||||
2151 0cce 01F4 brne .L290
|
||||
2152 .LM442:
|
||||
2153 0cd0 0E94 0000 call deactivateRobot
|
||||
2154 .LM443:
|
||||
2155 0cd4 1092 0000 sts rfEnable,__zero_reg__
|
||||
2156 .LM444:
|
||||
2157 0cd8 81E0 ldi r24,lo8(1)
|
||||
2158 0cda 8093 0000 sts switchOneCheck,r24
|
||||
2159 .LM445:
|
||||
2160 0cde 0E94 0000 call main
|
||||
2161 0ce2 00C0 rjmp .L290
|
||||
2162 .L292:
|
||||
2163 .LM446:
|
||||
2164 0ce4 CD99 sbic 57-0x20,5
|
||||
2165 0ce6 00C0 rjmp .L290
|
||||
2166 .LM447:
|
||||
2167 0ce8 8091 0000 lds r24,switchOneCheck
|
||||
2168 0cec 8823 tst r24
|
||||
2169 0cee 01F0 breq .L290
|
||||
2170 .LM448:
|
||||
2171 0cf0 80E0 ldi r24,lo8(0)
|
||||
2172 0cf2 0E94 0000 call lcdSetLayout
|
||||
2173 .LM449:
|
||||
2174 0cf6 CE01 movw r24,r28
|
||||
2175 0cf8 0E94 0000 call lcdWriteStringP
|
||||
2176 .LM450:
|
||||
2177 0cfc 81E0 ldi r24,lo8(1)
|
||||
2178 0cfe 8093 0000 sts rfEnable,r24
|
||||
2179 .LM451:
|
||||
2180 0d02 0E94 0000 call rfIdEnable
|
||||
2181 .LM452:
|
||||
2182 0d06 0E94 0000 call roboMSPEnable
|
||||
2183 .L312:
|
||||
2184 .LM453:
|
||||
2185 0d0a 1092 0000 sts switchOneCheck,__zero_reg__
|
||||
2186 .L290:
|
||||
2187 .LM454:
|
||||
2188 0d0e CE99 sbic 57-0x20,6
|
||||
2189 0d10 00C0 rjmp .L298
|
||||
2190 .LM455:
|
||||
2191 0d12 8091 0000 lds r24,switchTwoCheck
|
||||
2192 0d16 8823 tst r24
|
||||
2193 0d18 01F0 breq .L313
|
||||
2194 .LM456:
|
||||
2195 0d1a 81E0 ldi r24,lo8(1)
|
||||
2196 0d1c 00C0 rjmp .L311
|
||||
2197 .L298:
|
||||
2198 .LM457:
|
||||
2199 0d1e CF9B sbis 57-0x20,7
|
||||
2200 0d20 00C0 rjmp .L301
|
||||
2201 0d22 CE9B sbis 57-0x20,6
|
||||
2202 0d24 00C0 rjmp .L301
|
||||
2203 .LM458:
|
||||
2204 0d26 8091 0000 lds r24,switchTwoCheck
|
||||
2205 0d2a 8823 tst r24
|
||||
2206 0d2c 01F0 breq .+2
|
||||
2207 0d2e 00C0 rjmp .L313
|
||||
2208 .LM459:
|
||||
2209 0d30 0E94 0000 call deactivateRobot
|
||||
2210 .LM460:
|
||||
2211 0d34 1092 0000 sts rfEnable,__zero_reg__
|
||||
2212 .LM461:
|
||||
2213 0d38 81E0 ldi r24,lo8(1)
|
||||
2214 0d3a 8093 0000 sts switchTwoCheck,r24
|
||||
2215 .LM462:
|
||||
2216 0d3e 0E94 0000 call main
|
||||
2217 0d42 00C0 rjmp .L313
|
||||
2218 .L301:
|
||||
2219 .LM463:
|
||||
2220 0d44 CF99 sbic 57-0x20,7
|
||||
2221 0d46 00C0 rjmp .L313
|
||||
2222 .LM464:
|
||||
2223 0d48 8091 0000 lds r24,switchTwoCheck
|
||||
2224 0d4c 8823 tst r24
|
||||
2225 0d4e 01F4 brne .+2
|
||||
2226 0d50 00C0 rjmp .L313
|
||||
2227 .LM465:
|
||||
2228 0d52 82E0 ldi r24,lo8(2)
|
||||
2229 .L311:
|
||||
2230 0d54 0E94 0000 call activateRobot
|
||||
2231 .LM466:
|
||||
2232 0d58 1092 0000 sts switchTwoCheck,__zero_reg__
|
||||
2233 0d5c 00C0 rjmp .L313
|
||||
2234 /* epilogue: frame size=0 */
|
||||
2235 /* epilogue: noreturn */
|
||||
2236 /* epilogue end (size=0) */
|
||||
2237 /* function main size 129 (127) */
|
||||
2238 .LFE22:
|
||||
2240 .global servoPing
|
||||
2241 .data
|
||||
2244 servoPing:
|
||||
2245 0303 8C .byte -116
|
||||
2246 .global servoMotorLeft
|
||||
2249 servoMotorLeft:
|
||||
2250 0304 77 .byte 119
|
||||
2251 .global servoMotorRight
|
||||
2254 servoMotorRight:
|
||||
2255 0305 77 .byte 119
|
||||
2256 .global servoCounter
|
||||
2257 .global servoCounter
|
||||
2258 .section .bss
|
||||
2261 servoCounter:
|
||||
2262 0000 00 .skip 1,0
|
||||
2263 .global servoMotorLeftReg
|
||||
2264 .data
|
||||
2267 servoMotorLeftReg:
|
||||
2268 0306 77 .byte 119
|
||||
2269 .global servoMotorRightReg
|
||||
2272 servoMotorRightReg:
|
||||
2273 0307 77 .byte 119
|
||||
2274 .global progCounterPing
|
||||
2275 .global progCounterPing
|
||||
2276 .section .bss
|
||||
2279 progCounterPing:
|
||||
2280 0001 00 .skip 1,0
|
||||
2281 .global progCounterPPM
|
||||
2282 .global progCounterPPM
|
||||
2285 progCounterPPM:
|
||||
2286 0002 00 .skip 1,0
|
||||
2287 .global progCounter
|
||||
2288 .global progCounter
|
||||
2291 progCounter:
|
||||
2292 0003 00 .skip 1,0
|
||||
2293 .global progTimer
|
||||
2294 .global progTimer
|
||||
2297 progTimer:
|
||||
2298 0004 00 .skip 1,0
|
||||
2299 .global progPosition
|
||||
2300 .global progPosition
|
||||
2303 progPosition:
|
||||
2304 0005 00 .skip 1,0
|
||||
2305 .global progDoUpdate
|
||||
2306 .global progDoUpdate
|
||||
2309 progDoUpdate:
|
||||
2310 0006 00 .skip 1,0
|
||||
2311 .global tempDistance
|
||||
2312 .global tempDistance
|
||||
2315 tempDistance:
|
||||
2316 0007 0000 .skip 2,0
|
||||
2317 .global tempDistanceToWall
|
||||
2318 .global tempDistanceToWall
|
||||
2321 tempDistanceToWall:
|
||||
2322 0009 0000 .skip 2,0
|
||||
2323 .global tempLastDistanceToWall
|
||||
2324 .global tempLastDistanceToWall
|
||||
2327 tempLastDistanceToWall:
|
||||
2328 000b 0000 .skip 2,0
|
||||
2329 .global tempLeftDistance
|
||||
2330 .global tempLeftDistance
|
||||
2333 tempLeftDistance:
|
||||
2334 000d 0000 .skip 2,0
|
||||
2335 .global tempRightDistance
|
||||
2336 .global tempRightDistance
|
||||
2339 tempRightDistance:
|
||||
2340 000f 0000 .skip 2,0
|
||||
2341 .global roboActive
|
||||
2342 .global roboActive
|
||||
2345 roboActive:
|
||||
2346 0011 00 .skip 1,0
|
||||
2347 .global rfEnable
|
||||
2348 .global rfEnable
|
||||
2351 rfEnable:
|
||||
2352 0012 00 .skip 1,0
|
||||
2353 .global switchOneCheck
|
||||
2354 .global switchOneCheck
|
||||
2357 switchOneCheck:
|
||||
2358 0013 00 .skip 1,0
|
||||
2359 .global switchTwoCheck
|
||||
2360 .global switchTwoCheck
|
||||
2363 switchTwoCheck:
|
||||
2364 0014 00 .skip 1,0
|
||||
2365 .global regulatorMode
|
||||
2366 .global regulatorMode
|
||||
2369 regulatorMode:
|
||||
2370 0015 00 .skip 1,0
|
||||
2371 .global regulatorTimer
|
||||
2372 .global regulatorTimer
|
||||
2375 regulatorTimer:
|
||||
2376 0016 00 .skip 1,0
|
||||
2377 .global regulatorCounter
|
||||
2378 .global regulatorCounter
|
||||
2381 regulatorCounter:
|
||||
2382 0017 00 .skip 1,0
|
||||
2383 .global regulatorMeasureCounter
|
||||
2384 .global regulatorMeasureCounter
|
||||
2387 regulatorMeasureCounter:
|
||||
2388 0018 00 .skip 1,0
|
||||
2389 .global menuTable
|
||||
2390 .section .progmem.data,"a",@progbits
|
||||
2393 menuTable:
|
||||
2394 0000 2020 2020 .string " CMtec roboCrawler v1.1 "
|
||||
2394 2043 4D74
|
||||
2394 6563 2020
|
||||
2394 2020 2020
|
||||
2394 726F 626F
|
||||
2395 0031 2020 2020 .string " mode 1: Follow wall at a distance(1m) "
|
||||
2395 206D 6F64
|
||||
2395 6520 313A
|
||||
2395 2020 2020
|
||||
2395 2046 6F6C
|
||||
2396 0062 2020 2020 .string " mode 2: Drive and void any walls "
|
||||
2396 206D 6F64
|
||||
2396 6520 323A
|
||||
2396 2020 2020
|
||||
2396 2044 7269
|
||||
2397 0093 2020 2020 .string " mode 3: Measure distance forward "
|
||||
2397 206D 6F64
|
||||
2397 6520 333A
|
||||
2397 2020 2020
|
||||
2397 4D65 6173
|
||||
2398 00c4 2020 2020 .string " mode RF: RF actived and waiting for com."
|
||||
2398 6D6F 6465
|
||||
2398 2052 463A
|
||||
2398 2020 2020
|
||||
2398 2052 4620
|
||||
2487 .Letext0:
|
||||
DEFINED SYMBOLS
|
||||
*ABS*:00000000 RoboMI.c
|
||||
/tmp/ccgaOObN.s:2 *ABS*:0000003f __SREG__
|
||||
/tmp/ccgaOObN.s:3 *ABS*:0000003e __SP_H__
|
||||
/tmp/ccgaOObN.s:4 *ABS*:0000003d __SP_L__
|
||||
/tmp/ccgaOObN.s:5 *ABS*:00000000 __tmp_reg__
|
||||
/tmp/ccgaOObN.s:6 *ABS*:00000001 __zero_reg__
|
||||
/tmp/ccgaOObN.s:19 .text:00000000 initIO
|
||||
/tmp/ccgaOObN.s:2303 .bss:00000005 progPosition
|
||||
/tmp/ccgaOObN.s:62 .text:0000002e __vector_15
|
||||
/tmp/ccgaOObN.s:2285 .bss:00000002 progCounterPPM
|
||||
/tmp/ccgaOObN.s:2261 .bss:00000000 servoCounter
|
||||
/tmp/ccgaOObN.s:2309 .bss:00000006 progDoUpdate
|
||||
/tmp/ccgaOObN.s:114 .text:00000076 __vector_11
|
||||
/tmp/ccgaOObN.s:2244 .data:00000303 servoPing
|
||||
/tmp/ccgaOObN.s:2249 .data:00000304 servoMotorLeft
|
||||
/tmp/ccgaOObN.s:2254 .data:00000305 servoMotorRight
|
||||
/tmp/ccgaOObN.s:211 .text:000000e6 activateRobot
|
||||
/tmp/ccgaOObN.s:2393 .progmem.data:00000000 menuTable
|
||||
/tmp/ccgaOObN.s:2297 .bss:00000004 progTimer
|
||||
/tmp/ccgaOObN.s:2345 .bss:00000011 roboActive
|
||||
/tmp/ccgaOObN.s:245 .text:0000010e deactivateRobot
|
||||
/tmp/ccgaOObN.s:336 .text:00000128 showDistanceOnLCD
|
||||
/tmp/ccgaOObN.s:705 .text:00000306 checkCommunication
|
||||
/tmp/ccgaOObN.s:807 .text:00000366 updateProgram
|
||||
/tmp/ccgaOObN.s:2351 .bss:00000012 rfEnable
|
||||
/tmp/ccgaOObN.s:2291 .bss:00000003 progCounter
|
||||
/tmp/ccgaOObN.s:2315 .bss:00000007 tempDistance
|
||||
/tmp/ccgaOObN.s:2387 .bss:00000018 regulatorMeasureCounter
|
||||
/tmp/ccgaOObN.s:2333 .bss:0000000d tempLeftDistance
|
||||
/tmp/ccgaOObN.s:2339 .bss:0000000f tempRightDistance
|
||||
/tmp/ccgaOObN.s:2369 .bss:00000015 regulatorMode
|
||||
/tmp/ccgaOObN.s:2327 .bss:0000000b tempLastDistanceToWall
|
||||
/tmp/ccgaOObN.s:2321 .bss:00000009 tempDistanceToWall
|
||||
/tmp/ccgaOObN.s:2375 .bss:00000016 regulatorTimer
|
||||
/tmp/ccgaOObN.s:2381 .bss:00000017 regulatorCounter
|
||||
/tmp/ccgaOObN.s:2080 .text:00000c60 main
|
||||
/tmp/ccgaOObN.s:2357 .bss:00000013 switchOneCheck
|
||||
/tmp/ccgaOObN.s:2363 .bss:00000014 switchTwoCheck
|
||||
/tmp/ccgaOObN.s:2267 .data:00000306 servoMotorLeftReg
|
||||
/tmp/ccgaOObN.s:2272 .data:00000307 servoMotorRightReg
|
||||
/tmp/ccgaOObN.s:2279 .bss:00000001 progCounterPing
|
||||
|
||||
UNDEFINED SYMBOLS
|
||||
__do_copy_data
|
||||
__do_clear_bss
|
||||
lcdSetLayout
|
||||
lcdWriteStringP
|
||||
rfIdDisable
|
||||
lcdSetPos
|
||||
lcdWriteString
|
||||
rfIdGetTagPresent
|
||||
rfIdGetTag
|
||||
roboMSPSetData
|
||||
roboMSPGetActiveStatus
|
||||
rfIdEnable
|
||||
rfIdClearBuffer
|
||||
lcdClearDisplay
|
||||
pingSendPing
|
||||
pingGetReady
|
||||
pingGetDistance
|
||||
__udivmodsi4
|
||||
lcdWriteHexAsDecimal
|
||||
lcdInit
|
||||
rfIdInit
|
||||
roboMSPInit
|
||||
pingInit
|
||||
lcdSetIntensity
|
||||
roboMSPDisable
|
||||
roboMSPEnable
|
||||
742
RoboMI.map
Normal file
742
RoboMI.map
Normal file
@ -0,0 +1,742 @@
|
||||
Archive member included because of file (symbol)
|
||||
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o (lcdSetIntensity)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
RoboMI.o (rfIdGetTag)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
RoboMI.o (roboMSPGetActiveStatus)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o) (spiWrite)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o) (usart0SetBaud)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o) (usart1SetBaud)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
RoboMI.o (pingSendPing)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodhi4.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o) (__udivmodhi4)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodsi4.o)
|
||||
RoboMI.o (__udivmodsi4)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_divmodsi4.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o) (__divmodsi4)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o (exit)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
RoboMI.o (__do_copy_data)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
RoboMI.o (__do_clear_bss)
|
||||
|
||||
Memory Configuration
|
||||
|
||||
Name Origin Length Attributes
|
||||
text 0x00000000 0x00020000 xr
|
||||
data 0x00800060 0x0000ffa0 rw !x
|
||||
eeprom 0x00810000 0x00010000 rw !x
|
||||
fuse 0x00820000 0x00000400 rw !x
|
||||
lock 0x00830000 0x00000400 rw !x
|
||||
signature 0x00840000 0x00000400 rw !x
|
||||
*default* 0x00000000 0xffffffff
|
||||
|
||||
Linker script and memory map
|
||||
|
||||
Address of section .data set to 0x800100
|
||||
LOAD /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
LOAD RoboMI.o
|
||||
LOAD /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/libm.a
|
||||
LOAD /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a
|
||||
LOAD /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a
|
||||
LOAD /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/libc.a
|
||||
LOAD /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a
|
||||
|
||||
.hash
|
||||
*(.hash)
|
||||
|
||||
.dynsym
|
||||
*(.dynsym)
|
||||
|
||||
.dynstr
|
||||
*(.dynstr)
|
||||
|
||||
.gnu.version
|
||||
*(.gnu.version)
|
||||
|
||||
.gnu.version_d
|
||||
*(.gnu.version_d)
|
||||
|
||||
.gnu.version_r
|
||||
*(.gnu.version_r)
|
||||
|
||||
.rel.init
|
||||
*(.rel.init)
|
||||
|
||||
.rela.init
|
||||
*(.rela.init)
|
||||
|
||||
.rel.text
|
||||
*(.rel.text)
|
||||
*(.rel.text.*)
|
||||
*(.rel.gnu.linkonce.t*)
|
||||
|
||||
.rela.text
|
||||
*(.rela.text)
|
||||
*(.rela.text.*)
|
||||
*(.rela.gnu.linkonce.t*)
|
||||
|
||||
.rel.fini
|
||||
*(.rel.fini)
|
||||
|
||||
.rela.fini
|
||||
*(.rela.fini)
|
||||
|
||||
.rel.rodata
|
||||
*(.rel.rodata)
|
||||
*(.rel.rodata.*)
|
||||
*(.rel.gnu.linkonce.r*)
|
||||
|
||||
.rela.rodata
|
||||
*(.rela.rodata)
|
||||
*(.rela.rodata.*)
|
||||
*(.rela.gnu.linkonce.r*)
|
||||
|
||||
.rel.data
|
||||
*(.rel.data)
|
||||
*(.rel.data.*)
|
||||
*(.rel.gnu.linkonce.d*)
|
||||
|
||||
.rela.data
|
||||
*(.rela.data)
|
||||
*(.rela.data.*)
|
||||
*(.rela.gnu.linkonce.d*)
|
||||
|
||||
.rel.ctors
|
||||
*(.rel.ctors)
|
||||
|
||||
.rela.ctors
|
||||
*(.rela.ctors)
|
||||
|
||||
.rel.dtors
|
||||
*(.rel.dtors)
|
||||
|
||||
.rela.dtors
|
||||
*(.rela.dtors)
|
||||
|
||||
.rel.got
|
||||
*(.rel.got)
|
||||
|
||||
.rela.got
|
||||
*(.rela.got)
|
||||
|
||||
.rel.bss
|
||||
*(.rel.bss)
|
||||
|
||||
.rela.bss
|
||||
*(.rela.bss)
|
||||
|
||||
.rel.plt
|
||||
*(.rel.plt)
|
||||
|
||||
.rela.plt
|
||||
*(.rela.plt)
|
||||
|
||||
.text 0x00000000 0x184a
|
||||
*(.vectors)
|
||||
.vectors 0x00000000 0x70 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
0x00000000 __vectors
|
||||
0x00000000 __vector_default
|
||||
*(.vectors)
|
||||
*(.progmem.gcc*)
|
||||
.progmem.gcc_sw_table
|
||||
0x00000070 0x2c RoboMI.o
|
||||
*(.progmem*)
|
||||
.progmem.data 0x0000009c 0xf5 RoboMI.o
|
||||
0x0000009c menuTable
|
||||
0x00000192 . = ALIGN (0x2)
|
||||
*fill* 0x00000191 0x1 00
|
||||
0x00000192 __trampolines_start = .
|
||||
*(.trampolines)
|
||||
.trampolines 0x00000192 0x0 linker stubs
|
||||
*(.trampolines*)
|
||||
0x00000192 __trampolines_end = .
|
||||
*(.jumptables)
|
||||
*(.jumptables*)
|
||||
*(.lowtext)
|
||||
*(.lowtext*)
|
||||
0x00000192 __ctors_start = .
|
||||
*(.ctors)
|
||||
0x00000192 __ctors_end = .
|
||||
0x00000192 __dtors_start = .
|
||||
*(.dtors)
|
||||
0x00000192 __dtors_end = .
|
||||
SORT(*)(.ctors)
|
||||
SORT(*)(.dtors)
|
||||
*(.init0)
|
||||
.init0 0x00000192 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
0x00000192 __init
|
||||
*(.init0)
|
||||
*(.init1)
|
||||
*(.init1)
|
||||
*(.init2)
|
||||
.init2 0x00000192 0xc /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
*(.init2)
|
||||
*(.init3)
|
||||
*(.init3)
|
||||
*(.init4)
|
||||
.init4 0x0000019e 0x16 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
0x0000019e __do_copy_data
|
||||
.init4 0x000001b4 0x10 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
0x000001b4 __do_clear_bss
|
||||
*(.init4)
|
||||
*(.init5)
|
||||
*(.init5)
|
||||
*(.init6)
|
||||
*(.init6)
|
||||
*(.init7)
|
||||
*(.init7)
|
||||
*(.init8)
|
||||
*(.init8)
|
||||
*(.init9)
|
||||
.init9 0x000001c4 0x8 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
*(.init9)
|
||||
*(.text)
|
||||
.text 0x000001cc 0x4 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
0x000001cc __vector_22
|
||||
0x000001cc __vector_24
|
||||
0x000001cc __vector_12
|
||||
0x000001cc __bad_interrupt
|
||||
0x000001cc __vector_6
|
||||
0x000001cc __vector_3
|
||||
0x000001cc __vector_23
|
||||
0x000001cc __vector_25
|
||||
0x000001cc __vector_13
|
||||
0x000001cc __vector_17
|
||||
0x000001cc __vector_7
|
||||
0x000001cc __vector_27
|
||||
0x000001cc __vector_5
|
||||
0x000001cc __vector_4
|
||||
0x000001cc __vector_9
|
||||
0x000001cc __vector_2
|
||||
0x000001cc __vector_21
|
||||
0x000001cc __vector_8
|
||||
0x000001cc __vector_26
|
||||
0x000001cc __vector_14
|
||||
0x000001cc __vector_10
|
||||
0x000001cc __vector_16
|
||||
0x000001cc __vector_18
|
||||
.text 0x000001d0 0xd5e RoboMI.o
|
||||
0x000004d6 checkCommunication
|
||||
0x00000246 __vector_11
|
||||
0x000002b6 activateRobot
|
||||
0x000002f8 showDistanceOnLCD
|
||||
0x000002de deactivateRobot
|
||||
0x00000e30 main
|
||||
0x00000536 updateProgram
|
||||
0x000001fe __vector_15
|
||||
0x000001d0 initIO
|
||||
.text 0x00000f2e 0x39a /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
0x00000fa6 lcdSetPos
|
||||
0x00001076 lcdWriteString
|
||||
0x00000f2e lcdEngToSwe
|
||||
0x00000f36 lcdWriteIns
|
||||
0x00000ff4 lcdSetCursor
|
||||
0x00001280 lcdInit
|
||||
0x00000fbe lcdClearDisplay
|
||||
0x0000101a lcdSetDisplay
|
||||
0x0000105a lcdWriteStringP
|
||||
0x00000f50 lcdSetLayout
|
||||
0x00000fce lcdSetBlink
|
||||
0x00000f32 lcdSetIntensity
|
||||
0x00001100 lcdWriteHexAsDecimal
|
||||
0x0000108e lcdWriteHex
|
||||
0x00000f9c lcdSetContrast
|
||||
0x00000fae lcdReturnHome
|
||||
0x00001040 lcdWriteChar
|
||||
.text 0x000012c8 0xbe /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
0x000012d2 rfIdClearBuffer
|
||||
0x000012c8 rfIdGetTag
|
||||
0x00001360 rfIdInit
|
||||
0x000012e2 __vector_19
|
||||
0x00001376 rfIdDisable
|
||||
0x0000137e rfIdEnable
|
||||
0x000012da rfIdGetTagPresent
|
||||
.text 0x00001386 0x258 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
0x00001484 roboMSPDisable
|
||||
0x00001392 calculateChecksum
|
||||
0x0000144c roboMSPGetCommand
|
||||
0x0000148a roboMSPEnable
|
||||
0x000013b8 roboMSPValidatePacket
|
||||
0x00001454 roboMSPClearBuffer
|
||||
0x00001386 roboMSPGetActiveStatus
|
||||
0x00001490 roboMSPSendData
|
||||
0x00001460 roboMSPInit
|
||||
0x00001512 __vector_20
|
||||
0x00001426 roboMSPSetData
|
||||
.text 0x000015de 0x42 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
0x000015ec spiSetHighSpeed
|
||||
0x000015f8 spiSelectDeviceIO
|
||||
0x000015f2 spiSetLowSpeed
|
||||
0x000015de spiWrite
|
||||
0x000015e6 spiReadIO
|
||||
0x0000160c spiInit
|
||||
.text 0x00001620 0x78 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
0x00001620 usart0SetBaud
|
||||
0x00001660 usart0Receive
|
||||
0x00001672 usart0RxIntEnable
|
||||
0x00001676 usart0RxIntDisable
|
||||
0x00001684 usart0SendString
|
||||
0x0000167a usart0Init
|
||||
0x0000166a usart0Send
|
||||
.text 0x00001698 0x80 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
0x00001704 usart1SendString
|
||||
0x000016e2 usart1Send
|
||||
0x000016f2 usart1RxIntDisable
|
||||
0x000016ea usart1RxIntEnable
|
||||
0x00001698 usart1SetBaud
|
||||
0x000016d8 usart1Receive
|
||||
0x000016fa usart1Init
|
||||
.text 0x00001718 0x8e /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
0x00001758 __vector_1
|
||||
0x00001718 pingSendPing
|
||||
0x00001740 pingGetDistance
|
||||
0x0000174e pingGetReady
|
||||
0x00001756 pingInit
|
||||
.text 0x000017a6 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodhi4.o)
|
||||
.text 0x000017a6 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodsi4.o)
|
||||
.text 0x000017a6 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_divmodsi4.o)
|
||||
.text 0x000017a6 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
.text 0x000017a6 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
.text 0x000017a6 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
0x000017a6 . = ALIGN (0x2)
|
||||
*(.text.*)
|
||||
.text.libgcc 0x000017a6 0x28 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodhi4.o)
|
||||
0x000017a6 __udivmodhi4
|
||||
.text.libgcc 0x000017ce 0x44 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodsi4.o)
|
||||
0x000017ce __udivmodsi4
|
||||
.text.libgcc 0x00001812 0x36 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_divmodsi4.o)
|
||||
0x00001812 __divmodsi4
|
||||
.text.libgcc 0x00001848 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
.text.libgcc 0x00001848 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
.text.libgcc 0x00001848 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
0x00001848 . = ALIGN (0x2)
|
||||
*(.fini9)
|
||||
.fini9 0x00001848 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
0x00001848 exit
|
||||
0x00001848 _exit
|
||||
*(.fini9)
|
||||
*(.fini8)
|
||||
*(.fini8)
|
||||
*(.fini7)
|
||||
*(.fini7)
|
||||
*(.fini6)
|
||||
*(.fini6)
|
||||
*(.fini5)
|
||||
*(.fini5)
|
||||
*(.fini4)
|
||||
*(.fini4)
|
||||
*(.fini3)
|
||||
*(.fini3)
|
||||
*(.fini2)
|
||||
*(.fini2)
|
||||
*(.fini1)
|
||||
*(.fini1)
|
||||
*(.fini0)
|
||||
.fini0 0x00001848 0x2 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
*(.fini0)
|
||||
0x0000184a _etext = .
|
||||
|
||||
.data 0x00800100 0x32a load address 0x0000184a
|
||||
0x00800100 PROVIDE (__data_start, .)
|
||||
*(.data)
|
||||
.data 0x00800100 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
.data 0x00800100 0x308 RoboMI.o
|
||||
0x00800407 servoMotorRightReg
|
||||
0x00800404 servoMotorLeft
|
||||
0x00800406 servoMotorLeftReg
|
||||
0x00800405 servoMotorRight
|
||||
0x00800403 servoPing
|
||||
.data 0x00800408 0x6 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
.data 0x0080040e 0x0 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
.data 0x0080040e 0x1b /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
.data 0x00800429 0x0 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
.data 0x00800429 0x0 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
.data 0x00800429 0x0 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
.data 0x00800429 0x0 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
.data 0x00800429 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodhi4.o)
|
||||
.data 0x00800429 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodsi4.o)
|
||||
.data 0x00800429 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_divmodsi4.o)
|
||||
.data 0x00800429 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
.data 0x00800429 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
.data 0x00800429 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
*(.data*)
|
||||
*(.rodata)
|
||||
*(.rodata*)
|
||||
*(.gnu.linkonce.d*)
|
||||
0x0080042a . = ALIGN (0x2)
|
||||
*fill* 0x00800429 0x1 00
|
||||
0x0080042a _edata = .
|
||||
0x0080042a PROVIDE (__data_end, .)
|
||||
|
||||
.bss 0x0080042a 0x3b load address 0x00001b74
|
||||
0x0080042a PROVIDE (__bss_start, .)
|
||||
*(.bss)
|
||||
.bss 0x0080042a 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
.bss 0x0080042a 0x19 RoboMI.o
|
||||
0x00800437 tempLeftDistance
|
||||
0x0080043c rfEnable
|
||||
0x00800435 tempLastDistanceToWall
|
||||
0x0080043b roboActive
|
||||
0x00800433 tempDistanceToWall
|
||||
0x0080042c progCounterPPM
|
||||
0x0080043d switchOneCheck
|
||||
0x00800439 tempRightDistance
|
||||
0x0080043e switchTwoCheck
|
||||
0x00800440 regulatorTimer
|
||||
0x0080042b progCounterPing
|
||||
0x0080042e progTimer
|
||||
0x00800430 progDoUpdate
|
||||
0x00800441 regulatorCounter
|
||||
0x00800442 regulatorMeasureCounter
|
||||
0x00800431 tempDistance
|
||||
0x0080042f progPosition
|
||||
0x0080042d progCounter
|
||||
0x0080042a servoCounter
|
||||
0x0080043f regulatorMode
|
||||
.bss 0x00800443 0x1 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
.bss 0x00800444 0xe /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
.bss 0x00800452 0x12 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
.bss 0x00800464 0x0 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
.bss 0x00800464 0x0 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
.bss 0x00800464 0x0 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
.bss 0x00800464 0x1 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
0x00800464 pingGotDistance
|
||||
.bss 0x00800465 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodhi4.o)
|
||||
.bss 0x00800465 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodsi4.o)
|
||||
.bss 0x00800465 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_divmodsi4.o)
|
||||
.bss 0x00800465 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
.bss 0x00800465 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
.bss 0x00800465 0x0 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
0x00800465 PROVIDE (__bss_end, .)
|
||||
0x0000184a __data_load_start = LOADADDR (.data)
|
||||
0x00001b74 __data_load_end = (__data_load_start + SIZEOF (.data))
|
||||
|
||||
.noinit 0x00800465 0x0
|
||||
0x00800465 PROVIDE (__noinit_start, .)
|
||||
*(.noinit*)
|
||||
0x00800465 PROVIDE (__noinit_end, .)
|
||||
0x00800465 _end = .
|
||||
0x00800465 PROVIDE (__heap_start, .)
|
||||
|
||||
.eeprom 0x00810000 0x0
|
||||
*(.eeprom*)
|
||||
0x00810000 __eeprom_end = .
|
||||
|
||||
.fuse
|
||||
*(.fuse)
|
||||
*(.lfuse)
|
||||
*(.hfuse)
|
||||
*(.efuse)
|
||||
|
||||
.lock
|
||||
*(.lock*)
|
||||
|
||||
.signature
|
||||
*(.signature*)
|
||||
|
||||
.stab 0x00000000 0x2f4c
|
||||
*(.stab)
|
||||
.stab 0x00000000 0x6b4 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
.stab 0x000006b4 0xdbc /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
0xdc8 (size before relaxing)
|
||||
.stab 0x00001470 0x42c /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
0x5d0 (size before relaxing)
|
||||
.stab 0x0000189c 0x8c4 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
0xa80 (size before relaxing)
|
||||
.stab 0x00002160 0x33c /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
0x4ec (size before relaxing)
|
||||
.stab 0x0000249c 0x390 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
0x540 (size before relaxing)
|
||||
.stab 0x0000282c 0x390 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
0x540 (size before relaxing)
|
||||
.stab 0x00002bbc 0x390 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
0x54c (size before relaxing)
|
||||
|
||||
.stabstr 0x00000000 0x132e
|
||||
*(.stabstr)
|
||||
.stabstr 0x00000000 0x132e /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
|
||||
.stab.excl
|
||||
*(.stab.excl)
|
||||
|
||||
.stab.exclstr
|
||||
*(.stab.exclstr)
|
||||
|
||||
.stab.index
|
||||
*(.stab.index)
|
||||
|
||||
.stab.indexstr
|
||||
*(.stab.indexstr)
|
||||
|
||||
.comment
|
||||
*(.comment)
|
||||
|
||||
.debug
|
||||
*(.debug)
|
||||
|
||||
.line
|
||||
*(.line)
|
||||
|
||||
.debug_srcinfo
|
||||
*(.debug_srcinfo)
|
||||
|
||||
.debug_sfnames
|
||||
*(.debug_sfnames)
|
||||
|
||||
.debug_aranges 0x00000000 0x20
|
||||
*(.debug_aranges)
|
||||
.debug_aranges
|
||||
0x00000000 0x20 RoboMI.o
|
||||
|
||||
.debug_pubnames
|
||||
0x00000000 0x299
|
||||
*(.debug_pubnames)
|
||||
.debug_pubnames
|
||||
0x00000000 0x299 RoboMI.o
|
||||
|
||||
.debug_info 0x00000000 0x3ff
|
||||
*(.debug_info)
|
||||
.debug_info 0x00000000 0x3ff RoboMI.o
|
||||
*(.gnu.linkonce.wi.*)
|
||||
|
||||
.debug_abbrev 0x00000000 0x13e
|
||||
*(.debug_abbrev)
|
||||
.debug_abbrev 0x00000000 0x13e RoboMI.o
|
||||
|
||||
.debug_line 0x00000000 0xf52
|
||||
*(.debug_line)
|
||||
.debug_line 0x00000000 0xf52 RoboMI.o
|
||||
|
||||
.debug_frame 0x00000000 0xa0
|
||||
*(.debug_frame)
|
||||
.debug_frame 0x00000000 0xa0 RoboMI.o
|
||||
|
||||
.debug_str 0x00000000 0x2dc
|
||||
*(.debug_str)
|
||||
.debug_str 0x00000000 0x2dc RoboMI.o
|
||||
0x323 (size before relaxing)
|
||||
|
||||
.debug_loc 0x00000000 0xab
|
||||
*(.debug_loc)
|
||||
.debug_loc 0x00000000 0xab RoboMI.o
|
||||
|
||||
.debug_macinfo
|
||||
*(.debug_macinfo)
|
||||
OUTPUT(RoboMI.elf elf32-avr)
|
||||
LOAD linker stubs
|
||||
|
||||
Cross Reference Table
|
||||
|
||||
Symbol File
|
||||
__bad_interrupt /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__bss_end /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
__bss_start /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
__data_end /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
__data_load_start /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
__data_start /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
__divmodsi4 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_divmodsi4.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
__do_clear_bss /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_clear_bss.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
__do_copy_data /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_copy_data.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
__heap_end /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__init /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__stack /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__udivmodhi4 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodhi4.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
__udivmodsi4 /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_udivmodsi4.o)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_divmodsi4.o)
|
||||
RoboMI.o
|
||||
__vector_1 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_10 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_11 RoboMI.o
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_12 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_13 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_14 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_15 RoboMI.o
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_16 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_17 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_18 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_19 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_2 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_20 /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_21 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_22 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_23 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_24 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_25 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_26 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_27 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_3 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_4 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_5 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_6 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_7 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_8 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_9 /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vector_default /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
__vectors /usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
_exit /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
activateRobot RoboMI.o
|
||||
calculateChecksum /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
checkCommunication RoboMI.o
|
||||
deactivateRobot RoboMI.o
|
||||
exit /usr/local/avr/lib/gcc/avr/4.2.2/avr5/libgcc.a(_exit.o)
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
initIO RoboMI.o
|
||||
lcdClearDisplay /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
lcdEngToSwe /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdInit /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
lcdReturnHome /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdSetBlink /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdSetContrast /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdSetCursor /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdSetDisplay /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdSetIntensity /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
lcdSetLayout /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
lcdSetPos /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
lcdWriteChar /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdWriteHex /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdWriteHexAsDecimal /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
lcdWriteIns /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
lcdWriteString /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
lcdWriteStringP /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
RoboMI.o
|
||||
main RoboMI.o
|
||||
/usr/local/avr/lib/gcc/avr/4.2.2/../../../../avr/lib/avr5/crtm162.o
|
||||
menuTable RoboMI.o
|
||||
pingGetDistance /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
RoboMI.o
|
||||
pingGetReady /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
RoboMI.o
|
||||
pingGotDistance /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
pingInit /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
RoboMI.o
|
||||
pingSendPing /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(ping.o)
|
||||
RoboMI.o
|
||||
progCounter RoboMI.o
|
||||
progCounterPPM RoboMI.o
|
||||
progCounterPing RoboMI.o
|
||||
progDoUpdate RoboMI.o
|
||||
progPosition RoboMI.o
|
||||
progTimer RoboMI.o
|
||||
regulatorCounter RoboMI.o
|
||||
regulatorMeasureCounter RoboMI.o
|
||||
regulatorMode RoboMI.o
|
||||
regulatorTimer RoboMI.o
|
||||
rfEnable RoboMI.o
|
||||
rfIdClearBuffer /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
RoboMI.o
|
||||
rfIdDisable /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
RoboMI.o
|
||||
rfIdEnable /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
RoboMI.o
|
||||
rfIdGetTag /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
RoboMI.o
|
||||
rfIdGetTagPresent /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
RoboMI.o
|
||||
rfIdInit /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
RoboMI.o
|
||||
roboActive RoboMI.o
|
||||
roboMSPClearBuffer /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
roboMSPDisable /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
RoboMI.o
|
||||
roboMSPEnable /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
RoboMI.o
|
||||
roboMSPGetActiveStatus /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
RoboMI.o
|
||||
roboMSPGetCommand /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
roboMSPInit /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
RoboMI.o
|
||||
roboMSPSendData /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
roboMSPSetData /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
RoboMI.o
|
||||
roboMSPValidatePacket /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
servoCounter RoboMI.o
|
||||
servoMotorLeft RoboMI.o
|
||||
servoMotorLeftReg RoboMI.o
|
||||
servoMotorRight RoboMI.o
|
||||
servoMotorRightReg RoboMI.o
|
||||
servoPing RoboMI.o
|
||||
showDistanceOnLCD RoboMI.o
|
||||
spiInit /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
spiReadIO /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
spiSelectDeviceIO /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
spiSetHighSpeed /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
spiSetLowSpeed /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
spiWrite /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(spiMaster.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(lcdDOG.o)
|
||||
switchOneCheck RoboMI.o
|
||||
switchTwoCheck RoboMI.o
|
||||
tempDistance RoboMI.o
|
||||
tempDistanceToWall RoboMI.o
|
||||
tempLastDistanceToWall RoboMI.o
|
||||
tempLeftDistance RoboMI.o
|
||||
tempRightDistance RoboMI.o
|
||||
updateProgram RoboMI.o
|
||||
usart0Init /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
usart0Receive /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
usart0RxIntDisable /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
usart0RxIntEnable /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
usart0Send /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
usart0SendString /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
usart0SetBaud /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart0.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(rfID.o)
|
||||
usart1Init /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
usart1Receive /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
usart1RxIntDisable /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
usart1RxIntEnable /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
usart1Send /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
usart1SendString /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
usart1SetBaud /media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(usart1.o)
|
||||
/media/CM/Projects/cmAvrLibC/libcmAvrLibC.a(roboMSP.o)
|
||||
211
RoboMI.sym
Normal file
211
RoboMI.sym
Normal file
@ -0,0 +1,211 @@
|
||||
00000000 W __heap_end
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 a __tmp_reg__
|
||||
00000000 W __vector_default
|
||||
00000000 T __vectors
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
00000001 a __zero_reg__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003d a __SP_L__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003e a __SP_H__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000003f a __SREG__
|
||||
0000009c T menuTable
|
||||
00000192 T __ctors_end
|
||||
00000192 T __ctors_start
|
||||
00000192 T __dtors_end
|
||||
00000192 T __dtors_start
|
||||
00000192 W __init
|
||||
00000192 T __trampolines_end
|
||||
00000192 T __trampolines_start
|
||||
0000019e T __do_copy_data
|
||||
000001aa t .do_copy_data_loop
|
||||
000001ae t .do_copy_data_start
|
||||
000001b4 T __do_clear_bss
|
||||
000001bc t .do_clear_bss_loop
|
||||
000001be t .do_clear_bss_start
|
||||
000001cc T __bad_interrupt
|
||||
000001cc W __vector_10
|
||||
000001cc W __vector_12
|
||||
000001cc W __vector_13
|
||||
000001cc W __vector_14
|
||||
000001cc W __vector_16
|
||||
000001cc W __vector_17
|
||||
000001cc W __vector_18
|
||||
000001cc W __vector_2
|
||||
000001cc W __vector_21
|
||||
000001cc W __vector_22
|
||||
000001cc W __vector_23
|
||||
000001cc W __vector_24
|
||||
000001cc W __vector_25
|
||||
000001cc W __vector_26
|
||||
000001cc W __vector_27
|
||||
000001cc W __vector_3
|
||||
000001cc W __vector_4
|
||||
000001cc W __vector_5
|
||||
000001cc W __vector_6
|
||||
000001cc W __vector_7
|
||||
000001cc W __vector_8
|
||||
000001cc W __vector_9
|
||||
000001d0 T initIO
|
||||
000001fe T __vector_15
|
||||
00000246 T __vector_11
|
||||
000002b6 T activateRobot
|
||||
000002de T deactivateRobot
|
||||
000002f8 T showDistanceOnLCD
|
||||
000004d6 T checkCommunication
|
||||
000004ff W __stack
|
||||
00000536 T updateProgram
|
||||
00000e30 T main
|
||||
00000f2e T lcdEngToSwe
|
||||
00000f32 T lcdSetIntensity
|
||||
00000f36 T lcdWriteIns
|
||||
00000f50 T lcdSetLayout
|
||||
00000f9c T lcdSetContrast
|
||||
00000fa6 T lcdSetPos
|
||||
00000fae T lcdReturnHome
|
||||
00000fbe T lcdClearDisplay
|
||||
00000fce T lcdSetBlink
|
||||
00000ff4 T lcdSetCursor
|
||||
0000101a T lcdSetDisplay
|
||||
00001040 T lcdWriteChar
|
||||
0000105a T lcdWriteStringP
|
||||
00001076 T lcdWriteString
|
||||
0000108e T lcdWriteHex
|
||||
00001100 T lcdWriteHexAsDecimal
|
||||
00001280 T lcdInit
|
||||
000012c8 T rfIdGetTag
|
||||
000012d2 T rfIdClearBuffer
|
||||
000012da T rfIdGetTagPresent
|
||||
000012e2 T __vector_19
|
||||
00001360 T rfIdInit
|
||||
00001376 T rfIdDisable
|
||||
0000137e T rfIdEnable
|
||||
00001386 T roboMSPGetActiveStatus
|
||||
00001392 T calculateChecksum
|
||||
000013b8 T roboMSPValidatePacket
|
||||
00001426 T roboMSPSetData
|
||||
0000144c T roboMSPGetCommand
|
||||
00001454 T roboMSPClearBuffer
|
||||
00001460 T roboMSPInit
|
||||
00001484 T roboMSPDisable
|
||||
0000148a T roboMSPEnable
|
||||
00001490 T roboMSPSendData
|
||||
00001512 T __vector_20
|
||||
000015de T spiWrite
|
||||
000015e6 T spiReadIO
|
||||
000015ec T spiSetHighSpeed
|
||||
000015f2 T spiSetLowSpeed
|
||||
000015f8 T spiSelectDeviceIO
|
||||
0000160c T spiInit
|
||||
00001620 T usart0SetBaud
|
||||
00001660 T usart0Receive
|
||||
0000166a T usart0Send
|
||||
00001672 T usart0RxIntEnable
|
||||
00001676 T usart0RxIntDisable
|
||||
0000167a T usart0Init
|
||||
00001684 T usart0SendString
|
||||
00001698 T usart1SetBaud
|
||||
000016d8 T usart1Receive
|
||||
000016e2 T usart1Send
|
||||
000016ea T usart1RxIntEnable
|
||||
000016f2 T usart1RxIntDisable
|
||||
000016fa T usart1Init
|
||||
00001704 T usart1SendString
|
||||
00001718 T pingSendPing
|
||||
00001740 T pingGetDistance
|
||||
0000174e T pingGetReady
|
||||
00001756 T pingInit
|
||||
00001758 T __vector_1
|
||||
000017a6 T __udivmodhi4
|
||||
000017ae t __udivmodhi4_loop
|
||||
000017bc t __udivmodhi4_ep
|
||||
000017ce T __udivmodsi4
|
||||
000017da t __udivmodsi4_loop
|
||||
000017f4 t __udivmodsi4_ep
|
||||
00001812 T __divmodsi4
|
||||
00001826 t __divmodsi4_neg2
|
||||
00001834 t __divmodsi4_exit
|
||||
00001836 t __divmodsi4_neg1
|
||||
00001848 t __stop_program
|
||||
00001848 T _exit
|
||||
00001848 W exit
|
||||
0000184a A __data_load_start
|
||||
0000184a T _etext
|
||||
00001b74 A __data_load_end
|
||||
00800100 D __data_start
|
||||
00800403 D servoPing
|
||||
00800404 D servoMotorLeft
|
||||
00800405 D servoMotorRight
|
||||
00800406 D servoMotorLeftReg
|
||||
00800407 D servoMotorRightReg
|
||||
0080040e d roboMSPActiveStatus
|
||||
0080040f d roboMSPbufferSendData
|
||||
0080041c d roboMSPbufferSendNothing
|
||||
0080042a B __bss_start
|
||||
0080042a D __data_end
|
||||
0080042a D _edata
|
||||
0080042a B servoCounter
|
||||
0080042b B progCounterPing
|
||||
0080042c B progCounterPPM
|
||||
0080042d B progCounter
|
||||
0080042e B progTimer
|
||||
0080042f B progPosition
|
||||
00800430 B progDoUpdate
|
||||
00800431 B tempDistance
|
||||
00800433 B tempDistanceToWall
|
||||
00800435 B tempLastDistanceToWall
|
||||
00800437 B tempLeftDistance
|
||||
00800439 B tempRightDistance
|
||||
0080043b B roboActive
|
||||
0080043c B rfEnable
|
||||
0080043d B switchOneCheck
|
||||
0080043e B switchTwoCheck
|
||||
0080043f B regulatorMode
|
||||
00800440 B regulatorTimer
|
||||
00800441 B regulatorCounter
|
||||
00800442 B regulatorMeasureCounter
|
||||
00800443 b lcdTempReg
|
||||
00800444 b rfIdByteCount
|
||||
00800445 b rfIdGotTag
|
||||
00800446 b rfIdTagBuffer
|
||||
00800452 b roboMSPbyteCount
|
||||
00800453 b roboMSPCommand
|
||||
00800454 b roboMSPSendDataFlag
|
||||
00800455 b roboMSPBufferReady
|
||||
00800456 b roboMSPbufferReceive
|
||||
00800464 B pingGotDistance
|
||||
00800465 B __bss_end
|
||||
00800465 N _end
|
||||
00810000 N __eeprom_end
|
||||
83
default/Makefile
Normal file
83
default/Makefile
Normal file
@ -0,0 +1,83 @@
|
||||
###############################################################################
|
||||
# Makefile for the project RoboMI
|
||||
###############################################################################
|
||||
|
||||
## General Flags
|
||||
PROJECT = RoboMI
|
||||
MCU = atmega162
|
||||
TARGET = RoboMI.elf
|
||||
CC = avr-gcc.exe
|
||||
|
||||
## Options common to compile, link and assembly rules
|
||||
COMMON = -mmcu=$(MCU)
|
||||
|
||||
## Compile options common for all C compilation units.
|
||||
CFLAGS = $(COMMON)
|
||||
CFLAGS += -Wall -gdwarf-2 -DF_CPU=16000000UL -Os -fsigned-char
|
||||
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
|
||||
|
||||
## Assembly specific flags
|
||||
ASMFLAGS = $(COMMON)
|
||||
ASMFLAGS += $(CFLAGS)
|
||||
ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2
|
||||
|
||||
## Linker flags
|
||||
LDFLAGS = $(COMMON)
|
||||
LDFLAGS +=
|
||||
|
||||
|
||||
## Intel Hex file production flags
|
||||
HEX_FLASH_FLAGS = -R .eeprom
|
||||
|
||||
HEX_EEPROM_FLAGS = -j .eeprom
|
||||
HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
|
||||
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings
|
||||
|
||||
|
||||
## Include Directories
|
||||
INCLUDES = -I"D:\Projects\roboCrawler\C\..\..\..\-Project-\cmAvrLibC"
|
||||
|
||||
## Library Directories
|
||||
LIBDIRS = -L"D:\-Project-\cmAvrLibC"
|
||||
|
||||
## Libraries
|
||||
LIBS = -lcmAvrLibC
|
||||
|
||||
## Objects that must be built in order to link
|
||||
OBJECTS = RoboMI.o
|
||||
|
||||
## Objects explicitly added by the user
|
||||
LINKONLYOBJECTS =
|
||||
|
||||
## Build
|
||||
all: $(TARGET) RoboMI.hex RoboMI.eep size
|
||||
|
||||
## Compile
|
||||
RoboMI.o: ../RoboMI.c
|
||||
$(CC) $(INCLUDES) $(CFLAGS) -c $<
|
||||
|
||||
##Link
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)
|
||||
|
||||
%.hex: $(TARGET)
|
||||
avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@
|
||||
|
||||
%.eep: $(TARGET)
|
||||
-avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0
|
||||
|
||||
%.lss: $(TARGET)
|
||||
avr-objdump -h -S $< > $@
|
||||
|
||||
size: ${TARGET}
|
||||
@echo
|
||||
@avr-size -C --mcu=${MCU} ${TARGET}
|
||||
|
||||
## Clean target
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -rf $(OBJECTS) RoboMI.elf dep/* RoboMI.hex RoboMI.eep
|
||||
|
||||
## Other dependencies
|
||||
-include $(shell mkdir dep 2>/dev/null) $(wildcard dep/*)
|
||||
|
||||
0
default/dep/RoboMI.o.d
Normal file
0
default/dep/RoboMI.o.d
Normal file
1
robomi.aws
Normal file
1
robomi.aws
Normal file
@ -0,0 +1 @@
|
||||
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="D:\Projects\roboCrawler\C\RoboMI.c" Position="258 67 1332 778" LineCol="44 34" State="Maximized"/></Files></AVRWorkspace>
|
||||
Loading…
x
Reference in New Issue
Block a user