Opgaven week 4 afgemaakt

This commit is contained in:
2016-03-08 12:07:22 +01:00
parent d2b96f769a
commit e29d649780
4 changed files with 586 additions and 1409 deletions
File diff suppressed because it is too large Load Diff
+95 -104
View File
@@ -26,28 +26,52 @@ Discarded input sections
.text 0x00000000 0x0 lcd.o
.data 0x00000000 0x0 lcd.o
.bss 0x00000000 0x0 lcd.o
.text.display_char
0x00000000 0x48 lcd.o
.text.lcd_command
0x00000000 0x40 lcd.o
.text.display_text
0x00000000 0x3c lcd.o
.text.clear_display
0x00000000 0xe lcd.o
.text.lcd_init
0x00000000 0x8e lcd.o
.text.set_cursor
0x00000000 0x8 lcd.o
.text.shift_display
0x00000000 0x52 lcd.o
.debug_info 0x00000000 0x5ff lcd.o
.debug_abbrev 0x00000000 0x1ac lcd.o
.debug_loc 0x00000000 0x2e1 lcd.o
.debug_aranges
0x00000000 0x50 lcd.o
.debug_ranges 0x00000000 0x40 lcd.o
.debug_line 0x00000000 0x2df lcd.o
.debug_str 0x00000000 0x223 lcd.o
.comment 0x00000000 0x31 lcd.o
.debug_frame 0x00000000 0xac lcd.o
.text 0x00000000 0x0 main.o
.data 0x00000000 0x0 main.o
.bss 0x00000000 0x0 main.o
.text.timer1Init
0x00000000 0x1a main.o
.text.setRed 0x00000000 0x8 main.o
.text.setGreen
0x00000000 0x8 main.o
.text.setBlue 0x00000000 0xc main.o
.text.adcInitFree
0x00000000 0xa main.o
.text.adcInitPoll
0x00000000 0xa main.o
.text.OpgaveB31
0x00000000 0x20 main.o
.rodata.str1.1
0x00000000 0x3 main.o
.text.OpgaveB33
0x00000000 0x68 main.o
.text.setWithButton
0x00000000 0x6 main.o
.text.somemain
.text.OpgaveB32
0x00000000 0x2c main.o
.text.alleKleuren
0x00000000 0x132 main.o
.text.opgaveextra
.text.OpgaveB22
0x00000000 0x1f2 main.o
.bss.hours 0x00000000 0x2 main.o
.bss.minutes 0x00000000 0x2 main.o
@@ -103,21 +127,36 @@ Discarded input sections
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(sprintf.o)
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(sprintf.o)
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(sprintf.o)
.text.avr-libc
0x00000000 0x60 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(sprintf.o)
.comment 0x00000000 0x31 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(sprintf.o)
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(vfprintf_std.o)
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(vfprintf_std.o)
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(vfprintf_std.o)
.text.avr-libc
0x00000000 0x3f6 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(vfprintf_std.o)
.comment 0x00000000 0x2d c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(vfprintf_std.o)
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen_P.o)
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen_P.o)
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen_P.o)
.text.avr-libc
0x00000000 0x16 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen_P.o)
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen.o)
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen.o)
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen.o)
.text.avr-libc
0x00000000 0x16 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen.o)
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(fputc.o)
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(fputc.o)
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(fputc.o)
.text.avr-libc
0x00000000 0x70 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(fputc.o)
.comment 0x00000000 0x31 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(fputc.o)
.text 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(ultoa_invert.o)
.data 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(ultoa_invert.o)
.bss 0x00000000 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(ultoa_invert.o)
.text.avr-libc
0x00000000 0xbc c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(ultoa_invert.o)
Memory Configuration
@@ -237,7 +276,7 @@ END GROUP
.rela.plt
*(.rela.plt)
.text 0x00000000 0x83c
.text 0x00000000 0x232
*(.vectors)
.vectors 0x00000000 0x8c C:/Program Files (x86)/Atmel/Studio/7.0/Packs/Atmel/ATmega_DFP/1.0.91/gcc/dev/atmega128/avr51/crtatmega128.o
0x00000000 __vector_default
@@ -331,51 +370,21 @@ END GROUP
0x000000c6 __vector_20
0x000000c8 . = ALIGN (0x2)
*(.text.*)
.text.display_char
0x000000c8 0x48 lcd.o
0x000000c8 display_char
.text.lcd_command
0x00000110 0x40 lcd.o
0x00000110 lcd_command
.text.display_text
0x00000150 0x36 lcd.o
0x00000150 display_text
.text.clear_display
0x00000186 0xa lcd.o
0x00000186 clear_display
.text.lcd_init
0x00000190 0x84 lcd.o
0x00000190 lcd_init
.text.wait 0x00000214 0x22 main.o
0x00000214 wait
.text.adcInitPoll
0x00000236 0xa main.o
0x00000236 adcInitPoll
.text.main 0x00000240 0x66 main.o
0x00000240 main
.text.avr-libc
0x000002a6 0x5e c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(sprintf.o)
0x000002a6 sprintf
.text.avr-libc
0x00000304 0x3dc c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(vfprintf_std.o)
0x00000304 vfprintf
.text.avr-libc
0x000006e0 0x16 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen_P.o)
0x000006e0 strnlen_P
.text.avr-libc
0x000006f6 0x16 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(strnlen.o)
0x000006f6 strnlen
.text.avr-libc
0x0000070c 0x70 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(fputc.o)
0x0000070c fputc
.text.avr-libc
0x0000077c 0xbc c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(ultoa_invert.o)
0x0000077c __ultoa_invert
0x00000838 . = ALIGN (0x2)
.text.wait 0x000000c8 0x22 main.o
0x000000c8 wait
.text.timer1Init
0x000000ea 0x1a main.o
0x000000ea timer1Init
.text.OpgaveB23
0x00000104 0x128 main.o
0x00000104 OpgaveB23
.text.main 0x0000022c 0x2 main.o
0x0000022c main
0x0000022e . = ALIGN (0x2)
*(.fini9)
.fini9 0x00000838 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_exit.o)
0x00000838 _exit
0x00000838 exit
.fini9 0x0000022e 0x0 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_exit.o)
0x0000022e _exit
0x0000022e exit
*(.fini9)
*(.fini8)
*(.fini8)
@@ -394,39 +403,36 @@ END GROUP
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x00000838 0x4 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_exit.o)
.fini0 0x0000022e 0x4 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/avr51\libgcc.a(_exit.o)
*(.fini0)
0x0000083c _etext = .
0x00000232 _etext = .
.data 0x00800100 0x4 load address 0x0000083c
.data 0x00800100 0x0 load address 0x00000232
0x00800100 PROVIDE (__data_start, .)
*(.data)
*(.data*)
*(.rodata)
*(.rodata*)
.rodata.str1.1
0x00800100 0x3 main.o
*(.gnu.linkonce.d*)
0x00800104 . = ALIGN (0x2)
*fill* 0x00800103 0x1
0x00800104 _edata = .
0x00800104 PROVIDE (__data_end, .)
0x00800100 . = ALIGN (0x2)
0x00800100 _edata = .
0x00800100 PROVIDE (__data_end, .)
.bss 0x00800104 0x0
0x00800104 PROVIDE (__bss_start, .)
.bss 0x00800100 0x0
0x00800100 PROVIDE (__bss_start, .)
*(.bss)
*(.bss*)
*(COMMON)
0x00800104 PROVIDE (__bss_end, .)
0x0000083c __data_load_start = LOADADDR (.data)
0x00000840 __data_load_end = (__data_load_start + SIZEOF (.data))
0x00800100 PROVIDE (__bss_end, .)
0x00000232 __data_load_start = LOADADDR (.data)
0x00000232 __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x00800104 0x0
0x00800104 PROVIDE (__noinit_start, .)
.noinit 0x00800100 0x0
0x00800100 PROVIDE (__noinit_start, .)
*(.noinit*)
0x00800104 PROVIDE (__noinit_end, .)
0x00800104 _end = .
0x00800104 PROVIDE (__heap_start, .)
0x00800100 PROVIDE (__noinit_end, .)
0x00800100 _end = .
0x00800100 PROVIDE (__heap_start, .)
.eeprom 0x00810000 0x0
*(.eeprom*)
@@ -465,15 +471,10 @@ END GROUP
.stab.indexstr
*(.stab.indexstr)
.comment 0x00000000 0x5c
.comment 0x00000000 0x30
*(.comment)
.comment 0x00000000 0x30 lcd.o
.comment 0x00000000 0x30 main.o
0x31 (size before relaxing)
.comment 0x00000030 0x31 main.o
.comment 0x00000030 0x31 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(sprintf.o)
.comment 0x00000030 0x2c c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(vfprintf_std.o)
0x2d (size before relaxing)
.comment 0x0000005c 0x31 c:/program files (x86)/atmel/studio/7.0/toolchain/avr8/avr8-gnu-toolchain/bin/../lib/gcc/avr/4.9.2/../../../../avr/lib/avr51\libc.a(fputc.o)
.note.gnu.avr.deviceinfo
0x00000000 0x3c
@@ -495,47 +496,38 @@ END GROUP
.debug_sfnames
*(.debug_sfnames)
.debug_aranges 0x00000000 0xc8
.debug_aranges 0x00000000 0x88
*(.debug_aranges)
.debug_aranges
0x00000000 0x50 lcd.o
.debug_aranges
0x00000050 0x78 main.o
0x00000000 0x88 main.o
.debug_pubnames
*(.debug_pubnames)
.debug_info 0x00000000 0x12f5
.debug_info 0x00000000 0xd56
*(.debug_info .gnu.linkonce.wi.*)
.debug_info 0x00000000 0x5ff lcd.o
.debug_info 0x000005ff 0xcf6 main.o
.debug_info 0x00000000 0xd56 main.o
.debug_abbrev 0x00000000 0x48c
.debug_abbrev 0x00000000 0x2ef
*(.debug_abbrev)
.debug_abbrev 0x00000000 0x1ac lcd.o
.debug_abbrev 0x000001ac 0x2e0 main.o
.debug_abbrev 0x00000000 0x2ef main.o
.debug_line 0x00000000 0x9cf
.debug_line 0x00000000 0x752
*(.debug_line .debug_line.* .debug_line_end)
.debug_line 0x00000000 0x2df lcd.o
.debug_line 0x000002df 0x6f0 main.o
.debug_line 0x00000000 0x752 main.o
.debug_frame 0x00000000 0x190
.debug_frame 0x00000000 0x104
*(.debug_frame)
.debug_frame 0x00000000 0xac lcd.o
.debug_frame 0x000000ac 0xe4 main.o
.debug_frame 0x00000000 0x104 main.o
.debug_str 0x00000000 0x2bb
.debug_str 0x00000000 0x276
*(.debug_str)
.debug_str 0x00000000 0x1e5 lcd.o
0x223 (size before relaxing)
.debug_str 0x000001e5 0xd6 main.o
0x2a3 (size before relaxing)
.debug_str 0x00000000 0x276 main.o
0x2af (size before relaxing)
.debug_loc 0x00000000 0x7e6
.debug_loc 0x00000000 0x542
*(.debug_loc)
.debug_loc 0x00000000 0x2e1 lcd.o
.debug_loc 0x000002e1 0x505 main.o
.debug_loc 0x00000000 0x542 main.o
.debug_macinfo
*(.debug_macinfo)
@@ -555,10 +547,9 @@ END GROUP
.debug_pubtypes
*(.debug_pubtypes)
.debug_ranges 0x00000000 0x188
.debug_ranges 0x00000000 0x170
*(.debug_ranges)
.debug_ranges 0x00000000 0x40 lcd.o
.debug_ranges 0x00000040 0x148 main.o
.debug_ranges 0x00000000 0x170 main.o
.debug_macro
*(.debug_macro)
+27 -124
View File
@@ -8,128 +8,31 @@ S11300503AC0000038C0000036C0000034C00000C0
S113006032C0000030C000002EC000002CC00000D0
S11300702AC0000028C0000026C0000024C00000E0
S113008022C0000020C000001EC0000011241FBEBA
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0ECE3F3
S11300A0F8E000E00BBF02C007900D92A430B10746
S11300B0D9F721E0A4E0B1E001C01D92A430B20759
S11300C0E1F7BED0B9C39CCF982F907F95BB95B371
S11300D09C6095BBEFE9FFE03197F1F700C00000A9
S11300E094E095BBEFE9FFE03197F1F700C0000021
S11300F0F0E18F9FC001112485BB85B38C6085BB63
S11301008FE99FE00197F1F700C0000015BA089548
S1130110982F907F95BBAB9AEFE9FFE03197F1F709
S113012000C0000094E095BBEFE9FFE03197F1F7E0
S113013000C00000F0E18F9FC001112485BBAB9A81
S11301408FE99FE00197F1F700C0000015BA089508
S1130150CF93DF93EB01892B19F080ECD9DF02C038
S113016080E8D6DF8881882359F02196ADDF8FE9B6
S11301709FE00197F1F700C0000089918111F6CF4B
S1130180DF91CF91089581E0C3DF80E8C1CF089566
S11301908FEF84BB2FEF80E792E0215080409040A6
S11301A0E1F700C0000082E0B3DF2FE788E391E0CD
S11301B0215080409040E1F700C0000088E2A8DFB1
S11301C02FE788E391E0215080409040E1F700C0A0
S11301D000008CE09DDF2FE788E391E02150804010
S11301E09040E1F700C0000086E092DF2FE788E34B
S11301F091E0215080409040E1F700C00000C3DF4F
S11302002FEF80E792E0215080409040E1F700C05A
S113021000000895181619066CF420E030E0EFECA5
S1130220F7E03197F1F700C000002F5F3F4F281728
S11302303907A9F7089581E687B986E886B908954C
S1130240CF93DF93CDB7DEB728970FB6F894DEBF10
S11302500FBECDBF10926100EEDF9ADF0F2EF0E0EB
S1130260EF2EF1E0FF2EF02D8E010F5F1F4F369A17
S11302703699FECF85B184B185B11F928F93FF92D9
S1130280EF921F930F930FD0B80180E090E060DFEE
S113029088EB9BE0BFDF77DF0F900F900F900F90FC
S11302A00F900F90E4CF0F931F93CF93DF93CDB7AD
S11302B0DEB72E970FB6F894DEBF0FBECDBF0D8903
S11302C01E8986E08C831A8309838FEF9FE79E83C0
S11302D08D83AE01475E5F4F6F89788DCE010196A5
S11302E011D02F813885F801E20FF31F10822E966A
S11302F00FB6F894DEBF0FBECDBFDF91CF911F9133
S11303000F9108952F923F924F925F926F927F9236
S11303108F929F92AF92BF92CF92DF92EF92FF9211
S11303200F931F93CF93DF93CDB7DEB72C970FB600
S1130330F894DEBF0FBECDBF7C016B018A01FC01C6
S113034017821682838181FFB0C1CE0101964C01D0
S1130350F7019381F60193FD859193FF81916F01DC
S1130360882309F49EC1853239F493FD859193FF66
S113037081916F01853221F4B70190E0C7D1E8CFB4
S1130380512C312C20E02032A0F48B3269F030F46F
S1130390803259F0833269F420612CC08D3239F0F7
S11303A0803339F4216026C02260246023C0286091
S11303B021C027FD27C030ED380F3A3078F426FFEE
S11303C006C0FAE05F9E300D1124532E13C08AE05C
S11303D0389E300D1124332E20620CC08E3221F44D
S11303E026FD5FC1206406C08C3611F4206802C06B
S11303F0883641F4F60193FD859193FF81916F0155
S11304008111C1CF982F9F7D9554933028F40C5FB0
S11304101F4FFFE3F9830DC0833631F0833771F04A
S1130420833509F057C021C0F801808189830E5FAC
S11304301F4F44244394512C540114C03801F2E05A
S11304406F0E711CF801A080B18026FF03C0652DDA
S113045070E002C06FEF7FEFC5012C874CD12C01F7
S113046083012C852F77222E16C03801F2E06F0EFF
S1130470711CF801A080B18026FF03C0652D70E0D7
S113048002C06FEF7FEFC5012C872AD12C012C8588
S11304902068222E830123FC19C0832D90E0481686
S11304A05906A0F4B70180E290E030D13A94F5CF38
S11304B0F50127FC859127FE81915F01B70190E04A
S11304C025D131103A94F1E04F1A510841145104E6
S11304D079F7DEC0843611F0893631F5F80127FF4B
S11304E007C060817181828193810C5F1F4F08C0B6
S11304F060817181072E000C880B990B0E5F1F4FD2
S11305002F76722E97FF09C090958095709561950E
S11305107F4F8F4F9F4F2068722E2AE030E0A40156
S11305202DD1A82EA81843C0853729F42F7EB22ECA
S11305302AE030E025C0F22FF97FBF2E8F36C1F0BC
S113054018F4883579F0ADC0803719F0883721F078
S1130550A8C02F2F2061B22EB4FE0DC08B2D846055
S1130560B82E09C024FF0AC09F2F9660B92E06C07A
S113057028E030E005C020E130E002C020E132E0B4
S1130580F801B7FE07C060817181828193810C5F9D
S11305901F4F06C06081718180E090E00E5F1F4FA5
S11305A0A401ECD0A82EA818FB2DFF777F2E76FE91
S11305B00BC0372D3E7FA51450F474FE0AC072FCA4
S11305C008C0372D3E7E05C0BA2C372D03C0BA2C87
S11305D001C0B52C34FF0DC0FE01EA0DF11D808170
S11305E0803311F4397E09C032FF06C0B394B3944A
S11305F004C0832F867809F0B39433FD12C030FF12
S113060006C05A2CB31418F4530C5B18B32CB3144F
S113061060F4B70180E290E03C8778D0B3943C85E5
S1130620F6CFB31410F43B1801C0312C34FF11C0C1
S1130630B70180E390E03C8769D03C8532FF16C067
S113064031FD03C088E790E002C088E590E0B7017F
S11306500CC0832F867851F031FF02C08BE201C0B9
S113066080E237FD8DE2B70190E050D0A51430F45C
S1130670B70180E390E04AD05A94F8CFAA94F401E9
S1130680EA0DF11D8081B70190E040D0A110F6CFB2
S1130690332009F45DCEB70180E290E037D03A947C
S11306A0F7CFF7018681978102C08FEF9FEF2C96D9
S11306B00FB6F894DEBF0FBECDBFDF91CF911F916F
S11306C00F91FF90EF90DF90CF90BF90AF909F90ED
S11306D08F907F906F905F904F903F902F900895F0
S11306E0FC010590615070400110D8F780959095F9
S11306F08E0F9F1F0895FC016150704001900110FE
S1130700D8F7809590958E0F9F1F08950F931F9390
S1130710CF93DF93FB01238121FD03C08FEF9FEF74
S113072028C022FF16C04681578124813581421793
S1130730530744F4A081B1819D012F5F3F4F318362
S113074020838C93268137812F5F3F4F3783268305
S113075010C0EB01092F182F0084F185E02D0995B5
S1130760892BE1F68E819F8101969F838E83812F51
S1130770902FDF91CF911F910F910895FA01AA272D
S1130780283051F1203181F1E8946F936E7F6E5FD0
S11307907F4F8F4F9F4FAF4FB1E03ED0B4E03CD07E
S11307A0670F781F891F9A1FA11D680F791F8A1F61
S11307B0911DA11D6A0F711D811D911DA11D20D0C8
S11307C009F468943F912AE0269F11243019305D82
S11307D03193DEF6CF010895462F4770405D419373
S11307E0B3E00FD0C9F7F6CF462F4F70405D4A33C0
S11307F018F0495D31FD4052419302D0A9F7EACF88
S1130800B4E0A6959795879577956795BA95C9F7B6
S113081000976105710508959B01AC010A2E0694A9
S11308205795479537952795BA95C9F7620F731F62
S10F0830841F951FA01D0895F894FFCFAD
S107083C256400002B
S1130090CFEFD0E1DEBFCDBF11E0A0E0B1E0E2E3FD
S11300A0F2E000E00BBF02C007900D92A030B10750
S11300B0D9F721E0A0E0B1E001C01D92A030B20761
S11300C0E1F7B4D0B4C09CCF181619066CF420E044
S11300D030E0EFECF7E03197F1F700C000002F5F5C
S11300E03F4F28173907A9F708951BBC1ABC19BC40
S11300F018BC109279001092780089EA8FBD8BE0C9
S11301008EBD08958FEF87BBF0DF84E690E0DCDFDF
S11301101BBC1ABC109279001092780019BC18BC50
S1130120C0E0D0E0EE24E394F12CCE0199279BBDEE
S11301308ABD82E0E80EF11C84E690E0C5DFCE0DB6
S1130140DF1DCF3FD10589F384F3CC24C394D12C94
S1130150C1E0D0E0812C912C0F2EF8E7AF2EB12C0A
S1130160F02D77247A94612C082D192DC801992734
S113017099BD88BD229684E690E0A6DF0C0F1D1F72
S11301800F3F110599F394F3082D192DC8019927F0
S1130190F50191838083F2E0CF0ED11C84E690E0D8
S11301A093DF0C0D1D1D0F3F110581F37CF3072D0B
S11301B0162DC80199279BBD8ABD82E0E81AF10873
S11301C084E690E081DF0E191F099AF7072D162D9A
S11301D0C801992799BD88BD229784E690E074DF11
S11301E00C1B1D0BAAF7082D192DC80199279BBDBF
S11301F08ABDE2E0EE0EF11C84E690E065DF0E0DB0
S11302001F1D0F3F110589F384F3072D162DC80117
S11302109927F50191838083F2E0CF1AD10884E60F
S113022090E052DF0C191D0992F79ECF6BDFF89412
S1050230FFCFFA
S9030000FC
+76 -51
View File
@@ -79,29 +79,56 @@ void adcInitFree( void )
void adcInitPoll( void )
{
ADMUX = 0b01100001; // AREF=2,56 V, result left adjusted, channel1 at pin PF1
ADMUX = 0b11100001; // AREF=2,56 V, result left adjusted, channel1 at pin PF1
ADCSRA = 0b10000110; // ADC-enable, no interrupt, no free running, division by 64
}
int main( void )
{
//OpgaveB22();
OpgaveB23();
//OpgaveB31();
//OpgaveB32();
//OpgaveB33();
}
int OpgaveB31( void )
{
DDRF = 0x00;
DDRA = 0xFF;
DDRB = 0xFF;
adcInitFree();
while(1)
{
PORTA = ADCH;
PORTB = ADCL;
wait(10);
}
}
int OpgaveB33( void )
{
DDRF = 0x00;
adcInitPoll();
lcd_init();
unsigned char data;
char l1[8];
char l1[6];
while(1)
{
ADCSRA |= BIT(6); // Start ADC
while ( ADCSRA & BIT(6) ) ; // Wait for completion
data = ADCH;
data = (data<<2) | ADCL;
sprintf(l1, "%d", ADCH);
display_text(0, l1);
@@ -109,12 +136,11 @@ int main( void )
clear_display();
}
}
// Main program: Counting on T1
int somemain( void )
int OpgaveB32( void )
{
DDRB = 0xFF;
DDRF = 0x00; // set PORTF for input (ADC)
@@ -144,22 +170,18 @@ int setWithButton(void)
}
}
int alleKleuren(void)
int OpgaveB23(void)
{
DDRB = 0xFF; // set PORTB for compare output
timer1Init();
wait(100);
;
while (1)
{
int delta1 = 1;
int delta2 = 1;
int delta = 1;
setRed (0);
setBlue(0);
setGreen(0);
int delta1 = 1;
int delta2 = 1;
int delta = 1;
setRed (0);
setBlue(0);
setGreen(0);
for (int red = 0; red<=255; red+=delta)
{
@@ -168,33 +190,36 @@ int alleKleuren(void)
wait(100); // delay of 100 ms (busy waiting)
}
for (int green = 0; green<=255; green+=delta1)
while (1)
{
setGreen( green ); // 8-bits PWM on pin OCR1a
delta1 += 2; // progressive steps up
wait(100); // delay of 100 ms (busy waiting)
}
for (int blue = 0; blue<=255; blue+=delta2)
{
setBlue( blue ); // 8-bits PWM on pin OCR1a
delta2 += 2; // progressive steps up
wait(100); // delay of 100 ms (busy waiting)
}
for (int green = 0; green<=255; green+=delta1)
{
setGreen( green ); // 8-bits PWM on pin OCR1a
delta1 += 2; // progressive steps up
wait(100); // delay of 100 ms (busy waiting)
}
for (int red = 255; red>=0; red-=delta)
{
setRed( red ); // 8-bits PWM on pin OCR1a
delta -= 2; // progressive steps down
wait(100); // delay of 100 ms (busy waiting)
}
for (int blue = 0; blue<=255; blue+=delta2)
{
setBlue( blue ); // 8-bits PWM on pin OCR1a
delta2 += 2; // progressive steps up
wait(100); // delay of 100 ms (busy waiting)
}
for (int green = 255; green>=0; green-=delta1)
{
setGreen( green ); // 8-bits PWM on pin OCR1a
delta1 -= 2; // progressive steps up
wait(100); // delay of 100 ms (busy waiting)
}
for (int red = 255; red>=0; red-=delta)
{
setRed( red ); // 8-bits PWM on pin OCR1a
delta -= 2; // progressive steps down
wait(100); // delay of 100 ms (busy waiting)
}
for (int green = 255; green>=0; green-=delta1)
{
setGreen( green ); // 8-bits PWM on pin OCR1a
delta1 -= 2; // progressive steps up
wait(100); // delay of 100 ms (busy waiting)
}
for (int red = 0; red<=255; red+=delta)
{
@@ -203,18 +228,18 @@ int alleKleuren(void)
wait(100); // delay of 100 ms (busy waiting)
}
for (int blue = 255; blue>=0; blue-=delta2)
{
setBlue( blue ); // 8-bits PWM on pin OCR1a
delta2 -= 2; // progressive steps up
wait(100); // delay of 100 ms (busy waiting)
}
for (int blue = 255; blue>=0; blue-=delta2)
{
setBlue( blue ); // 8-bits PWM on pin OCR1a
delta2 -= 2; // progressive steps up
wait(100); // delay of 100 ms (busy waiting)
}
}
}
// Main program: Counting on T1
int opgaveextra( void )
int OpgaveB22( void )
{
DDRB = 0xFF; // set PORTB for compare output
timer1Init();