From e4a14ccaa981dfd1db8824c97028849160b9bb30 Mon Sep 17 00:00:00 2001 From: JohnD Date: Thu, 28 Feb 2019 16:10:10 +0100 Subject: [PATCH] Init --- .gitignore | 31 +++++ .tfignore | 1 + Geigerzaehler/Geigerzaehler.componentinfo.xml | 86 ++++++++++++ Geigerzaehler/Geigerzaehler.cproj | 128 ++++++++++++++++++ Geigerzaehler/main.c | 45 ++++++ 5 files changed, 291 insertions(+) create mode 100644 .gitignore create mode 100644 .tfignore create mode 100644 Geigerzaehler/Geigerzaehler.componentinfo.xml create mode 100644 Geigerzaehler/Geigerzaehler.cproj create mode 100644 Geigerzaehler/main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd34986 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +Thumbs.db +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.sln.docstates +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +*.vssscc +$tf*/ +*.atsln +.vs/ \ No newline at end of file diff --git a/.tfignore b/.tfignore new file mode 100644 index 0000000..e37a9f1 --- /dev/null +++ b/.tfignore @@ -0,0 +1 @@ +\.git \ No newline at end of file diff --git a/Geigerzaehler/Geigerzaehler.componentinfo.xml b/Geigerzaehler/Geigerzaehler.componentinfo.xml new file mode 100644 index 0000000..fbb3063 --- /dev/null +++ b/Geigerzaehler/Geigerzaehler.componentinfo.xml @@ -0,0 +1,86 @@ + + + + + + + Device + Startup + + + Atmel + 1.2.0 + C:/Program Files (x86)\Atmel\Studio\7.0\Packs + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\include + + include + C + + + include + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\include\avr\iom328p.h + + header + C + UMk4QUzkkuShabuoYtNl/Q== + + include/avr/iom328p.h + + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\templates\main.c + template + source + C Exe + rilelfmGXRUOgmv1HcJt6g== + + templates/main.c + Main file (.c) + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\templates\main.cpp + template + source + C Exe + YXFphlh0CtZJU+ebktABgQ== + + templates/main.cpp + Main file (.cpp) + + + + C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p + + libraryPrefix + GCC + + + gcc/dev/atmega328p + + + + + ATmega_DFP + C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.2.209/Atmel.ATmega_DFP.pdsc + 1.2.209 + true + ATmega328P + + + + Resolved + Fixed + true + + + \ No newline at end of file diff --git a/Geigerzaehler/Geigerzaehler.cproj b/Geigerzaehler/Geigerzaehler.cproj new file mode 100644 index 0000000..63675f9 --- /dev/null +++ b/Geigerzaehler/Geigerzaehler.cproj @@ -0,0 +1,128 @@ + + + + 2.0 + 7.0 + com.Atmel.AVRGCC8.C + dce6c7e3-ee26-4d79-826b-08594b9ad897 + ATmega328P + none + Executable + C + $(MSBuildProjectName) + .elf + $(MSBuildProjectDirectory)\$(Configuration) + Geigerzaehler + Geigerzaehler + Geigerzaehler + Native + true + false + true + true + + + true + + 2 + 0 + 0 + + + + + + + + + + + + + + + + + + -mmcu=atmega328p -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p" + True + True + True + True + False + True + True + + + NDEBUG + + + + + %24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\include + + + Optimize for size (-Os) + True + True + True + + + libm + + + + + %24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\include + + + + + + + + + -mmcu=atmega328p -B "%24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\gcc\dev\atmega328p" + True + True + True + True + False + True + True + + + DEBUG + + + + + %24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\include + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + + + %24(PackRepoDir)\atmel\ATmega_DFP\1.2.209\include + + + Default (-Wa,-g) + + + + + + compile + + + + \ No newline at end of file diff --git a/Geigerzaehler/main.c b/Geigerzaehler/main.c new file mode 100644 index 0000000..3d6ffac --- /dev/null +++ b/Geigerzaehler/main.c @@ -0,0 +1,45 @@ +/* + * geigerzaehler.main.c.c + * + * Created: 28.02.2019 09:07:22 + * Author : John_Ditgens + */ +#define F_CPU ...UL // Taktfrequenz (...)Hz + +#include +#include + +// Todo: Clock speed missing + +int main(void) +{ + DDRD &= ~(1<<2); // Eingang PD2 + DDRD &= ~(1<<3); // Eingang PD3 + + PORTD |= (1<<2); // Enable Pull Up Resistor Pin D2 + PORTD |= (1<<3); // Enable Pull Up Resistor Pin D3 + + EICRA |= (1 << ISC01)|(1 << ISC00); + EIMSK |= (1 << INT0); + + EICRA |= (1 << ISC11)|(1 << ISC10); + EIMSK |= (1 <