Auto stash before merge of "main" and "origin/main"
This commit is contained in:
139
Microcontrollers/GLCDdriver/Debug/Makefile
Normal file
139
Microcontrollers/GLCDdriver/Debug/Makefile
Normal file
@@ -0,0 +1,139 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
SHELL := cmd.exe
|
||||
RM := rm -rf
|
||||
|
||||
USER_OBJS :=
|
||||
|
||||
LIBS :=
|
||||
PROJ :=
|
||||
|
||||
O_SRCS :=
|
||||
C_SRCS :=
|
||||
S_SRCS :=
|
||||
S_UPPER_SRCS :=
|
||||
OBJ_SRCS :=
|
||||
ASM_SRCS :=
|
||||
PREPROCESSING_SRCS :=
|
||||
OBJS :=
|
||||
OBJS_AS_ARGS :=
|
||||
C_DEPS :=
|
||||
C_DEPS_AS_ARGS :=
|
||||
EXECUTABLES :=
|
||||
OUTPUT_FILE_PATH :=
|
||||
OUTPUT_FILE_PATH_AS_ARGS :=
|
||||
AVR_APP_PATH :=$$$AVR_APP_PATH$$$
|
||||
QUOTE := "
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
OUTPUT_FILE_DEP:=
|
||||
LIB_DEP:=
|
||||
LINKER_SCRIPT_DEP:=
|
||||
|
||||
# Every subdirectory with source files must be described here
|
||||
SUBDIRS :=
|
||||
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../main.c \
|
||||
../stepper_driver.c
|
||||
|
||||
|
||||
PREPROCESSING_SRCS +=
|
||||
|
||||
|
||||
ASM_SRCS +=
|
||||
|
||||
|
||||
OBJS += \
|
||||
main.o \
|
||||
stepper_driver.o
|
||||
|
||||
OBJS_AS_ARGS += \
|
||||
main.o \
|
||||
stepper_driver.o
|
||||
|
||||
C_DEPS += \
|
||||
main.d \
|
||||
stepper_driver.d
|
||||
|
||||
C_DEPS_AS_ARGS += \
|
||||
main.d \
|
||||
stepper_driver.d
|
||||
|
||||
OUTPUT_FILE_PATH +=Servo_driver.elf
|
||||
|
||||
OUTPUT_FILE_PATH_AS_ARGS +=Servo_driver.elf
|
||||
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
|
||||
OUTPUT_FILE_DEP:= ./makedep.mk
|
||||
|
||||
LIB_DEP+=
|
||||
|
||||
LINKER_SCRIPT_DEP+=
|
||||
|
||||
|
||||
# AVR32/GNU C Compiler
|
||||
./main.o: .././main.c
|
||||
@echo Building file: $<
|
||||
@echo Invoking: AVR/GNU C Compiler : 5.4.0
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include" -Og -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
./stepper_driver.o: .././stepper_driver.c
|
||||
@echo Building file: $<
|
||||
@echo Invoking: AVR/GNU C Compiler : 5.4.0
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include" -Og -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# AVR32/GNU Preprocessing Assembler
|
||||
|
||||
|
||||
|
||||
# AVR32/GNU Assembler
|
||||
|
||||
|
||||
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(strip $(C_DEPS)),)
|
||||
-include $(C_DEPS)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
|
||||
# All Target
|
||||
all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)
|
||||
|
||||
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
|
||||
@echo Building target: $@
|
||||
@echo Invoking: AVR/GNU Linker : 5.4.0
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="Servo_driver.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"
|
||||
@echo Finished building target: $@
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "Servo_driver.elf" "Servo_driver.hex"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "Servo_driver.elf" "Servo_driver.eep" || exit 0
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "Servo_driver.elf" > "Servo_driver.lss"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "Servo_driver.elf" "Servo_driver.srec"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "Servo_driver.elf"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)
|
||||
-$(RM) $(C_DEPS_AS_ARGS)
|
||||
rm -rf "Servo_driver.elf" "Servo_driver.a" "Servo_driver.hex" "Servo_driver.lss" "Servo_driver.eep" "Servo_driver.map" "Servo_driver.srec" "Servo_driver.usersignatures"
|
||||
|
||||
1
Microcontrollers/GLCDdriver/Debug/Servo_driver.eep
Normal file
1
Microcontrollers/GLCDdriver/Debug/Servo_driver.eep
Normal file
@@ -0,0 +1 @@
|
||||
:00000001FF
|
||||
395
Microcontrollers/GLCDdriver/Debug/Servo_driver.lss
Normal file
395
Microcontrollers/GLCDdriver/Debug/Servo_driver.lss
Normal file
@@ -0,0 +1,395 @@
|
||||
|
||||
Servo_driver.elf: file format elf32-avr
|
||||
|
||||
Sections:
|
||||
Idx Name Size VMA LMA File off Algn
|
||||
0 .data 00000008 00800100 00000216 000002aa 2**0
|
||||
CONTENTS, ALLOC, LOAD, DATA
|
||||
1 .text 00000216 00000000 00000000 00000094 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
2 .bss 00000005 00800108 00800108 000002b2 2**0
|
||||
ALLOC
|
||||
3 .comment 00000030 00000000 00000000 000002b2 2**0
|
||||
CONTENTS, READONLY
|
||||
4 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 000002e4 2**2
|
||||
CONTENTS, READONLY
|
||||
5 .debug_aranges 00000080 00000000 00000000 00000320 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
6 .debug_info 00000b4f 00000000 00000000 000003a0 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
7 .debug_abbrev 00000987 00000000 00000000 00000eef 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
8 .debug_line 000004cb 00000000 00000000 00001876 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
9 .debug_frame 00000110 00000000 00000000 00001d44 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
10 .debug_str 00000514 00000000 00000000 00001e54 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
11 .debug_loc 000001d2 00000000 00000000 00002368 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
12 .debug_ranges 00000060 00000000 00000000 0000253a 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
00000000 <__vectors>:
|
||||
0: 45 c0 rjmp .+138 ; 0x8c <__ctors_end>
|
||||
2: 00 00 nop
|
||||
4: 60 c0 rjmp .+192 ; 0xc6 <__bad_interrupt>
|
||||
6: 00 00 nop
|
||||
8: 5e c0 rjmp .+188 ; 0xc6 <__bad_interrupt>
|
||||
a: 00 00 nop
|
||||
c: 5c c0 rjmp .+184 ; 0xc6 <__bad_interrupt>
|
||||
e: 00 00 nop
|
||||
10: 5a c0 rjmp .+180 ; 0xc6 <__bad_interrupt>
|
||||
12: 00 00 nop
|
||||
14: 58 c0 rjmp .+176 ; 0xc6 <__bad_interrupt>
|
||||
16: 00 00 nop
|
||||
18: 56 c0 rjmp .+172 ; 0xc6 <__bad_interrupt>
|
||||
1a: 00 00 nop
|
||||
1c: 54 c0 rjmp .+168 ; 0xc6 <__bad_interrupt>
|
||||
1e: 00 00 nop
|
||||
20: 52 c0 rjmp .+164 ; 0xc6 <__bad_interrupt>
|
||||
22: 00 00 nop
|
||||
24: 80 c0 rjmp .+256 ; 0x126 <__vector_9>
|
||||
26: 00 00 nop
|
||||
28: 4e c0 rjmp .+156 ; 0xc6 <__bad_interrupt>
|
||||
2a: 00 00 nop
|
||||
2c: 4c c0 rjmp .+152 ; 0xc6 <__bad_interrupt>
|
||||
2e: 00 00 nop
|
||||
30: 4a c0 rjmp .+148 ; 0xc6 <__bad_interrupt>
|
||||
32: 00 00 nop
|
||||
34: 48 c0 rjmp .+144 ; 0xc6 <__bad_interrupt>
|
||||
36: 00 00 nop
|
||||
38: 46 c0 rjmp .+140 ; 0xc6 <__bad_interrupt>
|
||||
3a: 00 00 nop
|
||||
3c: 44 c0 rjmp .+136 ; 0xc6 <__bad_interrupt>
|
||||
3e: 00 00 nop
|
||||
40: 42 c0 rjmp .+132 ; 0xc6 <__bad_interrupt>
|
||||
42: 00 00 nop
|
||||
44: 40 c0 rjmp .+128 ; 0xc6 <__bad_interrupt>
|
||||
46: 00 00 nop
|
||||
48: 3e c0 rjmp .+124 ; 0xc6 <__bad_interrupt>
|
||||
4a: 00 00 nop
|
||||
4c: 3c c0 rjmp .+120 ; 0xc6 <__bad_interrupt>
|
||||
4e: 00 00 nop
|
||||
50: 3a c0 rjmp .+116 ; 0xc6 <__bad_interrupt>
|
||||
52: 00 00 nop
|
||||
54: 38 c0 rjmp .+112 ; 0xc6 <__bad_interrupt>
|
||||
56: 00 00 nop
|
||||
58: 36 c0 rjmp .+108 ; 0xc6 <__bad_interrupt>
|
||||
5a: 00 00 nop
|
||||
5c: 34 c0 rjmp .+104 ; 0xc6 <__bad_interrupt>
|
||||
5e: 00 00 nop
|
||||
60: 32 c0 rjmp .+100 ; 0xc6 <__bad_interrupt>
|
||||
62: 00 00 nop
|
||||
64: 30 c0 rjmp .+96 ; 0xc6 <__bad_interrupt>
|
||||
66: 00 00 nop
|
||||
68: 2e c0 rjmp .+92 ; 0xc6 <__bad_interrupt>
|
||||
6a: 00 00 nop
|
||||
6c: 2c c0 rjmp .+88 ; 0xc6 <__bad_interrupt>
|
||||
6e: 00 00 nop
|
||||
70: 2a c0 rjmp .+84 ; 0xc6 <__bad_interrupt>
|
||||
72: 00 00 nop
|
||||
74: 28 c0 rjmp .+80 ; 0xc6 <__bad_interrupt>
|
||||
76: 00 00 nop
|
||||
78: 26 c0 rjmp .+76 ; 0xc6 <__bad_interrupt>
|
||||
7a: 00 00 nop
|
||||
7c: 24 c0 rjmp .+72 ; 0xc6 <__bad_interrupt>
|
||||
7e: 00 00 nop
|
||||
80: 22 c0 rjmp .+68 ; 0xc6 <__bad_interrupt>
|
||||
82: 00 00 nop
|
||||
84: 20 c0 rjmp .+64 ; 0xc6 <__bad_interrupt>
|
||||
86: 00 00 nop
|
||||
88: 1e c0 rjmp .+60 ; 0xc6 <__bad_interrupt>
|
||||
...
|
||||
|
||||
0000008c <__ctors_end>:
|
||||
8c: 11 24 eor r1, r1
|
||||
8e: 1f be out 0x3f, r1 ; 63
|
||||
90: cf ef ldi r28, 0xFF ; 255
|
||||
92: d0 e1 ldi r29, 0x10 ; 16
|
||||
94: de bf out 0x3e, r29 ; 62
|
||||
96: cd bf out 0x3d, r28 ; 61
|
||||
|
||||
00000098 <__do_copy_data>:
|
||||
98: 11 e0 ldi r17, 0x01 ; 1
|
||||
9a: a0 e0 ldi r26, 0x00 ; 0
|
||||
9c: b1 e0 ldi r27, 0x01 ; 1
|
||||
9e: e6 e1 ldi r30, 0x16 ; 22
|
||||
a0: f2 e0 ldi r31, 0x02 ; 2
|
||||
a2: 00 e0 ldi r16, 0x00 ; 0
|
||||
a4: 0b bf out 0x3b, r16 ; 59
|
||||
a6: 02 c0 rjmp .+4 ; 0xac <__do_copy_data+0x14>
|
||||
a8: 07 90 elpm r0, Z+
|
||||
aa: 0d 92 st X+, r0
|
||||
ac: a8 30 cpi r26, 0x08 ; 8
|
||||
ae: b1 07 cpc r27, r17
|
||||
b0: d9 f7 brne .-10 ; 0xa8 <__do_copy_data+0x10>
|
||||
|
||||
000000b2 <__do_clear_bss>:
|
||||
b2: 21 e0 ldi r18, 0x01 ; 1
|
||||
b4: a8 e0 ldi r26, 0x08 ; 8
|
||||
b6: b1 e0 ldi r27, 0x01 ; 1
|
||||
b8: 01 c0 rjmp .+2 ; 0xbc <.do_clear_bss_start>
|
||||
|
||||
000000ba <.do_clear_bss_loop>:
|
||||
ba: 1d 92 st X+, r1
|
||||
|
||||
000000bc <.do_clear_bss_start>:
|
||||
bc: ad 30 cpi r26, 0x0D ; 13
|
||||
be: b2 07 cpc r27, r18
|
||||
c0: e1 f7 brne .-8 ; 0xba <.do_clear_bss_loop>
|
||||
c2: 16 d0 rcall .+44 ; 0xf0 <main>
|
||||
c4: a6 c0 rjmp .+332 ; 0x212 <_exit>
|
||||
|
||||
000000c6 <__bad_interrupt>:
|
||||
c6: 9c cf rjmp .-200 ; 0x0 <__vectors>
|
||||
|
||||
000000c8 <wait>:
|
||||
int value = 0;
|
||||
value = ADCH;
|
||||
value <<= 2;
|
||||
value += (ADCL >> 6);
|
||||
return value;
|
||||
}
|
||||
c8: 20 e0 ldi r18, 0x00 ; 0
|
||||
ca: 30 e0 ldi r19, 0x00 ; 0
|
||||
cc: 08 c0 rjmp .+16 ; 0xde <wait+0x16>
|
||||
ce: e3 ec ldi r30, 0xC3 ; 195
|
||||
d0: f9 e0 ldi r31, 0x09 ; 9
|
||||
d2: 31 97 sbiw r30, 0x01 ; 1
|
||||
d4: f1 f7 brne .-4 ; 0xd2 <wait+0xa>
|
||||
d6: 00 c0 rjmp .+0 ; 0xd8 <wait+0x10>
|
||||
d8: 00 00 nop
|
||||
da: 2f 5f subi r18, 0xFF ; 255
|
||||
dc: 3f 4f sbci r19, 0xFF ; 255
|
||||
de: 28 17 cp r18, r24
|
||||
e0: 39 07 cpc r19, r25
|
||||
e2: ac f3 brlt .-22 ; 0xce <wait+0x6>
|
||||
e4: 08 95 ret
|
||||
|
||||
000000e6 <adcInit>:
|
||||
e6: 80 ee ldi r24, 0xE0 ; 224
|
||||
e8: 87 b9 out 0x07, r24 ; 7
|
||||
ea: 86 e8 ldi r24, 0x86 ; 134
|
||||
ec: 86 b9 out 0x06, r24 ; 6
|
||||
ee: 08 95 ret
|
||||
|
||||
000000f0 <main>:
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* Replace with your application code */
|
||||
DDRF = 0x00;
|
||||
f0: 10 92 61 00 sts 0x0061, r1 ; 0x800061 <__TEXT_REGION_LENGTH__+0x7e0061>
|
||||
adcInit();
|
||||
f4: f8 df rcall .-16 ; 0xe6 <adcInit>
|
||||
init_stepper_driver();
|
||||
f6: 7f d0 rcall .+254 ; 0x1f6 <init_stepper_driver>
|
||||
f8: 80 e0 ldi r24, 0x00 ; 0
|
||||
|
||||
stepper_rotate(512);
|
||||
fa: 92 e0 ldi r25, 0x02 ; 2
|
||||
fc: 75 d0 rcall .+234 ; 0x1e8 <stepper_rotate>
|
||||
fe: 84 e6 ldi r24, 0x64 ; 100
|
||||
while (1)
|
||||
{
|
||||
wait(100);
|
||||
100: 90 e0 ldi r25, 0x00 ; 0
|
||||
102: e2 df rcall .-60 ; 0xc8 <wait>
|
||||
104: fc cf rjmp .-8 ; 0xfe <main+0xe>
|
||||
|
||||
00000106 <set_stepper_state>:
|
||||
106: e8 2f mov r30, r24
|
||||
108: f0 e0 ldi r31, 0x00 ; 0
|
||||
}
|
||||
|
||||
void (*snap_event)(uint8_t);
|
||||
|
||||
void set_snap_event(void (*snap_event_p)(uint8_t)){
|
||||
snap_event = snap_event_p;
|
||||
10a: e0 50 subi r30, 0x00 ; 0
|
||||
10c: ff 4f sbci r31, 0xFF ; 255
|
||||
10e: 80 81 ld r24, Z
|
||||
110: 83 b9 out 0x03, r24 ; 3
|
||||
112: 08 95 ret
|
||||
|
||||
00000114 <stepper_rotate_full_rotation>:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void stepper_rotate_full_rotation(){
|
||||
steps_to_do = 512;
|
||||
114: 80 e0 ldi r24, 0x00 ; 0
|
||||
116: 92 e0 ldi r25, 0x02 ; 2
|
||||
118: 90 93 0a 01 sts 0x010A, r25 ; 0x80010a <steps_to_do+0x1>
|
||||
11c: 80 93 09 01 sts 0x0109, r24 ; 0x800109 <steps_to_do>
|
||||
TCCR2 = 0b00001100;
|
||||
120: 8c e0 ldi r24, 0x0C ; 12
|
||||
122: 85 bd out 0x25, r24 ; 37
|
||||
124: 08 95 ret
|
||||
|
||||
00000126 <__vector_9>:
|
||||
snap_event = snap_event_p;
|
||||
}
|
||||
|
||||
uint16_t steps_to_do = 0;
|
||||
uint8_t stepper_state = 0;
|
||||
ISR( TIMER2_COMP_vect ){
|
||||
126: 1f 92 push r1
|
||||
128: 0f 92 push r0
|
||||
12a: 0f b6 in r0, 0x3f ; 63
|
||||
12c: 0f 92 push r0
|
||||
12e: 11 24 eor r1, r1
|
||||
130: 0b b6 in r0, 0x3b ; 59
|
||||
132: 0f 92 push r0
|
||||
134: 2f 93 push r18
|
||||
136: 3f 93 push r19
|
||||
138: 4f 93 push r20
|
||||
13a: 5f 93 push r21
|
||||
13c: 6f 93 push r22
|
||||
13e: 7f 93 push r23
|
||||
140: 8f 93 push r24
|
||||
142: 9f 93 push r25
|
||||
144: af 93 push r26
|
||||
146: bf 93 push r27
|
||||
148: ef 93 push r30
|
||||
14a: ff 93 push r31
|
||||
TCNT2 = 0;
|
||||
14c: 14 bc out 0x24, r1 ; 36
|
||||
|
||||
set_stepper_state(stepper_state);
|
||||
14e: 80 91 08 01 lds r24, 0x0108 ; 0x800108 <__data_end>
|
||||
152: d9 df rcall .-78 ; 0x106 <set_stepper_state>
|
||||
|
||||
if(stepper_state < 7){
|
||||
154: 80 91 08 01 lds r24, 0x0108 ; 0x800108 <__data_end>
|
||||
158: 87 30 cpi r24, 0x07 ; 7
|
||||
15a: 20 f4 brcc .+8 ; 0x164 <__vector_9+0x3e>
|
||||
stepper_state++;
|
||||
15c: 8f 5f subi r24, 0xFF ; 255
|
||||
15e: 80 93 08 01 sts 0x0108, r24 ; 0x800108 <__data_end>
|
||||
162: 2f c0 rjmp .+94 ; 0x1c2 <__vector_9+0x9c>
|
||||
} else {
|
||||
//OCR2 = ADCH;
|
||||
stepper_state = 0;
|
||||
164: 10 92 08 01 sts 0x0108, r1 ; 0x800108 <__data_end>
|
||||
|
||||
if(steps_to_do == 0){
|
||||
168: 80 91 09 01 lds r24, 0x0109 ; 0x800109 <steps_to_do>
|
||||
16c: 90 91 0a 01 lds r25, 0x010A ; 0x80010a <steps_to_do+0x1>
|
||||
170: 00 97 sbiw r24, 0x00 ; 0
|
||||
172: 19 f4 brne .+6 ; 0x17a <__vector_9+0x54>
|
||||
TCCR2 = 0b00000000;
|
||||
stepper_rotate_full_rotation();
|
||||
174: 15 bc out 0x25, r1 ; 37
|
||||
176: ce df rcall .-100 ; 0x114 <stepper_rotate_full_rotation>
|
||||
178: 24 c0 rjmp .+72 ; 0x1c2 <__vector_9+0x9c>
|
||||
} else {
|
||||
|
||||
if(steps_to_do % 32 == 0){
|
||||
17a: 8f 71 andi r24, 0x1F ; 31
|
||||
17c: 99 27 eor r25, r25
|
||||
17e: 89 2b or r24, r25
|
||||
180: b9 f4 brne .+46 ; 0x1b0 <__vector_9+0x8a>
|
||||
|
||||
if(PORTG == 0x01){
|
||||
182: 80 91 65 00 lds r24, 0x0065 ; 0x800065 <__TEXT_REGION_LENGTH__+0x7e0065>
|
||||
186: 81 30 cpi r24, 0x01 ; 1
|
||||
188: 19 f4 brne .+6 ; 0x190 <__vector_9+0x6a>
|
||||
PORTG = 0x00;
|
||||
18a: 10 92 65 00 sts 0x0065, r1 ; 0x800065 <__TEXT_REGION_LENGTH__+0x7e0065>
|
||||
18e: 07 c0 rjmp .+14 ; 0x19e <__vector_9+0x78>
|
||||
} else if (PORTG == 0x00){
|
||||
190: 80 91 65 00 lds r24, 0x0065 ; 0x800065 <__TEXT_REGION_LENGTH__+0x7e0065>
|
||||
194: 81 11 cpse r24, r1
|
||||
196: 03 c0 rjmp .+6 ; 0x19e <__vector_9+0x78>
|
||||
PORTG = 0x01;
|
||||
198: 81 e0 ldi r24, 0x01 ; 1
|
||||
19a: 80 93 65 00 sts 0x0065, r24 ; 0x800065 <__TEXT_REGION_LENGTH__+0x7e0065>
|
||||
}
|
||||
|
||||
if(snap_event != NULL)
|
||||
19e: e0 91 0b 01 lds r30, 0x010B ; 0x80010b <snap_event>
|
||||
1a2: f0 91 0c 01 lds r31, 0x010C ; 0x80010c <snap_event+0x1>
|
||||
1a6: 30 97 sbiw r30, 0x00 ; 0
|
||||
1a8: 19 f0 breq .+6 ; 0x1b0 <__vector_9+0x8a>
|
||||
snap_event(steps_to_do);
|
||||
1aa: 80 91 09 01 lds r24, 0x0109 ; 0x800109 <steps_to_do>
|
||||
1ae: 09 95 icall
|
||||
}
|
||||
|
||||
steps_to_do--;
|
||||
1b0: 80 91 09 01 lds r24, 0x0109 ; 0x800109 <steps_to_do>
|
||||
1b4: 90 91 0a 01 lds r25, 0x010A ; 0x80010a <steps_to_do+0x1>
|
||||
1b8: 01 97 sbiw r24, 0x01 ; 1
|
||||
1ba: 90 93 0a 01 sts 0x010A, r25 ; 0x80010a <steps_to_do+0x1>
|
||||
1be: 80 93 09 01 sts 0x0109, r24 ; 0x800109 <steps_to_do>
|
||||
}
|
||||
}
|
||||
}
|
||||
1c2: ff 91 pop r31
|
||||
1c4: ef 91 pop r30
|
||||
1c6: bf 91 pop r27
|
||||
1c8: af 91 pop r26
|
||||
1ca: 9f 91 pop r25
|
||||
1cc: 8f 91 pop r24
|
||||
1ce: 7f 91 pop r23
|
||||
1d0: 6f 91 pop r22
|
||||
1d2: 5f 91 pop r21
|
||||
1d4: 4f 91 pop r20
|
||||
1d6: 3f 91 pop r19
|
||||
1d8: 2f 91 pop r18
|
||||
1da: 0f 90 pop r0
|
||||
1dc: 0b be out 0x3b, r0 ; 59
|
||||
1de: 0f 90 pop r0
|
||||
1e0: 0f be out 0x3f, r0 ; 63
|
||||
1e2: 0f 90 pop r0
|
||||
1e4: 1f 90 pop r1
|
||||
1e6: 18 95 reti
|
||||
|
||||
000001e8 <stepper_rotate>:
|
||||
steps_to_do = 512;
|
||||
TCCR2 = 0b00001100;
|
||||
}
|
||||
|
||||
void stepper_rotate(uint16_t steps){
|
||||
steps_to_do = steps;
|
||||
1e8: 90 93 0a 01 sts 0x010A, r25 ; 0x80010a <steps_to_do+0x1>
|
||||
1ec: 80 93 09 01 sts 0x0109, r24 ; 0x800109 <steps_to_do>
|
||||
TCCR2 = 0b00001100;
|
||||
1f0: 8c e0 ldi r24, 0x0C ; 12
|
||||
1f2: 85 bd out 0x25, r24 ; 37
|
||||
1f4: 08 95 ret
|
||||
|
||||
000001f6 <init_stepper_driver>:
|
||||
}
|
||||
|
||||
void init_stepper_driver(){
|
||||
DDRE = 0xff;
|
||||
1f6: 8f ef ldi r24, 0xFF ; 255
|
||||
1f8: 82 b9 out 0x02, r24 ; 2
|
||||
DDRG = 0xff;
|
||||
1fa: 80 93 64 00 sts 0x0064, r24 ; 0x800064 <__TEXT_REGION_LENGTH__+0x7e0064>
|
||||
PORTG = 0x01;
|
||||
1fe: 81 e0 ldi r24, 0x01 ; 1
|
||||
200: 80 93 65 00 sts 0x0065, r24 ; 0x800065 <__TEXT_REGION_LENGTH__+0x7e0065>
|
||||
PORTE = 0x00;
|
||||
204: 13 b8 out 0x03, r1 ; 3
|
||||
OCR2 = 50;
|
||||
206: 82 e3 ldi r24, 0x32 ; 50
|
||||
208: 83 bd out 0x23, r24 ; 35
|
||||
TIMSK = BIT(7);
|
||||
20a: 80 e8 ldi r24, 0x80 ; 128
|
||||
20c: 87 bf out 0x37, r24 ; 55
|
||||
sei();
|
||||
20e: 78 94 sei
|
||||
210: 08 95 ret
|
||||
|
||||
00000212 <_exit>:
|
||||
212: f8 94 cli
|
||||
|
||||
00000214 <__stop_program>:
|
||||
214: ff cf rjmp .-2 ; 0x214 <__stop_program>
|
||||
37
Microcontrollers/GLCDdriver/Debug/Servo_driver.srec
Normal file
37
Microcontrollers/GLCDdriver/Debug/Servo_driver.srec
Normal file
@@ -0,0 +1,37 @@
|
||||
S0140000536572766F5F6472697665722E7372656316
|
||||
S113000045C0000060C000005EC000005CC000008D
|
||||
S11300105AC0000058C0000056C0000054C0000080
|
||||
S113002052C0000080C000004EC000004CC0000060
|
||||
S11300304AC0000048C0000046C0000044C00000A0
|
||||
S113004042C0000040C000003EC000003CC00000B0
|
||||
S11300503AC0000038C0000036C0000034C00000C0
|
||||
S113006032C0000030C000002EC000002CC00000D0
|
||||
S11300702AC0000028C0000026C0000024C00000E0
|
||||
S113008022C0000020C000001EC0000011241FBEBA
|
||||
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0E6E1FB
|
||||
S11300A0F2E000E00BBF02C007900D92A830B10748
|
||||
S11300B0D9F721E0A8E0B1E001C01D92AD30B2074C
|
||||
S11300C0E1F716D0A6C09CCF20E030E008C0E3ECF6
|
||||
S11300D0F9E03197F1F700C000002F5F3F4F281778
|
||||
S11300E03907ACF3089580EE87B986E886B9089598
|
||||
S11300F010926100F8DF7FD080E092E075D084E652
|
||||
S113010090E0E2DFFCCFE82FF0E0E050FF4F808189
|
||||
S113011083B9089580E092E090930A0180930901E5
|
||||
S11301208CE085BD08951F920F920FB60F92112493
|
||||
S11301300BB60F922F933F934F935F936F937F93DD
|
||||
S11301408F939F93AF93BF93EF93FF9314BC8091CE
|
||||
S11301500801D9DF80910801873020F48F5F8093F4
|
||||
S113016008012FC0109208018091090190910A01A1
|
||||
S1130170009719F415BCCEDF24C08F719927892B01
|
||||
S1130180B9F480916500813019F41092650007C0BC
|
||||
S113019080916500811103C081E080936500E09146
|
||||
S11301A00B01F0910C01309719F080910901099528
|
||||
S11301B08091090190910A01019790930A0180931B
|
||||
S11301C00901FF91EF91BF91AF919F918F917F9121
|
||||
S11301D06F915F914F913F912F910F900BBE0F90B4
|
||||
S11301E00FBE0F901F90189590930A0180930901F8
|
||||
S11301F08CE085BD08958FEF82B98093640081E01F
|
||||
S11302008093650013B882E383BD80E887BF789448
|
||||
S10902100895F894FFCFED
|
||||
S10B0216080C040602030109AF
|
||||
S9030000FC
|
||||
8
Microcontrollers/GLCDdriver/Debug/makedep.mk
Normal file
8
Microcontrollers/GLCDdriver/Debug/makedep.mk
Normal file
@@ -0,0 +1,8 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit or delete the file
|
||||
################################################################################
|
||||
|
||||
main.c
|
||||
|
||||
stepper_driver.c
|
||||
|
||||
86
Microcontrollers/GLCDdriver/Servo_driver.componentinfo.xml
Normal file
86
Microcontrollers/GLCDdriver/Servo_driver.componentinfo.xml
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.6.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>C</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>include/</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\avr\iom128.h</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>C</Condition>
|
||||
<FileContentHash>JdJ7J9I/SJh965SEyyyVYw==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>include/avr/iom128.h</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.c</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>C Exe</Condition>
|
||||
<FileContentHash>3JyV3AVW3kDDXpyeQO3NhQ==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>templates/main.c</Name>
|
||||
<SelectString>Main file (.c)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.cpp</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>C Exe</Condition>
|
||||
<FileContentHash>mkKaE95TOoATsuBGv6jmxg==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>templates/main.cpp</Name>
|
||||
<SelectString>Main file (.cpp)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>libraryPrefix</Category>
|
||||
<Condition>GCC</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>gcc/dev/atmega128</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.6.364/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.6.364</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
136
Microcontrollers/GLCDdriver/Servo_driver.cproj
Normal file
136
Microcontrollers/GLCDdriver/Servo_driver.cproj
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
|
||||
<ProjectGuid>{fe1d92d4-4858-4112-ad41-e57799a980c9}</ProjectGuid>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
<Language>C</Language>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.elf</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<AssemblyName>GLCDdriver</AssemblyName>
|
||||
<Name>Servo_driver</Name>
|
||||
<RootNamespace>GLCDdriver</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.49.1" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
|
||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
||||
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
|
||||
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
|
||||
<avrgcc.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>NDEBUG</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.symbols.DefSymbols>
|
||||
<avrgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
|
||||
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
|
||||
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
|
||||
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
|
||||
<avrgcc.linker.libraries.Libraries>
|
||||
<ListValues>
|
||||
<Value>libm</Value>
|
||||
</ListValues>
|
||||
</avrgcc.linker.libraries.Libraries>
|
||||
<avrgcc.assembler.general.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
|
||||
</ListValues>
|
||||
</avrgcc.assembler.general.IncludePaths>
|
||||
</AvrGcc>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
|
||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
||||
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
|
||||
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
|
||||
<avrgcc.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>DEBUG</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.symbols.DefSymbols>
|
||||
<avrgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize debugging experience (-Og)</avrgcc.compiler.optimization.level>
|
||||
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
|
||||
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
|
||||
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
|
||||
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
|
||||
<avrgcc.linker.libraries.Libraries>
|
||||
<ListValues>
|
||||
<Value>libm</Value>
|
||||
</ListValues>
|
||||
</avrgcc.linker.libraries.Libraries>
|
||||
<avrgcc.assembler.general.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
|
||||
</ListValues>
|
||||
</avrgcc.assembler.general.IncludePaths>
|
||||
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
|
||||
</AvrGcc>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="main.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="stepper_driver.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="stepper_driver.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
|
||||
</Project>
|
||||
49
Microcontrollers/GLCDdriver/main.c
Normal file
49
Microcontrollers/GLCDdriver/main.c
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* GLCDdriver.c
|
||||
*
|
||||
* Created: 10-Mar-21 10:47:34 AM
|
||||
* Author : lemms
|
||||
*/
|
||||
#define F_CPU 10e6
|
||||
#include <avr/io.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#include "stepper_driver.h"
|
||||
|
||||
void wait( int ms ) {
|
||||
for (int tms=0; tms<ms; tms++) {
|
||||
_delay_ms( 1 ); // library function (max 30 ms at 8MHz)
|
||||
}
|
||||
}
|
||||
|
||||
void adcInit(){
|
||||
ADMUX = 0b11100000; // internal reference: 2.56V and SEI on ADC0 and left-adjusted.
|
||||
ADCSRA = 0b10000110; // enable ADC. No free-run. Clock 64 D-factor.
|
||||
}
|
||||
|
||||
int getADCValue(){
|
||||
int value = 0;
|
||||
value = ADCH;
|
||||
value <<= 2;
|
||||
value += (ADCL >> 6);
|
||||
return value;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* Replace with your application code */
|
||||
DDRF = 0x00;
|
||||
adcInit();
|
||||
init_stepper_driver();
|
||||
|
||||
stepper_rotate(512);
|
||||
while (1)
|
||||
{
|
||||
wait(100);
|
||||
}
|
||||
}
|
||||
|
||||
101
Microcontrollers/GLCDdriver/stepper_driver.c
Normal file
101
Microcontrollers/GLCDdriver/stepper_driver.c
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* stepper_driver.c
|
||||
* PORTB
|
||||
* Created: 10-Mar-21 12:21:47 PM
|
||||
* Author: lemms
|
||||
*/
|
||||
#define F_CPU 10e6
|
||||
|
||||
#include <avr/interrupt.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define BIT(x) (1 << (x))
|
||||
|
||||
uint8_t CCW[8] = {0x09,0x01,0x03,0x02,0x06,0x04,0x0c,0x08};
|
||||
uint8_t CW[8] = {0x08,0x0c,0x04,0x06,0x02,0x03,0x01,0x09};
|
||||
|
||||
/*
|
||||
Een timer met interupt routine.
|
||||
|
||||
in de interump routine een state machine voor de 8 nibbles
|
||||
elke keer dat de interupt routine wordt geroepen wordt de state
|
||||
incremented. hier houd je ook een var bij om de relatieve
|
||||
positie te weten van de stappenmotor.
|
||||
|
||||
Nog een timer voor microstepping.
|
||||
|
||||
Timers:
|
||||
timer voor de speed.
|
||||
stappen van 100ms naar 10ms
|
||||
prescaler = 255
|
||||
*/
|
||||
|
||||
void stepper_rotate_full_rotation();
|
||||
|
||||
void set_stepper_state(uint8_t count){
|
||||
PORTE = CW[count];
|
||||
}
|
||||
|
||||
void (*snap_event)(uint8_t);
|
||||
|
||||
void set_snap_event(void (*snap_event_p)(uint8_t)){
|
||||
snap_event = snap_event_p;
|
||||
}
|
||||
|
||||
uint16_t steps_to_do = 0;
|
||||
uint8_t stepper_state = 0;
|
||||
ISR( TIMER2_COMP_vect ){
|
||||
TCNT2 = 0;
|
||||
|
||||
set_stepper_state(stepper_state);
|
||||
|
||||
if(stepper_state < 7){
|
||||
stepper_state++;
|
||||
} else {
|
||||
//OCR2 = ADCH;
|
||||
stepper_state = 0;
|
||||
|
||||
if(steps_to_do == 0){
|
||||
TCCR2 = 0b00000000;
|
||||
stepper_rotate_full_rotation();
|
||||
} else {
|
||||
|
||||
if(steps_to_do % 32 == 0){
|
||||
|
||||
if(PORTG == 0x01){
|
||||
PORTG = 0x00;
|
||||
} else if (PORTG == 0x00){
|
||||
PORTG = 0x01;
|
||||
}
|
||||
|
||||
if(snap_event != NULL)
|
||||
snap_event(steps_to_do);
|
||||
}
|
||||
|
||||
steps_to_do--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void stepper_rotate_full_rotation(){
|
||||
steps_to_do = 512;
|
||||
TCCR2 = 0b00001100;
|
||||
}
|
||||
|
||||
void stepper_rotate(uint16_t steps){
|
||||
steps_to_do = steps;
|
||||
TCCR2 = 0b00001100;
|
||||
}
|
||||
|
||||
void init_stepper_driver(){
|
||||
DDRE = 0xff;
|
||||
DDRG = 0xff;
|
||||
PORTG = 0x01;
|
||||
PORTE = 0x00;
|
||||
OCR2 = 50;
|
||||
TIMSK = BIT(7);
|
||||
sei();
|
||||
}
|
||||
17
Microcontrollers/GLCDdriver/stepper_driver.h
Normal file
17
Microcontrollers/GLCDdriver/stepper_driver.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* stepper_driver.h
|
||||
*
|
||||
* Created: 10-Mar-21 12:35:30 PM
|
||||
* Author: lemms
|
||||
*/
|
||||
|
||||
|
||||
#ifndef STEPPER_DRIVER_H_
|
||||
#define STEPPER_DRIVER_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
void stepper_rotate(uint16_t steps);
|
||||
void init_stepper_driver();
|
||||
|
||||
#endif /* STEPPER_DRIVER_H_ */
|
||||
@@ -35,6 +35,12 @@ Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "ultrasonicSensor", "ultraso
|
||||
EndProject
|
||||
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "opdracht C", "opdracht C\opdracht C.cproj", "{2DF6F5F3-181F-430E-B49A-3D9794F91482}"
|
||||
EndProject
|
||||
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "opdracht 4.b1", "opdracht 4.b1\opdracht 4.b1.cproj", "{596B8FFA-0A57-48B9-AE5D-B29F78D46CF6}"
|
||||
EndProject
|
||||
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "opdracht 4.3", "opdracht 4.3\opdracht 4.3.cproj", "{F7219797-D668-49E2-AC80-7EAF068BA957}"
|
||||
EndProject
|
||||
Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "Servo_driver", "GLCDdriver\Servo_driver.cproj", "{FE1D92D4-4858-4112-AD41-E57799A980C9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|AVR = Debug|AVR
|
||||
@@ -98,6 +104,7 @@ Global
|
||||
{2432E6BF-DA1E-4668-99BB-59FEA1F5B8A2}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{2432E6BF-DA1E-4668-99BB-59FEA1F5B8A2}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{2432E6BF-DA1E-4668-99BB-59FEA1F5B8A2}.Release|AVR.Build.0 = Release|AVR
|
||||
<<<<<<< Updated upstream
|
||||
{2DF6F5F3-181F-430E-B49A-3D9794F91482}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{2DF6F5F3-181F-430E-B49A-3D9794F91482}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{2DF6F5F3-181F-430E-B49A-3D9794F91482}.Release|AVR.ActiveCfg = Release|AVR
|
||||
@@ -112,6 +119,20 @@ Global
|
||||
{26DA64DE-DD48-4718-94B5-81F9EC5D4B33}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{26DA64DE-DD48-4718-94B5-81F9EC5D4B33}.Release|AVR.Build.0 = Release|AVR
|
||||
>>>>>>> ultrasonic-sensor
|
||||
=======
|
||||
{596B8FFA-0A57-48B9-AE5D-B29F78D46CF6}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{596B8FFA-0A57-48B9-AE5D-B29F78D46CF6}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{596B8FFA-0A57-48B9-AE5D-B29F78D46CF6}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{596B8FFA-0A57-48B9-AE5D-B29F78D46CF6}.Release|AVR.Build.0 = Release|AVR
|
||||
{F7219797-D668-49E2-AC80-7EAF068BA957}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{F7219797-D668-49E2-AC80-7EAF068BA957}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{F7219797-D668-49E2-AC80-7EAF068BA957}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{F7219797-D668-49E2-AC80-7EAF068BA957}.Release|AVR.Build.0 = Release|AVR
|
||||
{FE1D92D4-4858-4112-AD41-E57799A980C9}.Debug|AVR.ActiveCfg = Debug|AVR
|
||||
{FE1D92D4-4858-4112-AD41-E57799A980C9}.Debug|AVR.Build.0 = Debug|AVR
|
||||
{FE1D92D4-4858-4112-AD41-E57799A980C9}.Release|AVR.ActiveCfg = Release|AVR
|
||||
{FE1D92D4-4858-4112-AD41-E57799A980C9}.Release|AVR.Build.0 = Release|AVR
|
||||
>>>>>>> Stashed changes
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -11,6 +11,6 @@ int main(void)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
//TODO:: Please write your application code
|
||||
|
||||
}
|
||||
}
|
||||
@@ -11,23 +11,23 @@ Idx Name Size VMA LMA File off Algn
|
||||
CONTENTS, READONLY
|
||||
3 .debug_aranges 00000028 00000000 00000000 00000277 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
4 .debug_info 00000b85 00000000 00000000 0000029f 2**0
|
||||
4 .debug_info 00000bac 00000000 00000000 0000029f 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
5 .debug_abbrev 00000854 00000000 00000000 00000e24 2**0
|
||||
5 .debug_abbrev 00000854 00000000 00000000 00000e4b 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
6 .debug_line 000002b1 00000000 00000000 00001678 2**0
|
||||
6 .debug_line 000002b1 00000000 00000000 0000169f 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
7 .debug_frame 00000034 00000000 00000000 0000192c 2**2
|
||||
7 .debug_frame 00000034 00000000 00000000 00001950 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
8 .debug_str 0000027d 00000000 00000000 00001960 2**0
|
||||
8 .debug_str 0000027d 00000000 00000000 00001984 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
9 .debug_loc 000000b2 00000000 00000000 00001bdd 2**0
|
||||
9 .debug_loc 000000b2 00000000 00000000 00001c01 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
10 .debug_ranges 00000030 00000000 00000000 00001c8f 2**0
|
||||
10 .debug_ranges 00000030 00000000 00000000 00001cb3 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
11 .text 00000004 00000140 00000140 000001b4 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
12 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00001cc0 2**2
|
||||
12 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00001ce4 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
13 .text.wait 0000001e 00000122 00000122 00000196 2**1
|
||||
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
||||
@@ -136,7 +136,7 @@ Disassembly of section .text:
|
||||
Disassembly of section .text:
|
||||
|
||||
00000140 <__bad_interrupt>:
|
||||
140: 0c 94 00 00 jmp 0 ; 0x0 <__TEXT_REGION_ORIGIN__>
|
||||
140: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
|
||||
|
||||
Disassembly of section .text.wait:
|
||||
|
||||
@@ -179,14 +179,14 @@ Disassembly of section .text.main:
|
||||
|
||||
int main( void )
|
||||
{
|
||||
DDRA = 0xFF;
|
||||
DDRA = 0xFF; // set PORTA to all output
|
||||
ec: 8f ef ldi r24, 0xFF ; 255
|
||||
ee: 8a bb out 0x1a, r24 ; 26
|
||||
while (1==1)
|
||||
{
|
||||
// Set index to begin of pattern array
|
||||
int index = 0;
|
||||
// as long as delay has meaningful content
|
||||
// loop through the array
|
||||
for (int i = 0; i < sizeof(segments)/sizeof(segments[0]); i++)
|
||||
f0: 00 e0 ldi r16, 0x00 ; 0
|
||||
f2: 10 e0 ldi r17, 0x00 ; 0
|
||||
@@ -198,7 +198,7 @@ int main( void )
|
||||
int index = 0;
|
||||
f4: c0 e0 ldi r28, 0x00 ; 0
|
||||
f6: d0 e0 ldi r29, 0x00 ; 0
|
||||
// as long as delay has meaningful content
|
||||
// loop through the array
|
||||
for (int i = 0; i < sizeof(segments)/sizeof(segments[0]); i++)
|
||||
f8: 10 c0 rjmp .+32 ; 0x11a <main+0x2e>
|
||||
{
|
||||
@@ -225,7 +225,7 @@ int main( void )
|
||||
{
|
||||
// Set index to begin of pattern array
|
||||
int index = 0;
|
||||
// as long as delay has meaningful content
|
||||
// loop through the array
|
||||
for (int i = 0; i < sizeof(segments)/sizeof(segments[0]); i++)
|
||||
116: 0f 5f subi r16, 0xFF ; 255
|
||||
118: 1f 4f sbci r17, 0xFF ; 255
|
||||
|
||||
@@ -23,11 +23,11 @@ Idx Name Size VMA LMA File off Algn
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
9 .debug_frame 000001e0 00000000 00000000 00002be0 2**2
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
10 .debug_str 00000537 00000000 00000000 00002dc0 2**0
|
||||
10 .debug_str 0000055e 00000000 00000000 00002dc0 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
11 .debug_loc 000004dd 00000000 00000000 000032f7 2**0
|
||||
11 .debug_loc 000004dd 00000000 00000000 0000331e 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
12 .debug_ranges 00000090 00000000 00000000 000037d4 2**0
|
||||
12 .debug_ranges 00000090 00000000 00000000 000037fb 2**0
|
||||
CONTENTS, READONLY, DEBUGGING
|
||||
|
||||
Disassembly of section .text:
|
||||
@@ -471,10 +471,10 @@ ISR( TIMER2_OVF_vect ) {
|
||||
218: df 93 push r29
|
||||
21a: cd b7 in r28, 0x3d ; 61
|
||||
21c: de b7 in r29, 0x3e ; 62
|
||||
|
||||
int length = snprintf(NULL, 0, "%d", number + 1);
|
||||
char str[length + 1];
|
||||
snprintf(str, length + 1, "%d", number + 1);
|
||||
|
||||
lcd_write_string(str);
|
||||
}
|
||||
21e: cd b6 in r12, 0x3d ; 61
|
||||
@@ -551,7 +551,6 @@ ISR( TIMER2_OVF_vect ) {
|
||||
2a6: 1f 93 push r17
|
||||
2a8: 0f 93 push r16
|
||||
2aa: 50 d0 rcall .+160 ; 0x34c <snprintf>
|
||||
|
||||
lcd_write_string(str);
|
||||
2ac: 80 2f mov r24, r16
|
||||
2ae: 91 2f mov r25, r17
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,16 @@
|
||||
S01400006F7064726163687420342E312E7372656308
|
||||
S113000045C0000058C0000056C0000054C00000A5
|
||||
S113001052C0000050C000004EC000004CC00000A0
|
||||
S11300204AC000003BC1000046C0000044C00000BC
|
||||
S11300204AC0000036C1000046C0000044C00000C1
|
||||
S113003042C0000040C000003EC000003CC00000C0
|
||||
S11300403AC0000038C0000036C0000034C00000D0
|
||||
S113005032C0000030C000002EC000002CC00000E0
|
||||
S11300602AC0000028C0000026C0000024C00000F0
|
||||
S113007022C0000020C000001EC000001CC0000000
|
||||
S11300801AC0000018C0000016C0000011241FBED2
|
||||
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0E4EFEF
|
||||
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0E8EEEC
|
||||
S11300A0F8E000E00BBF02C007900D92A430B10746
|
||||
S11300B0D9F711D11DC4A4CF9BB321E030E002C015
|
||||
S11300B0D9F70CD117C4A4CF9BB321E030E002C020
|
||||
S11300C0220F331F8A95E2F7292B2BBB08959BB38C
|
||||
S11300D021E030E002C0220F331F8A95E2F7209519
|
||||
S11300E029232BBB089586E090E0E6DF89EF90E0BA
|
||||
@@ -30,118 +30,117 @@ S11301B0DF91CF910895AF92BF92CF92DF92EF92E9
|
||||
S11301C0FF920F931F93CF93DF93CDB7DEB76C01EC
|
||||
S11301D0ADB6BEB601969F938F930F2EF0E0EF2E2F
|
||||
S11301E0F1E0FF2EF02DFF92EF921F921F921F92CB
|
||||
S11301F01F9295D001962DB73EB7285F3F4F0FB69B
|
||||
S11301F01F928FD001962DB73EB7285F3F4F0FB6A1
|
||||
S1130200F8943EBF0FBE2DBF281B390B0FB6F894D0
|
||||
S11302103EBF0FBE2DBF0DB71EB70F5F1F4FDF923E
|
||||
S1130220CF92FF92EF929F938F931F930F9377D068
|
||||
S1130220CF92FF92EF929F938F931F930F9371D06E
|
||||
S1130230802F912FB4DF8DB79EB708960FB6F89430
|
||||
S11302409EBF0FBE8DBF0FB6F894BEBE0FBEADBE2F
|
||||
S1130250DF91CF911F910F91FF90EF90DF90CF909E
|
||||
S1130260BF90AF90089520E030E008C0EFECF7E0D5
|
||||
S11302703197F1F700C000002F5F3F4F281739076F
|
||||
S1130280ACF3089580EE87B986E886B9089587B7F8
|
||||
S1130290806887BF789483E085BD08951F920F928C
|
||||
S11302A00FB60F9211248F9386B1806486B98F9113
|
||||
S11302B00F900FBE0F901F90189585B190E0880F96
|
||||
S11302C0991F880F991F24B122952695269523708E
|
||||
S11302D0820F911D0895109261008FEF82B9D2DFD1
|
||||
S11302E040DF8FE19EE40197F1F700C000002EDFAC
|
||||
S11302F0CEDF80E090E025B122BB24B123B9C5B1A3
|
||||
S1130300D0E08C179D0731F021DF8AE090E0ABDF6D
|
||||
S1130310D4DF51DF84E690E0A6DFCE01ECCF0F936B
|
||||
S11303201F93CF93DF93CDB7DEB72E970FB6F89414
|
||||
S1130330DEBF0FBECDBF0D891E898F89988D26E043
|
||||
S11303402C831A83098397FF02C080E090E8019709
|
||||
S11303509E838D83AE01455E5F4F698D7A8DCE019C
|
||||
S1130360019619D04D815E8157FD0AC02F813885D1
|
||||
S1130370421753070CF49A01F801E20FF31F10829D
|
||||
S11303802E960FB6F894DEBF0FBECDBFDF91CF918E
|
||||
S11303901F910F9108952F923F924F925F926F9207
|
||||
S11303A07F928F929F92AF92BF92CF92DF92EF9201
|
||||
S11303B0FF920F931F93CF93DF93CDB7DEB72B97A5
|
||||
S11303C00FB6F894DEBF0FBECDBF6C017B018A016E
|
||||
S11303D0FC0117821682838181FFBFC1CE01019681
|
||||
S11303E03C01F6019381F70193FD859193FF81917F
|
||||
S11303F07F01882309F4ADC1853239F493FD8591D9
|
||||
S113040093FF81917F01853221F4B60190E0D6D12A
|
||||
S1130410E8CF912C212C312CFFE1F315D8F08B324D
|
||||
S113042079F038F4803279F08332A1F4232D2061FD
|
||||
S11304301DC08D3261F0803369F4232D216016C014
|
||||
S1130440832D8260382EE32DE4603E2E2AC0F32DE6
|
||||
S1130450F8601DC037FC2DC020ED280F2A3040F075
|
||||
S11304608E32B9F436FC75C1232D2064322E19C0A6
|
||||
S113047036FE06C08AE0989E200D1124922E11C0EB
|
||||
S1130480EAE02E9E200D1124222EF32DF0623F2E41
|
||||
S113049008C08C3621F4832D8068382E02C088363B
|
||||
S11304A041F4F70193FD859193FF81917F018111BF
|
||||
S11304B0B3CF982F9F7D9554933028F40C5F1F4F32
|
||||
S11304C09FE399830DC0833631F0833771F0833510
|
||||
S11304D009F055C020C0F801808189830E5F1F4F49
|
||||
S11304E088248394912C530112C02801F2E04F0E0A
|
||||
S11304F0511CF801A080B18036FE03C0692D70E064
|
||||
S113050002C06FEF7FEFC5014ED14C018201F32D84
|
||||
S1130510FF773F2E15C0280122E0420E511CF8013E
|
||||
S1130520A080B18036FE03C0692D70E002C06FEF79
|
||||
S11305307FEFC5012DD14C01F32DF0683F2E8201D0
|
||||
S113054033FC19C0822D90E088169906A0F4B601F8
|
||||
S113055080E290E033D12A94F5CFF50137FC859100
|
||||
S113056037FE81915F01B60190E028D121102A94D1
|
||||
S113057021E0821A91088114910479F7E1C084364C
|
||||
S113058011F0893639F5F80137FE07C060817181B1
|
||||
S1130590828193810C5F1F4F08C060817181072E97
|
||||
S11305A0000C880B990B0E5F1F4FF32DFF763F2E27
|
||||
S11305B097FF09C090958095709561957F4F8F4FF7
|
||||
S11305C09F4FF0683F2E2AE030E0A30133D1882EFC
|
||||
S11305D0861844C0853731F4232D2F7EB22E2AE0AD
|
||||
S11305E030E025C0932D997FB92E8F36C1F018F4D1
|
||||
S11305F0883579F0AEC0803719F0883721F0A9C06A
|
||||
S1130600E92FE061BE2EB4FE0DC0FB2DF460BF2EB9
|
||||
S113061009C034FE0AC0292F2660B22E06C028E085
|
||||
S113062030E005C020E130E002C020E132E0F80112
|
||||
S1130630B7FE07C060817181828193810C5F1F4F77
|
||||
S113064006C06081718180E090E00E5F1F4FA301BE
|
||||
S1130650F1D0882E8618FB2DFF773F2E36FE0DC075
|
||||
S1130660232D2E7FA22E891458F434FE0BC032FCA5
|
||||
S113067009C0832D8E7EA82E05C0B82CA32C03C0E0
|
||||
S1130680B82C01C0B92CA4FE0FC0FE01E80DF11D69
|
||||
S11306908081803321F49A2D997EA92E09C0A2FE6F
|
||||
S11306A006C0B394B39404C08A2D867809F0B39439
|
||||
S11306B0A3FC10C0A0FE06C0B21480F4280C922C37
|
||||
S11306C09B180DC0B21458F4B60180E290E076D0C5
|
||||
S11306D0B394F8CFB21418F42B1802C0982C212C20
|
||||
S11306E0A4FE0FC0B60180E390E068D0A2FE16C05D
|
||||
S11306F0A1FC03C088E790E002C088E590E0B60161
|
||||
S11307000CC08A2D867851F0A1FE02C08BE201C094
|
||||
S113071080E2A7FC8DE2B60190E050D0891430F459
|
||||
S1130720B60180E390E04AD09A94F8CF8A94F3011A
|
||||
S1130730E80DF11D8081B60190E040D08110F6CF24
|
||||
S1130740222009F44ECEB60180E290E037D02A94FC
|
||||
S1130750F7CFF6018681978102C08FEF9FEF2B962A
|
||||
S11307600FB6F894DEBF0FBECDBFDF91CF911F91BE
|
||||
S11307700F91FF90EF90DF90CF90BF90AF909F903C
|
||||
S11307808F907F906F905F904F903F902F9008953F
|
||||
S1130790FC010590615070400110D8F78095909548
|
||||
S11307A08E0F9F1F0895FC0161507040019001104D
|
||||
S11307B0D8F7809590958E0F9F1F08950F931F93E0
|
||||
S11307C0CF93DF93FB01238121FD03C08FEF9FEFC4
|
||||
S11307D02CC022FF16C046815781248135814217DF
|
||||
S11307E0530744F4A081B1819D012F5F3F4F3183B2
|
||||
S11307F020838C93268137812F5F3F4F3783268355
|
||||
S113080014C08B01EC01FB010084F185E02D0995F6
|
||||
S1130810892BE1F6D80116968D919C911797019634
|
||||
S113082017969C938E931697CE01DF91CF911F91CB
|
||||
S11308300F910895FA01AA27283051F1203181F14E
|
||||
S1130840E8946F936E7F6E5F7F4F8F4F9F4FAF4FD4
|
||||
S1130850B1E03ED0B4E03CD0670F781F891F9A1FE7
|
||||
S1130860A11D680F791F8A1F911DA11D6A0F711D9B
|
||||
S1130870811D911DA11D20D009F468943F912AE0A7
|
||||
S1130880269F11243019305D3193DEF6CF0108958F
|
||||
S1130890462F4770405D4193B3E00FD0C9F7F6CFC0
|
||||
S11308A0462F4F70405D4A3318F0495D31FD405288
|
||||
S11308B0419302D0A9F7EACFB4E0A695979587951E
|
||||
S11308C077956795BA95C9F70097610571050895FD
|
||||
S11308D09B01AC010A2E06945795479537952795A9
|
||||
S11308E0BA95C9F7620F731F841F951FA01D089541
|
||||
S10708F0F894FFCFA6
|
||||
S10708F42564000073
|
||||
S1130280ACF3089587B7806887BF789483E085BD11
|
||||
S113029008951F920F920FB60F9211248F9386B177
|
||||
S11302A0806486B98F910F900FBE0F901F901895A0
|
||||
S11302B085B190E0880F991F880F991F24B122956A
|
||||
S11302C0269526952370820F911D08951092610042
|
||||
S11302D08FEF82B946DF8FE19EE40197F1F700C00A
|
||||
S11302E0000034DFCFDF80E090E025B122BB24B1F1
|
||||
S11302F023B9C5B1D0E08C179D0731F027DF8AE020
|
||||
S113030090E0B1DFD5DF57DF84E690E0ACDFCE01CB
|
||||
S1130310ECCF0F931F93CF93DF93CDB7DEB72E9718
|
||||
S11303200FB6F894DEBF0FBECDBF0D891E898F892D
|
||||
S1130330988D26E02C831A83098397FF02C080E0FE
|
||||
S113034090E801979E838D83AE01455E5F4F698D72
|
||||
S11303507A8DCE01019619D04D815E8157FD0AC078
|
||||
S11303602F813885421753070CF49A01F801E20FE4
|
||||
S1130370F31F10822E960FB6F894DEBF0FBECDBFCA
|
||||
S1130380DF91CF911F910F9108952F923F924F9239
|
||||
S11303905F926F927F928F929F92AF92BF92CF9211
|
||||
S11303A0DF92EF92FF920F931F93CF93DF93CDB71A
|
||||
S11303B0DEB72B970FB6F894DEBF0FBECDBF6C012E
|
||||
S11303C07B018A01FC0117821682838181FFBFC1F0
|
||||
S11303D0CE0101963C01F6019381F70193FD8591CD
|
||||
S11303E093FF81917F01882309F4ADC1853239F4EB
|
||||
S11303F093FD859193FF81917F01853221F4B601AC
|
||||
S113040090E0D6D1E8CF912C212C312CFFE1F315CB
|
||||
S1130410D8F08B3279F038F4803279F08332A1F459
|
||||
S1130420232D20611DC08D3261F0803369F4232DAA
|
||||
S1130430216016C0832D8260382EE32DE4603E2EA9
|
||||
S11304402AC0F32DF8601DC037FC2DC020ED280F05
|
||||
S11304502A3040F08E32B9F436FC75C1232D206465
|
||||
S1130460322E19C036FE06C08AE0989E200D112453
|
||||
S1130470922E11C0EAE02E9E200D1124222EF32D7F
|
||||
S1130480F0623F2E08C08C3621F4832D8068382E0C
|
||||
S113049002C0883641F4F70193FD859193FF819161
|
||||
S11304A07F018111B3CF982F9F7D9554933028F409
|
||||
S11304B00C5F1F4F9FE399830DC0833631F0833760
|
||||
S11304C071F0833509F055C020C0F801808189831B
|
||||
S11304D00E5F1F4F88248394912C530112C028016E
|
||||
S11304E0F2E04F0E511CF801A080B18036FE03C02B
|
||||
S11304F0692D70E002C06FEF7FEFC5014ED14C0152
|
||||
S11305008201F32DFF773F2E15C0280122E0420E11
|
||||
S1130510511CF801A080B18036FE03C0692D70E043
|
||||
S113052002C06FEF7FEFC5012DD14C01F32DF068B0
|
||||
S11305303F2E820133FC19C0822D90E08816990663
|
||||
S1130540A0F4B60180E290E033D12A94F5CFF5010E
|
||||
S113055037FC859137FE81915F01B60190E028D187
|
||||
S113056021102A9421E0821A91088114910479F7C8
|
||||
S1130570E1C0843611F0893639F5F80137FE07C039
|
||||
S113058060817181828193810C5F1F4F08C06081FB
|
||||
S11305907181072E000C880B990B0E5F1F4FF32DF2
|
||||
S11305A0FF763F2E97FF09C09095809570956195D1
|
||||
S11305B07F4F8F4F9F4FF0683F2E2AE030E0A3011A
|
||||
S11305C033D1882E861844C0853731F4232D2F7EED
|
||||
S11305D0B22E2AE030E025C0932D997FB92E8F36B4
|
||||
S11305E0C1F018F4883579F0AEC0803719F0883737
|
||||
S11305F021F0A9C0E92FE061BE2EB4FE0DC0FB2D91
|
||||
S1130600F460BF2E09C034FE0AC0292F2660B22E22
|
||||
S113061006C028E030E005C020E130E002C020E15F
|
||||
S113062032E0F801B7FE07C0608171818281938155
|
||||
S11306300C5F1F4F06C06081718180E090E00E5F07
|
||||
S11306401F4FA301F1D0882E8618FB2DFF773F2E74
|
||||
S113065036FE0DC0232D2E7FA22E891458F434FEAD
|
||||
S11306600BC032FC09C0832D8E7EA82E05C0B82C89
|
||||
S1130670A32C03C0B82C01C0B92CA4FE0FC0FE01EA
|
||||
S1130680E80DF11D8081803321F49A2D997EA92EE5
|
||||
S113069009C0A2FE06C0B394B39404C08A2D867820
|
||||
S11306A009F0B394A3FC10C0A0FE06C0B21480F4F9
|
||||
S11306B0280C922C9B180DC0B21458F4B60180E299
|
||||
S11306C090E076D0B394F8CFB21418F42B1802C08B
|
||||
S11306D0982C212CA4FE0FC0B60180E390E068D0D2
|
||||
S11306E0A2FE16C0A1FC03C088E790E002C088E522
|
||||
S11306F090E0B6010CC08A2D867851F0A1FE02C0AC
|
||||
S11307008BE201C080E2A7FC8DE2B60190E050D0FC
|
||||
S1130710891430F4B60180E390E04AD09A94F8CF7B
|
||||
S11307208A94F301E80DF11D8081B60190E040D078
|
||||
S11307308110F6CF222009F44ECEB60180E290E07B
|
||||
S113074037D02A94F7CFF6018681978102C08FEFC4
|
||||
S11307509FEF2B960FB6F894DEBF0FBECDBFDF918F
|
||||
S1130760CF911F910F91FF90EF90DF90CF90BF90AA
|
||||
S1130770AF909F908F907F906F905F904F903F903D
|
||||
S11307802F900895FC010590615070400110D8F736
|
||||
S1130790809590958E0F9F1F0895FC0161507040C5
|
||||
S11307A001900110D8F7809590958E0F9F1F0895A2
|
||||
S11307B00F931F93CF93DF93FB01238121FD03C08C
|
||||
S11307C08FEF9FEF2CC022FF16C0468157812481F2
|
||||
S11307D035814217530744F4A081B1819D012F5FF5
|
||||
S11307E03F4F318320838C93268137812F5F3F4F86
|
||||
S11307F03783268314C08B01EC01FB010084F1854F
|
||||
S1130800E02D0995892BE1F6D80116968D919C91DE
|
||||
S11308101797019617969C938E931697CE01DF91A6
|
||||
S1130820CF911F910F910895FA01AA27283051F111
|
||||
S1130830203181F1E8946F936E7F6E5F7F4F8F4F0D
|
||||
S11308409F4FAF4FB1E03ED0B4E03CD0670F781F6C
|
||||
S1130850891F9A1FA11D680F791F8A1F911DA11D51
|
||||
S11308606A0F711D811D911DA11D20D009F468948A
|
||||
S11308703F912AE0269F11243019305D3193DEF632
|
||||
S1130880CF010895462F4770405D4193B3E00FD0E8
|
||||
S1130890C9F7F6CF462F4F70405D4A3318F0495DD3
|
||||
S11308A031FD4052419302D0A9F7EACFB4E0A695B6
|
||||
S11308B09795879577956795BA95C9F700976105D8
|
||||
S11308C0710508959B01AC010A2E0694579547952E
|
||||
S11308D037952795BA95C9F7620F731F841F951F23
|
||||
S10B08E0A01D0895F894FFCF58
|
||||
S10708E8256400007F
|
||||
S9030000FC
|
||||
|
||||
@@ -52,7 +52,7 @@ int main(void)
|
||||
/* Replace with your application code */
|
||||
DDRF = 0x00; // set port F input.
|
||||
DDRE = 0xFF; // all port A output.
|
||||
adcInit();
|
||||
|
||||
|
||||
init_4bits_mode();
|
||||
_delay_ms(10);
|
||||
@@ -72,7 +72,7 @@ int main(void)
|
||||
|
||||
wait(10);
|
||||
|
||||
lcd_write_integer(getADCValue());
|
||||
lcd_write_integer((getADCValue()));
|
||||
}
|
||||
|
||||
previousValue = number;
|
||||
|
||||
139
Microcontrollers/opdracht 4.3/Debug/Makefile
Normal file
139
Microcontrollers/opdracht 4.3/Debug/Makefile
Normal file
@@ -0,0 +1,139 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
SHELL := cmd.exe
|
||||
RM := rm -rf
|
||||
|
||||
USER_OBJS :=
|
||||
|
||||
LIBS :=
|
||||
PROJ :=
|
||||
|
||||
O_SRCS :=
|
||||
C_SRCS :=
|
||||
S_SRCS :=
|
||||
S_UPPER_SRCS :=
|
||||
OBJ_SRCS :=
|
||||
ASM_SRCS :=
|
||||
PREPROCESSING_SRCS :=
|
||||
OBJS :=
|
||||
OBJS_AS_ARGS :=
|
||||
C_DEPS :=
|
||||
C_DEPS_AS_ARGS :=
|
||||
EXECUTABLES :=
|
||||
OUTPUT_FILE_PATH :=
|
||||
OUTPUT_FILE_PATH_AS_ARGS :=
|
||||
AVR_APP_PATH :=$$$AVR_APP_PATH$$$
|
||||
QUOTE := "
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
OUTPUT_FILE_DEP:=
|
||||
LIB_DEP:=
|
||||
LINKER_SCRIPT_DEP:=
|
||||
|
||||
# Every subdirectory with source files must be described here
|
||||
SUBDIRS :=
|
||||
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS += \
|
||||
../lcd_control.c \
|
||||
../main.c
|
||||
|
||||
|
||||
PREPROCESSING_SRCS +=
|
||||
|
||||
|
||||
ASM_SRCS +=
|
||||
|
||||
|
||||
OBJS += \
|
||||
lcd_control.o \
|
||||
main.o
|
||||
|
||||
OBJS_AS_ARGS += \
|
||||
lcd_control.o \
|
||||
main.o
|
||||
|
||||
C_DEPS += \
|
||||
lcd_control.d \
|
||||
main.d
|
||||
|
||||
C_DEPS_AS_ARGS += \
|
||||
lcd_control.d \
|
||||
main.d
|
||||
|
||||
OUTPUT_FILE_PATH +=opdracht\ 4.3.elf
|
||||
|
||||
OUTPUT_FILE_PATH_AS_ARGS +="opdracht 4.3.elf"
|
||||
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
|
||||
OUTPUT_FILE_DEP:= ./makedep.mk
|
||||
|
||||
LIB_DEP+=
|
||||
|
||||
LINKER_SCRIPT_DEP+=
|
||||
|
||||
|
||||
# AVR32/GNU C Compiler
|
||||
./lcd_control.o: .././lcd_control.c
|
||||
@echo Building file: $<
|
||||
@echo Invoking: AVR/GNU C Compiler : 5.4.0
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include" -Og -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
./main.o: .././main.c
|
||||
@echo Building file: $<
|
||||
@echo Invoking: AVR/GNU C Compiler : 5.4.0
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include" -Og -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -g2 -Wall -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
|
||||
@echo Finished building: $<
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# AVR32/GNU Preprocessing Assembler
|
||||
|
||||
|
||||
|
||||
# AVR32/GNU Assembler
|
||||
|
||||
|
||||
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(strip $(C_DEPS)),)
|
||||
-include $(C_DEPS)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
|
||||
# All Target
|
||||
all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)
|
||||
|
||||
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
|
||||
@echo Building target: $@
|
||||
@echo Invoking: AVR/GNU Linker : 5.4.0
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="opdracht 4.3.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mrelax -mmcu=atmega128 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"
|
||||
@echo Finished building target: $@
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "opdracht 4.3.elf" "opdracht 4.3.hex"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "opdracht 4.3.elf" "opdracht 4.3.eep" || exit 0
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "opdracht 4.3.elf" > "opdracht 4.3.lss"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "opdracht 4.3.elf" "opdracht 4.3.srec"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "opdracht 4.3.elf"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)
|
||||
-$(RM) $(C_DEPS_AS_ARGS)
|
||||
rm -rf "opdracht 4.3.elf" "opdracht 4.3.a" "opdracht 4.3.hex" "opdracht 4.3.lss" "opdracht 4.3.eep" "opdracht 4.3.map" "opdracht 4.3.srec" "opdracht 4.3.usersignatures"
|
||||
|
||||
8
Microcontrollers/opdracht 4.3/Debug/makedep.mk
Normal file
8
Microcontrollers/opdracht 4.3/Debug/makedep.mk
Normal file
@@ -0,0 +1,8 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit or delete the file
|
||||
################################################################################
|
||||
|
||||
lcd_control.c
|
||||
|
||||
main.c
|
||||
|
||||
1
Microcontrollers/opdracht 4.3/Debug/opdracht 4.3.eep
Normal file
1
Microcontrollers/opdracht 4.3/Debug/opdracht 4.3.eep
Normal file
@@ -0,0 +1 @@
|
||||
:00000001FF
|
||||
1459
Microcontrollers/opdracht 4.3/Debug/opdracht 4.3.lss
Normal file
1459
Microcontrollers/opdracht 4.3/Debug/opdracht 4.3.lss
Normal file
File diff suppressed because it is too large
Load Diff
147
Microcontrollers/opdracht 4.3/Debug/opdracht 4.3.srec
Normal file
147
Microcontrollers/opdracht 4.3/Debug/opdracht 4.3.srec
Normal file
@@ -0,0 +1,147 @@
|
||||
S01400006F7064726163687420342E332E7372656306
|
||||
S113000045C0000058C0000056C0000054C00000A5
|
||||
S113001052C0000050C000004EC000004CC00000A0
|
||||
S11300204AC000003BC1000046C0000044C00000BC
|
||||
S113003042C0000040C000003EC000003CC00000C0
|
||||
S11300403AC0000038C0000036C0000034C00000D0
|
||||
S113005032C0000030C000002EC000002CC00000E0
|
||||
S11300602AC0000028C0000026C0000024C00000F0
|
||||
S113007022C0000020C000001EC000001CC0000000
|
||||
S11300801AC0000018C0000016C0000011241FBED2
|
||||
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0E8EFEB
|
||||
S11300A0F8E000E00BBF02C007900D92A430B10746
|
||||
S11300B0D9F711D11FC4A4CF9BB321E030E002C013
|
||||
S11300C0220F331F8A95E2F7292B2BBB08959BB38C
|
||||
S11300D021E030E002C0220F331F8A95E2F7209519
|
||||
S11300E029232BBB089586E090E0E6DF89EF90E0BA
|
||||
S11300F00197F1F700C0000086E090E0E8DF89EFA7
|
||||
S113010090E00197F1F700C000000895CF93C82F45
|
||||
S113011085BB84E090E0D0DFE6DFC295C07FC5BB3D
|
||||
S113012084E090E0C9DFDFDFCF910895CF93C82F3B
|
||||
S113013085BB84E090E0CBDFD6DFC295C07FC5BB32
|
||||
S113014084E090E0C4DFCFDFCF91089581E0EEDF5B
|
||||
S113015083EF91E00197F1F700C0000080E8E6CF5B
|
||||
S11301600895CF938FEF84BB85BB8ABB15BA1BBAA6
|
||||
S1130170C0E2C5BBB8DFC5BBB6DF80E885BBB3DF73
|
||||
S113018015BAB1DF80EF85BBAEDF15BAACDF80E610
|
||||
S113019085BBA9DF82E0CADFA6DFCF910895CF93A4
|
||||
S11301A0DF93EC0102C0B2DF219688818111FBCF7D
|
||||
S11301B0DF91CF910895AF92BF92CF92DF92EF92E9
|
||||
S11301C0FF920F931F93CF93DF93CDB7DEB76C01EC
|
||||
S11301D0ADB6BEB601969F938F930F2EF0E0EF2E2F
|
||||
S11301E0F1E0FF2EF02DFF92EF921F921F921F92CB
|
||||
S11301F01F9297D001962DB73EB7285F3F4F0FB699
|
||||
S1130200F8943EBF0FBE2DBF281B390B0FB6F894D0
|
||||
S11302103EBF0FBE2DBF0DB71EB70F5F1F4FDF923E
|
||||
S1130220CF92FF92EF929F938F931F930F9379D066
|
||||
S1130230802F912FB4DF8DB79EB708960FB6F89430
|
||||
S11302409EBF0FBE8DBF0FB6F894BEBE0FBEADBE2F
|
||||
S1130250DF91CF911F910F91FF90EF90DF90CF909E
|
||||
S1130260BF90AF90089520E030E008C0EFECF7E0D5
|
||||
S11302703197F1F700C000002F5F3F4F281739076F
|
||||
S1130280ACF3089580EE87B986E886B9089587B7F8
|
||||
S1130290806887BF789483E085BD08951F920F928C
|
||||
S11302A00FB60F9211248F9386B1806486B98F9113
|
||||
S11302B00F900FBE0F901F90189585B190E0880F96
|
||||
S11302C0991F880F991F24B122952695269523708E
|
||||
S11302D0820F911D0895109261008FEF82B9D2DFD1
|
||||
S11302E040DF8FE19EE40197F1F700C000002EDFAC
|
||||
S11302F0CEDF80E090E025B122BB24B123B9C5B1A3
|
||||
S1130300D0E08C179D0741F021DF8AE090E0ABDF5D
|
||||
S1130310D4DF959587954FDF84E690E0A4DFCE0186
|
||||
S1130320EACF0F931F93CF93DF93CDB7DEB72E970A
|
||||
S11303300FB6F894DEBF0FBECDBF0D891E898F891D
|
||||
S1130340988D26E02C831A83098397FF02C080E0EE
|
||||
S113035090E801979E838D83AE01455E5F4F698D62
|
||||
S11303607A8DCE01019619D04D815E8157FD0AC068
|
||||
S11303702F813885421753070CF49A01F801E20FD4
|
||||
S1130380F31F10822E960FB6F894DEBF0FBECDBFBA
|
||||
S1130390DF91CF911F910F9108952F923F924F9229
|
||||
S11303A05F926F927F928F929F92AF92BF92CF9201
|
||||
S11303B0DF92EF92FF920F931F93CF93DF93CDB70A
|
||||
S11303C0DEB72B970FB6F894DEBF0FBECDBF6C011E
|
||||
S11303D07B018A01FC0117821682838181FFBFC1E0
|
||||
S11303E0CE0101963C01F6019381F70193FD8591BD
|
||||
S11303F093FF81917F01882309F4ADC1853239F4DB
|
||||
S113040093FD859193FF81917F01853221F4B6019B
|
||||
S113041090E0D6D1E8CF912C212C312CFFE1F315BB
|
||||
S1130420D8F08B3279F038F4803279F08332A1F449
|
||||
S1130430232D20611DC08D3261F0803369F4232D9A
|
||||
S1130440216016C0832D8260382EE32DE4603E2E99
|
||||
S11304502AC0F32DF8601DC037FC2DC020ED280FF5
|
||||
S11304602A3040F08E32B9F436FC75C1232D206455
|
||||
S1130470322E19C036FE06C08AE0989E200D112443
|
||||
S1130480922E11C0EAE02E9E200D1124222EF32D6F
|
||||
S1130490F0623F2E08C08C3621F4832D8068382EFC
|
||||
S11304A002C0883641F4F70193FD859193FF819151
|
||||
S11304B07F018111B3CF982F9F7D9554933028F4F9
|
||||
S11304C00C5F1F4F9FE399830DC0833631F0833750
|
||||
S11304D071F0833509F055C020C0F801808189830B
|
||||
S11304E00E5F1F4F88248394912C530112C028015E
|
||||
S11304F0F2E04F0E511CF801A080B18036FE03C01B
|
||||
S1130500692D70E002C06FEF7FEFC5014ED14C0141
|
||||
S11305108201F32DFF773F2E15C0280122E0420E01
|
||||
S1130520511CF801A080B18036FE03C0692D70E033
|
||||
S113053002C06FEF7FEFC5012DD14C01F32DF068A0
|
||||
S11305403F2E820133FC19C0822D90E08816990653
|
||||
S1130550A0F4B60180E290E033D12A94F5CFF501FE
|
||||
S113056037FC859137FE81915F01B60190E028D177
|
||||
S113057021102A9421E0821A91088114910479F7B8
|
||||
S1130580E1C0843611F0893639F5F80137FE07C029
|
||||
S113059060817181828193810C5F1F4F08C06081EB
|
||||
S11305A07181072E000C880B990B0E5F1F4FF32DE2
|
||||
S11305B0FF763F2E97FF09C09095809570956195C1
|
||||
S11305C07F4F8F4F9F4FF0683F2E2AE030E0A3010A
|
||||
S11305D033D1882E861844C0853731F4232D2F7EDD
|
||||
S11305E0B22E2AE030E025C0932D997FB92E8F36A4
|
||||
S11305F0C1F018F4883579F0AEC0803719F0883727
|
||||
S113060021F0A9C0E92FE061BE2EB4FE0DC0FB2D80
|
||||
S1130610F460BF2E09C034FE0AC0292F2660B22E12
|
||||
S113062006C028E030E005C020E130E002C020E14F
|
||||
S113063032E0F801B7FE07C0608171818281938145
|
||||
S11306400C5F1F4F06C06081718180E090E00E5FF7
|
||||
S11306501F4FA301F1D0882E8618FB2DFF773F2E64
|
||||
S113066036FE0DC0232D2E7FA22E891458F434FE9D
|
||||
S11306700BC032FC09C0832D8E7EA82E05C0B82C79
|
||||
S1130680A32C03C0B82C01C0B92CA4FE0FC0FE01DA
|
||||
S1130690E80DF11D8081803321F49A2D997EA92ED5
|
||||
S11306A009C0A2FE06C0B394B39404C08A2D867810
|
||||
S11306B009F0B394A3FC10C0A0FE06C0B21480F4E9
|
||||
S11306C0280C922C9B180DC0B21458F4B60180E289
|
||||
S11306D090E076D0B394F8CFB21418F42B1802C07B
|
||||
S11306E0982C212CA4FE0FC0B60180E390E068D0C2
|
||||
S11306F0A2FE16C0A1FC03C088E790E002C088E512
|
||||
S113070090E0B6010CC08A2D867851F0A1FE02C09B
|
||||
S11307108BE201C080E2A7FC8DE2B60190E050D0EC
|
||||
S1130720891430F4B60180E390E04AD09A94F8CF6B
|
||||
S11307308A94F301E80DF11D8081B60190E040D068
|
||||
S11307408110F6CF222009F44ECEB60180E290E06B
|
||||
S113075037D02A94F7CFF6018681978102C08FEFB4
|
||||
S11307609FEF2B960FB6F894DEBF0FBECDBFDF917F
|
||||
S1130770CF911F910F91FF90EF90DF90CF90BF909A
|
||||
S1130780AF909F908F907F906F905F904F903F902D
|
||||
S11307902F900895FC010590615070400110D8F726
|
||||
S11307A0809590958E0F9F1F0895FC0161507040B5
|
||||
S11307B001900110D8F7809590958E0F9F1F089592
|
||||
S11307C00F931F93CF93DF93FB01238121FD03C07C
|
||||
S11307D08FEF9FEF2CC022FF16C0468157812481E2
|
||||
S11307E035814217530744F4A081B1819D012F5FE5
|
||||
S11307F03F4F318320838C93268137812F5F3F4F76
|
||||
S11308003783268314C08B01EC01FB010084F1853E
|
||||
S1130810E02D0995892BE1F6D80116968D919C91CE
|
||||
S11308201797019617969C938E931697CE01DF9196
|
||||
S1130830CF911F910F910895FA01AA27283051F101
|
||||
S1130840203181F1E8946F936E7F6E5F7F4F8F4FFD
|
||||
S11308509F4FAF4FB1E03ED0B4E03CD0670F781F5C
|
||||
S1130860891F9A1FA11D680F791F8A1F911DA11D41
|
||||
S11308706A0F711D811D911DA11D20D009F468947A
|
||||
S11308803F912AE0269F11243019305D3193DEF622
|
||||
S1130890CF010895462F4770405D4193B3E00FD0D8
|
||||
S11308A0C9F7F6CF462F4F70405D4A3318F0495DC3
|
||||
S11308B031FD4052419302D0A9F7EACFB4E0A695A6
|
||||
S11308C09795879577956795BA95C9F700976105C8
|
||||
S11308D0710508959B01AC010A2E0694579547951E
|
||||
S11308E037952795BA95C9F7620F731F841F951F13
|
||||
S10B08F0A01D0895F894FFCF48
|
||||
S10708F8256400006F
|
||||
S9030000FC
|
||||
130
Microcontrollers/opdracht 4.3/lcd_control.c
Normal file
130
Microcontrollers/opdracht 4.3/lcd_control.c
Normal file
@@ -0,0 +1,130 @@
|
||||
/*
|
||||
* lcd_controlc.c
|
||||
*
|
||||
* Created: 24-2-2021 11:55:12
|
||||
* Author: Sem
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include "lcd_control.h"
|
||||
|
||||
void _delay_ms(double __ms);
|
||||
|
||||
void lcd_clear() {
|
||||
lcd_write_command (0x01); //Leeg display
|
||||
_delay_ms(2);
|
||||
lcd_write_command (0x80); //Cursor terug naar start
|
||||
}
|
||||
|
||||
void lcd_strobe_lcd_e(void) {
|
||||
|
||||
sbi_porta(LCD_E); // E high
|
||||
_delay_ms(1);
|
||||
cbi_porta(LCD_E); // E low
|
||||
_delay_ms(1);
|
||||
|
||||
}
|
||||
|
||||
void sbi_portc(int index){
|
||||
PORTC |= (1<<index);
|
||||
}
|
||||
|
||||
|
||||
void cbi_portc(int index){
|
||||
PORTC &= ~(1<<index);
|
||||
}
|
||||
|
||||
void sbi_porta(int index){
|
||||
PORTA |= (1<<index);
|
||||
}
|
||||
|
||||
|
||||
void cbi_porta(int index){
|
||||
PORTA &= ~(1<<index);
|
||||
}
|
||||
|
||||
void init_4bits_mode(void) {
|
||||
|
||||
// PORTC output mode and all low (also E and RS pin)
|
||||
|
||||
// Init I/O
|
||||
DDRC = 0xFF; // PORTD(7) output, PORTD(6:0) input
|
||||
PORTC = 0xFF;
|
||||
|
||||
DDRA = 0xFF;
|
||||
PORTC = 0x00;
|
||||
PORTA = 0x00;
|
||||
|
||||
PORTC = 0x20; // function for 4-bit 1 row
|
||||
lcd_strobe_lcd_e();
|
||||
|
||||
PORTC = 0x20; // function high nibble 4-bit 2 row
|
||||
lcd_strobe_lcd_e();
|
||||
PORTC = 0x80; // function low nibble 4-bit 2 row
|
||||
lcd_strobe_lcd_e();
|
||||
|
||||
PORTC = 0x00; // function high nibble turn on visible blinking-block cursor
|
||||
lcd_strobe_lcd_e();
|
||||
PORTC = 0xF0; // function low nibble turn on visible blinking-block cursor
|
||||
lcd_strobe_lcd_e();
|
||||
|
||||
PORTC = 0x00; // Entry mode set high nibble
|
||||
lcd_strobe_lcd_e();
|
||||
PORTC = 0x60; // Entry mode set low nibble
|
||||
lcd_strobe_lcd_e();
|
||||
|
||||
// return home
|
||||
lcd_write_command(0x02);
|
||||
lcd_strobe_lcd_e();
|
||||
}
|
||||
|
||||
void lcd_write_integer(int number){
|
||||
int length = snprintf(NULL, 0, "%d", number + 1);
|
||||
char str[length + 1];
|
||||
snprintf(str, length + 1, "%d", number);
|
||||
lcd_write_string(str);
|
||||
}
|
||||
|
||||
void lcd_write_character(unsigned char byte){
|
||||
|
||||
|
||||
//upper nibble
|
||||
PORTC = byte;
|
||||
sbi_porta(LCD_RS);
|
||||
lcd_strobe_lcd_e();
|
||||
|
||||
//lower nibble
|
||||
PORTC = (byte<<4);
|
||||
sbi_porta(LCD_RS);
|
||||
lcd_strobe_lcd_e();
|
||||
|
||||
}
|
||||
|
||||
void lcd_write_command(unsigned char byte){
|
||||
|
||||
//upper nibble
|
||||
PORTC = byte;
|
||||
cbi_porta(LCD_RS);
|
||||
lcd_strobe_lcd_e();
|
||||
|
||||
//lower nibble
|
||||
PORTC = (byte<<4);
|
||||
cbi_porta(LCD_RS);
|
||||
lcd_strobe_lcd_e();
|
||||
|
||||
}
|
||||
|
||||
void lcd_write_string(const char *str) {
|
||||
|
||||
for(;*str; str++){
|
||||
lcd_write_character(*str);
|
||||
}
|
||||
}
|
||||
|
||||
void lcd_move_right(void){
|
||||
|
||||
lcd_write_command(0x1E);
|
||||
}
|
||||
31
Microcontrollers/opdracht 4.3/lcd_control.h
Normal file
31
Microcontrollers/opdracht 4.3/lcd_control.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* lcd_control.h
|
||||
*
|
||||
* Created: 24-2-2021 11:56:16
|
||||
* Author: Sem
|
||||
*/
|
||||
|
||||
|
||||
#ifndef LCD_CONTROL_H_
|
||||
#define LCD_CONTROL_H_
|
||||
|
||||
#define LCD_E 6
|
||||
#define LCD_RS 4
|
||||
|
||||
void _delay_ms(double __ms);
|
||||
void lcd_strobe_lcd_e(void);
|
||||
void sbi_portc(int index);
|
||||
void cbi_portc(int index);
|
||||
void sbi_porta(int index);
|
||||
void cbi_porta(int index);
|
||||
void init_4bits_mode(void);
|
||||
void lcd_write_string(const char *str);
|
||||
void lcd_write_character(unsigned char byte);
|
||||
void lcd_write_command(unsigned char byte);
|
||||
void lcd_write_integer(int number);
|
||||
void lcd_move_right(void);
|
||||
void lcd_clear();
|
||||
|
||||
|
||||
|
||||
#endif /* LCD_CONTROL_H_ */
|
||||
83
Microcontrollers/opdracht 4.3/main.c
Normal file
83
Microcontrollers/opdracht 4.3/main.c
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* opdracht 4.1.c
|
||||
*
|
||||
* Created: 03-Mar-21 9:26:31 AM
|
||||
* Author : lemms
|
||||
*/
|
||||
|
||||
|
||||
#define F_CPU 8e6
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include "lcd_control.h"
|
||||
#define BIT(x) (1 << (x))
|
||||
|
||||
void wait( int ms ) {
|
||||
for (int tms=0; tms<ms; tms++) {
|
||||
_delay_ms( 1 ); // library function (max 30 ms at 8MHz)
|
||||
}
|
||||
}
|
||||
|
||||
void adcInit(){
|
||||
ADMUX = 0b11100000; // internal reference: 2.56V and SEI on ADC0 and left-adjusted.
|
||||
ADCSRA = 0b10000110; // enable ADC. No free-run. Clock 64 D-factor.
|
||||
}
|
||||
|
||||
void timer2Init( void ) {
|
||||
TIMSK |= BIT(7); // T2 compare match interrupt enable
|
||||
sei(); // turn_on interrupt all
|
||||
TCCR2 = 0b00000011; // Initialize T2: timer, pre-scaler=64
|
||||
}
|
||||
|
||||
ISR( TIMER2_COMP_vect ) {
|
||||
ADCSRA |= BIT(6);
|
||||
}
|
||||
|
||||
int getADCValue(){
|
||||
int value = 0;
|
||||
value = ADCH;
|
||||
value <<= 2;
|
||||
value += (ADCL >> 6);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int previousValue = 0;
|
||||
/* Replace with your application code */
|
||||
DDRF = 0x00; // set port F input.
|
||||
DDRE = 0xFF; // all port A output.
|
||||
adcInit();
|
||||
|
||||
init_4bits_mode();
|
||||
_delay_ms(10);
|
||||
lcd_clear();
|
||||
|
||||
timer2Init();
|
||||
while (1)
|
||||
{
|
||||
PORTD = ADCH;
|
||||
PORTE = ADCL;
|
||||
|
||||
int number = ADCH;
|
||||
|
||||
if(previousValue != number){
|
||||
|
||||
lcd_clear();
|
||||
|
||||
wait(10);
|
||||
|
||||
lcd_write_integer((getADCValue() >> 1));
|
||||
}
|
||||
|
||||
previousValue = number;
|
||||
|
||||
wait(100);
|
||||
}
|
||||
}
|
||||
|
||||
86
Microcontrollers/opdracht 4.3/opdracht 4.3.componentinfo.xml
Normal file
86
Microcontrollers/opdracht 4.3/opdracht 4.3.componentinfo.xml
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.6.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>include</Category>
|
||||
<Condition>C</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>include/</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\include\avr\iom128.h</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>C</Condition>
|
||||
<FileContentHash>JdJ7J9I/SJh965SEyyyVYw==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>include/avr/iom128.h</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.c</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>C Exe</Condition>
|
||||
<FileContentHash>E3YF7GOdCa1nIeGlpTnlmw==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>templates/main.c</Name>
|
||||
<SelectString>Main file (.c)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\templates\main.cpp</AbsolutePath>
|
||||
<Attribute>template</Attribute>
|
||||
<Category>source</Category>
|
||||
<Condition>C Exe</Condition>
|
||||
<FileContentHash>mkKaE95TOoATsuBGv6jmxg==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>templates/main.cpp</Name>
|
||||
<SelectString>Main file (.cpp)</SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>libraryPrefix</Category>
|
||||
<Condition>GCC</Condition>
|
||||
<FileContentHash i:nil="true" />
|
||||
<FileVersion></FileVersion>
|
||||
<Name>gcc/dev/atmega128</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.6.364/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.6.364</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
136
Microcontrollers/opdracht 4.3/opdracht 4.3.cproj
Normal file
136
Microcontrollers/opdracht 4.3/opdracht 4.3.cproj
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
|
||||
<ProjectGuid>{f7219797-d668-49e2-ac80-7eaf068ba957}</ProjectGuid>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
<Language>C</Language>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.elf</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<AssemblyName>opdracht 4.3</AssemblyName>
|
||||
<Name>opdracht 4.3</Name>
|
||||
<RootNamespace>opdracht 4.3</RootNamespace>
|
||||
<ToolchainFlavour>Native</ToolchainFlavour>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.49.1" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
|
||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
||||
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
|
||||
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
|
||||
<avrgcc.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>NDEBUG</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.symbols.DefSymbols>
|
||||
<avrgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
|
||||
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
|
||||
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
|
||||
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
|
||||
<avrgcc.linker.libraries.Libraries>
|
||||
<ListValues>
|
||||
<Value>libm</Value>
|
||||
</ListValues>
|
||||
</avrgcc.linker.libraries.Libraries>
|
||||
<avrgcc.assembler.general.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
|
||||
</ListValues>
|
||||
</avrgcc.assembler.general.IncludePaths>
|
||||
</AvrGcc>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings>
|
||||
<AvrGcc>
|
||||
<avrgcc.common.Device>-mmcu=atmega128 -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\gcc\dev\atmega128"</avrgcc.common.Device>
|
||||
<avrgcc.common.optimization.RelaxBranches>True</avrgcc.common.optimization.RelaxBranches>
|
||||
<avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
|
||||
<avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
|
||||
<avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
|
||||
<avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
|
||||
<avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
|
||||
<avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
|
||||
<avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
|
||||
<avrgcc.compiler.symbols.DefSymbols>
|
||||
<ListValues>
|
||||
<Value>DEBUG</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.symbols.DefSymbols>
|
||||
<avrgcc.compiler.directories.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
|
||||
</ListValues>
|
||||
</avrgcc.compiler.directories.IncludePaths>
|
||||
<avrgcc.compiler.optimization.level>Optimize debugging experience (-Og)</avrgcc.compiler.optimization.level>
|
||||
<avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
|
||||
<avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
|
||||
<avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
|
||||
<avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
|
||||
<avrgcc.linker.libraries.Libraries>
|
||||
<ListValues>
|
||||
<Value>libm</Value>
|
||||
</ListValues>
|
||||
</avrgcc.linker.libraries.Libraries>
|
||||
<avrgcc.assembler.general.IncludePaths>
|
||||
<ListValues>
|
||||
<Value>%24(PackRepoDir)\atmel\ATmega_DFP\1.6.364\include\</Value>
|
||||
</ListValues>
|
||||
</avrgcc.assembler.general.IncludePaths>
|
||||
<avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
|
||||
</AvrGcc>
|
||||
</ToolchainSettings>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="lcd_control.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="lcd_control.h">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
<Compile Include="main.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
|
||||
</Project>
|
||||
115
Microcontrollers/opdracht 4.b1/Debug/Makefile
Normal file
115
Microcontrollers/opdracht 4.b1/Debug/Makefile
Normal file
@@ -0,0 +1,115 @@
|
||||
################################################################################
|
||||
# Automatically-generated file. Do not edit!
|
||||
################################################################################
|
||||
|
||||
SHELL := cmd.exe
|
||||
RM := rm -rf
|
||||
|
||||
USER_OBJS :=
|
||||
|
||||
LIBS :=
|
||||
PROJ :=
|
||||
|
||||
O_SRCS :=
|
||||
C_SRCS :=
|
||||
S_SRCS :=
|
||||
S_UPPER_SRCS :=
|
||||
OBJ_SRCS :=
|
||||
ASM_SRCS :=
|
||||
PREPROCESSING_SRCS :=
|
||||
OBJS :=
|
||||
OBJS_AS_ARGS :=
|
||||
C_DEPS :=
|
||||
C_DEPS_AS_ARGS :=
|
||||
EXECUTABLES :=
|
||||
OUTPUT_FILE_PATH :=
|
||||
OUTPUT_FILE_PATH_AS_ARGS :=
|
||||
AVR_APP_PATH :=$$$AVR_APP_PATH$$$
|
||||
QUOTE := "
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
OUTPUT_FILE_DEP:=
|
||||
LIB_DEP:=
|
||||
LINKER_SCRIPT_DEP:=
|
||||
|
||||
# Every subdirectory with source files must be described here
|
||||
SUBDIRS :=
|
||||
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
C_SRCS +=
|
||||
|
||||
|
||||
PREPROCESSING_SRCS +=
|
||||
|
||||
|
||||
ASM_SRCS +=
|
||||
|
||||
|
||||
OBJS +=
|
||||
|
||||
OBJS_AS_ARGS +=
|
||||
|
||||
C_DEPS +=
|
||||
|
||||
C_DEPS_AS_ARGS +=
|
||||
|
||||
OUTPUT_FILE_PATH +=opdracht\ 4.b1.elf
|
||||
|
||||
OUTPUT_FILE_PATH_AS_ARGS +="opdracht 4.b1.elf"
|
||||
|
||||
ADDITIONAL_DEPENDENCIES:=
|
||||
|
||||
OUTPUT_FILE_DEP:= ./makedep.mk
|
||||
|
||||
LIB_DEP+=
|
||||
|
||||
LINKER_SCRIPT_DEP+=
|
||||
|
||||
|
||||
# AVR32/GNU C Compiler
|
||||
|
||||
|
||||
|
||||
# AVR32/GNU Preprocessing Assembler
|
||||
|
||||
|
||||
|
||||
# AVR32/GNU Assembler
|
||||
|
||||
|
||||
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(strip $(C_DEPS)),)
|
||||
-include $(C_DEPS)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add inputs and outputs from these tool invocations to the build variables
|
||||
|
||||
# All Target
|
||||
all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)
|
||||
|
||||
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
|
||||
@echo Building target: $@
|
||||
@echo Invoking: AVR/GNU Linker : 5.4.0
|
||||
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="opdracht 4.b1.map" -Wl,--start-group -Wl,--end-group -Wl,--gc-sections
|
||||
@echo Finished building target: $@
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "opdracht 4.b1.elf" "opdracht 4.b1.hex"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "opdracht 4.b1.elf" "opdracht 4.b1.eep" || exit 0
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "opdracht 4.b1.elf" > "opdracht 4.b1.lss"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "opdracht 4.b1.elf" "opdracht 4.b1.srec"
|
||||
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-size.exe" "opdracht 4.b1.elf"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Other Targets
|
||||
clean:
|
||||
-$(RM) $(OBJS_AS_ARGS) $(EXECUTABLES)
|
||||
-$(RM) $(C_DEPS_AS_ARGS)
|
||||
rm -rf "opdracht 4.b1.elf" "opdracht 4.b1.a" "opdracht 4.b1.hex" "opdracht 4.b1.lss" "opdracht 4.b1.eep" "opdracht 4.b1.map" "opdracht 4.b1.srec" "opdracht 4.b1.usersignatures"
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
|
||||
<<<<<<< Updated upstream
|
||||
<ProjectGuid>{314fe495-a311-499d-b63e-4b5e7b7f2054}</ProjectGuid>
|
||||
=======
|
||||
<ProjectGuid>{596b8ffa-0a57-48b9-ae5d-b29f78d46cf6}</ProjectGuid>
|
||||
>>>>>>> Stashed changes
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
@@ -28,6 +32,21 @@
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.49.1" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
>>>>>>> Stashed changes
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings>
|
||||
|
||||
Reference in New Issue
Block a user