Deleted Schmutz, added new Version

This commit is contained in:
Max Braungardt 2018-03-16 05:30:47 +01:00
parent 5a459ebdaf
commit 8457a756a6
10 changed files with 1111 additions and 862 deletions

View File

@ -22,48 +22,6 @@ X ~ 3 300 0 200 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CEAE2594M-5.0
#
DEF CEAE2594M-5.0 U 0 40 Y Y 1 F N
F0 "U" 0 -150 60 H V C CNN
F1 "CEAE2594M-5.0" 0 300 60 H V C CNN
F2 "" -50 0 60 H V C CNN
F3 "" -50 0 60 H V C CNN
DRAW
S -250 200 250 -200 0 1 0 N
X NC 1 -450 150 200 R 50 50 1 1 N
X NC 2 -450 50 200 R 50 50 1 1 N
X NC 3 -450 -50 200 R 50 50 1 1 N
X FB 4 -450 -150 200 R 50 50 1 1 I
X ~EN 5 450 -150 200 L 50 50 1 1 I
X GND 6 450 -50 200 L 50 50 1 1 W
X VCC 7 450 50 200 L 50 50 1 1 W
X OUT 8 450 150 200 L 50 50 1 1 O
ENDDRAW
ENDDEF
#
# CONN_02X01
#
DEF CONN_02X01 P 0 1 Y N 1 F N
F0 "P" 0 100 50 H V C CNN
F1 "CONN_02X01" 0 -100 50 H V C CNN
F2 "" 0 -1200 50 H V C CNN
F3 "" 0 -1200 50 H V C CNN
$FPLIST
Pin_Header_Straight_2X01
Pin_Header_Angled_2X01
Socket_Strip_Straight_2X01
Socket_Strip_Angled_2X01
$ENDFPLIST
DRAW
S -100 5 -50 -5 0 1 0 N
S -100 50 100 -50 0 1 0 N
S 50 5 100 -5 0 1 0 N
X P1 1 -250 0 150 R 50 50 1 1 P
X P2 2 250 0 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CONN_02X02
#
DEF CONN_02X02 P 0 1 Y N 1 F N
@ -90,6 +48,44 @@ X P4 4 250 -50 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CONN_02X05
#
DEF CONN_02X05 P 0 1 Y N 1 F N
F0 "P" 0 300 50 H V C CNN
F1 "CONN_02X05" 0 -300 50 H V C CNN
F2 "" 0 -1200 50 H V C CNN
F3 "" 0 -1200 50 H V C CNN
$FPLIST
Pin_Header_Straight_2X05
Pin_Header_Angled_2X05
Socket_Strip_Straight_2X05
Socket_Strip_Angled_2X05
$ENDFPLIST
DRAW
S -100 -195 -50 -205 0 1 0 N
S -100 -95 -50 -105 0 1 0 N
S -100 5 -50 -5 0 1 0 N
S -100 105 -50 95 0 1 0 N
S -100 205 -50 195 0 1 0 N
S -100 250 100 -250 0 1 0 N
S 50 -195 100 -205 0 1 0 N
S 50 -95 100 -105 0 1 0 N
S 50 5 100 -5 0 1 0 N
S 50 105 100 95 0 1 0 N
S 50 205 100 195 0 1 0 N
X P1 1 -250 200 150 R 50 50 1 1 P
X P2 2 250 200 150 L 50 50 1 1 P
X P3 3 -250 100 150 R 50 50 1 1 P
X P4 4 250 100 150 L 50 50 1 1 P
X P5 5 -250 0 150 R 50 50 1 1 P
X P6 6 250 0 150 L 50 50 1 1 P
X P7 7 -250 -100 150 R 50 50 1 1 P
X P8 8 250 -100 150 L 50 50 1 1 P
X P9 9 -250 -200 150 R 50 50 1 1 P
X P10 10 250 -200 150 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# CP
#
DEF CP C 0 10 N Y 1 F N
@ -131,23 +127,6 @@ X GND 1 0 0 0 D 50 50 1 1 W N
ENDDRAW
ENDDEF
#
# INDUCTOR_SMALL
#
DEF INDUCTOR_SMALL L 0 0 N N 1 F N
F0 "L" 0 100 50 H V C CNN
F1 "INDUCTOR_SMALL" 0 -50 50 H V C CNN
F2 "" 0 0 50 H V C CNN
F3 "" 0 0 50 H V C CNN
DRAW
A -150 0 50 1 1799 0 1 0 N -100 0 -200 0
A -50 0 50 1 1799 0 1 0 N 0 0 -100 0
A 50 0 50 1 1799 0 1 0 N 100 0 0 0
A 150 0 50 1 1799 0 1 0 N 200 0 100 0
X 1 1 -250 0 50 R 30 30 1 1 I
X 2 2 250 0 50 L 30 30 1 1 I
ENDDRAW
ENDDEF
#
# IRF7309IPBF
#
DEF IRF7309IPBF Q 0 0 Y Y 2 L N
@ -192,6 +171,24 @@ X D 6 100 200 100 D 50 50 2 1 P
ENDDRAW
ENDDEF
#
# LM1084IT-ADJ/NOPB
#
DEF LM1084IT-ADJ/NOPB U 0 40 Y Y 1 F N
F0 "U" 200 -200 50 H V C CNN
F1 "LM1084IT-ADJ/NOPB" -300 200 50 H V L CNN
F2 "TO-220" 0 100 50 H V C CIN
F3 "" 0 0 50 H V C CNN
$FPLIST
TO*
$ENDFPLIST
DRAW
S -250 150 250 -150 0 1 10 f
X ADJ 1 0 -250 100 U 40 40 1 1 I
X OUT 2 400 50 150 L 40 40 1 1 w
X IN 3 -400 50 150 R 40 40 1 1 I
ENDDRAW
ENDDEF
#
# PWR_FLAG
#
DEF PWR_FLAG #FLG 0 0 N N 1 F P

