diff --git a/Beleuchtung/BackupFiles/Beleuchtung - Kopie.T3000A b/Beleuchtung/BackupFiles/Beleuchtung - Kopie.T3000A
new file mode 100644
index 0000000..6a990fd
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung - Kopie.T3000A differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung.BK1 b/Beleuchtung/BackupFiles/Beleuchtung.BK1
new file mode 100644
index 0000000..cd2cd9a
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung.BK1 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung.BK2 b/Beleuchtung/BackupFiles/Beleuchtung.BK2
new file mode 100644
index 0000000..ce1336b
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung.BK2 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung.BK3 b/Beleuchtung/BackupFiles/Beleuchtung.BK3
new file mode 100644
index 0000000..bb23116
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung.BK3 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung.BK4 b/Beleuchtung/BackupFiles/Beleuchtung.BK4
new file mode 100644
index 0000000..bbb0455
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung.BK4 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung.BK5 b/Beleuchtung/BackupFiles/Beleuchtung.BK5
new file mode 100644
index 0000000..8465dcc
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung.BK5 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung.T3000A b/Beleuchtung/BackupFiles/Beleuchtung.T3000A
new file mode 100644
index 0000000..1f53076
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung.T3000A differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung.T3000B b/Beleuchtung/BackupFiles/Beleuchtung.T3000B
new file mode 100644
index 0000000..2cd65f0
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung.T3000B differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung.T3000C b/Beleuchtung/BackupFiles/Beleuchtung.T3000C
new file mode 100644
index 0000000..05a117d
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung.T3000C differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK1 b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK1
new file mode 100644
index 0000000..2be9c8c
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK1 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK2 b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK2
new file mode 100644
index 0000000..bcdabb1
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK2 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK3 b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK3
new file mode 100644
index 0000000..75348af
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK3 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK4 b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK4
new file mode 100644
index 0000000..e301208
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK4 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK5 b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK5
new file mode 100644
index 0000000..da7e497
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.BK5 differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000A b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000A
new file mode 100644
index 0000000..bc15c52
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000A differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000B b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000B
new file mode 100644
index 0000000..f3f4d3c
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000B differ
diff --git a/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000C b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000C
new file mode 100644
index 0000000..5a79ac9
Binary files /dev/null and b/Beleuchtung/BackupFiles/Beleuchtung_Resistor.T3000C differ
diff --git a/Beleuchtung/Beleuchtung.T3000 b/Beleuchtung/Beleuchtung.T3000
new file mode 100644
index 0000000..89f6d9f
Binary files /dev/null and b/Beleuchtung/Beleuchtung.T3000 differ
diff --git a/Beleuchtung/Beleuchtung/Beleuchtung.aps b/Beleuchtung/Beleuchtung/Beleuchtung.aps
new file mode 100644
index 0000000..ee4aadb
--- /dev/null
+++ b/Beleuchtung/Beleuchtung/Beleuchtung.aps
@@ -0,0 +1 @@
+Beleuchtung29-Jun-2012 19:04:4801-Jul-2012 23:09:24241029-Jun-2012 19:04:4844, 19, 0, 730AVR GCCdefault\Beleuchtung.elfD:\Doc's\Basteleien\Beleuchtung\Beleuchtung\JTAGICE mkIIATtiny24falseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31USB200Beleuchtung.cdefault\Beleuchtung.lssdefault\Beleuchtung.mapdefaultNOattiny2411
Beleuchtung.elfdefault\0-Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enumsdefault1E:\Programme\AVR Toolchain\bin\avr-gcc.exeE:\Programme\AVR Toolchain\bin\make.exe00000Beleuchtung.c1
diff --git a/Beleuchtung/Beleuchtung/Beleuchtung.c b/Beleuchtung/Beleuchtung/Beleuchtung.c
new file mode 100644
index 0000000..735a389
--- /dev/null
+++ b/Beleuchtung/Beleuchtung/Beleuchtung.c
@@ -0,0 +1,271 @@
+#include
+#include
+
+#define L_NORM PA0
+#define L_HORN PA1
+#define L_DAYL PA2
+#define B_LEFT PA3
+#define B_RIGH PA4
+#define R_NORM PA5
+#define R_BREK PA6
+#define R_TBRK PA7
+
+// L_NORM L_HORN L_DAYL B_LEFT B_RIGH R_NORM R_BREK R_TBRK
+volatile uint8_t ofdim[8] = { 40, 10, 10, 1, 1, 10, 5, 5};
+volatile uint8_t ofdis[8] = { 0, 0, 0, 0, 0, 0, 0, 0};
+volatile uint8_t ondim[8] = { 15, 5, 4, 10, 10, 2, 40, 40};
+volatile uint8_t ondis[8] = { 0, 0, 0, 0, 0, 0, 0, 0};
+volatile uint8_t bltia[8] = { 0, 0, 0, 40, 40, 0, 0, 100};
+volatile uint8_t bltib[8] = { 0, 0, 0, 30, 30, 0, 0, 1};
+volatile uint8_t bltis[8] = { 0, 0, 0, 0, 0, 0, 0, 0};
+volatile uint8_t bltit[8] = { 0, 0, 0, 0, 0, 0, 0, 0};
+
+volatile uint8_t isson = 0b00000000;
+volatile uint8_t trfla = 0b00000000;
+
+// PB1 PB2 PB3
+volatile uint8_t servo[3] = { 5, 5, 5};
+volatile uint8_t servc[3] = { 0, 0, 0};
+//volatile uint8_t servi[3] = { 0, 0, 0};
+//volatile uint8_t servt[3] = { 0, 0, 0};
+
+volatile uint8_t seton = 0b00000000;
+volatile uint8_t blink = 0b00000000;
+
+void dimmen(uint8_t i) {
+ if(seton & (1<= 5) {
+ servo[i] = servt[i];
+ servt[i] = 0;
+ servi[i] = 0;
+ } else {
+ servi[i]++;
+ }
+ }
+ }
+ }
+}*/
+void verarbeitung() {
+ if(servo[0] >= 50 && servo[0] < 60) {
+ ofdim[0] = 8;
+ ondim[0] = 3;
+ ofdim[1] = 8;
+ ondim[1] = 3;
+ seton |= ((1<= 60) {
+ ofdim[0] = 1;
+ ondim[0] = 20;
+ ofdim[1] = 1;
+ ondim[1] = 20;
+ seton |= ((1<= 50){
+ if(!(blink & (1< 34) {
+ blink &= ~((1< 34) {
+ seton |= ((1<
+#include
+
+
+
+
+#define OUTPUT_PORT PORTB
+#define OUTPUT_DDR DDRB
+
+#define LIGHT_FRONT 0
+#define LIGHT_FOG 1
+#define LIGHT_FAR 2
+#define LIGHT_SIGN_L 3
+#define LIGHT_SIGN_R 4
+#define LIGHT_BACK 5
+#define LIGHT_BRAKE 6
+#define LIGHT_BRAKE_M 7
+
+
+#define MODE_OFF (0<<0)
+#define MODE_ON (1<<0)
+#define MODE_BLINK (1<<2)
+
+
+
+#define BLINK_SPEED 32 //lower is faster: range 0..255 //where 0 is longer than 255!!!
+
+
+volatile uint8_t lightModes[8] = {MODE_OFF, MODE_OFF, MODE_OFF, MODE_OFF | MODE_BLINK, MODE_OFF | MODE_BLINK, MODE_OFF, MODE_OFF, MODE_OFF};
+volatile uint8_t lightValue[8] = {255, 255, 255, 255, 255, 255, 32, 255};
+volatile uint8_t timeCounter = 0;
+volatile uint8_t blinkCounter = 0;
+volatile uint8_t blinker = 0;
+
+
+void updateOutput()
+{
+ uint8_t outputState = 0;
+
+ for(uint8_t i = 0; i < 8; i++) //go through all 8 lights
+ {
+ if(lightModes[i] & MODE_ON)
+ {
+ if(lightModes[i] & MODE_BLINK)
+ {
+ if(blinker)
+ {
+ outputState |= (lightValue[i] >= timeCounter) << i;
+ }
+ }
+ else
+ {
+ outputState |= (lightValue[i] >= timeCounter) << i;
+ }
+ }
+ }
+
+ OUTPUT_PORT = outputState;
+ //OUTPUT_PORT = 1;
+}
+
+
+
+ISR(TIM0_OVF_vect)
+{
+ timeCounter++;
+ if(timeCounter == 0) //overflow
+ {
+ blinkCounter++;
+ if(blinkCounter == BLINK_SPEED) //when blink-speed steps are reached
+ {
+ blinker = 1-blinker; //toggle blinker-state
+ blinkCounter = 0;
+ }
+ }
+
+ updateOutput();
+}
+
+
+
+void setUpDimmer()
+{
+ OUTPUT_DDR = 255; //set all bits to output
+ OUTPUT_PORT = 0; //set all zero
+
+ //TCCR0B |= (1<
diff --git a/Beleuchtung/Beleuchtung/default/Makefile b/Beleuchtung/Beleuchtung/default/Makefile
new file mode 100644
index 0000000..d82bc6d
--- /dev/null
+++ b/Beleuchtung/Beleuchtung/default/Makefile
@@ -0,0 +1,77 @@
+###############################################################################
+# Makefile for the project Beleuchtung
+###############################################################################
+
+## General Flags
+PROJECT = Beleuchtung
+MCU = atxmega16a4
+TARGET = Beleuchtung.elf
+CC = avr-gcc
+
+CPP = avr-g++
+
+## Options common to compile, link and assembly rules
+COMMON = -mmcu=$(MCU)
+
+## Compile options common for all C compilation units.
+CFLAGS = $(COMMON)
+CFLAGS += -Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
+CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
+
+## Assembly specific flags
+ASMFLAGS = $(COMMON)
+ASMFLAGS += $(CFLAGS)
+ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2
+
+## Linker flags
+LDFLAGS = $(COMMON)
+LDFLAGS += -Wl,-Map=Beleuchtung.map
+
+
+## Intel Hex file production flags
+HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature
+
+HEX_EEPROM_FLAGS = -j .eeprom
+HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load"
+HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings
+
+
+## Objects that must be built in order to link
+OBJECTS = Beleuchtung.o
+
+## Objects explicitly added by the user
+LINKONLYOBJECTS =
+
+## Build
+all: $(TARGET) Beleuchtung.hex Beleuchtung.eep Beleuchtung.lss size
+
+## Compile
+Beleuchtung.o: ../Beleuchtung.c
+ $(CC) $(INCLUDES) $(CFLAGS) -c $<
+
+##Link
+$(TARGET): $(OBJECTS)
+ $(CC) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET)
+
+%.hex: $(TARGET)
+ avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@
+
+%.eep: $(TARGET)
+ -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0
+
+%.lss: $(TARGET)
+ avr-objdump -h -S $< > $@
+
+size: ${TARGET}
+ @echo
+ @avr-size -C --mcu=${MCU} ${TARGET}
+
+## Clean target
+.PHONY: clean
+clean:
+ -rm -rf $(OBJECTS) Beleuchtung.elf dep/* Beleuchtung.hex Beleuchtung.eep Beleuchtung.lss Beleuchtung.map
+
+
+## Other dependencies
+-include $(shell mkdir dep 2>NUL) $(wildcard dep/*)
+
diff --git a/Beleuchtung/Beleuchtung/default/dep/.gitignore b/Beleuchtung/Beleuchtung/default/dep/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/Beleuchtung/Beleuchtung_Resistor-Bestückung-Oben.TIF b/Beleuchtung/Beleuchtung_Resistor-Bestückung-Oben.TIF
new file mode 100644
index 0000000..29185db
Binary files /dev/null and b/Beleuchtung/Beleuchtung_Resistor-Bestückung-Oben.TIF differ
diff --git a/Beleuchtung/Beleuchtung_Resistor-Bestückung-Unten.TIF b/Beleuchtung/Beleuchtung_Resistor-Bestückung-Unten.TIF
new file mode 100644
index 0000000..0e1c0cb
Binary files /dev/null and b/Beleuchtung/Beleuchtung_Resistor-Bestückung-Unten.TIF differ
diff --git a/Beleuchtung/Beleuchtung_Resistor-Platine-Unten.TIF b/Beleuchtung/Beleuchtung_Resistor-Platine-Unten.TIF
new file mode 100644
index 0000000..f1768a0
Binary files /dev/null and b/Beleuchtung/Beleuchtung_Resistor-Platine-Unten.TIF differ
diff --git a/Beleuchtung/Beleuchtung_Resistor.T3000 b/Beleuchtung/Beleuchtung_Resistor.T3000
new file mode 100644
index 0000000..219957a
Binary files /dev/null and b/Beleuchtung/Beleuchtung_Resistor.T3000 differ
diff --git a/Beleuchtung/Transistor.ms11 b/Beleuchtung/Transistor.ms11
new file mode 100644
index 0000000..85ec8ca
Binary files /dev/null and b/Beleuchtung/Transistor.ms11 differ
diff --git a/Beleuchtung/leds.txt b/Beleuchtung/leds.txt
new file mode 100644
index 0000000..b225728
--- /dev/null
+++ b/Beleuchtung/leds.txt
@@ -0,0 +1,10 @@
+F_norm 2 Warm Weiß 30mA 3,8V (8cd) 22Ohm
+F_lighthorn 2 Weiß 25mA 3,5V (25cd) 33Ohm
+F_Fog 2 weiß 25mA 3,5V (5,5cd) 33Ohm
+
+B_left 3 gelb 20mA 2,1V 56Ohm
+B_right 3 gelb 20mA 2,1V 56Ohm
+
+R_norm 2 rot 20mA 2,0V 82Ohm
+R_Break 2 rot 20mA 2,0V 82Ohm
+R_3break 3 rot 20mA 2,0V 56Ohm
\ No newline at end of file