File diff suppressed because it is too large Load Diff

View File

@ -11,25 +11,25 @@
(via_costs 50)
(plane_via_costs 5)
(start_ripup_costs 100)
(start_pass_no 118)
(start_pass_no 290)
(layer_rule F.Cu
(active on)
(preferred_direction vertical)
(preferred_direction_trace_costs 1.0)
(against_preferred_direction_trace_costs 2.4)
(against_preferred_direction_trace_costs 2.2)
)
(layer_rule B.Cu
(active off)
(preferred_direction horizontal)
(preferred_direction_trace_costs 1.0)
(against_preferred_direction_trace_costs 1.7)
(against_preferred_direction_trace_costs 1.9)
)
)
(rule
(width 250.0)
(clear 200.2)
(clear 125.0 (type smd_to_turn_gap))
(clear 50.0 (type smd_smd))
(width 400.0)
(clear 400.2)
(clear 200.0 (type smd_to_turn_gap))
(clear 100.0 (type smd_smd))
)
(padstack "Via[0-1]_600:400_um"
(shape
@ -56,19 +56,18 @@
(clearance_class default)
(via_rule default)
(rule
(width 250.0)
(width 400.0)
)
(circuit
(use_layer F.Cu B.Cu)
)
)
(class "kicad_default"
"Net-(C1-Pad1)" GND "Net-(C2-Pad1)" "Net-(D1-Pad2)" "Net-(D2-Pad1)" VCC "Net-(U1-Pad1)" "Net-(U1-Pad2)"
"Net-(U1-Pad3)"
"Net-(C1-Pad1)" GND "Net-(C2-Pad1)" "Net-(D1-Pad2)" VCC "Net-(R2-Pad1)" "Net-(R2-Pad2)" "Net-(R3-Pad2)"
(clearance_class "kicad_default")
(via_rule kicad_default)
(rule
(width 250.0)
(width 400.0)
)
(circuit
(use_layer F.Cu B.Cu)

View File

@ -45,17 +45,6 @@ Comment3 ""
Comment4 ""
$EndDescr
$Comp
L CEAE2594M-5.0 U1
U 1 1 5AA1A538
P 4300 3100
F 0 "U1" H 4300 2950 60 0000 C CNN
F 1 "CEAE2594M-5.0" H 4300 3400 60 0000 C CNN
F 2 "Power_Integrations:SO-8" H 4250 3100 60 0001 C CNN
F 3 "" H 4250 3100 60 0000 C CNN
1 4300 3100
0 1 1 0
$EndComp
$Comp
L IRF7309IPBF Q1
U 2 1 5AA1A8CA
P 2600 2700
@ -78,17 +67,6 @@ F 3 "" H 3150 2800 50 0000 C CNN
0 1 1 0
$EndComp
$Comp
L ZENER D2
U 1 1 5AA1A9EA
P 5150 3400
F 0 "D2" H 5150 3500 50 0000 C CNN
F 1 "ZDP5.1" H 5150 3300 50 0000 C CNN
F 2 "Diodes_ThroughHole:Diode_DO-35_SOD27_Horizontal_RM10" H 5150 3400 50 0001 C CNN
F 3 "" H 5150 3400 50 0000 C CNN
1 5150 3400
0 -1 1 0
$EndComp
$Comp
L R R1
U 1 1 5AA1AA56
P 2850 3350
@ -110,63 +88,8 @@ F 3 "" H 2150 1900 50 0000 C CNN
1 2150 3100
0 1 1 0
$EndComp
$Comp
L CONN_02X01 P6
U 1 1 5AA1AED9
P 7150 3050
F 0 "P6" H 7150 3150 50 0000 C CNN
F 1 "CONN_02X01" H 7150 2950 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x01" H 7150 1850 50 0001 C CNN
F 3 "" H 7150 1850 50 0000 C CNN
1 7150 3050
0 1 1 0
$EndComp
$Comp
L CONN_02X01 P5
U 1 1 5AA1AF39
P 6850 3050
F 0 "P5" H 6850 3150 50 0000 C CNN
F 1 "CONN_02X01" H 6850 2950 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x01" H 6850 1850 50 0001 C CNN
F 3 "" H 6850 1850 50 0000 C CNN
1 6850 3050
0 1 1 0
$EndComp
$Comp
L CONN_02X01 P4
U 1 1 5AA1AF73
P 6550 3050
F 0 "P4" H 6550 3150 50 0000 C CNN
F 1 "CONN_02X01" H 6550 2950 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x01" H 6550 1850 50 0001 C CNN
F 3 "" H 6550 1850 50 0000 C CNN
1 6550 3050
0 1 1 0
$EndComp
$Comp
L CONN_02X01 P3
U 1 1 5AA1AFB2
P 6250 3050
F 0 "P3" H 6250 3150 50 0000 C CNN
F 1 "CONN_02X01" H 6250 2950 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x01" H 6250 1850 50 0001 C CNN
F 3 "" H 6250 1850 50 0000 C CNN
1 6250 3050
0 1 1 0
$EndComp
NoConn ~ 2400 2600
$Comp
L INDUCTOR_SMALL L1
U 1 1 5AA1E400
P 4950 2850
F 0 "L1" H 4950 2950 50 0000 C CNN
F 1 "110 µH" H 4950 2800 50 0000 C CNN
F 2 "footprints:Inductor18.4x15" H 4950 2850 50 0001 C CNN
F 3 "" H 4950 2850 50 0000 C CNN
1 4950 2850
0 1 1 0
$EndComp
$Comp
L GND #PWR01
U 1 1 5AA1F0E8
P 1550 3700
@ -235,12 +158,12 @@ $EndComp
$Comp
L PWR_FLAG #FLG07
U 1 1 5AA1F535
P 3900 2450
F 0 "#FLG07" H 3900 2545 50 0001 C CNN
F 1 "PWR_FLAG" H 3900 2630 50 0000 C CNN
F 2 "" H 3900 2450 50 0000 C CNN
F 3 "" H 3900 2450 50 0000 C CNN
1 3900 2450
P 3550 1850
F 0 "#FLG07" H 3550 1945 50 0001 C CNN
F 1 "PWR_FLAG" H 3550 2030 50 0000 C CNN
F 2 "" H 3550 1850 50 0000 C CNN
F 3 "" H 3550 1850 50 0000 C CNN
1 3550 1850
1 0 0 -1
$EndComp
$Comp
@ -257,12 +180,12 @@ $EndComp
$Comp
L CP C2
U 1 1 5AA200EB
P 5600 3100
F 0 "C2" H 5625 3200 50 0000 L CNN
F 1 "100 µF" H 5625 3000 50 0000 L CNN
F 2 "Capacitors_SMD:c_elec_6.3x5.3" H 5638 2950 50 0001 C CNN
F 3 "" H 5600 3100 50 0000 C CNN
1 5600 3100
P 4800 3100
F 0 "C2" H 4825 3200 50 0000 L CNN
F 1 "100 µF" H 4825 3000 50 0000 L CNN
F 2 "Capacitors_SMD:c_elec_6.3x5.3" H 4838 2950 50 0001 C CNN
F 3 "" H 4800 3100 50 0000 C CNN
1 4800 3100
1 0 0 -1
$EndComp
$Comp
@ -286,23 +209,11 @@ Wire Wire Line
2650 3000 3150 3000
Connection ~ 2850 3000
Connection ~ 3150 2600
Wire Wire Line
4150 3700 4150 3550
Wire Wire Line
4250 3700 4250 3550
Connection ~ 4150 3700
Wire Wire Line
4450 3600 4450 3550
Wire Wire Line
4950 3600 4450 3600
Connection ~ 4250 3700
Wire Wire Line
4150 2500 4150 2650
Wire Wire Line
2100 2850 2100 2500
Connection ~ 2100 2500
Wire Wire Line
2200 2850 2200 2500
2200 2500 2200 2850
Connection ~ 2200 2500
Wire Wire Line
2100 3350 2100 3700
@ -311,77 +222,209 @@ Wire Wire Line
Wire Wire Line
2850 3200 2850 3000
Wire Wire Line
3900 2450 3900 3600
1550 3700 6450 3700
Wire Wire Line
3900 3600 4350 3600
6350 2500 6350 2800
Wire Wire Line
4350 3600 4350 3550
6050 2500 6050 2800
Connection ~ 6050 2500
Wire Wire Line
1550 3700 7150 3700
5750 2500 5750 2800
Connection ~ 5750 2500
Wire Wire Line
4150 2500 7150 2500
Wire Wire Line
4950 2600 4950 2500
Connection ~ 4950 2500
Wire Wire Line
4950 3100 4950 3600
Wire Wire Line
4950 3150 5150 3150
Wire Wire Line
5150 3150 5150 3200
Connection ~ 4950 3150
Wire Wire Line
5150 3600 5150 3700
Connection ~ 5150 3700
Wire Wire Line
5600 3250 5600 3700
Connection ~ 5600 3700
Wire Wire Line
5600 2950 5600 2500
Connection ~ 5600 2500
Wire Wire Line
7150 2500 7150 2800
Wire Wire Line
7150 3700 7150 3300
Wire Wire Line
6850 3300 6850 3700
Connection ~ 6850 3700
Wire Wire Line
6850 2800 6850 2500
Connection ~ 6850 2500
Wire Wire Line
6550 3300 6550 3700
Connection ~ 6550 3700
Wire Wire Line
6550 2800 6550 2500
Connection ~ 6550 2500
Wire Wire Line
6250 3300 6250 3700
Connection ~ 6250 3700
Wire Wire Line
6250 2800 6250 2500
Connection ~ 6250 2500
Connection ~ 3900 2600
5450 2800 5450 2500
Connection ~ 5450 2500
Wire Wire Line
1650 2500 2400 2500
Wire Wire Line
2800 2600 3900 2600
Wire Wire Line
3550 2950 3550 2600
Connection ~ 3550 2600
Wire Wire Line
3550 3250 3550 3700
Connection ~ 3550 3700
3550 3700 3550 3250
Wire Wire Line
2850 3500 2850 3700
Connection ~ 2850 3700
Wire Wire Line
1650 2950 1650 2500
Wire Wire Line
1550 3700 1550 3050
1550 3050 1550 3700
Wire Wire Line
1550 3050 1500 3050
Wire Wire Line
1500 3150 1550 3150
Connection ~ 1550 3150
Wire Wire Line
3550 2600 2800 2600
$Comp
L LM1084IT-ADJ/NOPB U1
U 1 1 5AAB33D6
P 4050 2050
F 0 "U1" H 4250 1850 50 0000 C CNN
F 1 "LT1084" H 3900 2250 50 0000 L CNN
F 2 "TO_SOT_Packages_THT:TO-247_Vertical_Neutral123_largePads" H 4050 2150 50 0001 C CIN
F 3 "" H 4050 2050 50 0000 C CNN
1 4050 2050
1 0 0 -1
$EndComp
$Comp
L R R5
U 1 1 5AAB3487
P 4550 2250
F 0 "R5" V 4630 2250 50 0000 C CNN
F 1 "120" V 4550 2250 50 0000 C CNN
F 2 "Resistors_ThroughHole:Resistor_Horizontal_RM10mm" V 4480 2250 50 0001 C CNN
F 3 "" H 4550 2250 50 0000 C CNN
1 4550 2250
1 0 0 -1
$EndComp
$Comp
L R R2
U 1 1 5AAB3BE8
P 4050 2650
F 0 "R2" V 4130 2650 50 0000 C CNN
F 1 "120" V 4050 2650 50 0000 C CNN
F 2 "Resistors_ThroughHole:Resistor_Horizontal_RM10mm" V 3980 2650 50 0001 C CNN
F 3 "" H 4050 2650 50 0000 C CNN
1 4050 2650
1 0 0 -1
$EndComp
$Comp
L R R3
U 1 1 5AAB3C4C
P 4050 3050
F 0 "R3" V 4130 3050 50 0000 C CNN
F 1 "120" V 4050 3050 50 0000 C CNN
F 2 "Resistors_ThroughHole:Resistor_Horizontal_RM10mm" V 3980 3050 50 0001 C CNN
F 3 "" H 4050 3050 50 0000 C CNN
1 4050 3050
1 0 0 -1
$EndComp
$Comp
L R R4
U 1 1 5AAB3D28
P 4050 3450
F 0 "R4" V 4130 3450 50 0000 C CNN
F 1 "120" V 4050 3450 50 0000 C CNN
F 2 "Resistors_ThroughHole:Resistor_Horizontal_RM10mm" V 3980 3450 50 0001 C CNN
F 3 "" H 4050 3450 50 0000 C CNN
1 4050 3450
1 0 0 -1
$EndComp
Wire Wire Line
4800 2500 6450 2500
Connection ~ 3550 2600
Wire Wire Line
3550 1850 3550 2950
Wire Wire Line
4450 2000 4800 2000
Wire Wire Line
4550 2000 4550 2100
Wire Wire Line
4550 2400 4550 2450
Wire Wire Line
4550 2450 4050 2450
Wire Wire Line
4050 2300 4050 2500
Connection ~ 4050 2450
Wire Wire Line
4050 2800 4050 2900
Wire Wire Line
4050 3200 4050 3300
Wire Wire Line
4800 2000 4800 2950
Connection ~ 3550 3700
Connection ~ 4800 2500
Connection ~ 4550 2000
Wire Wire Line
4800 3250 4800 3700
Connection ~ 4800 3700
Wire Wire Line
3650 2000 3550 2000
Connection ~ 3550 2000
Wire Wire Line
4050 3600 4050 3700
Connection ~ 4050 3700
Wire Wire Line
5450 3300 5450 3700
Connection ~ 5450 3700
Wire Wire Line
5750 3300 5750 3700
Connection ~ 5750 3700
Wire Wire Line
6050 3300 6050 3700
Connection ~ 6050 3700
Wire Wire Line
6350 3700 6350 3300
$Comp
L ZENER D2
U 1 1 5AAB5CD9
P 5150 3050
F 0 "D2" H 5150 3150 50 0000 C CNN
F 1 "ZPD6.2" H 5150 2950 50 0000 C CNN
F 2 "Diodes_ThroughHole:Diode_DO-35_SOD27_Horizontal_RM10" H 5150 3050 50 0001 C CNN
F 3 "" H 5150 3050 50 0000 C CNN
1 5150 3050
0 1 1 0
$EndComp
Wire Wire Line
5150 2850 5150 2500
Connection ~ 5150 2500
Wire Wire Line
5150 3250 5150 3700
Connection ~ 5150 3700
$Comp
L CONN_02X05 P1
U 1 1 5AAB5FCD
P 5650 3050
F 0 "P1" H 5650 3350 50 0000 C CNN
F 1 "CONN_02X05" H 5650 2750 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x05" H 5650 1850 50 0001 C CNN
F 3 "" H 5650 1850 50 0000 C CNN
1 5650 3050
0 1 1 0
$EndComp
$Comp
L CONN_02X05 P3
U 1 1 5AAB60F2
P 6250 3050
F 0 "P3" H 6250 3350 50 0000 C CNN
F 1 "CONN_02X05" H 6250 2750 50 0000 C CNN
F 2 "Pin_Headers:Pin_Header_Straight_2x05" H 6250 1850 50 0001 C CNN
F 3 "" H 6250 1850 50 0000 C CNN
1 6250 3050
0 1 1 0
$EndComp
Wire Wire Line
5550 2800 5550 2500
Connection ~ 5550 2500
Wire Wire Line
5650 2800 5650 2500
Connection ~ 5650 2500
Wire Wire Line
5850 2800 5850 2500
Connection ~ 5850 2500
Wire Wire Line
5550 3300 5550 3700
Connection ~ 5550 3700
Wire Wire Line
5650 3300 5650 3700
Connection ~ 5650 3700
Wire Wire Line
5850 3300 5850 3700
Connection ~ 5850 3700
Wire Wire Line
6150 3300 6150 3700
Connection ~ 6150 3700
Wire Wire Line
6250 3300 6250 3700
Connection ~ 6250 3700
Wire Wire Line
6450 3700 6450 3300
Connection ~ 6350 3700
Wire Wire Line
6450 2500 6450 2800
Connection ~ 6350 2500
Wire Wire Line
6250 2800 6250 2500
Connection ~ 6250 2500
Wire Wire Line
6150 2800 6150 2500
Connection ~ 6150 2500
$EndSCHEMATC

View File

@ -50,7 +50,7 @@
//
// A clock slow enough for an attiny85 @ 1MHz, is a reasonable default:
#define SPI_CLOCK (20000000/6)
#define SPI_CLOCK (1000000/6)
// Select hardware or software SPI, depending on SPI clock.
@ -139,7 +139,6 @@
// Configure the baud rate:
// #define BAUDRATE 19200
#define BAUDRATE 115200
// #define BAUDRATE 1000000

View File

@ -1,5 +1,5 @@
CFLAGS = -O3 -Wall --std=c11
CHIP = 328p
CHIP = atmega328p
SOURCE_FILES = $(wildcard *.c)
OBJ_FILES = $(SOURCE_FILES:%.c=%.o)
BIN = led-driver.bin
@ -8,7 +8,7 @@ HEX = led-driver.hex
default: $(HEX)
%.o: %.c
avr-gcc $(CFLAGS) -mmcu=atmega$(CHIP) -o $@ $<
avr-gcc $(CFLAGS) -mmcu=$(CHIP) -o $@ $<
$(BIN): $(OBJ_FILES)
avr-gcc $(CFLAGS) -o $@ $^
@ -17,7 +17,7 @@ $(HEX): $(BIN)
avr-objcopy -O ihex -j .text -j .data $^ $@
flash: $(HEX)
avrdude -p m$(CHIP) -c arduino -B 115200 -P /dev/ttyACM0 -v -v -e flash:w:$(HEX):a
avrdude -p $(CHIP) -c arduino -B 115200 -P /dev/ttyACM1 -v -v -e -Uflash:w:$(HEX):a
clean:
$(RM) $(OBJ_FILES) $(BIN) $(HEX)

Binary file not shown.

View File

@ -1,7 +1,36 @@
#define F_CPU 1000000UL
#define F_CPU 20000000UL
#include <stdint.h>
#include <avr/io.h>
#include <util/delay.h>
#define BAUD 9600
#include <util/setbaud.h>
void uart_init(void) {
#define BAUDRATE ((F_CPU)/(BAUD*8UL)-1) // set baud rate value for UBRR
UBRR0H = (BAUDRATE>>8); // shift the register right by 8 bits to get the upper 8 bits
UBRR0L = BAUDRATE; // set baud rate
// UCSR0A |= (1 << U2X0); // double transmission speed
// UCSR0B = (1 << TXEN0) | (1 << RXEN0);
// UCSR0C = (1 << UCSZ01) | (1 << UCSZ00);
// UBRR0H = UBRRH_VALUE;
// UBRR0L = UBRRL_VALUE;
UCSR0A |= _BV(U2X0);
// UCSR0A &= ~(_BV(U2X0));
// UCSR0C = _BV(UCSZ01) | _BV(UCSZ00); /* 8-bit data */
UCSR0C = 0x06; /* 8-bit data */
UCSR0B = _BV(RXEN0) | _BV(TXEN0) | _BV(RXCIE0); /* Enable RX and TX */
}
/*
// f=20MHz -> T=0,05 µs
@ -17,37 +46,54 @@ uint8_t RES = 51; // > 50 µs
#define wait14 __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t")
#define wait15 __asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t")
uint8_t const CMAX = 32;
inline void writeZero() {
PORTB = 1;
PORTC = 1;
wait6;
PORTB = 0;
PORTC = 0;
wait15;
}
inline void writeOne() {
PORTB = 1;
PORTC = 1;
wait14;
PORTB = 0;
PORTC = 0;
wait8;
}
int main2() {
DDRB = 1; // PORT C0 output
int main() {
DDRC = 1; // PORT C0 output
// uart_init();
do{
writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();
writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();
writeOne();writeOne();writeOne();writeOne();writeOne();writeOne();writeOne();writeOne();
_delay_ms(1);
// for( int i = 0; i < 7; i++) {
// if( i%2==0){
writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeOne();
writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();
writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();
// } else {
writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();
writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();
writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();writeZero();
// }
// }
_delay_ms(500);
// loop_until_bit_is_set(UCSR0A, UDRE0);
// UDR0 = 'D';
}while(1);
}
int main( void )
int main2( void )
{
DDRC |= (1 << PC0);
DDRC = 0xff; // (1 << PC0);
while(1) {
PORTC ^= (1 << PC0);
PORTC ^= 0xff; //(1 << PC0);
_delay_ms(1000);
}
return 0;

View File

@ -1,83 +1,156 @@
:100000000C9434000C943E000C943E000C943E0082
:100010000C943E000C943E000C943E000C943E0068
:100020000C943E000C943E000C943E000C943E0058
:100030000C943E000C943E000C943E000C943E0048
:100040000C943E000C943E000C943E000C943E0038
:100050000C943E000C943E000C943E000C943E0028
:100060000C943E000C943E0011241FBECFEFD8E04C
:10007000DEBFCDBF0E9479020C9488020C94000070
:1000800081E084B985B90000000000000000000094
:10009000000015B800000000000000000000000093
:1000A0000000000000000000000000000000000050
:1000B000000085B900000000000000000000000002
:1000C00015B8000000000000000000000000000063
:1000D0000000000000000000000000000000000020
:1000E00085B900000000000000000000000015B805
:100000000C9434000C9449000C9449000C94490061
:100010000C9449000C9449000C9449000C9449003C
:100020000C9449000C9449000C9449000C9449002C
:100030000C9449000C9449000C9449000C9449001C
:100040000C9449000C9449000C9449000C9449000C
:100050000C9449000C9449000C9449000C944900FC
:100060000C9449000C94490011241FBECFEFD8E036
:10007000DEBFCDBF11E0A0E0B1E0E8E9F9E002C0E9
:1000800005900D92A230B107D9F70E946C000C9434
:10009000CA040C94000081E08093C50083E0809343
:1000A000C400E0ECF0E080818260808386E0809391
:1000B000C20088E98093C10008958FEF87B988B1A5
:1000C000809588B92FEF88E09DE3215080409040D3
:1000D000E1F700C00000F3CF81E087B988B90000E4
:1000E0000000000000000000000018B80000000040
:1000F0000000000000000000000000000000000000
:10010000000000000000000000000000000085B9B1
:1001100000000000000000000000000015B8000012
:100100000000000000000000000088B900000000AE
:10011000000000000000000018B80000000000000F
:1001200000000000000000000000000000000000CF
:1001300000000000000000000000000085B9000081
:100140000000000000000000000015B800000000E2
:10013000000000000000000088B90000000000007E
:1001400000000000000018B80000000000000000DF
:10015000000000000000000000000000000000009F
:100160000000000000000000000085B90000000051
:10017000000000000000000015B8000000000000B2
:1001600000000000000088B900000000000000004E
:100170000000000018B800000000000000000000AF
:10018000000000000000000000000000000000006F
:10019000000000000000000085B900000000000021
:1001A00000000000000015B8000000000000000082
:100190000000000088B9000000000000000000001E
:1001A000000018B80000000000000000000000007F
:1001B000000000000000000000000000000000003F
:1001C00000000000000085B90000000000000000F1
:1001D0000000000015B80000000000000000000052
:1001C000000088B9000000000000000000000000EE
:1001D00018B800000000000000000000000000004F
:1001E000000000000000000000000000000000000F
:1001F0000000000085B900000000000000000000C1
:10020000000015B800000000000000000000000021
:1002100000000000000000000000000000000000DE
:10022000000085B900000000000000000000000090
:1002300015B80000000000000000000000000000F1
:1002400000000000000000000000000000000000AE
:1002500085B900000000000000000000000015B893
:1001F00088B900000000000000000000000018B8EE
:1002000000000000000000000000000000000000EE
:10021000000000000000000000000000000088B99D
:1002200000000000000000000000000000000000CE
:1002300000000000000000000000000018B80000EE
:10024000000000000000000000000000000088B96D
:1002500000000000000000000000000018B80000CE
:10026000000000000000000000000000000000008E
:10027000000000000000000000000000000085B940
:1002800000000000000000000000000015B80000A1
:1002700000000000000000000000000088B900003D
:100280000000000000000000000018B8000000009E
:10029000000000000000000000000000000000005E
:1002A00000000000000000000000000085B9000010
:1002B0000000000000000000000015B80000000071
:1002A0000000000000000000000088B9000000000D
:1002B000000000000000000018B80000000000006E
:1002C000000000000000000000000000000000002E
:1002D0000000000000000000000085B900000000E0
:1002E000000000000000000015B800000000000041
:1002D000000000000000000088B9000000000000DD
:1002E00000000000000018B800000000000000003E
:1002F00000000000000000000000000000000000FE
:10030000000000000000000085B9000000000000AF
:1003100000000000000015B8000000000000000010
:1003000000000000000088B90000000000000000AC
:100310000000000018B8000000000000000000000D
:1003200000000000000000000000000000000000CD
:1003300000000000000085B900000000000000007F
:100340000000000015B800000000000000000000E0
:100330000000000088B9000000000000000000007C
:10034000000018B8000000000000000000000000DD
:10035000000000000000000000000000000000009D
:100360000000000085B9000000000000000000004F
:10037000000000000000000000000000000000007D
:10038000000015B8000000000000000000000000A0
:100390000000000085B9000000000000000000001F
:10036000000088B90000000000000000000000004C
:1003700018B80000000000000000000000000000AD
:10038000000000000000000000000000000000006D
:1003900088B900000000000000000000000018B84C
:1003A000000000000000000000000000000000004D
:1003B000000015B800000000000000000000000070
:1003C0000000000085B900000000000000000000EF
:1003B000000000000000000000000000000088B9FC
:1003C00000000000000000000000000018B800005D
:1003D000000000000000000000000000000000001D
:1003E000000015B800000000000000000000000040
:1003F0000000000085B900000000000000000000BF
:1003E00000000000000000000000000088B90000CC
:1003F0000000000000000000000018B8000000002D
:1004000000000000000000000000000000000000EC
:10041000000015B80000000000000000000000000F
:100420000000000085B9000000000000000000008E
:100410000000000000000000000088B9000000009B
:10042000000000000000000018B8000000000000FC
:1004300000000000000000000000000000000000BC
:10044000000015B8000000000000000000000000DF
:100450000000000085B9000000000000000000005E
:10044000000000000000000088B90000000000006B
:1004500000000000000018B80000000000000000CC
:10046000000000000000000000000000000000008C
:10047000000015B8000000000000000000000000AF
:100480000000000085B9000000000000000000002E
:1004700000000000000088B900000000000000003B
:100480000000000018B8000000000000000000009C
:10049000000000000000000000000000000000005C
:1004A000000015B80000000000000000000000007F
:1004B0000000000085B900000000000000000000FE
:1004A0000000000088B9000000000000000000000B
:1004B000000018B80000000000000000000000006C
:1004C000000000000000000000000000000000002C
:1004D000000015B80000000000000000000000004F
:1004E00000000000E9EFF0E03197F1F700C00000F4
:1004F000C9CD389A91E088B1892788B92FE33DE0CA
:1005000083E0215030408040E1F700C00000F3CF8D
:04051000F894FFCF8D
:1004D000000088B9000000000000000000000000DB
:1004E00018B800000000000000000000000000003C
:1004F00000000000000000000000000000000000FC
:1005000088B900000000000000000000000018B8DA
:1005100000000000000000000000000000000000DB
:10052000000000000000000000000000000088B98A
:1005300000000000000000000000000018B80000EB
:1005400000000000000000000000000000000000AB
:1005500000000000000000000000000088B900005A
:100560000000000000000000000018B800000000BB
:10057000000000000000000000000000000000007B
:100580000000000000000000000088B9000000002A
:10059000000000000000000018B80000000000008B
:1005A000000000000000000000000000000000004B
:1005B000000000000000000088B9000000000000FA
:1005C00000000000000018B800000000000000005B
:1005D000000000000000000000000000000000001B
:1005E00000000000000088B90000000000000000CA
:1005F0000000000018B8000000000000000000002B
:1006000000000000000000000000000000000000EA
:100610000000000088B90000000000000000000099
:10062000000018B8000000000000000000000000FA
:1006300000000000000000000000000000000000BA
:10064000000088B900000000000000000000000069
:1006500018B80000000000000000000000000000CA
:10066000000000000000000000000000000000008A
:1006700088B900000000000000000000000018B869
:10068000000000000000000000000000000000006A
:10069000000000000000000000000000000088B919
:1006A00000000000000000000000000018B800007A
:1006B000000000000000000000000000000000003A
:1006C00000000000000000000000000088B90000E9
:1006D0000000000000000000000018B8000000004A
:1006E000000000000000000000000000000000000A
:1006F0000000000000000000000088B900000000B9
:10070000000000000000000018B800000000000019
:1007100000000000000000000000000000000000D9
:10072000000000000000000088B900000000000088
:1007300000000000000018B80000000000000000E9
:1007400000000000000000000000000000000000A9
:1007500000000000000088B9000000000000000058
:100760000000000018B800000000000000000000B9
:100770000000000000000000000000000000000079
:100780000000000088B90000000000000000000028
:10079000000018B800000000000000000000000089
:1007A0000000000000000000000000000000000049
:1007B000000088B9000000000000000000000000F8
:1007C00018B8000000000000000000000000000059
:1007D0000000000000000000000000000000000019
:1007E00088B900000000000000000000000018B8F8
:1007F00000000000000000000000000000000000F9
:10080000000000000000000000000000000088B9A7
:1008100000000000000000000000000018B8000008
:1008200000000000000000000000000000000000C8
:1008300000000000000000000000000088B9000077
:100840000000000000000000000018B800000000D8
:100850000000000000000000000000000000000098
:100860000000000000000000000088B90000000047
:10087000000000000000000018B8000000000000A8
:100880000000000000000000000000000000000068
:10089000000000000000000088B900000000000017
:1008A00000000000000018B8000000000000000078
:1008B0000000000000000000000000000000000038
:1008C00000000000000088B90000000000000000E7
:1008D0000000000018B80000000000000000000048
:1008E0000000000000000000000000000000000008
:1008F0000000000088B900000000000000000000B7
:10090000000018B800000000000000000000000017
:1009100000000000000000000000000000000000D7
:10092000000088B900000000000000000000000086
:1009300018B80000000000000000000000000000E7
:1009400000000000000000000000000000000000A7
:1009500088B900000000000000000000000018B886
:100960000000000000000000000000000000000087
:1009700000000000000000000000000000002FE761
:1009800034E89EE1215030409040E1F700C0000083
:080990000C946E00F894FFCFF7
:0209980020003D
:00000001FF

Binary file not shown.