Modified some code on "frum" and "microdrill"

This commit is contained in:
Eddy 2014-10-21 01:58:46 +04:00
parent cb0a628165
commit d642d03734
25 changed files with 283204 additions and 1012 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
*.pho
*.drl
.hg*
*.tgz

View File

@ -47,7 +47,6 @@
unsigned long Global_time = 0L, boom_start = 0L; // global time in ms
U16 boom_length = 100; // length of "boom" in ms
U16 paused_val = 500; // interval between LED flashing
U8 bank_i = 0; // number of sample in meander (even/odd)
U8 sample_flag = 0; // flag is set in interrupt -> next sample in sound
#ifdef UART
@ -148,7 +147,8 @@ void error_msg(char *msg){
int main() {
unsigned long T = 0L;
unsigned int I;
unsigned long I;
U8 bank_i = 0; // number of sample in meander (even/odd)
U8 cur_vol;
U16 Ival;
#ifdef UART
@ -199,19 +199,21 @@ int main() {
// Loop
do{
if(sample_flag){ // next sample in sound
if(sample_flag){ // next sample in sound (TIM2 irq)
sample_flag = 0;
I = Global_time - boom_start; // amount of us from start
if(I > boom_length || boom_start > Global_time){
// end of sound
stop_snd();
}else{
I *= 16;
cur_vol = 16 - I / boom_length; // linear fading
// generate meander
if(bank_i){
change_CCR(0);
bank_i = 0;
}else{
I <<= 8; // multiply by PWM len
I /= boom_length;
cur_vol = 255 - (I & 0xff); // linear fading
change_CCR(cur_vol);
bank_i = 1;
}
@ -254,8 +256,8 @@ int main() {
paused_val = 500;
break;
case 'F':
if(readInt(&Ival) && Ival > 64){
change_period(Ival >> 4); // F*4 for 16 array values
if(readInt(&Ival)){
change_period(Ival);
}else error_msg("bad period");
break;
case 'P':

View File

@ -26,7 +26,6 @@
extern unsigned long Global_time, boom_start; // global time in ms
extern U8 sample_flag; // flag is set in interrupt -> next sample in sound
extern U8 bank_i;
#define UART_BUF_LEN 8 // max 7 bytes transmited in on operation
#define MIN_STEP_LENGTH 9 // max speed, microseconds for one microstep

View File

@ -22,22 +22,22 @@
#include "noicegen.h"
void configure_timers(){
/**** TIMERS TIM1 - 1MHz, TIM2 - 1MHz ****/
/**** TIMERS TIM1 - 16MHz, TIM2 - 1MHz ****/
TIM1_PSCRH = 0; // this timer have 16 bit prescaler
TIM1_PSCRL = 3; // LSB should be written last as it updates prescaler
TIM1_PSCRL = 0; // LSB should be written last as it updates prescaler
TIM2_PSCR = 4;
// Timer1 is PWM sound level generator
// Timer2 runs with F*16 to change voltage level (F - frequency of sound)
// Timer2 runs with F to change voltage level (F - frequency of sound)
TIM1_ARRH = 0;
TIM1_ARRL = 16;
TIM1_CCR1H = 0; TIM1_CCR1L = 8; // default: 50%
TIM1_ARRL = 255;
TIM1_CCR1H = 0; TIM1_CCR1L = 127; // default: 50%
// channel 1 generates PWM pulses
TIM1_CCMR1 = 0x60; // OC1M = 110b - PWM mode 1 ( 1 -> 0)
//TIM1_CCMR1 = 0x70; // OC1M = 111b - PWM mode 2 ( 0 -> 1)
TIM1_CCER1 = 1; // Channel 1 is on. Active is high
//TIM1_CCER1 = 3; // Channel 1 is on. Active is low
// default period: near 33ms (30Hz)
TIM2_ARRH = 127; TIM2_ARRL = 0;
// default period: 33ms (30Hz)
TIM2_ARRH = 128; TIM2_ARRL = 232; // 0x80E8 = 33000
// interrupts: update for timer 2, none for timer 1
TIM1_IER = 0;
TIM2_IER = TIM_IER_UIE;

View File

@ -34,7 +34,7 @@ void configure_timers();
#define change_period(F) do{TIM2_ARRH = F >> 8; TIM2_ARRL = F & 0xff;}while(0)
#define change_CCR(C) do{TIM1_CCR1H = 0; TIM1_CCR1L = C;}while(0)
// change CCR value. U = Vcc *
#define play_snd() do{boom_start = Global_time; bank_i = 0; \
#define play_snd() do{boom_start = Global_time; \
TIM1_CR1 = TIM_EN; TIM2_CR1 = TIM_EN;}while(0)
#define stop_snd() do{TIM1_CR1 |= TIM_CR1_OPM; TIM2_CR1 = 0;}while(0)

View File

@ -40,7 +40,7 @@ $Descr A4 11693 8268
encoding utf-8
Sheet 2 3
Title ""
Date "20 sep 2014"
Date "13 oct 2014"
Rev ""
Comp ""
Comment1 ""
@ -60,10 +60,10 @@ F 3 "" H 3950 1750 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L CRYSTAL X2
L CRYSTAL X3
U 1 1 53D64225
P 3750 2950
F 0 "X2" H 3750 3100 60 0000 C CNN
F 0 "X3" H 3750 3100 60 0000 C CNN
F 1 "CRYSTAL" H 3750 2800 60 0000 C CNN
F 2 "" H 3750 2950 60 0000 C CNN
F 3 "" H 3750 2950 60 0000 C CNN
@ -71,10 +71,10 @@ F 3 "" H 3750 2950 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L CRYSTAL X1
L CRYSTAL X2
U 1 1 53D64234
P 3750 2500
F 0 "X1" H 3750 2650 60 0000 C CNN
F 0 "X2" H 3750 2650 60 0000 C CNN
F 1 "CRYSTAL" H 3750 2350 60 0000 C CNN
F 2 "" H 3750 2500 60 0000 C CNN
F 3 "" H 3750 2500 60 0000 C CNN
@ -82,10 +82,10 @@ F 3 "" H 3750 2500 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L LED D5
L LED D3
U 1 1 53D6424D
P 1900 3600
F 0 "D5" H 1900 3700 50 0000 C CNN
F 0 "D3" H 1900 3700 50 0000 C CNN
F 1 "LED" H 1900 3500 50 0000 C CNN
F 2 "" H 1900 3600 60 0000 C CNN
F 3 "" H 1900 3600 60 0000 C CNN
@ -93,10 +93,10 @@ F 3 "" H 1900 3600 60 0000 C CNN
-1 0 0 -1
$EndComp
$Comp
L LED D6
L LED D4
U 1 1 53D6425A
P 1900 3900
F 0 "D6" H 1900 4000 50 0000 C CNN
F 0 "D4" H 1900 4000 50 0000 C CNN
F 1 "LED" H 1900 3800 50 0000 C CNN
F 2 "" H 1900 3900 60 0000 C CNN
F 3 "" H 1900 3900 60 0000 C CNN
@ -104,10 +104,10 @@ F 3 "" H 1900 3900 60 0000 C CNN
-1 0 0 -1
$EndComp
$Comp
L LED D7
L LED D5
U 1 1 53D64260
P 1900 4200
F 0 "D7" H 1900 4300 50 0000 C CNN
F 0 "D5" H 1900 4300 50 0000 C CNN
F 1 "LED" H 1900 4100 50 0000 C CNN
F 2 "" H 1900 4200 60 0000 C CNN
F 3 "" H 1900 4200 60 0000 C CNN
@ -115,10 +115,10 @@ F 3 "" H 1900 4200 60 0000 C CNN
-1 0 0 -1
$EndComp
$Comp
L LED D8
L LED D6
U 1 1 53D6426C
P 1900 4500
F 0 "D8" H 1900 4600 50 0000 C CNN
F 0 "D6" H 1900 4600 50 0000 C CNN
F 1 "LED" H 1900 4400 50 0000 C CNN
F 2 "" H 1900 4500 60 0000 C CNN
F 3 "" H 1900 4500 60 0000 C CNN
@ -126,10 +126,10 @@ F 3 "" H 1900 4500 60 0000 C CNN
-1 0 0 -1
$EndComp
$Comp
L LED D9
L LED D7
U 1 1 53D64272
P 1900 4800
F 0 "D9" H 1900 4900 50 0000 C CNN
F 0 "D7" H 1900 4900 50 0000 C CNN
F 1 "LED" H 1900 4700 50 0000 C CNN
F 2 "" H 1900 4800 60 0000 C CNN
F 3 "" H 1900 4800 60 0000 C CNN
@ -137,10 +137,10 @@ F 3 "" H 1900 4800 60 0000 C CNN
-1 0 0 -1
$EndComp
$Comp
L LED D10
L LED D8
U 1 1 53D64278
P 1900 5100
F 0 "D10" H 1900 5200 50 0000 C CNN
F 0 "D8" H 1900 5200 50 0000 C CNN
F 1 "LED" H 1900 5000 50 0000 C CNN
F 2 "" H 1900 5100 60 0000 C CNN
F 3 "" H 1900 5100 60 0000 C CNN
@ -159,10 +159,10 @@ F 3 "" H 3050 900 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L GND #PWR29
L GND #PWR023
U 1 1 53D642A5
P 3350 1000
F 0 "#PWR29" H 3350 1000 30 0001 C CNN
F 0 "#PWR023" H 3350 1000 30 0001 C CNN
F 1 "GND" H 3350 930 30 0001 C CNN
F 2 "" H 3350 1000 60 0000 C CNN
F 3 "" H 3350 1000 60 0000 C CNN
@ -196,10 +196,10 @@ Wire Wire Line
Wire Wire Line
1700 5100 1500 5100
$Comp
L SPST SW6
L SPST SW5
U 1 1 53D643ED
P 2150 900
F 0 "SW6" H 2150 1000 70 0000 C CNN
F 0 "SW5" H 2150 1000 70 0000 C CNN
F 1 "SPST" H 2150 800 70 0000 C CNN
F 2 "" H 2150 900 60 0000 C CNN
F 3 "" H 2150 900 60 0000 C CNN
@ -211,10 +211,10 @@ VCC
Wire Wire Line
1500 900 1650 900
$Comp
L GND #PWR30
L GND #PWR024
U 1 1 53D64527
P 3550 2100
F 0 "#PWR30" H 3550 2100 30 0001 C CNN
F 0 "#PWR024" H 3550 2100 30 0001 C CNN
F 1 "GND" H 3550 2030 30 0001 C CNN
F 2 "" H 3550 2100 60 0000 C CNN
F 3 "" H 3550 2100 60 0000 C CNN
@ -232,10 +232,10 @@ Wire Wire Line
Wire Wire Line
4050 2500 4050 3150
$Comp
L GND #PWR31
L GND #PWR025
U 1 1 53D64679
P 4050 3150
F 0 "#PWR31" H 4050 3150 30 0001 C CNN
F 0 "#PWR025" H 4050 3150 30 0001 C CNN
F 1 "GND" H 4050 3080 30 0001 C CNN
F 2 "" H 4050 3150 60 0000 C CNN
F 3 "" H 4050 3150 60 0000 C CNN
@ -252,10 +252,10 @@ Wire Wire Line
Wire Wire Line
3450 2950 3350 2950
$Comp
L SW_PUSH SW2
L SW_PUSH SW1
U 1 1 53D647DD
P 1950 1750
F 0 "SW2" H 2100 1860 50 0000 C CNN
F 0 "SW1" H 2100 1860 50 0000 C CNN
F 1 "SW_PUSH" H 1950 1670 50 0000 C CNN
F 2 "" H 1950 1750 60 0000 C CNN
F 3 "" H 1950 1750 60 0000 C CNN
@ -263,10 +263,10 @@ F 3 "" H 1950 1750 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L SW_PUSH SW3
L SW_PUSH SW2
U 1 1 53D647EA
P 1950 2100
F 0 "SW3" H 2100 2210 50 0000 C CNN
F 0 "SW2" H 2100 2210 50 0000 C CNN
F 1 "SW_PUSH" H 1950 2020 50 0000 C CNN
F 2 "" H 1950 2100 60 0000 C CNN
F 3 "" H 1950 2100 60 0000 C CNN
@ -274,10 +274,10 @@ F 3 "" H 1950 2100 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L SW_PUSH SW4
L SW_PUSH SW3
U 1 1 53D647F0
P 1950 2500
F 0 "SW4" H 2100 2610 50 0000 C CNN
F 0 "SW3" H 2100 2610 50 0000 C CNN
F 1 "SW_PUSH" H 1950 2420 50 0000 C CNN
F 2 "" H 1950 2500 60 0000 C CNN
F 3 "" H 1950 2500 60 0000 C CNN
@ -285,10 +285,10 @@ F 3 "" H 1950 2500 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L SW_PUSH SW5
L SW_PUSH SW4
U 1 1 53D647F6
P 1950 2850
F 0 "SW5" H 2100 2960 50 0000 C CNN
F 0 "SW4" H 2100 2960 50 0000 C CNN
F 1 "SW_PUSH" H 1950 2770 50 0000 C CNN
F 2 "" H 1950 2850 60 0000 C CNN
F 3 "" H 1950 2850 60 0000 C CNN
@ -319,10 +319,10 @@ Wire Wire Line
Wire Wire Line
1500 2850 1650 2850
$Comp
L GND #PWR27
L GND #PWR026
U 1 1 53D6A2BE
P 1650 1200
F 0 "#PWR27" H 1650 1200 30 0001 C CNN
F 0 "#PWR026" H 1650 1200 30 0001 C CNN
F 1 "GND" H 1650 1130 30 0001 C CNN
F 2 "" H 1650 1200 60 0000 C CNN
F 3 "" H 1650 1200 60 0000 C CNN
@ -352,10 +352,10 @@ Connection ~ 2100 5100
Wire Wire Line
2100 3600 2100 5100
$Comp
L R R8
L R R5
U 1 1 53D77D36
P 2450 3300
F 0 "R8" V 2530 3300 50 0000 C CNN
F 0 "R5" V 2530 3300 50 0000 C CNN
F 1 "330" V 2450 3300 50 0000 C CNN
F 2 "" H 2450 3300 60 0000 C CNN
F 3 "" H 2450 3300 60 0000 C CNN
@ -373,17 +373,15 @@ Wire Wire Line
Wire Wire Line
2450 1150 1800 1150
Connection ~ 1800 1150
NoConn ~ 1950 1300
NoConn ~ 2100 1300
Text Notes 1050 1450 0 60 ~ 0
Break here\nand connect to GROUND!
Wire Wire Line
2450 3600 2450 3550
$Comp
L GND #PWR28
L GND #PWR027
U 1 1 53D7DE63
P 2100 1400
F 0 "#PWR28" H 2100 1400 30 0001 C CNN
F 0 "#PWR027" H 2100 1400 30 0001 C CNN
F 1 "GND" H 2100 1330 30 0001 C CNN
F 2 "" H 2100 1400 60 0000 C CNN
F 3 "" H 2100 1400 60 0000 C CNN
@ -395,4 +393,18 @@ Wire Wire Line
Wire Wire Line
2100 1350 2250 1350
Connection ~ 2250 1350
Wire Notes Line
1900 1250 2150 1250
$Comp
L PWR_FLAG #FLG028
U 1 1 5426B7EA
P 1550 1150
F 0 "#FLG028" H 1550 1245 30 0001 C CNN
F 1 "PWR_FLAG" H 1550 1330 30 0000 C CNN
F 2 "" H 1550 1150 60 0000 C CNN
F 3 "" H 1550 1150 60 0000 C CNN
1 1550 1150
1 0 0 -1
$EndComp
Connection ~ 1550 1150
$EndSCHEMATC

View File

@ -40,7 +40,7 @@ $Descr A4 11693 8268
encoding utf-8
Sheet 3 3
Title ""
Date "20 sep 2014"
Date "13 oct 2014"
Rev ""
Comp ""
Comment1 ""
@ -83,10 +83,6 @@ Text HLabel 1200 3650 0 60 Input ~ 0
BTN4b
Text HLabel 1200 4000 0 60 Input ~ 0
BAT+
Text HLabel 1200 4600 0 60 Input ~ 0
BAT-
Wire Wire Line
1200 4600 1450 4600
Wire Wire Line
1200 4000 1450 4000
Text HLabel 1200 4900 0 60 Input ~ 0
@ -99,12 +95,11 @@ Wire Wire Line
1200 5300 1450 5300
Wire Wire Line
1450 5300 1450 4600
Connection ~ 1450 4600
$Comp
L PWR_FLAG #FLG1
L PWR_FLAG #FLG029
U 1 1 53D67208
P 1300 4900
F 0 "#FLG1" H 1300 4995 30 0001 C CNN
F 0 "#FLG029" H 1300 4995 30 0001 C CNN
F 1 "PWR_FLAG" H 1300 5080 30 0000 C CNN
F 2 "" H 1300 4900 60 0000 C CNN
F 3 "" H 1300 4900 60 0000 C CNN
@ -112,10 +107,10 @@ F 3 "" H 1300 4900 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L PWR_FLAG #FLG2
L PWR_FLAG #FLG030
U 1 1 53D67215
P 1600 5100
F 0 "#FLG2" H 1600 5195 30 0001 C CNN
F 0 "#FLG030" H 1600 5195 30 0001 C CNN
F 1 "PWR_FLAG" H 1600 5280 30 0000 C CNN
F 2 "" H 1600 5100 60 0000 C CNN
F 3 "" H 1600 5100 60 0000 C CNN
@ -127,10 +122,10 @@ Wire Wire Line
Wire Wire Line
1200 4900 1300 4900
$Comp
L CONN_2 P5
L CONN_2 P2
U 1 1 541D2C34
P 1750 1950
F 0 "P5" V 1700 1950 40 0000 C CNN
F 0 "P2" V 1700 1950 40 0000 C CNN
F 1 "CONN_2" V 1800 1950 40 0000 C CNN
F 2 "" H 1750 1950 60 0000 C CNN
F 3 "" H 1750 1950 60 0000 C CNN
@ -142,10 +137,10 @@ Wire Wire Line
Wire Wire Line
1400 2450 1200 2450
$Comp
L CONN_2 P6
L CONN_2 P3
U 1 1 541D2C57
P 1750 2350
F 0 "P6" V 1700 2350 40 0000 C CNN
F 0 "P3" V 1700 2350 40 0000 C CNN
F 1 "CONN_2" V 1800 2350 40 0000 C CNN
F 2 "" H 1750 2350 60 0000 C CNN
F 3 "" H 1750 2350 60 0000 C CNN
@ -157,10 +152,10 @@ Wire Wire Line
Wire Wire Line
1400 2850 1200 2850
$Comp
L CONN_2 P7
L CONN_2 P4
U 1 1 541D2C5F
P 1750 2750
F 0 "P7" V 1700 2750 40 0000 C CNN
F 0 "P4" V 1700 2750 40 0000 C CNN
F 1 "CONN_2" V 1800 2750 40 0000 C CNN
F 2 "" H 1750 2750 60 0000 C CNN
F 3 "" H 1750 2750 60 0000 C CNN
@ -172,10 +167,10 @@ Wire Wire Line
Wire Wire Line
1400 3250 1200 3250
$Comp
L CONN_2 P8
L CONN_2 P5
U 1 1 541D2C67
P 1750 3150
F 0 "P8" V 1700 3150 40 0000 C CNN
F 0 "P5" V 1700 3150 40 0000 C CNN
F 1 "CONN_2" V 1800 3150 40 0000 C CNN
F 2 "" H 1750 3150 60 0000 C CNN
F 3 "" H 1750 3150 60 0000 C CNN
@ -187,10 +182,10 @@ Wire Wire Line
Wire Wire Line
1400 3650 1200 3650
$Comp
L CONN_2 P9
L CONN_2 P6
U 1 1 541D2C6F
P 1750 3550
F 0 "P9" V 1700 3550 40 0000 C CNN
F 0 "P6" V 1700 3550 40 0000 C CNN
F 1 "CONN_2" V 1800 3550 40 0000 C CNN
F 2 "" H 1750 3550 60 0000 C CNN
F 3 "" H 1750 3550 60 0000 C CNN

File diff suppressed because it is too large Load Diff

472
DRUM/schematics/drum.cmp Normal file
View File

@ -0,0 +1,472 @@
Cmp-Mod V01 Created by CvPcb (2013-may-18)-stable date = Пн 13 окт 2014 23:39:56
BeginCmp
TimeStamp = /53D64077/53D64296;
Reference = BT1;
ValeurCmp = BATTERY;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D66CFD/53D66E57;
Reference = BT2;
ValeurCmp = BATTERY;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D695F4;
Reference = C1;
ValeurCmp = 100u;
IdModule = CP_5x11mm;
EndCmp
BeginCmp
TimeStamp = /53D69710;
Reference = C2;
ValeurCmp = 100u;
IdModule = CP_5x11mm;
EndCmp
BeginCmp
TimeStamp = /543CDB79;
Reference = C3;
ValeurCmp = 100u;
IdModule = CP_5x11mm;
EndCmp
BeginCmp
TimeStamp = /543CD89A;
Reference = C4;
ValeurCmp = 100u;
IdModule = CP_5x11mm;
EndCmp
BeginCmp
TimeStamp = /541D94C6;
Reference = D1;
ValeurCmp = BZX55C3V6;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /541D9B34;
Reference = D2;
ValeurCmp = BZX55C3V6;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D6424D;
Reference = D3;
ValeurCmp = LED;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D6425A;
Reference = D4;
ValeurCmp = LED;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D64260;
Reference = D5;
ValeurCmp = LED;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D6426C;
Reference = D6;
ValeurCmp = LED;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D64272;
Reference = D7;
ValeurCmp = LED;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D64278;
Reference = D8;
ValeurCmp = LED;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /543FC340;
Reference = D9;
ValeurCmp = DIODESCH;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D63E9D;
Reference = DA1;
ValeurCmp = TDA2822;
IdModule = DIP-8__300;
EndCmp
BeginCmp
TimeStamp = /53D73322;
Reference = DD1;
ValeurCmp = CD74HC154;
IdModule = DIP-24__300;
EndCmp
BeginCmp
TimeStamp = /52FB4AA7;
Reference = P1;
ValeurCmp = CONN_5;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D66CFD/541D2C34;
Reference = P2;
ValeurCmp = CONN_2;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D66CFD/541D2C57;
Reference = P3;
ValeurCmp = CONN_2;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D66CFD/541D2C5F;
Reference = P4;
ValeurCmp = CONN_2;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D66CFD/541D2C67;
Reference = P5;
ValeurCmp = CONN_2;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D66CFD/541D2C6F;
Reference = P6;
ValeurCmp = CONN_2;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /543F4960;
Reference = P7;
ValeurCmp = CONN_10;
IdModule = SIL-10;
EndCmp
BeginCmp
TimeStamp = /544041B0;
Reference = P8;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404214;
Reference = P9;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /5440421A;
Reference = P10;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /5440432F;
Reference = P11;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404335;
Reference = P12;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /544043E9;
Reference = P13;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /544043EF;
Reference = P14;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /544043F5;
Reference = P15;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404452;
Reference = P16;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404458;
Reference = P17;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /5440479D;
Reference = P18;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /544047A3;
Reference = P19;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /544047A9;
Reference = P20;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /544047AF;
Reference = P21;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404563;
Reference = P22;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404569;
Reference = P23;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /5440456F;
Reference = P24;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404575;
Reference = P25;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /5440457B;
Reference = P26;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404581;
Reference = P27;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /54404587;
Reference = P28;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /5440458D;
Reference = P29;
ValeurCmp = CONN_1;
IdModule = SIL-1;
EndCmp
BeginCmp
TimeStamp = /541D6DE3;
Reference = Q1;
ValeurCmp = 2N7002;
IdModule = transistors_gaui-SOT23;
EndCmp
BeginCmp
TimeStamp = /541D6DE9;
Reference = Q2;
ValeurCmp = 2N7002;
IdModule = transistors_gaui-SOT23;
EndCmp
BeginCmp
TimeStamp = /541D6C1B;
Reference = Q3;
ValeurCmp = 2N7002;
IdModule = transistors_gaui-SOT23;
EndCmp
BeginCmp
TimeStamp = /541D6DEF;
Reference = Q4;
ValeurCmp = 2N7002;
IdModule = transistors_gaui-SOT23;
EndCmp
BeginCmp
TimeStamp = /541D5E5C;
Reference = Q5;
ValeurCmp = 2N7002;
IdModule = transistors_gaui-SOT23;
EndCmp
BeginCmp
TimeStamp = /541D6AAD;
Reference = Q6;
ValeurCmp = 2N7002;
IdModule = transistors_gaui-SOT23;
EndCmp
BeginCmp
TimeStamp = /541D517A;
Reference = R1;
ValeurCmp = 10k;
IdModule = SM0603;
EndCmp
BeginCmp
TimeStamp = /541D399A;
Reference = R2;
ValeurCmp = 10k;
IdModule = SM0603;
EndCmp
BeginCmp
TimeStamp = /541D5363;
Reference = R3;
ValeurCmp = 3.3k;
IdModule = SM0603;
EndCmp
BeginCmp
TimeStamp = /541D48EE;
Reference = R4;
ValeurCmp = 10k;
IdModule = SM0603;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D77D36;
Reference = R5;
ValeurCmp = 330;
IdModule = SM0603;
EndCmp
BeginCmp
TimeStamp = /543A7793;
Reference = R6;
ValeurCmp = 100k;
IdModule = SM0603;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D64216;
Reference = SP1;
ValeurCmp = SPEAKER;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D647DD;
Reference = SW1;
ValeurCmp = SW_PUSH;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D647EA;
Reference = SW2;
ValeurCmp = SW_PUSH;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D647F0;
Reference = SW3;
ValeurCmp = SW_PUSH;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D647F6;
Reference = SW4;
ValeurCmp = SW_PUSH;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D643ED;
Reference = SW5;
ValeurCmp = SPST;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /5425C192;
Reference = X1;
ValeurCmp = STM8S105BOARD;
IdModule = devboard_pins-9-14;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D64234;
Reference = X2;
ValeurCmp = CRYSTAL;
IdModule = ;
EndCmp
BeginCmp
TimeStamp = /53D64077/53D64225;
Reference = X3;
ValeurCmp = CRYSTAL;
IdModule = ;
EndCmp
EndListe

File diff suppressed because it is too large Load Diff

853
DRUM/schematics/drum.net Normal file
View File

@ -0,0 +1,853 @@
(export (version D)
(design
(source /home/eddy/Dropbox/Projects/STM8_samples/DRUM/schematics/drum.sch)
(date "Вт 14 окт 2014 00:52:41")
(tool "eeschema (2013-may-18)-stable"))
(components
(comp (ref P1)
(value CONN_5)
(libsource (lib conn) (part CONN_5))
(sheetpath (names /) (tstamps /))
(tstamp 52FB4AA7))
(comp (ref DA1)
(value TDA2822)
(footprint DIP-8__300)
(libsource (lib tda2822) (part TDA2822))
(sheetpath (names /) (tstamps /))
(tstamp 53D63E9D))
(comp (ref C1)
(value 100u)
(libsource (lib device) (part C))
(sheetpath (names /) (tstamps /))
(tstamp 53D695F4))
(comp (ref C2)
(value 100u)
(libsource (lib device) (part C))
(sheetpath (names /) (tstamps /))
(tstamp 53D69710))
(comp (ref DD1)
(value CD74HC154)
(footprint MODULE)
(datasheet DOCUMENTATION)
(libsource (lib CD74HC154) (part CD74HC154))
(sheetpath (names /) (tstamps /))
(tstamp 53D73322))
(comp (ref R2)
(value 10k)
(footprint SM0603)
(libsource (lib device) (part R))
(sheetpath (names /) (tstamps /))
(tstamp 541D399A))
(comp (ref R4)
(value 10k)
(footprint SM0603)
(libsource (lib device) (part R))
(sheetpath (names /) (tstamps /))
(tstamp 541D48EE))
(comp (ref R1)
(value 10k)
(footprint SM0603)
(libsource (lib device) (part R))
(sheetpath (names /) (tstamps /))
(tstamp 541D517A))
(comp (ref R3)
(value 3.3k)
(footprint SM0603)
(libsource (lib device) (part R))
(sheetpath (names /) (tstamps /))
(tstamp 541D5363))
(comp (ref Q5)
(value 2N7002)
(footprint transistors_gaui-SOT23)
(libsource (lib transistors_gaui) (part 2N7002))
(sheetpath (names /) (tstamps /))
(tstamp 541D5E5C))
(comp (ref Q6)
(value 2N7002)
(footprint transistors_gaui-SOT23)
(libsource (lib transistors_gaui) (part 2N7002))
(sheetpath (names /) (tstamps /))
(tstamp 541D6AAD))
(comp (ref Q3)
(value 2N7002)
(footprint transistors_gaui-SOT23)
(libsource (lib transistors_gaui) (part 2N7002))
(sheetpath (names /) (tstamps /))
(tstamp 541D6C1B))
(comp (ref Q1)
(value 2N7002)
(footprint transistors_gaui-SOT23)
(libsource (lib transistors_gaui) (part 2N7002))
(sheetpath (names /) (tstamps /))
(tstamp 541D6DE3))
(comp (ref Q2)
(value 2N7002)
(footprint transistors_gaui-SOT23)
(libsource (lib transistors_gaui) (part 2N7002))
(sheetpath (names /) (tstamps /))
(tstamp 541D6DE9))
(comp (ref Q4)
(value 2N7002)
(footprint transistors_gaui-SOT23)
(libsource (lib transistors_gaui) (part 2N7002))
(sheetpath (names /) (tstamps /))
(tstamp 541D6DEF))
(comp (ref D1)
(value BZX55C3V6)
(libsource (lib device) (part ZENERSMALL))
(sheetpath (names /) (tstamps /))
(tstamp 541D94C6))
(comp (ref D2)
(value BZX55C3V6)
(libsource (lib device) (part ZENERSMALL))
(sheetpath (names /) (tstamps /))
(tstamp 541D9B34))
(comp (ref X1)
(value STM8S105BOARD)
(footprint devboard_pins-9-14)
(libsource (lib stm8s105k4t6c) (part STM8S105BOARD))
(sheetpath (names /) (tstamps /))
(tstamp 5425C192))
(comp (ref R6)
(value 100k)
(footprint SM0603)
(libsource (lib device) (part R))
(sheetpath (names /) (tstamps /))
(tstamp 543A7793))
(comp (ref C4)
(value 100u)
(libsource (lib device) (part CP1))
(sheetpath (names /) (tstamps /))
(tstamp 543CD89A))
(comp (ref C3)
(value 100u)
(libsource (lib device) (part CP1))
(sheetpath (names /) (tstamps /))
(tstamp 543CDB79))
(comp (ref P7)
(value CONN_10)
(libsource (lib conn) (part CONN_10))
(sheetpath (names /) (tstamps /))
(tstamp 543F4960))
(comp (ref D9)
(value DIODESCH)
(libsource (lib device) (part DIODESCH))
(sheetpath (names /) (tstamps /))
(tstamp 543FC340))
(comp (ref P8)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 544041B0))
(comp (ref P9)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 54404214))
(comp (ref P10)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 5440421A))
(comp (ref P11)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 5440432F))
(comp (ref P12)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 54404335))
(comp (ref P13)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 544043E9))
(comp (ref P15)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 544043F5))
(comp (ref P16)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 54404452))
(comp (ref P22)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 54404563))
(comp (ref P23)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 54404569))
(comp (ref P24)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 5440456F))
(comp (ref P25)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 54404575))
(comp (ref P26)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 5440457B))
(comp (ref P27)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 54404581))
(comp (ref P28)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 54404587))
(comp (ref P29)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 5440458D))
(comp (ref P18)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 5440479D))
(comp (ref P19)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 544047A3))
(comp (ref P20)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 544047A9))
(comp (ref P21)
(value CONN_1)
(libsource (lib conn) (part CONN_1))
(sheetpath (names /) (tstamps /))
(tstamp 544047AF))
(comp (ref SP1)
(value SPEAKER)
(libsource (lib device) (part SPEAKER))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D64216))
(comp (ref X3)
(value CRYSTAL)
(libsource (lib device) (part CRYSTAL))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D64225))
(comp (ref X2)
(value CRYSTAL)
(libsource (lib device) (part CRYSTAL))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D64234))
(comp (ref D3)
(value LED)
(libsource (lib device) (part LED))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D6424D))
(comp (ref D4)
(value LED)
(libsource (lib device) (part LED))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D6425A))
(comp (ref D5)
(value LED)
(libsource (lib device) (part LED))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D64260))
(comp (ref D6)
(value LED)
(libsource (lib device) (part LED))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D6426C))
(comp (ref D7)
(value LED)
(libsource (lib device) (part LED))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D64272))
(comp (ref D8)
(value LED)
(libsource (lib device) (part LED))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D64278))
(comp (ref BT1)
(value BATTERY)
(libsource (lib device) (part BATTERY))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D64296))
(comp (ref SW5)
(value SPST)
(libsource (lib device) (part SPST))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D643ED))
(comp (ref SW1)
(value SW_PUSH)
(libsource (lib device) (part SW_PUSH))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D647DD))
(comp (ref SW2)
(value SW_PUSH)
(libsource (lib device) (part SW_PUSH))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D647EA))
(comp (ref SW3)
(value SW_PUSH)
(libsource (lib device) (part SW_PUSH))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D647F0))
(comp (ref SW4)
(value SW_PUSH)
(libsource (lib device) (part SW_PUSH))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D647F6))
(comp (ref R5)
(value 330)
(libsource (lib device) (part R))
(sheetpath (names /DRUM/) (tstamps /53D64077/))
(tstamp 53D77D36))
(comp (ref BT2)
(value BATTERY)
(libsource (lib device) (part BATTERY))
(sheetpath (names /Player/) (tstamps /53D66CFD/))
(tstamp 53D66E57))
(comp (ref P2)
(value CONN_2)
(libsource (lib conn) (part CONN_2))
(sheetpath (names /Player/) (tstamps /53D66CFD/))
(tstamp 541D2C34))
(comp (ref P3)
(value CONN_2)
(libsource (lib conn) (part CONN_2))
(sheetpath (names /Player/) (tstamps /53D66CFD/))
(tstamp 541D2C57))
(comp (ref P4)
(value CONN_2)
(libsource (lib conn) (part CONN_2))
(sheetpath (names /Player/) (tstamps /53D66CFD/))
(tstamp 541D2C5F))
(comp (ref P5)
(value CONN_2)
(libsource (lib conn) (part CONN_2))
(sheetpath (names /Player/) (tstamps /53D66CFD/))
(tstamp 541D2C67))
(comp (ref P6)
(value CONN_2)
(libsource (lib conn) (part CONN_2))
(sheetpath (names /Player/) (tstamps /53D66CFD/))
(tstamp 541D2C6F)))
(libparts
(libpart (lib device) (part BATTERY)
(fields
(field (name Reference) BT)
(field (name Value) BATTERY))
(pins
(pin (num 1) (name +) (type passive))
(pin (num 2) (name -) (type passive))))
(libpart (lib device) (part C)
(description "Condensateur non polarise")
(footprints
(fp SM*)
(fp C?)
(fp C1-1))
(fields
(field (name Reference) C)
(field (name Value) C))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib device) (part CP1)
(description "Condensateur polarise")
(footprints
(fp CP*)
(fp SM*))
(fields
(field (name Reference) C)
(field (name Value) CP1))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib device) (part CRYSTAL)
(fields
(field (name Reference) X)
(field (name Value) CRYSTAL))
(pins
(pin (num 1) (name 1) (type passive))
(pin (num 2) (name 2) (type passive))))
(libpart (lib device) (part DIODESCH)
(description "Diode schottky")
(footprints
(fp D?)
(fp S*))
(fields
(field (name Reference) D)
(field (name Value) DIODESCH))
(pins
(pin (num 1) (name A) (type passive))
(pin (num 2) (name K) (type passive))))
(libpart (lib device) (part LED)
(footprints
(fp LED-3MM)
(fp LED-5MM)
(fp LED-10MM)
(fp LED-0603)
(fp LED-0805)
(fp LED-1206)
(fp LEDV))
(fields
(field (name Reference) D)
(field (name Value) LED))
(pins
(pin (num 1) (name A) (type passive))
(pin (num 2) (name K) (type passive))))
(libpart (lib device) (part R)
(description Resistance)
(footprints
(fp R?)
(fp SM0603)
(fp SM0805)
(fp R?-*)
(fp SM1206))
(fields
(field (name Reference) R)
(field (name Value) R))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib device) (part SPEAKER)
(fields
(field (name Reference) SP)
(field (name Value) SPEAKER))
(pins
(pin (num 1) (name 1) (type input))
(pin (num 2) (name 2) (type input))))
(libpart (lib device) (part SPST)
(description "Interrupteur simple")
(fields
(field (name Reference) SW)
(field (name Value) SPST))
(pins
(pin (num 1) (name 1) (type input))
(pin (num 2) (name 2) (type input))))
(libpart (lib device) (part SW_PUSH)
(description "Push Button")
(fields
(field (name Reference) SW)
(field (name Value) SW_PUSH))
(pins
(pin (num 1) (name 1) (type passive))
(pin (num 2) (name 2) (type passive))))
(libpart (lib device) (part ZENERsmall)
(description "Diode zener")
(footprints
(fp D?)
(fp SO*)
(fp SM*))
(fields
(field (name Reference) D)
(field (name Value) ZENERsmall))
(pins
(pin (num 1) (name A) (type passive))
(pin (num 2) (name K) (type passive))))
(libpart (lib conn) (part CONN_1)
(description "1 pin")
(fields
(field (name Reference) P)
(field (name Value) CONN_1))
(pins
(pin (num 1) (name 1) (type passive))))
(libpart (lib conn) (part CONN_10)
(description "Symbole general de connecteur")
(fields
(field (name Reference) P)
(field (name Value) CONN_10))
(pins
(pin (num 1) (name P1) (type passive))
(pin (num 2) (name P2) (type passive))
(pin (num 3) (name P3) (type passive))
(pin (num 4) (name P4) (type passive))
(pin (num 5) (name P5) (type passive))
(pin (num 6) (name P6) (type passive))
(pin (num 7) (name P7) (type passive))
(pin (num 8) (name P8) (type passive))
(pin (num 9) (name P9) (type passive))
(pin (num 10) (name P10) (type passive))))
(libpart (lib conn) (part CONN_2)
(description "Symbole general de connecteur")
(fields
(field (name Reference) P)
(field (name Value) CONN_2))
(pins
(pin (num 1) (name P1) (type passive))
(pin (num 2) (name PM) (type passive))))
(libpart (lib conn) (part CONN_5)
(description "Symbole general de connecteur")
(fields
(field (name Reference) P)
(field (name Value) CONN_5))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))
(pin (num 3) (name ~) (type passive))
(pin (num 4) (name ~) (type passive))
(pin (num 5) (name ~) (type passive))))
(libpart (lib tda2822) (part TDA2822)
(fields
(field (name Reference) DA)
(field (name Value) TDA2822)
(field (name Footprint) DIP-4__300)
(field (name Datasheet) ~))
(pins
(pin (num 1) (name ~) (type input))
(pin (num 2) (name V+) (type power_in))
(pin (num 3) (name ~) (type input))
(pin (num 4) (name V-) (type power_in))
(pin (num 5) (name -) (type input))
(pin (num 6) (name +) (type input))
(pin (num 7) (name +) (type input))
(pin (num 8) (name -) (type input))))
(libpart (lib stm8s105k4t6c) (part stm8s105board)
(footprints
(fp stm8s105board))
(fields
(field (name Reference) X)
(field (name Value) stm8s105board)
(field (name Footprint) devboard_pins-9-14)
(field (name Datasheet) ~))
(pins
(pin (num 1) (name "VDD(3.3-5v)") (type power_in))
(pin (num 2) (name GND) (type power_in))
(pin (num 3) (name NRST) (type input))
(pin (num 4) (name OSCIN/PA1) (type 3state))
(pin (num 5) (name OSCOUT/PA2) (type 3state))
(pin (num 6) (name PF4/AIN12) (type 3state))
(pin (num 7) (name PB5/AIN5[I2X_SDA]) (type 3state))
(pin (num 8) (name PB4/AIN4[I2C_SCL]) (type 3state))
(pin (num 9) (name PB3/AIN3[TIM1_ETR]) (type 3state))
(pin (num 10) (name PB2/AIN2[TIM1_CH3N]) (type 3state))
(pin (num 11) (name PB1/AIN1_[TIM1_CH2N]) (type 3state))
(pin (num 12) (name PB0/AIN0_[TIM1_CH1N]) (type 3state))
(pin (num 13) (name PE5/SPI_NSS) (type 3state))
(pin (num 14) (name "PC1(HS)/TIM1_CH1") (type 3state))
(pin (num 15) (name "PC2(HS)/TIM1_CH2") (type 3state))
(pin (num 16) (name "PC3(HS)/TIM1_CH3") (type 3state))
(pin (num 17) (name "PC4(HS)/TIM1_CH4") (type 3state))
(pin (num 18) (name "PC5(HS)/SPI_SCK") (type 3state))
(pin (num 19) (name "PC6(HS)/SPI_MOSI") (type 3state))
(pin (num 20) (name "PC7(HS)/SPI_MISO") (type 3state))
(pin (num 21) (name "PD0(HS)/TIM3_CH2[TIM1_BKIN][CLK_CCO]") (type 3state))
(pin (num 22) (name "PD1(HS)/SWIM") (type 3state))
(pin (num 23) (name "PD2(HS)/TIM3_CH1[TIM2_CH3]") (type 3state))
(pin (num 24) (name "PD3(HS)/TIM2_CH2[ADC_ETR]") (type 3state))
(pin (num 25) (name "PD4(HS)/TIM2_CH1[BEEP]") (type 3state))
(pin (num 26) (name PD5/UART2_TX) (type 3state))
(pin (num 27) (name PD6/UART2_RX) (type 3state))
(pin (num 28) (name PD7/TLI[TIM1_CH4]) (type 3state))))
(libpart (lib CD74HC154) (part CD74HC154)
(fields
(field (name Reference) DD)
(field (name Value) CD74HC154)
(field (name Footprint) MODULE)
(field (name Datasheet) DOCUMENTATION))
(pins
(pin (num 1) (name ~Y0) (type output))
(pin (num 2) (name ~Y1) (type output))
(pin (num 3) (name ~Y2) (type output))
(pin (num 4) (name ~Y3) (type output))
(pin (num 5) (name ~Y4) (type output))
(pin (num 6) (name ~Y5) (type output))
(pin (num 7) (name ~Y6) (type output))
(pin (num 8) (name ~Y7) (type output))
(pin (num 9) (name ~Y8) (type output))
(pin (num 10) (name ~Y9) (type output))
(pin (num 11) (name ~Y10) (type output))
(pin (num 12) (name GND) (type power_in))
(pin (num 13) (name ~Y11) (type output))
(pin (num 14) (name ~Y12) (type output))
(pin (num 15) (name ~Y13) (type output))
(pin (num 16) (name ~Y14) (type output))
(pin (num 17) (name ~Y15) (type output))
(pin (num 18) (name ~E1) (type input))
(pin (num 19) (name ~E2) (type input))
(pin (num 20) (name A3) (type input))
(pin (num 21) (name A2) (type input))
(pin (num 22) (name A1) (type input))
(pin (num 23) (name A0) (type input))
(pin (num 24) (name VCC) (type power_in))))
(libpart (lib transistors_gaui) (part 2N7002)
(fields
(field (name Reference) Q)
(field (name Value) 2N7002)
(field (name Footprint) transistors_gaui-SOT23))
(pins
(pin (num 1) (name G) (type passive))
(pin (num 2) (name S) (type passive))
(pin (num 3) (name D) (type passive)))))
(libraries
(library (logical device)
(uri /usr/share/kicad/library/device.lib))
(library (logical conn)
(uri /usr/share/kicad/library/conn.lib))
(library (logical tda2822)
(uri tda2822.lib))
(library (logical stm8s105k4t6c)
(uri stm8s105k4t6c.lib))
(library (logical CD74HC154)
(uri CD74HC154.lib))
(library (logical transistors_gaui)
(uri /usr/share/kicad/library/transistors_gaui.lib)))
(nets
(net (code 1) (name "")
(node (ref Q3) (pin 2))
(node (ref Q4) (pin 3))
(node (ref Q3) (pin 1)))
(net (code 2) (name /PB0)
(node (ref X1) (pin 12))
(node (ref DD1) (pin 23)))
(net (code 3) (name /PD7)
(node (ref X1) (pin 28)))
(net (code 4) (name /PD4)
(node (ref Q6) (pin 1))
(node (ref X1) (pin 25)))
(net (code 5) (name /PD3)
(node (ref X1) (pin 24))
(node (ref Q5) (pin 1)))
(net (code 6) (name /PD2)
(node (ref Q4) (pin 1))
(node (ref X1) (pin 23)))
(net (code 7) (name /PE5)
(node (ref X1) (pin 13))
(node (ref DD1) (pin 21)))
(net (code 8) (name /SWIM/PD1)
(node (ref Q2) (pin 1))
(node (ref X1) (pin 22)))
(net (code 9) (name /PD0)
(node (ref X1) (pin 21))
(node (ref Q1) (pin 1)))
(net (code 10) (name /PB1)
(node (ref X1) (pin 11))
(node (ref DD1) (pin 22)))
(net (code 11) (name /PC7)
(node (ref X1) (pin 20)))
(net (code 12) (name /OSC2IN)
(node (ref X1) (pin 5)))
(net (code 13) (name /OSC1IN)
(node (ref X1) (pin 4)))
(net (code 14) (name /NRST)
(node (ref X1) (pin 3)))
(net (code 15) (name "")
(node (ref DA1) (pin 8))
(node (ref R2) (pin 2))
(node (ref R4) (pin 1)))
(net (code 16) (name "")
(node (ref DA1) (pin 5))
(node (ref R3) (pin 2))
(node (ref R1) (pin 2)))
(net (code 17) (name "")
(node (ref DA1) (pin 3))
(node (ref C3) (pin 1))
(node (ref R3) (pin 1)))
(net (code 18) (name /PC6)
(node (ref X1) (pin 19))
(node (ref DD1) (pin 19)))
(net (code 19) (name /PC1)
(node (ref R2) (pin 1))
(node (ref X1) (pin 14)))
(net (code 20) (name /Player/BTN0a)
(node (ref P7) (pin 10))
(node (ref P2) (pin 1))
(node (ref Q1) (pin 3)))
(net (code 21) (name /PB2)
(node (ref R6) (pin 1))
(node (ref D9) (pin 2))
(node (ref P16) (pin 1))
(node (ref X1) (pin 10)))
(net (code 22) (name /Player/BTN0b)
(node (ref Q1) (pin 2))
(node (ref P7) (pin 9))
(node (ref P2) (pin 2)))
(net (code 23) (name /Player/BTN1b)
(node (ref Q2) (pin 3))
(node (ref P3) (pin 2))
(node (ref P7) (pin 8)))
(net (code 24) (name /Player/BTN1a)
(node (ref P3) (pin 1))
(node (ref P7) (pin 7))
(node (ref Q2) (pin 2)))
(net (code 25) (name /Player/BTN2a)
(node (ref P4) (pin 1))
(node (ref P7) (pin 6))
(node (ref Q3) (pin 3)))
(net (code 26) (name /Player/BTN2b)
(node (ref P7) (pin 5))
(node (ref Q4) (pin 2))
(node (ref P4) (pin 2)))
(net (code 27) (name /Player/BTN3a)
(node (ref Q5) (pin 3))
(node (ref P7) (pin 4))
(node (ref P5) (pin 1)))
(net (code 28) (name /Player/BTN3b)
(node (ref Q5) (pin 2))
(node (ref P5) (pin 2))
(node (ref P7) (pin 3)))
(net (code 29) (name /Player/BTN4a)
(node (ref Q6) (pin 3))
(node (ref P6) (pin 1))
(node (ref P7) (pin 2)))
(net (code 30) (name /Player/BTN4b)
(node (ref P7) (pin 1))
(node (ref P6) (pin 2))
(node (ref Q6) (pin 2)))
(net (code 31) (name /DRUM/BUTN0)
(node (ref X1) (pin 15))
(node (ref SW1) (pin 1))
(node (ref P29) (pin 1)))
(net (code 32) (name VCC)
(node (ref DA1) (pin 2))
(node (ref P1) (pin 1))
(node (ref R5) (pin 1))
(node (ref SW5) (pin 1))
(node (ref X1) (pin 1))
(node (ref X1) (pin 8))
(node (ref DD1) (pin 24))
(node (ref P8) (pin 1))
(node (ref D9) (pin 1)))
(net (code 33) (name /DRUM/LED4)
(node (ref D7) (pin 2))
(node (ref P21) (pin 1))
(node (ref DD1) (pin 5)))
(net (code 34) (name /DRUM/LED5)
(node (ref P20) (pin 1))
(node (ref DD1) (pin 6))
(node (ref D8) (pin 2)))
(net (code 35) (name /PD5)
(node (ref X1) (pin 26))
(node (ref P1) (pin 4))
(node (ref P19) (pin 1)))
(net (code 36) (name /PD6)
(node (ref X1) (pin 27))
(node (ref P18) (pin 1))
(node (ref P1) (pin 3)))
(net (code 37) (name /DRUM/BUTN1)
(node (ref P28) (pin 1))
(node (ref SW2) (pin 1))
(node (ref X1) (pin 16)))
(net (code 38) (name /DRUM/BUTN2)
(node (ref SW3) (pin 1))
(node (ref X1) (pin 17))
(node (ref P27) (pin 1)))
(net (code 39) (name /DRUM/BUTN3)
(node (ref P26) (pin 1))
(node (ref X1) (pin 18))
(node (ref SW4) (pin 1)))
(net (code 40) (name /DRUM/LED0)
(node (ref DD1) (pin 1))
(node (ref P25) (pin 1))
(node (ref D3) (pin 2)))
(net (code 41) (name /DRUM/LED1)
(node (ref DD1) (pin 2))
(node (ref D4) (pin 2))
(node (ref P24) (pin 1)))
(net (code 42) (name /DRUM/LED2)
(node (ref D5) (pin 2))
(node (ref P23) (pin 1))
(node (ref DD1) (pin 3)))
(net (code 43) (name /DRUM/LED3)
(node (ref D6) (pin 2))
(node (ref P22) (pin 1))
(node (ref DD1) (pin 4)))
(net (code 44) (name /DRUM/DRUM1)
(node (ref X3) (pin 1))
(node (ref P13) (pin 1))
(node (ref X1) (pin 7))
(node (ref D1) (pin 2)))
(net (code 45) (name /DRUM/DRUM0)
(node (ref X2) (pin 1))
(node (ref X1) (pin 6))
(node (ref P12) (pin 1))
(node (ref D2) (pin 2)))
(net (code 46) (name /DRUM/SPEAKER)
(node (ref P11) (pin 1))
(node (ref C4) (pin 2))
(node (ref C3) (pin 2))
(node (ref SP1) (pin 1)))
(net (code 47) (name GND)
(node (ref X2) (pin 2))
(node (ref X3) (pin 2))
(node (ref SP1) (pin 2))
(node (ref BT1) (pin 2))
(node (ref SW1) (pin 2))
(node (ref SW2) (pin 2))
(node (ref SW3) (pin 2))
(node (ref SW4) (pin 2))
(node (ref P1) (pin 5))
(node (ref D2) (pin 1))
(node (ref D1) (pin 1))
(node (ref R6) (pin 2))
(node (ref P9) (pin 1))
(node (ref DA1) (pin 7))
(node (ref DA1) (pin 6))
(node (ref DA1) (pin 4))
(node (ref DD1) (pin 12))
(node (ref DD1) (pin 20))
(node (ref X1) (pin 2))
(node (ref BT2) (pin 2))
(node (ref DD1) (pin 18)))
(net (code 48) (name /Audio_in)
(node (ref C1) (pin 2))
(node (ref R1) (pin 1))
(node (ref P10) (pin 1))
(node (ref C2) (pin 2)))
(net (code 49) (name /Player/SNDb)
(node (ref C2) (pin 1)))
(net (code 50) (name /Player/SNDa)
(node (ref C1) (pin 1)))
(net (code 51) (name /Player/BAT+)
(node (ref P15) (pin 1))
(node (ref X1) (pin 9))
(node (ref BT2) (pin 1)))
(net (code 52) (name "")
(node (ref C4) (pin 1))
(node (ref R4) (pin 2))
(node (ref DA1) (pin 1)))
(net (code 55) (name /5.0V)
(node (ref P1) (pin 2)))
(net (code 56) (name "")
(node (ref DD1) (pin 15)))
(net (code 57) (name "")
(node (ref DD1) (pin 11)))
(net (code 58) (name "")
(node (ref DD1) (pin 10)))
(net (code 59) (name "")
(node (ref DD1) (pin 9)))
(net (code 60) (name "")
(node (ref DD1) (pin 8)))
(net (code 61) (name "")
(node (ref DD1) (pin 7)))
(net (code 62) (name "")
(node (ref DD1) (pin 17)))
(net (code 63) (name "")
(node (ref DD1) (pin 16)))
(net (code 64) (name "")
(node (ref DD1) (pin 14)))
(net (code 65) (name "")
(node (ref DD1) (pin 13)))
(net (code 66) (name "")
(node (ref SW5) (pin 2))
(node (ref BT1) (pin 1)))
(net (code 67) (name "")
(node (ref D4) (pin 1))
(node (ref D3) (pin 1))
(node (ref D5) (pin 1))
(node (ref D7) (pin 1))
(node (ref D8) (pin 1))
(node (ref D6) (pin 1))
(node (ref R5) (pin 2)))))

View File

@ -1,5 +1,5 @@
update=Сб 20 сен 2014 10:42:55
last_client=pcbnew
update=Сб 11 окт 2014 09:56:09
last_client=cvpcb
[general]
version=1
[eeschema]
@ -65,7 +65,6 @@ DrawSegmentWidth=" 0.200000"
BoardOutlineThickness=" 0.100000"
ModuleOutlineThickness=" 0.150000"
[pcbnew/libraries]
LibDir=
LibName1=sockets
LibName2=connect
LibName3=discret
@ -82,4 +81,11 @@ LibName13=led
LibName14=dip_sockets
LibName15=pga_sockets
LibName16=valves
LibName17=transistors_gaui
LibName17=capacitors
LibName18=devboard_pins
LibDir=
[cvpcb]
version=1
NetIExt=net
[cvpcb/libraries]
EquName1=devcms

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
EESchema-LIBRARY Version 2.3 Date: Вт 11 фев 2014 17:26:38
EESchema-LIBRARY Version 2.3 Date: Пт 26 сен 2014 22:55:41
#encoding utf-8
#
# STM8S003K3T
@ -48,6 +48,49 @@ X PD4/BEEP/TIM2_CH1 29 -1000 250 149 R 40 40 1 1 B
ENDDRAW
ENDDEF
#
# stm8s105board
#
DEF stm8s105board X 0 40 Y Y 1 F N
F0 "X" 0 1050 60 H V C CNN
F1 "stm8s105board" 0 -650 60 H V C CNN
F2 "devboard_pins-9-14" 0 0 60 H I C CNN
F3 "~" 0 0 60 H V C CNN
$FPLIST
stm8s105board
$ENDFPLIST
DRAW
S -1100 950 1100 -550 0 1 0 N
X VDD(3.3-5v) 1 -1400 850 300 R 50 50 1 1 W
X GND 2 -1400 750 300 R 50 50 1 1 W
X NRST 3 -1400 650 300 R 50 50 1 1 I
X OSCIN/PA1 4 -1400 550 300 R 50 50 1 1 T
X OSCOUT/PA2 5 -1400 450 300 R 50 50 1 1 T
X PF4/AIN12 6 -1400 350 300 R 50 50 1 1 T
X PB5/AIN5[I2X_SDA] 7 -1400 250 300 R 50 50 1 1 T
X PB4/AIN4[I2C_SCL] 8 -1400 150 300 R 50 50 1 1 T
X PB3/AIN3[TIM1_ETR] 9 -1400 50 300 R 50 50 1 1 T
X PB2/AIN2[TIM1_CH3N] 10 -1400 -50 300 R 50 50 1 1 T
X PC7(HS)/SPI_MISO 20 1400 50 300 L 50 50 1 1 T
X PB1/AIN1_[TIM1_CH2N] 11 -1400 -150 300 R 50 50 1 1 T
X PD0(HS)/TIM3_CH2[TIM1_BKIN][CLK_CCO] 21 1400 150 300 L 50 39 1 1 T
X PB0/AIN0_[TIM1_CH1N] 12 -1400 -250 300 R 50 50 1 1 T
X PD1(HS)/SWIM 22 1400 250 300 L 50 50 1 1 T
X PE5/SPI_NSS 13 -1400 -350 300 R 50 50 1 1 T
X PD2(HS)/TIM3_CH1[TIM2_CH3] 23 1400 350 300 L 50 50 1 1 T
X PC1(HS)/TIM1_CH1 14 -1400 -450 300 R 50 50 1 1 T
X PD3(HS)/TIM2_CH2[ADC_ETR] 24 1400 450 300 L 50 50 1 1 T
X PC2(HS)/TIM1_CH2 15 1400 -450 300 L 50 50 1 1 T
X PD4(HS)/TIM2_CH1[BEEP] 25 1400 550 300 L 50 50 1 1 T
X PC3(HS)/TIM1_CH3 16 1400 -350 300 L 50 50 1 1 T
X PD5/UART2_TX 26 1400 650 300 L 50 50 1 1 T
X PC4(HS)/TIM1_CH4 17 1400 -250 300 L 50 50 1 1 T
X PD6/UART2_RX 27 1400 750 300 L 50 50 1 1 T
X PC5(HS)/SPI_SCK 18 1400 -150 300 L 50 50 1 1 T
X PD7/TLI[TIM1_CH4] 28 1400 850 300 L 50 50 1 1 T
X PC6(HS)/SPI_MOSI 19 1400 -50 300 L 50 50 1 1 T
ENDDRAW
ENDDEF
#
# STM8S105K4T6C
#
DEF STM8S105K4T6C U 0 40 Y Y 1 F N

View File

@ -1,96 +1,98 @@
:2080A0008080808080880F01AE500BF6A5022712AE530DA627F7AE530EA610F7A6016B0128
:2080C0002014A5042710AE530DA661F7AE530EA6A8F7A6016B010D01271E90CE0011CE0089
:2080E0000F90CF0015CF0013725F001BAE5250A685F7AE5300A685F784808080808080AE68
:208100005302F6A501270A3501001CA4FEAE5302F78080808080805204AE5240F66B047BD9
:2081200004A5202751AE5241F66B017B04A4804D27FD7B0188CD81F484AE00011F02C600E7
:208140001E97C6001E4CC7001E4F9572FB027B01F7C6001DC1001E2612C6001D4CC7001D82
:20816000C6001DA1082604725F001DC6001EA1082604725F001E5B048080AE5342F64424B5
:208180001E90CE001172A90001C60010A90097C6000FA9009590CF0011CF000FCD87DAAEE3
:2081A00053427F8080AE52607FAE5261A603F7AE530CA604F7AE52627FAE5263A610F7AE7E
:2081C00052657FAE5266A608F7AE5258A660F7AE525CA601F7AE530DA67FF7AE530E7FAEA9
:1481E00052547FAE5301A601F7AE526DF6AA80AE526DF78154
:2080C0002014A5042710AE530DA661F7AE530EA6A8F7A6016B010D01271A90CE0011CE008D
:2080E0000F90CF0015CF0013AE5250A685F7AE5300A685F784808080808080AE5302F6A564
:2081000001270A3501001BA4FEAE5302F78080808080805204AE5240F66B047B04A52027DA
:2081200051AE5241F66B017B04A4804D27FD7B0188CD81F084AE00011F02C6001D97C60061
:208140001D4CC7001D4F9572FB027B01F7C6001CC1001D2612C6001C4CC7001CC6001CA180
:20816000082604725F001CC6001DA1082604725F001D5B048080AE5342F644241E90CE00C0
:208180001172A90001C60010A90097C6000FA9009590CF0011CF000FCD881DAE53427F8087
:2081A00080AE52607FAE52617FAE530CA604F7AE52627FAE5263A6FFF7AE52657FAE5266A8
:2081C000A67FF7AE5258A660F7AE525CA601F7AE530DA680F7AE530EA6E8F7AE52547FAEF4
:1081E0005301A601F7AE526DF6AA80AE526DF7812B
:208000008200808382000000820080A0820080A1820080A2820080A3820080A4820080A57E
:20802000820080FA820080FB8200000082000000820080FC820080FD820080FE820080FF45
:2080400082008112820081138200811482000000820000008200811582008116820081178F
:20806000820081798200817A820081A48200000082000000820000008200000082000000D6
:1D808300AE000E2707724F00005A26F9AE004B2709D68B15D7000E5A26F7CC8080F5
:03808000CC8406A7
:2081F400AE52417B03F7AE5240F6A54027F881160390F64D2710905CAE5241F7AE5240F67D
:20821400A54026ED20F6815202C6001EC1001D26034F20271605AE00011F01C6001D97C6BC
:20823400001D4CC7001D4F9572FB01F690F7C6001DA1082604725F001DA6015B0281521C77
:208254005F1F101F0E7B21A1042303CC83287B21A1032603CC83280D212603CC8328965CD1
:208274001F124F5F9772FB127F4CA10C25F51E121C000AA60AF77B21A101270E7B21A102B4
:20829400271C7B21A104272120301E1FF66B185F0F151F0F7B186B117B156B0E201C161FBE
:2082B40090FE5F17101F0E20111E1FE6036B1CE602FE6B101F0E7B1C6B11A6096B0D4B0A6E
:2082D4005F894B001E14891E1489CD88955B089F887B0E6B15840A0D5F417B144172FB12DA
:2082F400AB30F74B0A5F894B001E14891E1489CD89125B081F10170E1E1026041E0E2706CA
:208314007B0DA1FF2CB87B0D4C5F9772FB1289CD82035B025B1C815217CE00111F09CE0086
:208334000F1F075F1F051F030F010F0B965C5C89CD821B5B024D276B7B02A1302403CC83E4
:20835400D97B02A1392303CC83D9A6016B011E05891E05894B0A5F894B00CD89B15B081F0F
:208374001217107B020F0E5F90977B0E909572F9129F1911979E19109572A200309FA20024
:208394006B159EA20017056B037B156B04AEFFFF13054F12044F120324095F1F051F03A67B
:2083B400016B0B90CE001172F209C60010120895C6000F12079790A327109EA2009FA20061
:2083D4002403CC83400D0B26040D0126034F200716051E1AFFA6015B1781AE86F989CD82F3
:2083F400035B021E0389CD82035B024B0ACD81F4848152115F1F051F03AE7F60F6AA01AE30
:208414007F60F7AE50C67FAE5345A607F7AE5346A67DF7AE5341A601F7AE5340A685F7AEF3
:2084340050A0A610F7AE500CF6AA04AE500CF7AE500DF6AA04AE500DF7AE5011F6AA20AEAE
:208454005011F7AE500FF6A4DFAE500FF7AE5007F6AA1FAE5007F7AE5008F6AA1FAE50089B
:20847400F7AE500CF6AA02AE500CF7AE500AF6A4FDAE500AF7AE5242A611F7AE5243A606C7
:20849400F7AE5245A62CF7CD81A59A725D001C2603CC851FC60012C000169097C60011C244
:2084B40000159095C60010C2001495C6000FC2001390C300172214CE0011C30015C6001056
:2084D400C20014C6000FC200132410AE5250F6AA08AE5250F7AE53007F20309358585858D2
:2084F40090CE001765A61089100285725D001B270EAE52657FAE52667F725F001B200CAE0A
:2085140052657FAE5266F73501001BCE001172F0051F0EC6001012046B0DC6000F1203CED4
:208534000019905F88130F909F120E909E12015B012511CE00111305C600101204C6000F9B
:208554001203241DCE00111F05CE000F1F03AE500AF6A804AE500AF7725D00242703CD8894
:2085740022961C000789CD821B5B024D2603CC849F7B07A12B274FA12D2603CC85F9A1456C
:208594002603CC86DDA1462603CC8618A148272AA14C2603CC867AA1502603CC8651A16813
:2085B4002718A16C2603CC86A7A1702603CC8651A1722603CC86D7CC849FAE870289CD82F9
:2085D400035B02CC849FCE00191C0064CF0019CE0019A327102203CC849F35F4001A35019B
:2085F4000019CC849FCE00191D0064CF0019CE0019A300642503CC849F35F4001A35010091
:2086140019CC849F965C89CD832B5B024D27221E01A30040231B1E01A610629E0F0AAE5326
:208634000DF71E01A610620F089FAE530EF7CC849FAE877F89CD83EE5B02CC849F90CE001B
:20865400111714CE000F7B15C700167B14C70015CF0013725F001BAE5250A685F7AE5300D4
:20867400A685F7CC849F965C89CD832B5B024D27161E01A303E8240F1E01A3000123081E0C
:2086940001CF0017CC849FAE878A89CD83EE5B02CC849F965C89CD832B5B024D27197B02C1
:2086B400A43F6B110F101E011310260B1E0189CD87A15B02CC849FAE879589CD83EE5B02DE
:2086D400CC849FCD8804CC849F965C89CD832B5B024D2603CC849F7B0288CD887584CC84F4
:2086F4009F5B1181010A4552524F523A20000A50524F544F3A0A2B2F2D094C4544207065AF
:2087140072696F640A502F7009426F6F6D0A4609536574206672657175656E63790A4C0932
:208734004368616E676520626F6F6D206C656E6774682028696E206D73290A6C09626C6972
:208754006E6B204C454473206279206D61736B0A72097265736574204C4544730A45097322
:208774006574206566666563740A0062616420706572696F6400626164206C656E677468E2
:0D87940000626164206269746D61736B00A6
:118B16000000000000000000006401F40000000000F5
:2087A1005206AE00091F050F015F7B019772FB057B0AA4016B040F03160327067B016B02B7
:2087C1002004A6106B027B02F70C011E09541F097B01A10625D35B06815202AE00091F0105
:2087E100C6005997C600594CC700594F9572FB01F6AE5005F7C60059A1062604725F0059DB
:208801005B02815202AE00091F014F5F9772FB0188A610F7844CA10625F1725F00245B0287
:2088210081CE0022274DC60023CB002097C60022A90095F65F9789CD87A15B02725D00200B
:20884100260BC60021A1FF260435010021C60020CB0021C70020C60023CB002097C60022D2
:20886100A90095F64D260C35FF0021C60020A002C700208152027B05A1042415AE00511F2F
:14888100015F7B05975872FB01FECF0022350100245B02817F
:208B27000001000000400103070F1F3F0021120C0C12210020100804020121110905032352
:1A8B4700130B0727170F2F1F3F00010204081020000025002D0034004A0006
:2088950052040F020F017B0B484F494D262E160D1E0B905859170D1F0B1E09130D7B08128E
:2088B5000C7B07120B240D160D1E0B549056170D1F0B20080C017B016B0220CA7B026B04FF
:2088D5001E09130D7B08120C7B07120B2513160972F20D7B08120C977B07120B9517091F89
:2088F50007160D1E0B549056170D1F0B7B046B030A040D0326CA1E0916075B048152125FA6
:208915001F051F03A6206B027B15484F496B0116171E1590585917171F157B036B0F1E04D0
:20893500887B076B1384081259090F1F047B126B067B0F6B030D01271A7B06AA016B0A7B07
:20895500056B097B046B087B036B0716091705160717031E05131B7B04121A7B031219256B
:208975002B160572F21B7B04121A6B0C7B03121917056B037B0C6B047B18AA0190977B17DB
:2089950090957B16977B159517171F150A020D022703CC891D1E1716155B12815240909631
:2089B500905C961C00431F0B1E0BE603961C00471F151E151F171E171F3F1E3F88E60197F9
:2089D500844290FF72A900021E0BE6031E151F111E111F131E131F191E1988E603978442CC
:2089F50090FF965C1F1B1E1BF66B1D1E0BF697161590E603429F1B1D1E1BF71E1BF66B1E95
:208A15001E0BE60197161590E602429F1B1E1E1BF79096905C93FE1F1F1E0BE6011E151F6A
:208A3500211E211F231E231F251E2588E60397844272FB1F90FF93FE1F271E0BE6021E15B3
:208A55001F291E291F2B1E2B1F2F1E2F88E60297844272FB2790FF160B1E0BE6021E151FD0
:208A7500311E311F331E331F351E3588E6019784429F90F71E0B5C1F371E0BE60290971EF4
:208A950015E60390421E37FF16151E0BE6031E151F3D1E3D1F051E0588F69784429F90F72E
:208AB5001E155C1F2D1E0BE60390971E15E60290421E2DFF1E151C00037F1E0B1C00037FBE
:208AD500965CE6036B0AE6026B09E6016B08F61643170D164572F909173B887B09190F6B48
:208AF5003B84190D6B39163BEF021639FFFE16491E4772F93B9F193A979E193995515B40E6
:018B150081DE
:20802000820080F6820080F78200000082000000820080F8820080F9820080FA820080FB5D
:208040008200810E8200810F820081108200000082000000820081118200811282008113A7
:208060008200817582008176820081A08200000082000000820000008200000082000000E2
:1D808300AE000E2707724F00005A26F9AE004A2709D68B58D7000E5A26F7CC8080B3
:03808000CC8403AA
:2081F000AE52417B03F7AE5240F6A54027F881160390F64D2710905CAE5241F7AE5240F681
:20821000A54026ED20F6815202C6001DC1001C26034F20271605AE00011F01C6001C97C6C3
:20823000001C4CC7001C4F9572FB01F690F7C6001CA1082604725F001CA6015B0281521C7F
:208250005F1F101F0E7B21A1042303CC83247B21A1032603CC83240D212603CC8324965CE1
:208270001F124F5F9772FB127F4CA10C25F51E121C000AA60AF77B21A101270E7B21A102B8
:20829000271C7B21A104272120301E1FF66B185F0F151F0F7B186B117B156B0E201C161FC2
:2082B00090FE5F17101F0E20111E1FE6036B1CE602FE6B101F0E7B1C6B11A6096B0D4B0A72
:2082D0005F894B001E14891E1489CD88D85B089F887B0E6B15840A0D5F417B144172FB129B
:2082F000AB30F74B0A5F894B001E14891E1489CD89555B081F10170E1E1026041E0E27068B
:208310007B0DA1FF2CB87B0D4C5F9772FB1289CD81FF5B025B1C815217CE00111F0ACE008E
:208330000F1F085F1F031F010F050F07961C000689CD82175B024D276B7B06A1302403CC04
:2083500083D67B06A1392303CC83D6A6016B051E03891E03894B0A5F894B00CD89F45B086E
:208370001F1217107B060F165F90977B16909572F9129F1911979E19109572A200309FA2F5
:20839000006B0D9EA20017036B017B0D6B02AEFFFF13034F12024F120124095F1F031F0145
:2083B000A6016B0790CE001172F20AC60010120995C6000F12089790A327109EA2009FA2C0
:2083D000002403CC833C0D0726040D0526034F200716031E1AFFA6015B1781AE873C89CD3B
:2083F00081FF5B021E0389CD81FF5B024B0ACD81F0848152275F1F031F010F07AE7F60F6F1
:20841000AA01AE7F60F7AE50C67FAE5345A607F7AE5346A67DF7AE5341A601F7AE5340A6C8
:2084300085F7AE50A0A610F7AE500CF6AA04AE500CF7AE500DF6AA04AE500DF7AE5011F600
:20845000AA20AE5011F7AE500FF6A4DFAE500FF7AE5007F6AA1FAE5007F7AE5008F6AA1F2D
:20847000AE5008F7AE500CF6AA02AE500CF7AE500AF6A4FDAE500AF7AE5242A611F7AE52B4
:2084900043A606F7AE5245A62CF7CD81A19A725D001B2603CC856B725F001BC60012C000FC
:2084B000166B0BC60011C2001597C60010C2001495C6000FC200131F256B247B0B6B27CE37
:2084D00000170F190F1813267B1912257B181224251AC60012C10016C60011C20015C600F7
:2084F00010C20014C6000FC200132410AE5250F6AA08AE5250F7AE53007F205F0D07270C23
:20851000AE52657FAE52667F0F07204F7B246B1C1625887B286B2084A6084D2709081F9080
:2085300059091C4A26F717097B1F6B0B7B1C6B08891E1A891E0E891E0E89CD89555B089FAB
:208550006B230F220F214F7B236B11A6FF1011AE52657FAE5266F7A6016B07CE001172F052
:20857000031F14C6001012026B13C6000F1201CE0019905F881315909F1214909E12015BEE
:20859000012511CE00111303C600101202C6000F1201241DCE00111F03CE000F1F01AE5090
:2085B0000AF6A804AE500AF7725D00232703CD8865961C000C89CD82175B024D2603CC845A
:2085D0009E7B0CA12B274FA12D2603CC8645A1452603CC871EA1462603CC8664A148272A16
:2085F000A14C2603CC86B7A1502603CC8692A1682718A16C2603CC86E6A1702603CC86927A
:20861000A1722603CC8718CC849EAE874589CD81FF5B02CC849ECE00191C0064CF0019CEFD
:208630000019A327102203CC849E35F4001A35010019CC849ECE00191D0064CF0019CE0086
:2086500019A300642503CC849E35F4001A35010019CC849E961C000589CD83275B024D27CC
:20867000157B050F16AE530DF77B06950F0D9EAE530EF7CC849EAE87C289CD83EB5B02CC83
:20869000849E90CE0011172ACE000F7B2BC700167B2AC70015CF0013AE5250A685F7AE53C2
:2086B00000A685F7CC849E961C000589CD83275B024D27161E05A303E8240F1E05A3000151
:2086D00023081E05CF0017CC849EAE87CD89CD83EB5B02CC849E961C000589CD83275B0243
:2086F0004D27197B06A43F6B100F0F1E05130F260B1E0589CD87E45B02CC849EAE87D889A5
:20871000CD83EB5B02CC849ECD8847CC849E961C000589CD83275B024D2603CC849E7B0640
:2087300088CD88B884CC849E5B2781010A4552524F523A20000A50524F544F3A0A2B2F2DC7
:20875000094C454420706572696F640A502F7009426F6F6D0A460953657420667265717531
:20877000656E63790A4C094368616E676520626F6F6D206C656E6774682028696E206D7307
:20879000290A6C09626C696E6B204C454473206279206D61736B0A72097265736574204CCE
:2087B0004544730A4509736574206566666563740A0062616420706572696F640062616481
:1487D000206C656E67746800626164206269746D61736B00C1
:108B59000000000000000000006401F400000000B3
:2087E4005206AE00091F050F015F7B019772FB057B0AA4016B040F03160327067B016B0274
:208804002004A6106B027B02F70C011E09541F097B01A10625D35B06815202AE00091F01C1
:20882400C6005897C600584CC700584F9572FB01F6AE5005F7C60058A1062604725F00589C
:208844005B02815202AE00091F014F5F9772FB0188A610F7844CA10625F1725F00235B0245
:2088640081CE0021274DC60022CB001F97C60021A90095F65F9789CD87E45B02725D001F8A
:20888400260BC60020A1FF260435010020C6001FCB0020C7001FC60022CB001F97C6002197
:2088A400A90095F64D260C35FF0020C6001FA002C7001F8152027B05A1042415AE00501FF0
:1488C400015F7B05975872FB01FECF0021350100235B02813E
:208B69000001000000400103070F1F3F0021120C0C12210020100804020121110905032310
:1A8B8900130B0727170F2F1F3F00010204081020000024002C0033004900C8
:2088D80052040F020F017B0B484F494D262E160D1E0B905859170D1F0B1E09130D7B08124B
:2088F8000C7B07120B240D160D1E0B549056170D1F0B20080C017B016B0220CA7B026B04BC
:208918001E09130D7B08120C7B07120B2513160972F20D7B08120C977B07120B9517091F45
:2089380007160D1E0B549056170D1F0B7B046B030A040D0326CA1E0916075B048152125F62
:208958001F051F03A6206B027B15484F496B0116171E1590585917171F157B036B0F1E048D
:20897800887B076B1384081259090F1F047B126B067B0F6B030D01271A7B06AA016B0A7BC4
:20899800056B097B046B087B036B0716091705160717031E05131B7B04121A7B0312192528
:2089B8002B160572F21B7B04121A6B0C7B03121917056B037B0C6B047B18AA0190977B1798
:2089D80090957B16977B159517171F150A020D022703CC89601E1716155B128152409096AB
:2089F800905C961C00431F0B1E0BE603961C00471F151E151F171E171F3F1E3F88E60197B6
:208A1800844290FF72A900021E0BE6031E151F111E111F131E131F191E1988E60397844288
:208A380090FF965C1F1B1E1BF66B1D1E0BF697161590E603429F1B1D1E1BF71E1BF66B1E51
:208A58001E0BE60197161590E602429F1B1E1E1BF79096905C93FE1F1F1E0BE6011E151F27
:208A7800211E211F231E231F251E2588E60397844272FB1F90FF93FE1F271E0BE6021E1570
:208A98001F291E291F2B1E2B1F2F1E2F88E60297844272FB2790FF160B1E0BE6021E151F8D
:208AB800311E311F331E331F351E3588E6019784429F90F71E0B5C1F371E0BE60290971EB1
:208AD80015E60390421E37FF16151E0BE6031E151F3D1E3D1F051E0588F69784429F90F7EB
:208AF8001E155C1F2D1E0BE60390971E15E60290421E2DFF1E151C00037F1E0B1C00037F7B
:208B1800965CE6036B0AE6026B09E6016B08F61643170D164572F909173B887B09190F6B04
:208B38003B84190D6B39163BEF021639FFFE16491E4772F93B9F193A979E193995515B40A2
:018B5800819B
:00000001FF

57
microdrill/README Normal file
View File

@ -0,0 +1,57 @@
Algorithm
1. Main functionality - footswitch
By pressing footswitch you move drill down. Speed setup produced
by variable resistor on tray's control. Pulling footswitch
up returns drill into its previous position. If you press down the
footswitch when drill haven't reach its starting position, it moves down
again and returns back on next pulling up.
If drill motor was off, pressing footswitch will also turn it on.
/*
* the behaviour of steps counter depends on footswitch state; timer
* setup varies due to varistor value.
*/
2. Tray buttons
2.1. Left button (BTN1) used to setup the zero point of drill:
- drill quickly moves up
- stepper speed changes to lowest
- while pressing down the footswitch motor moves down
- press BTN1 again to set current position as zero-point
/*
* Button control: by default, EXTI interrupts serve buttons.
* To avoid clash, EXTI interrupt handler sets the special flag
* value to 50 (in milliseconds) and turns off EXTI IRQ.
* In the main() body the endless cycle checks value of system
* timer variable changed by system timer once per millisecond.
* If the EXTI pause flag non-zero, it decrements it until zero.
* After that EXTI turns on again and keys state occured. This
* allows also to avoid some noice on MCU inputs.
*/
2.2. Right button (BTN2) used to switch between regulation
of stepper speed or drill speed by variable resistor on tray's
control. The default state is stepper (vertical) speed regulation.
Drill works with algorithm of automatical moment correction:
if drill stalled, the PWM duty reduced until current through drill's
winding stabilize to max value. Conversely, when current through winding
falls to very low value, PWM duty increased until normal current
value. Varistor allows you to set these limiting values in drill speed
mode.
2.3. Simultaneous pressing of both buttons will:
- stop drill motor
- move tray up
- move drill down
So, you can easily change drilling bits. After that press again BTN1+BTN2
to return tray down & drill motor up. After this operation the uppest
drill's position will be zero.

View File

@ -40,18 +40,8 @@ INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4){}
// External Interrupt PORTC
INTERRUPT_HANDLER(EXTI_PORTC_IRQHandler, 5){
if(!(PC_IDR & GPIO_PIN4)){ // PC4 - pedal switch - connect to ground!
if(!drill_works)
DRILL_ON(); // in future it should be more complex: move motor down etc
}else{
// it would be better to set flags as drill motor would have to move up first
if(drill_works)
DRILL_OFF();
}
// PC2 - down; PC3 - up
if((PC_IDR & (GPIO_PIN2 | GPIO_PIN3)) != (GPIO_PIN2 | GPIO_PIN3)){
TRAY_STOP(); // stop tray motor
}
BTNS_EXTI_DISABLE();
exti_event = 100; // set pause to 100us
}
// External Interrupt PORTD
@ -194,7 +184,10 @@ INTERRUPT_HANDLER(ADC1_IRQHandler, 22){
//if(val_ctr == 10) val_ctr = 0;
if(drill_works && auto_speed){
if(v > 50) DRILL_SLOWER(); // current = 0.48A
else if(v < 30) DRILL_FASTER(); // current = 0.29A
else if(v < 3){ // no motor or break?
DRILL_OFF();
uart_write("No drill motor?");
}else if(v < 30) DRILL_FASTER(); // current = 0.29A
}
ADC_CSR &= 0x3f; // clear EOC & AWD flags
}

View File

@ -26,6 +26,7 @@
#include "stepper.h"
unsigned long Global_time = 0L; // global time in ms
volatile char exti_event = -1; // flag & counter of EXTI interrupt
U16 paused_val = 500; // interval between LED flashing
U8 drill_works = 0; // flag of working motor
@ -46,12 +47,12 @@ U8 UART_rx_cur_i = 0; // index of current first byte in rx array (to which d
* 7 0111
* 8 1000
* 9 1001
*10 1010
*11 1011
*12 1100
*13 1101
*14 1110
*15 1111
*10 1010 a
*11 1011 b
*12 1100 c
*13 1101 d
*14 1110 e
*15 1111 f
*/
// microsteps: DCBA = 1000, 1100, 0100, 0110, 0010, 0011, 0001, 1001 -- for ULN
// what a shit is this > DCBA = 0001, 0010, 0110, 1010, 1001, 1000, 0100, 0000 - bipolar
@ -66,7 +67,7 @@ char usteps[8] =
#error Define MOTOR_TYPE_UNIPOLAR or MOTOR_TYPE_BIPOLAR
#endif
U16 ADC_value = 0; // value of last ADC measurement
volatile U16 ADC_value = 0; // value of last ADC measurement
/**
* Send one byte through UART
@ -159,8 +160,44 @@ void error_msg(char *msg){
UART_send_byte('\n');
}
U8 old_buttons_state = BTNS_EXTI_MASK; // default buttons state - none pressed
void check_buttons(){
U8 btn_state = BTNS_IDR & BTNS_EXTI_MASK, btns_changed;
if(btn_state == old_buttons_state) goto rtn; // none changed
btns_changed = btn_state ^ old_buttons_state; // XOR -> 1 on changed states
// check for footswitch
if(FOOTSW_TEST(btns_changed)){
if(!FOOTSW_TEST(btn_state)){ // pedal switch pressed - connect to ground!
if(!drill_works){
DRILL_ON();
}
add_steps(-5000); // this is a trick to move more than stage allows
uart_write("move down\n");
}else{
add_steps(-5000); // return to previous state (this function moves RELATIVELY)
uart_write("move up\n");
}
}
// check for tray endswitches. We don't care for their off state, so only check ON
if(TRAYSW_TEST(btns_changed) && TRAYSW_PRSD(btn_state)){
uart_write("tray stop\n");
TRAY_STOP(); // stop tray motor in any moving direction
}
// check for user buttons pressed (the same - only pressed)
if(BTN12_TEST(btns_changed) && !BTN12_TEST(btn_state)){ // pressed both buttons
uart_write("both buttons\n");
}else if(BTN1_TEST(btns_changed) && !BTN1_TEST(btn_state)){ // btn1
uart_write("button 1\n");
}else if(BTN2_TEST(btns_changed) && !BTN2_TEST(btn_state)){ // btn2
uart_write("button 2\n");
}
old_buttons_state = btn_state;
rtn:
BTNS_EXTI_ENABLE();
}
int main() {
unsigned long T = 0L;
unsigned long T = 0L, TT = 0L;
int Ival;
U8 rb, v;
CFG_GCR |= 1; // disable SWIM
@ -206,9 +243,8 @@ int main() {
// Configure pins
// EXTI
EXTI_CR1 = 0x30; // PCIS[1:0] = 11b -> rising/falling
PC_CR1 = 0x1c; // PC2, PC3 and PC4 are switches with pull-up
PC_CR2 = 0x1c; // enable interrupts
BTNS_SETUP();
BTNS_EXTI_ENABLE(); // enable interrupts
// other
PC_DDR |= GPIO_PIN1; // setup timer's output
DRILL_OFF(); // set PC1 to zero - power off motor
@ -234,14 +270,24 @@ int main() {
// Loop
do{
if(Global_time != TT){ // once per 1ms
TT = Global_time;
// check EXTI counter
if(exti_event > 0){ // delay for 50us - decrement counter
exti_event--;
}else if(exti_event == 0){
exti_event = -1;
check_buttons();
}
}
if((Global_time - T > paused_val) || (T > Global_time)){
U8 i;
//U8 i;
T = Global_time;
PORT(LED_PORT, ODR) ^= LED_PIN; // blink on-board LED
//ADC_value = 0;
//for(i = 0; i < 10; i++) ADC_value += ADC_values[i];
//ADC_value /= 10;
printUint((U8*)&ADC_value, 2); // & print out ADC value
// printUint((U8*)&ADC_value, 2); // & print out ADC value
}
if(UART_read_byte(&rb)){ // buffer isn't empty
switch(rb){

View File

@ -24,6 +24,8 @@
extern unsigned long Global_time; // global time in ms
extern volatile char exti_event; // flag of EXTI interrupt == 0 -> check keys
extern char usteps[]; // current array for microsteps
#define UART_BUF_LEN 8 // max 7 bytes transmited in on operation
@ -34,7 +36,7 @@ extern U8 UART_rx_start_i;
extern U8 UART_rx_cur_i;
//extern U16 ADC_values[];
extern U16 ADC_value; // value of last ADC measurement
extern volatile U16 ADC_value; // value of last ADC measurement
extern U8 drill_works;
extern U8 auto_speed; // == 1 to automatic speed regulation

View File

@ -48,30 +48,56 @@
// Clocking
#define STP_PORT PB // PB0..3 -- pins A..D of stepper
/* drill motor PC1 - timer 1 PWM output 1 */
/* drill motor PC1 - timer 1 PWM output 1; PC5 - footswitch */
#define DRILL_ON() do{TIM1_BKR |= 0x80; drill_works = 1;}while(0) // turn on drill motor
#define DRILL_OFF() do{TIM1_BKR &= ~0x80; PC_ODR &= ~GPIO_PIN1; drill_works = 0;}while(0) // turn it off
#define DRILL_FASTER() do{U8 r = TIM1_CCR1L; if(r < 100) TIM1_CCR1L = r+1;}while(0)// increase current
#define DRILL_SLOWER() do{U8 r = TIM1_CCR1L; if(r > 0) TIM1_CCR1L = r-1;}while(0) // decrease it
#define FOOTSWITCH ((PC_IDR & GPIO_PIN5))
#define FOOTSW_TEST(x) ((x & GPIO_PIN5))
/* tray motor: PB4, PB5 - rotation direction; PC2, PC3 - end-switches (bottom/top) */
#define TRAY_UP() do{if(!(PC_IDR & GPIO_PIN3)){PB_ODR &= ~0x30; PB_ODR |= 0x10;}}while(0)
#define TRAY_DOWN() do{if(!(PC_IDR & GPIO_PIN2)){PB_ODR &= ~0x30; PB_ODR |= 0x20;}}while(0)
#define TRAY_STOP() do{PB_ODR &= ~0x30;}while(0)
/* tray motor: PD2, PD3 - rotation direction; PC3, PC4 - end-switches (bottom/top) */
#define TRAY_TOP_SW ((PC_IDR & GPIO_PIN4))
#define TRAY_BTM_SW ((PC_IDR & GPIO_PIN3))
#define TRAYSW_TEST(x) ((x & (GPIO_PIN3 | GPIO_PIN4)))
#define TRAYSW_PRSD(x) (((x & (GPIO_PIN3 | GPIO_PIN4)) != (GPIO_PIN3 | GPIO_PIN4)))
#define TRAY_STOP() do{PD_ODR &= ~0x0C;}while(0)
#define TRAY_UP() do{if(!TRAY_TOP_SW){PD_ODR &= ~0x0C; PC_ODR |= 0x04;}}while(0)
#define TRAY_DOWN() do{if(!(TRAY_BTM_SW)){PD_ODR &= ~0x0C; PC_ODR |= 0x08;}}while(0)
/* Buttons: PC6 - BTN1 & PC7 - BTN2 */
#define BTN1 ((PC_IDR & GPIO_PIN6))
#define BTN2 ((PC_IDR & GPIO_PIN7))
#define BTN1_TEST(x) ((x & GPIO_PIN6))
#define BTN2_TEST(x) ((x & GPIO_PIN7))
#define BTN12_TEST(x) (((x & (GPIO_PIN7 | GPIO_PIN6)) == (GPIO_PIN7 | GPIO_PIN6)))
// EXTI for all buttons: PC3..7
#define BTNS_IDR PC_IDR
#define BTNS_EXTI_MASK (0xf8)
#define BTNS_EXTI_DISABLE() do{PC_CR2 = 0;}while(0)
#define BTNS_EXTI_ENABLE() do{PC_CR2 = BTNS_EXTI_MASK;}while(0)
#define BTNS_SETUP() do{EXTI_CR1 = 0x30; PC_CR1 |= BTNS_EXTI_MASK;}while(0)
#endif // __PORTS_DEFINITION_H__
/*
* PORTS:
* DRILL
* PC1 - PWM (TIM1_CH1)
* PF4 - Sence (AIN12)
* PC4 - Pedal switch
* PC5 - Pedal switch
* Stepper motor
* PB0, PB1, PB2, PB3 - phases of motor
* Slider (tray) motor
* PB4, PB5 - rotation direction
* PC2 - down end-switch
* PC3 - up end-switch
* PD2, PD3 - rotation direction
* PC3 - down end-switch
* PC4 - up end-switch
* On-tray buttons & resistor
* PB4 - variable resistor (AIN4)
* PC6 - BTN1
* PC7 - BTN2
* UART
* PD5 - TX
* PD6 - RX
*/

View File

@ -40,7 +40,7 @@ $Descr A3 16535 11693
encoding utf-8
Sheet 1 2
Title ""
Date "19 aug 2014"
Date "20 oct 2014"
Rev ""
Comp ""
Comment1 ""
@ -60,10 +60,10 @@ F 3 "~" H 4400 3100 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L GND #PWR01
L GND #PWR10
U 1 1 52FB03EF
P 2750 3200
F 0 "#PWR01" H 2750 3200 30 0001 C CNN
F 0 "#PWR10" H 2750 3200 30 0001 C CNN
F 1 "GND" H 2750 3130 30 0001 C CNN
F 2 "" H 2750 3200 60 0000 C CNN
F 3 "" H 2750 3200 60 0000 C CNN
@ -75,10 +75,10 @@ Wire Wire Line
Wire Wire Line
2750 3150 3000 3150
$Comp
L GND #PWR02
L GND #PWR9
U 1 1 52FB0400
P 2750 2600
F 0 "#PWR02" H 2750 2600 30 0001 C CNN
F 0 "#PWR9" H 2750 2600 30 0001 C CNN
F 1 "GND" H 2750 2530 30 0001 C CNN
F 2 "" H 2750 2600 60 0000 C CNN
F 3 "" H 2750 2600 60 0000 C CNN
@ -126,10 +126,10 @@ Wire Wire Line
Wire Wire Line
2050 2700 2050 3100
$Comp
L GND #PWR03
L GND #PWR5
U 1 1 52FB0453
P 2050 3100
F 0 "#PWR03" H 2050 3100 30 0001 C CNN
F 0 "#PWR5" H 2050 3100 30 0001 C CNN
F 1 "GND" H 2050 3030 30 0001 C CNN
F 2 "" H 2050 3100 60 0000 C CNN
F 3 "" H 2050 3100 60 0000 C CNN
@ -280,10 +280,10 @@ PC3
Text Label 6750 2150 2 60 ~ 0
PC2
$Comp
L +3.3V #PWR04
L +3.3V #PWR1
U 1 1 52FB0DC4
P 950 2800
F 0 "#PWR04" H 950 2760 30 0001 C CNN
F 0 "#PWR1" H 950 2760 30 0001 C CNN
F 1 "+3.3V" H 950 2910 30 0000 C CNN
F 2 "" H 950 2800 60 0000 C CNN
F 3 "" H 950 2800 60 0000 C CNN
@ -319,10 +319,10 @@ Wire Wire Line
Wire Wire Line
950 3850 950 3950
$Comp
L +3.3V #PWR05
L +3.3V #PWR2
U 1 1 52FB0EC7
P 1300 2800
F 0 "#PWR05" H 1300 2760 30 0001 C CNN
F 0 "#PWR2" H 1300 2760 30 0001 C CNN
F 1 "+3.3V" H 1300 2910 30 0000 C CNN
F 2 "" H 1300 2800 60 0000 C CNN
F 3 "" H 1300 2800 60 0000 C CNN
@ -352,10 +352,10 @@ F 3 "" H 1300 3600 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L GND #PWR06
L GND #PWR3
U 1 1 52FB0ED9
P 1300 3950
F 0 "#PWR06" H 1300 3950 30 0001 C CNN
F 0 "#PWR3" H 1300 3950 30 0001 C CNN
F 1 "GND" H 1300 3880 30 0001 C CNN
F 2 "" H 1300 3950 60 0000 C CNN
F 3 "" H 1300 3950 60 0000 C CNN
@ -371,10 +371,10 @@ Wire Wire Line
Text Label 950 3950 2 60 ~ 0
PC2
$Comp
L +3.3V #PWR07
L +3.3V #PWR18
U 1 1 52FB0EF1
P 6500 2550
F 0 "#PWR07" H 6500 2510 30 0001 C CNN
F 0 "#PWR18" H 6500 2510 30 0001 C CNN
F 1 "+3.3V" H 6500 2660 30 0000 C CNN
F 2 "" H 6500 2550 60 0000 C CNN
F 3 "" H 6500 2550 60 0000 C CNN
@ -393,10 +393,10 @@ F 3 "" H 6500 2900 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L GND #PWR08
L GND #PWR19
U 1 1 52FB0F03
P 6500 4050
F 0 "#PWR08" H 6500 4050 30 0001 C CNN
F 0 "#PWR19" H 6500 4050 30 0001 C CNN
F 1 "GND" H 6500 3980 30 0001 C CNN
F 2 "" H 6500 4050 60 0000 C CNN
F 3 "" H 6500 4050 60 0000 C CNN
@ -444,10 +444,10 @@ Connection ~ 6500 3200
Text Label 6650 3200 0 60 ~ 0
NRST
$Comp
L +3.3V #PWR09
L +3.3V #PWR6
U 1 1 52FB2273
P 2150 850
F 0 "#PWR09" H 2150 810 30 0001 C CNN
F 0 "#PWR6" H 2150 810 30 0001 C CNN
F 1 "+3.3V" H 2150 960 30 0000 C CNN
F 2 "" H 2150 850 60 0000 C CNN
F 3 "" H 2150 850 60 0000 C CNN
@ -457,10 +457,10 @@ $EndComp
Wire Wire Line
1600 850 2150 850
$Comp
L GND #PWR010
L GND #PWR7
U 1 1 52FB2296
P 2150 1000
F 0 "#PWR010" H 2150 1000 30 0001 C CNN
F 0 "#PWR7" H 2150 1000 30 0001 C CNN
F 1 "GND" H 2150 930 30 0001 C CNN
F 2 "" H 2150 1000 60 0000 C CNN
F 3 "" H 2150 1000 60 0000 C CNN
@ -477,10 +477,10 @@ Wire Wire Line
2750 3050 2750 2850
Connection ~ 2750 2850
$Comp
L +3.3V #PWR011
L +3.3V #PWR8
U 1 1 52FB26FA
P 2600 3000
F 0 "#PWR011" H 2600 2960 30 0001 C CNN
F 0 "#PWR8" H 2600 2960 30 0001 C CNN
F 1 "+3.3V" H 2600 3110 30 0000 C CNN
F 2 "" H 2600 3000 60 0000 C CNN
F 3 "" H 2600 3000 60 0000 C CNN
@ -491,10 +491,10 @@ Wire Wire Line
2600 3000 2600 3050
Connection ~ 2750 3050
$Comp
L +3.3V #PWR012
L +3.3V #PWR11
U 1 1 52FB286D
P 4000 750
F 0 "#PWR012" H 4000 710 30 0001 C CNN
F 0 "#PWR11" H 4000 710 30 0001 C CNN
F 1 "+3.3V" H 4000 860 30 0000 C CNN
F 2 "" H 4000 750 60 0000 C CNN
F 3 "" H 4000 750 60 0000 C CNN
@ -502,10 +502,10 @@ F 3 "" H 4000 750 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L GND #PWR013
L GND #PWR12
U 1 1 52FB287C
P 4000 1300
F 0 "#PWR013" H 4000 1300 30 0001 C CNN
F 0 "#PWR12" H 4000 1300 30 0001 C CNN
F 1 "GND" H 4000 1230 30 0001 C CNN
F 2 "" H 4000 1300 60 0000 C CNN
F 3 "" H 4000 1300 60 0000 C CNN
@ -550,10 +550,10 @@ Text Label 9100 1550 0 61 ~ 0
Text Label 9100 1650 0 61 ~ 0
3.3V
$Comp
L GND #PWR014
L GND #PWR24
U 1 1 52FB4CEF
P 10100 1350
F 0 "#PWR014" H 10100 1350 30 0001 C CNN
F 0 "#PWR24" H 10100 1350 30 0001 C CNN
F 1 "GND" H 10100 1280 30 0001 C CNN
F 2 "" H 10100 1350 60 0000 C CNN
F 3 "" H 10100 1350 60 0000 C CNN
@ -573,10 +573,10 @@ Wire Wire Line
Wire Wire Line
10300 1450 10300 950
$Comp
L +3.3V #PWR015
L +3.3V #PWR26
U 1 1 52FB4EDC
P 10500 1550
F 0 "#PWR015" H 10500 1510 30 0001 C CNN
F 0 "#PWR26" H 10500 1510 30 0001 C CNN
F 1 "+3.3V" H 10500 1660 30 0000 C CNN
F 2 "" H 10500 1550 60 0000 C CNN
F 3 "" H 10500 1550 60 0000 C CNN
@ -679,10 +679,10 @@ Wire Wire Line
Wire Wire Line
3700 5350 4000 5350
$Comp
L GND #PWR016
L GND #PWR13
U 1 1 53F0F2B8
P 4000 6500
F 0 "#PWR016" H 4000 6500 30 0001 C CNN
F 0 "#PWR13" H 4000 6500 30 0001 C CNN
F 1 "GND" H 4000 6430 30 0001 C CNN
F 2 "" H 4000 6500 60 0000 C CNN
F 3 "" H 4000 6500 60 0000 C CNN
@ -707,10 +707,10 @@ Wire Wire Line
5100 5900 5350 5900
Connection ~ 5350 5900
$Comp
L +5V #PWR017
L +5V #PWR16
U 1 1 53F0F5FC
P 5100 5900
F 0 "#PWR017" H 5100 5990 20 0001 C CNN
F 0 "#PWR16" H 5100 5990 20 0001 C CNN
F 1 "+5V" H 5100 5990 30 0000 C CNN
F 2 "" H 5100 5900 60 0000 C CNN
F 3 "" H 5100 5900 60 0000 C CNN
@ -760,10 +760,10 @@ Wire Wire Line
9450 3200 9450 3400
Connection ~ 9450 3300
$Comp
L GND #PWR018
L GND #PWR23
U 1 1 53F0FCF1
P 9450 3400
F 0 "#PWR018" H 9450 3400 30 0001 C CNN
F 0 "#PWR23" H 9450 3400 30 0001 C CNN
F 1 "GND" H 9450 3330 30 0001 C CNN
F 2 "" H 9450 3400 60 0000 C CNN
F 3 "" H 9450 3400 60 0000 C CNN
@ -782,10 +782,10 @@ F 3 "" H 7950 2900 60 0000 C CNN
-1 0 0 1
$EndComp
$Comp
L GND #PWR019
L GND #PWR21
U 1 1 53F0FD7A
P 8350 3100
F 0 "#PWR019" H 8350 3100 30 0001 C CNN
F 0 "#PWR21" H 8350 3100 30 0001 C CNN
F 1 "GND" H 8350 3030 30 0001 C CNN
F 2 "" H 8350 3100 60 0000 C CNN
F 3 "" H 8350 3100 60 0000 C CNN
@ -798,10 +798,10 @@ Wire Wire Line
8350 3000 8350 3100
Connection ~ 8800 2900
$Comp
L +5V #PWR020
L +5V #PWR22
U 1 1 53F0FE51
P 8800 2850
F 0 "#PWR020" H 8800 2940 20 0001 C CNN
F 0 "#PWR22" H 8800 2940 20 0001 C CNN
F 1 "+5V" H 8800 2940 30 0000 C CNN
F 2 "" H 8800 2850 60 0000 C CNN
F 3 "" H 8800 2850 60 0000 C CNN
@ -811,10 +811,10 @@ $EndComp
Wire Wire Line
8800 2900 8800 2850
$Comp
L +12V #PWR021
L +12V #PWR20
U 1 1 53F0FEBE
P 8350 2750
F 0 "#PWR021" H 8350 2700 20 0001 C CNN
F 0 "#PWR20" H 8350 2700 20 0001 C CNN
F 1 "+12V" H 8350 2850 30 0000 C CNN
F 2 "" H 8350 2750 60 0000 C CNN
F 3 "" H 8350 2750 60 0000 C CNN
@ -826,10 +826,10 @@ Wire Wire Line
Wire Wire Line
8350 2800 8300 2800
$Comp
L +3.3V #PWR022
L +3.3V #PWR25
U 1 1 53F1006E
P 10200 2850
F 0 "#PWR022" H 10200 2810 30 0001 C CNN
F 0 "#PWR25" H 10200 2810 30 0001 C CNN
F 1 "+3.3V" H 10200 2960 30 0000 C CNN
F 2 "" H 10200 2850 60 0000 C CNN
F 3 "" H 10200 2850 60 0000 C CNN
@ -864,9 +864,9 @@ Wire Wire Line
Wire Wire Line
5600 6400 5200 6400
Text Label 4000 7700 2 60 ~ 0
PB4
PD2
Text Label 4000 7600 2 60 ~ 0
PB5
PD3
Wire Wire Line
4000 7800 3700 7800
Wire Wire Line
@ -876,10 +876,10 @@ Wire Wire Line
Wire Wire Line
5200 7600 5200 7700
$Comp
L GND #PWR023
L GND #PWR14
U 1 1 53F11196
P 4000 7900
F 0 "#PWR023" H 4000 7900 30 0001 C CNN
F 0 "#PWR14" H 4000 7900 30 0001 C CNN
F 1 "GND" H 4000 7830 30 0001 C CNN
F 2 "" H 4000 7900 60 0000 C CNN
F 3 "" H 4000 7900 60 0000 C CNN
@ -890,10 +890,10 @@ Wire Wire Line
4000 7900 4000 7800
Connection ~ 4000 7800
$Comp
L +5V #PWR024
L +5V #PWR17
U 1 1 53F11209
P 5300 7650
F 0 "#PWR024" H 5300 7740 20 0001 C CNN
F 0 "#PWR17" H 5300 7740 20 0001 C CNN
F 1 "+5V" H 5300 7740 30 0000 C CNN
F 2 "" H 5300 7650 60 0000 C CNN
F 3 "" H 5300 7650 60 0000 C CNN
@ -937,18 +937,18 @@ Wire Wire Line
Wire Wire Line
5500 7750 5750 7750
Wire Notes Line
3550 7050 3550 8450
3550 7050 3550 8850
Wire Notes Line
5700 7050 5700 8450
5700 7050 5700 8850
Wire Notes Line
5700 7050 3550 7050
Text Notes 3800 7200 0 60 ~ 0
Slider (tray) motor
$Comp
L PWR_FLAG #FLG025
L PWR_FLAG #FLG1
U 1 1 53F11FC5
P 8550 2750
F 0 "#FLG025" H 8550 2845 30 0001 C CNN
F 0 "#FLG1" H 8550 2845 30 0001 C CNN
F 1 "PWR_FLAG" H 8550 2930 30 0000 C CNN
F 2 "" H 8550 2750 60 0000 C CNN
F 3 "" H 8550 2750 60 0000 C CNN
@ -958,10 +958,10 @@ $EndComp
Wire Wire Line
8550 2750 8350 2750
$Comp
L PWR_FLAG #FLG026
L PWR_FLAG #FLG2
U 1 1 53F12233
P 8550 3000
F 0 "#FLG026" H 8550 3095 30 0001 C CNN
F 0 "#FLG2" H 8550 3095 30 0001 C CNN
F 1 "PWR_FLAG" H 8550 3180 30 0000 C CNN
F 2 "" H 8550 3000 60 0000 C CNN
F 3 "" H 8550 3000 60 0000 C CNN
@ -970,10 +970,10 @@ F 3 "" H 8550 3000 60 0000 C CNN
$EndComp
Connection ~ 8350 3000
$Comp
L PWR_FLAG #FLG027
L PWR_FLAG #FLG3
U 1 1 53F122D9
P 9000 2800
F 0 "#FLG027" H 9000 2895 30 0001 C CNN
F 0 "#FLG3" H 9000 2895 30 0001 C CNN
F 1 "PWR_FLAG" H 9000 2980 30 0000 C CNN
F 2 "" H 9000 2800 60 0000 C CNN
F 3 "" H 9000 2800 60 0000 C CNN
@ -983,50 +983,48 @@ $EndComp
Wire Wire Line
9000 2800 9000 2900
Connection ~ 9000 2900
Wire Notes Line
5700 8450 3550 8450
$Comp
L SW_PUSH SW2
U 1 1 53F12B09
P 4150 8250
F 0 "SW2" H 4300 8360 50 0000 C CNN
F 1 "UP" H 4150 8170 50 0000 C CNN
F 2 "~" H 4150 8250 60 0000 C CNN
F 3 "~" H 4150 8250 60 0000 C CNN
1 4150 8250
P 4150 8400
F 0 "SW2" H 4300 8510 50 0000 C CNN
F 1 "BTN1" H 4150 8320 50 0000 C CNN
F 2 "~" H 4150 8400 60 0000 C CNN
F 3 "~" H 4150 8400 60 0000 C CNN
1 4150 8400
1 0 0 -1
$EndComp
$Comp
L SW_PUSH SW3
U 1 1 53F12B1C
P 5050 8250
F 0 "SW3" H 5200 8360 50 0000 C CNN
F 1 "DOWN" H 5050 8170 50 0000 C CNN
F 2 "~" H 5050 8250 60 0000 C CNN
F 3 "~" H 5050 8250 60 0000 C CNN
1 5050 8250
P 5050 8400
F 0 "SW3" H 5200 8510 50 0000 C CNN
F 1 "BTN2" H 5050 8320 50 0000 C CNN
F 2 "~" H 5050 8400 60 0000 C CNN
F 3 "~" H 5050 8400 60 0000 C CNN
1 5050 8400
1 0 0 -1
$EndComp
Wire Wire Line
4450 8250 4750 8250
4450 8400 4750 8400
$Comp
L GND #PWR028
L GND #PWR15
U 1 1 53F12BC1
P 4600 8350
F 0 "#PWR028" H 4600 8350 30 0001 C CNN
F 1 "GND" H 4600 8280 30 0001 C CNN
F 2 "" H 4600 8350 60 0000 C CNN
F 3 "" H 4600 8350 60 0000 C CNN
1 4600 8350
P 4600 8700
F 0 "#PWR15" H 4600 8700 30 0001 C CNN
F 1 "GND" H 4600 8630 30 0001 C CNN
F 2 "" H 4600 8700 60 0000 C CNN
F 3 "" H 4600 8700 60 0000 C CNN
1 4600 8700
1 0 0 -1
$EndComp
Wire Wire Line
4600 8350 4600 8250
Connection ~ 4600 8250
Text Label 5350 8250 0 60 ~ 0
PC2
Text Label 3850 8250 2 60 ~ 0
4600 8100 4600 8700
Connection ~ 4600 8400
Text Label 5350 8100 0 60 ~ 0
PC3
Text Label 3850 8100 2 60 ~ 0
PC4
$Comp
L SW_PUSH SW1
U 1 1 53F13089
@ -1039,10 +1037,10 @@ F 3 "~" H 1650 6750 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L GND #PWR029
L GND #PWR4
U 1 1 53F130B8
P 1950 6950
F 0 "#PWR029" H 1950 6950 30 0001 C CNN
F 0 "#PWR4" H 1950 6950 30 0001 C CNN
F 1 "GND" H 1950 6880 30 0001 C CNN
F 2 "" H 1950 6950 60 0000 C CNN
F 3 "" H 1950 6950 60 0000 C CNN
@ -1052,7 +1050,7 @@ $EndComp
Wire Wire Line
1950 6950 1950 6750
Text Label 1350 6750 2 60 ~ 0
PC4
PC5
Wire Notes Line
750 4750 750 7150
Wire Notes Line
@ -1063,4 +1061,104 @@ Wire Notes Line
2350 4750 750 4750
Text Notes 1050 5000 0 60 ~ 0
Drill motor
Text Notes 850 7450 0 60 ~ 0
"DRILL" is foot-switch.\nPress it to move drill down,\nrelease to return it to start position.\nDouble-click turns drill motor on/off.\n
Text Notes 6350 7250 0 60 ~ 0
Two buttons on tray have following functionality:\nBTN1 - setup zero point (move slowly + set coordinate\n to 0 after footswitch released); next pressing returns\n device to normal state;\nBTN2 - switch between regulation of drill speed/stepper speed;\nBTN1+BTN2 (simultaneously) - move tray up/down.\n\n"volume" varistor allows to regulate motor speed.\nDefault is max drill speed, varistor regulates stepper speed.
$Comp
L POT RV1
U 1 1 54442B33
P 5000 8650
F 0 "RV1" H 5000 8550 50 0000 C CNN
F 1 "POT" H 5000 8650 50 0000 C CNN
F 2 "" H 5000 8650 60 0000 C CNN
F 3 "" H 5000 8650 60 0000 C CNN
1 5000 8650
-1 0 0 1
$EndComp
Wire Wire Line
5000 8800 5250 8800
Wire Wire Line
5250 8800 5250 8650
Wire Wire Line
4750 8650 4600 8650
Connection ~ 5250 8650
Wire Notes Line
5700 8850 3550 8850
Text Notes 5950 3650 0 60 ~ 0
Drill PWM
Text Notes 2900 2850 2 60 ~ 0
Drill sense
Wire Notes Line
2900 2950 2800 2950
Wire Notes Line
2800 2950 2800 2900
Text Notes 6000 3250 0 60 ~ 0
Drill SW
Wire Notes Line
2850 3750 2800 3750
Wire Notes Line
2800 3750 2800 3400
Text Notes 2750 3600 2 60 ~ 0
Stepper phases
Text Notes 6000 2700 0 60 ~ 0
Tray bridge
Text Notes 6000 3150 0 60 ~ 0
BTN1
Text Notes 6000 3050 0 60 ~ 0
BTN2
Connection ~ 4600 8650
Wire Wire Line
5250 8650 5400 8650
Text Notes 2800 3350 2 60 ~ 0
Rvar
Text Label 5400 8650 0 60 ~ 0
PB4
$Comp
L SW_PUSH SW5
U 1 1 54442832
P 4150 8100
F 0 "SW5" H 4300 8210 50 0000 C CNN
F 1 "UP" H 4150 8020 50 0000 C CNN
F 2 "~" H 4150 8100 60 0000 C CNN
F 3 "~" H 4150 8100 60 0000 C CNN
1 4150 8100
1 0 0 -1
$EndComp
$Comp
L SW_PUSH SW6
U 1 1 54442838
P 5050 8100
F 0 "SW6" H 5200 8210 50 0000 C CNN
F 1 "DOWN" H 5050 8020 50 0000 C CNN
F 2 "~" H 5050 8100 60 0000 C CNN
F 3 "~" H 5050 8100 60 0000 C CNN
1 5050 8100
1 0 0 -1
$EndComp
Text Notes 5950 3450 0 60 ~ 0
Tray Down
Text Notes 6000 3350 0 60 ~ 0
Tray Up
Text Label 5350 8400 0 60 ~ 0
PC7
Text Label 3850 8400 2 60 ~ 0
PC6
Wire Wire Line
4450 8100 4750 8100
Connection ~ 4600 8100
Text Notes 6450 4500 0 60 ~ 0
All MCU inputs connected to switches\nshould be in "pull-up input" mode.
Text Notes 5950 3550 0 60 ~ 0
LED onbrd
Wire Notes Line
5950 2450 6000 2450
Wire Notes Line
6000 2450 6000 2300
Text Notes 6050 2400 0 60 ~ 0
UART
Wire Notes Line
5950 2750 6000 2750
Wire Notes Line
6000 2750 6000 2600
$EndSCHEMATC

View File

@ -40,7 +40,7 @@ $Descr A4 11693 8268
encoding utf-8
Sheet 2 2
Title ""
Date "19 aug 2014"
Date "20 oct 2014"
Rev ""
Comp ""
Comment1 ""
@ -62,10 +62,10 @@ $EndComp
Text Notes 5525 3150 0 60 ~ 0
Motor
$Comp
L GND #PWR030
L GND #PWR28
U 1 1 53E67E30
P 4800 5700
F 0 "#PWR030" H 4800 5700 30 0001 C CNN
F 0 "#PWR28" H 4800 5700 30 0001 C CNN
F 1 "GND" H 4800 5630 30 0001 C CNN
F 2 "" H 4800 5700 60 0000 C CNN
F 3 "" H 4800 5700 60 0000 C CNN
@ -95,10 +95,10 @@ F 3 "" H 4900 5350 60 0000 C CNN
1 0 0 -1
$EndComp
$Comp
L +12V #PWR031
L +12V #PWR29
U 1 1 53E67FAE
P 5375 3200
F 0 "#PWR031" H 5375 3150 20 0001 C CNN
F 0 "#PWR29" H 5375 3150 20 0001 C CNN
F 1 "+12V" H 5375 3300 30 0000 C CNN
F 2 "" H 5375 3200 60 0000 C CNN
F 3 "" H 5375 3200 60 0000 C CNN
@ -212,10 +212,10 @@ Wire Wire Line
6050 3700 6050 3950
Connection ~ 5375 3700
$Comp
L GND #PWR032
L GND #PWR27
U 1 1 53F35910
P 4000 5700
F 0 "#PWR032" H 4000 5700 30 0001 C CNN
F 0 "#PWR27" H 4000 5700 30 0001 C CNN
F 1 "GND" H 4000 5630 30 0001 C CNN
F 2 "" H 4000 5700 60 0000 C CNN
F 3 "" H 4000 5700 60 0000 C CNN

View File

@ -2,117 +2,126 @@
:2080C000A604F7909E0F01AE530DF74FAE530E909FF7AE5301A601F7AE5300F6AA84AE5372
:2080E00000F75B02811E03A300002E0B3501000D1E03501F032004725F000D16035F905D71
:208100002A015A90CF000BCF0009AE5300F6AA01AE5300F781AE5300F6A4FEAE5300F7727A
:208120005F000C725F000B725F000A725F0009AE5005F6A4F0AE5005F7AE820C89CD842185
:208120005F000C725F000B725F000A725F0009AE5005F6A4F0AE5005F7AE820C89CD841195
:208140005B0281CE000B2607CE0009272D2000AE5300F6959EA5012711A4FEAE5300F7AEA0
:20816000821289CD84215B0220109EAA01AE5300F7AE821989CD84215B0281AE5300F6A4E5
:20816000821289CD84115B0220109EAA01AE5300F7AE821989CD84115B0281AE5300F6A405
:20818000FEAE5300F7CE000B2610CE0009260B1E0389CD80E55B02CC820B16035F905D2AB1
:2081A000015A909F909772B9000B9FC9000A979EC900099590CF000BCF0009CE000BA3000C
:2081C00000C6000AA200C60009A2002E2AAE822189CD84215B02C6000DA0014F49C7000DDB
:2081C00000C6000AA200C60009A2002E2AAE822189CD84115B02C6000DA0014F49C7000DEB
:2081E00090CE000B90504FC2000A974FC200099590CF000BCF0009CE000B2605CE00092791
:208200000AAE5300F6AA01AE5300F78173746F700A0070617573650A00726573756D650AA6
:0A82200000726576657263650A005E
:078DCA0000000000000000A2
:20822A008080808080AE500BF6A5102616725D0018262EAE526DF6AA80AE526DF735010062
:20824A0018201E725D00182718AE526DF6A47FAE526DF7AE500AF6A4FDAE500AF7725F003F
:20826A0018AE500BF6A40CA10C270AAE5005F6A4CFAE5005F78080808080805202AE530292
:20828A00F66B027B02442503CC83217B02A4FEAE5302F7AE5005F6A4F06B01AE001C9FCBD2
:2082AA000011979EA90095F61A01AE5005F7725D000D272C725C0011C60011A1072D4B72AE
:2082CA005F001190CE000B72A20001C6000AA20097C60009A2009590CF000BCF0009202A0B
:2082EA00725A0011C60011A1002E1F3507001190CE000B72A20001C6000AA20097C600092F
:20830A00A2009590CF000BCF0009CE000B2608CE00092603CD81155B0280808080808052C1
:20832A0004AE5240F66B047B04A5202750AE5241F66B017B04A4804D27FDAE52417B01F764
:20834A00AE00011F02C6001B97C6001B4CC7001B4F9572FB027B01F7C6001AC1001B261202
:20836A00C6001A4CC7001AC6001AA1082604725F001AC6001BA1082604725F001B5B0480C9
:20838A005202AE5405F65F971F01AE5404F65F9758585858585858589F1A02979E1A01951A
:2083AA00CF0024725D0018272B725D00192725A30032230EAE5266F64D27194AAE5266F7BD
:2083CA002012A3001E240DAE5266F6A16424054CAE5266F7AE5400F6A43FAE5400F75B020B
:2083EA0080AE5342F644241B90CE001472A90001C60013A90097C60012A9009590CF001407
:09840A00CF0012AE53427F8080C6
:028DD1000000A0
:078F0000000000000000006A
:20822A008080808080AE500E7F356400168080808080805202AE5302F66B027B02442503D7
:20824A00CC82D97B02A4FEAE5302F7AE5005F6A4F06B01AE001D9FCB0011979EA90095F62C
:20826A001A01AE5005F7725D000D272C725C0011C60011A1072D4B725F001190CE000B721D
:20828A00A20001C6000AA20097C60009A2009590CF000BCF0009202A725A0011C60011A141
:2082AA00002E1F3507001190CE000B72A20001C6000AA20097C60009A2009590CF000BCF54
:2082CA000009CE000B2608CE00092603CD81155B028080808080805204AE5240F66B047B4E
:2082EA0004A5202750AE5241F66B017B04A4804D27FDAE52417B01F7AE00011F02C6001C17
:20830A0097C6001C4CC7001C4F9572FB027B01F7C6001BC1001C2612C6001B4CC7001BC61A
:20832A00001BA1082604725F001BC6001CA1082604725F001C5B04805202AE5405F65F9791
:20834A001F01AE5404F65F9758585858585858589F1A02979E1A0195CF0025725D0019279E
:20836A0053725D001A274DA30032230EAE5266F64D27414AAE5266F7203AA300032423AE90
:20838A00526DF6A47FAE526DF7AE500AF6A4FDAE500AF7725F0019AE83F389CD84115B02A3
:2083AA002012A3001E240DAE5266F6A16424054CAE5266F7AE5400F6A43FAE5400F75B022B
:2083CA0080AE5342F644241B90CE001472A90001C60013A90097C60012A9009590CF001427
:1983EA00CF0012AE53427F80804E6F206472696C6C206D6F746F723F0053
:028F0700000068
:2080000082008083820000008200822A8200822B8200822C8200822D8200822E8200822F36
:20802000820082808200828182000000820000008200828282008283820082848200828515
:20804000820083248200832582008326820000008200000082008327820083288200832917
:208060008200838A820083EB820084128200000082000000820000008200000082000000DF
:1D808300AE00082707724F00005A26F9AE001D2709D68DC9D700085A26F7CC808079
:03808000CC865A51
:20841300AE5240F64824F9AE52417B03F781160390F64D271BAE5240F64824F9AE5245F673
:20843300AA08AE5245F790F6905CAE5241F720E0815202C6001BC1001A26034F2027160526
:20845300AE00011F01C6001A97C6001A4CC7001A4F9572FB01F690F7C6001AA108260472C2
:208473005F001AA6015B0281521C5F1F101F0E7B21A1042303CC85517B21A1032603CC85FF
:20849300510D212603CC8551965C1F124F5F9772FB127F4CA10C25F51E121C000AA60AF709
:2084B3007B21A101270E7B21A102271C7B21A104272120301E1FF66B1C5F0F191F0F7B1CD5
:2084D3006B117B196B0E201C161F90FE5F17101F0E20111E1FE6036B17E602FE6B101F0EE7
:2084F3007B176B11A6096B0D4B0A5F894B001E14891E1489CD8B495B089F887B0E6B19847A
:208513000A0D5F417B184172FB12AB30F74B0A5F894B001E14891E1489CD8BC65B081F10BE
:20853300170E1E1026041E0E27067B0DA1FF2CB87B0D4C5F9772FB1289CD84215B025B1C2E
:2085530081521ACE00141F0DCE00121F0B5F1F061F040F080F020F01961C000389CD844451
:208573005B024D2603CC85F87B03A12D260E1E06260A1E042606A6016B0820697B03A130B8
:208593002403CC861A7B03A1392303CC861AA6016B021E06891E06894B0A5F894B00CD8CFC
:2085B300655B081F1917177B030F115F90977B11909572F9199F1918979E19179572A20043
:2085D300309FA2006B149EA20017066B047B146B05AE7FFF13064F12054F120424075F1F14
:2085F300061F040F0190CE001472F20DC60013120C95C60012120B9790A327109EA2009FEB
:20861300A2002403CC856B0D0126040D0226034F201A7B06887B086B0B846B090D0827058E
:208633001E09501F091E1D1609FFA6015B1A81AE8A2F89CD84215B021E0389CD84215B025A
:208653004B0ACD84138481520D5F1F031F01AE7F60F6AA01AE7F60F7AE50C67FAE5345A668
:2086730007F7AE5346A67DF7AE5341A601F7AE5340A685F7AE52607FAE5261A603F7AE5265
:20869300627FAE5263A664F7AE52657FAE5266A60AF7AE5258A660F7AE525CA601F7AE5242
:2086B300547FAE5250A685F7AE5400A62CF7AE5406A610F7AE5402A608F7AE5401A673F726
:2086D300AE5401A673F7AE50A0A630F7AE500DA61CF7AE500EA61CF7AE500CF6AA02AE50D6
:2086F3000CF7AE526DF6A47FAE526DF7AE500AF6A4FDAE500AF7725F0018AE500CF6AA0445
:20871300AE500CF7AE500DF6AA04AE500DF7AE5011F6AA20AE5011F7AE5012F6AA20AE50F1
:2087330012F7AE5242A611F7AE5243A606F7AE5245A62CF79A4BE84B03CD80B55B02CD8072
:20875300A0CE001472F0031F0CC6001312026B0BC600121201CE0016905F88130D909F12EA
:208773000C909E12015B012511CE00141303C600131202C600121201241FCE00141F03CE22
:2087930000121F01AE500AF6A804AE500AF7AE00244B0289CD847B5B03961C000689CD8487
:2087B300445B024D279B7B066B097B09A12B2603CC887D7B09A12D2603CC889C7B09A130F7
:2087D3002603CC89747B09A1312603CC898F7B09A13C2603CC89B37B09A13E2603CC89A01E
:2087F3007B09A1482603CC88717B09A14D2603CC89027B09A1532603CC88BB7B09A16126BD
:2088130003CC894C7B09A1632603CC8A097B09A1642603CC89E77B09A1672603CC8A177B06
:2088330009A16827397B09A16D2603CC88F47B09A1702603CC89467B09A1732603CC88E65C
:208853007B09A1752603CC89C57B09A1782603CC89407B09A17A2603CC8A10CC8754AE8AC0
:208873003889CD84215B02CC8754CE00161C0064CF0016CE0016A327102203CC875435F4B2
:20889300001735010016CC8754CE00161D0064CF0016CE0016A300642503CC87543564001E
:2088B30017725F0016CC8754961C000789CD85545B024D27121E07A3007D2D0B1E0789CD3D
:2088D30080B55B02CC8754AE8B2289CD86425B02CC8754AE000E4B0289CD847B5B03CC87C0
:2088F30054AE00094B0489CD847B5B03CC8754CE000B2605CE0009270CAE8B2C89CD864220
:208913005B02CC8754961C000789CD85545B024D270F1E07270B1E0789CD80E55B02CC8791
:2089330054AE8B3489CD86425B02CC8754CD8115CC8754CD8143CC8754961C000789CD856B
:20895300545B024D270F1E07270B1E0789CD817B5B02CC8754AE8B3F89CD86425B02CC87B8
:2089730054AE526DF6A47FAE526DF7AE500AF6A4FDAE500AF7725F0018CC8754AE526DF615
:20899300AA80AE526DF735010018CC8754AE5266F6A1642503CC87544CAE5266F7CC8754C1
:2089B300AE5266F64D2603CC87544AAE5266F7CC8754AE500BF6A5082703CC8754AE50055D
:2089D300F6A4CFAE5005F7AE5005F6AA10AE5005F7CC8754AE500BF6A5042703CC8754AEA6
:2089F3005005F6A4CFAE5005F7AE5005F6AA20AE5005F7CC8754725F0019CC875435010081
:208A130019CC8754AE5266F66B05961C00054B0189CD847B5B03CC87545B0D810A4552527E
:208A33004F523A20000A50524F544F3A0A2B2F2D094C454420706572696F640A532F730936
:208A53007365742F676574204D73706565640A6D096765742073746570730A780973746FDA
:208A7300700A700970617573652F726573756D650A4D096D6F7665206D6F746F720A610936
:208A9300616464204E737470730A30097475726E206472696C6C204F46460A310974757285
:208AB3006E206472696C6C204F4E0A3E09726F74617465206661737465720A3C09726F7418
:208AD30061746520736C6F7765720A7509747261792075700A64097472617920646F776E31
:208AF3000A63096175746F207370656564206F66660A7A096175746F207370656564206FA2
:208B13006E0A67096765742073706565640A00626164207370656564006D6F76696E6721D6
:168B330000626164204E7374657073006261642076616C75650004
:148DD3000000000001F400000000080A02060405010900006A
:208B490052040F020F017B0B484F494D262E160D1E0B905859170D1F0B1E09130D7B0812D7
:208B69000C7B07120B240D160D1E0B549056170D1F0B20080C017B016B0220CA7B026B0448
:208B89001E09130D7B08120C7B07120B2513160972F20D7B08120C977B07120B9517091FD2
:208BA90007160D1E0B549056170D1F0B7B046B030A040D0326CA1E0916075B048152125FEF
:208BC9001F051F03A6206B027B15484F496B0116171E1590585917171F157B036B0F1E041A
:208BE900887B076B1384081259090F1F047B126B067B0F6B030D01271A7B06AA016B0A7B51
:208C0900056B097B046B087B036B0716091705160717031E05131B7B04121A7B03121925B4
:208C29002B160572F21B7B04121A6B0C7B03121917056B037B0C6B047B18AA0190977B1724
:208C490090957B16977B159517171F150A020D022703CC8BD11E1716155B128152409096C4
:208C6900905C961C00431F0B1E0BE603961C00471F151E151F171E171F3F1E3F88E6019742
:208C8900844290FF72A900021E0BE6031E151F111E111F131E131F191E1988E60397844215
:208CA90090FF965C1F1B1E1BF66B1D1E0BF697161590E603429F1B1D1E1BF71E1BF66B1EDE
:208CC9001E0BE60197161590E602429F1B1E1E1BF79096905C93FE1F1F1E0BE6011E151FB4
:208CE900211E211F231E231F251E2588E60397844272FB1F90FF93FE1F271E0BE6021E15FD
:208D09001F291E291F2B1E2B1F2F1E2F88E60297844272FB2790FF160B1E0BE6021E151F19
:208D2900311E311F331E331F351E3588E6019784429F90F71E0B5C1F371E0BE60290971E3D
:208D490015E60390421E37FF16151E0BE6031E151F3D1E3D1F051E0588F69784429F90F777
:208D69001E155C1F2D1E0BE60390971E15E60290421E2DFF1E151C00037F1E0B1C00037F07
:208D8900965CE6036B0AE6026B09E6016B08F61643170D164572F909173B887B09190F6B91
:208DA9003B84190D6B39163BEF021639FFFE16491E4772F93B9F193A979E193995515B402F
:018DC9008128
:20802000820082388200823982000000820000008200823A8200823B8200823C8200823DC5
:20804000820082DC820082DD820082DE8200000082000000820082DF820082E0820082E1CD
:2080600082008342820083CB820083F2820000008200000082000000820000008200000068
:1D808300AE00082707724F00005A26F9AE001F2709D68EFFD700085A26F7CC808040
:03808000CC871F8B
:20840300AE5240F64824F9AE52417B03F781160390F64D271BAE5240F64824F9AE5245F683
:20842300AA08AE5245F790F6905CAE5241F720E0815202C6001CC1001B26034F2027160534
:20844300AE00011F01C6001B97C6001B4CC7001B4F9572FB01F690F7C6001BA108260472CE
:208463005F001BA6015B0281521C5F1F031F017B21A1042303CC85437B21A1032603CC8536
:20848300430D212603CC8543961C00051F124F5F9772FB127F4CA10C25F51E121C000AA671
:2084A3000AF77B21A101270E7B21A102271C7B21A104272120301E1FF66B1C5F0F191F0288
:2084C3007B1C6B047B196B01201C161F90FE5F17031F0120111E1FE6036B18E602FE6B03CD
:2084E3001F017B186B04A6096B114B0A5F894B001E07891E0789CD8C7F5B089F887B126BEE
:2085030015840A115F417B144172FB12AB30F74B0A5F894B001E07891E0789CD8CFC5B0847
:208523001F0317011E0326041E0127067B11A1FF2CB87B114C5F9772FB1289CD84115B02C2
:208543005B1C81521ACE00141F0BCE00121F095F1F071F050F020F0E0F0D965C89CD8434AD
:208563005B024D2603CC85E87B01A12D260E1E07260A1E052606A6016B0220697B01A130E0
:208583002403CC860A7B01A1392303CC860AA6016B0E1E07891E07894B0A5F894B00CD8D1F
:2085A3009B5B081F1517137B010F115F90977B11909572F9159F1914979E19139572A20033
:2085C300309FA2006B189EA20017076B057B186B06AE7FFF13074F12064F120524075F1F16
:2085E300071F050F0D90CE001472F20BC60013120A95C6001212099790A327109EA2009FF3
:20860300A2002403CC855D0D0D26040D0E26034F201A7B07887B096B05846B030D022705A4
:208623001E03501F031E1D1603FFA6015B1A81AE8B2489CD84115B021E0389CD84115B02A6
:208643004B0ACD840384815202AE500BF6A4F86B017B01C100272603CC87167B01C80027AD
:208663006B027B02A52027407B01A5202628725D0019260EAE526DF6AA80AE526DF735010F
:2086830000194B784BECCD817B5B02AE8B2D89CD84115B0220124B784BECCD817B5B02AEF0
:2086A3008B3889CD84115B027B02A518271B7B01A418A1182713AE8B4189CD84115B02AE95
:2086C300500FF6A4F3AE500FF77B02A4C0A1C026137B01A4C0A1C0270BAE8B4C89CD841149
:2086E3005B02202A7B02A54027117B01A540260BAE8B5A89CD84115B0220137B0248240E9F
:208703007B01482509AE8B6489CD84115B027B01C70027AE500EA6F8F75B028152115F1FB5
:20872300091F075F1F051F03AE7F60F6AA01AE7F60F7AE50C67FAE5345A607F7AE5346A696
:208743007DF7AE5341A601F7AE5340A685F7AE52607FAE5261A603F7AE52627FAE5263A695
:2087630064F7AE52657FAE5266A60AF7AE5258A660F7AE525CA601F7AE52547FAE5250A692
:2087830085F7AE5400A62CF7AE5406A610F7AE5402A608F7AE5401A673F7AE5401A673F70B
:2087A300AE50A0A630F7AE500DF6AAF8AE500DF7AE500EA6F8F7AE500CF6AA02AE500CF758
:2087C300AE526DF6A47FAE526DF7AE500AF6A4FDAE500AF7725F0019AE500CF6AA04AE5078
:2087E3000CF7AE500DF6AA04AE500DF7AE5011F6AA20AE5011F7AE5012F6AA20AE5012F716
:20880300AE5242A611F7AE5243A606F7AE5245A62CF79A4BE84B03CD80B55B02CD80A01EEC
:2088230005C3001426071E03C300122727CE00141F05CE00121F03C60016A1002D09C60067
:20884300164AC70016200D725D0016260735FF0016CD864ACE001472F0091F0FC60013124C
:20886300086B0EC600121207CE0017905F881310909F120F909E12015B012511CE001413EC
:2088830009C600131208C6001212072414CE00141F09CE00121F07AE500AF6A804AE500AEE
:2088A300F7961C000C89CD84345B024D2603CC88227B0C6B117B11A12B2603CC89787B11CC
:2088C300A12D2603CC89977B11A1302603CC8A697B11A1312603CC8A847B11A13C2603CCAE
:2088E3008AA87B11A13E2603CC8A957B11A1482603CC896C7B11A14D2603CC89FB7B11A145
:20890300532603CC89B67B11A1612603CC8A437B11A1632603CC8AFE7B11A1642603CC8A60
:20892300DC7B11A1672603CC8B0C7B11A16827397B11A16D2603CC89ED7B11A1702603CCAC
:208943008A3D7B11A1732603CC89DF7B11A1752603CC8ABA7B11A1782603CC8A377B11A1ED
:208963007A2603CC8B05CC8822AE8B6E89CD84115B02CC8822CE00171C0064CF0017CE0001
:2089830017A327102203CC882235F4001835010017CC8822CE00171D0064CF0017CE001713
:2089A300A300642503CC882235640018725F0017CC8822965C89CD85465B024D27121E01EB
:2089C300A3007D2D0B1E0189CD80B55B02CC8822AE8C5889CD86325B02CC8822AE000E4B45
:2089E3000289CD846B5B03CC8822AE00094B0489CD846B5B03CC8822CE000B2605CE00095F
:208A0300270CAE8C6289CD86325B02CC8822965C89CD85465B024D270F1E01270B1E0189B7
:208A2300CD80E55B02CC8822AE8C6A89CD86325B02CC8822CD8115CC8822CD8143CC8822C9
:208A4300965C89CD85465B024D270F1E01270B1E0189CD817B5B02CC8822AE8C7589CD8600
:208A6300325B02CC8822AE526DF6A47FAE526DF7AE500AF6A4FDAE500AF7725F0019CC8828
:208A830022AE526DF6AA80AE526DF735010019CC8822AE5266F6A1642503CC88224CAE52B0
:208AA30066F7CC8822AE5266F64D2603CC88224AAE5266F7CC8822AE500BF6A5102703CCD1
:208AC3008822AE500FF6A4F3AE500FF7AE500AF6AA04AE500AF7CC8822AE500BF6A5082757
:208AE30003CC8822AE500FF6A4F3AE500FF7AE500AF6AA08AE500AF7CC8822725F001ACC80
:208B030088223501001ACC8822AE5266F66B0B961C000B4B0189CD846B5B03CC88225B1182
:208B2300810A4552524F523A20006D6F766520646F776E0A006D6F76652075700A0074727E
:208B430061792073746F700A00626F746820627574746F6E730A00627574746F6E20310A6B
:208B630000627574746F6E20320A000A50524F544F3A0A2B2F2D094C454420706572696F74
:208B8300640A532F73097365742F676574204D73706565640A6D096765742073746570731E
:208BA3000A780973746F700A700970617573652F726573756D650A4D096D6F7665206D6FED
:208BC300746F720A6109616464204E737470730A30097475726E206472696C6C204F46462A
:208BE3000A31097475726E206472696C6C204F4E0A3E09726F7461746520666173746572EC
:208C03000A3C09726F7461746520736C6F7765720A7509747261792075700A6409747261AC
:208C23007920646F776E0A63096175746F207370656564206F66660A7A096175746F20734C
:208C430070656564206F6E0A67096765742073706565640A00626164207370656564006DBC
:1C8C63006F76696E672100626164204E7374657073006261642076616C75650089
:168F090000000000FF01F400000000080A0206040501090000F839
:208C7F0052040F020F017B0B484F494D262E160D1E0B905859170D1F0B1E09130D7B0812A0
:208C9F000C7B07120B240D160D1E0B549056170D1F0B20080C017B016B0220CA7B026B0411
:208CBF001E09130D7B08120C7B07120B2513160972F20D7B08120C977B07120B9517091F9B
:208CDF0007160D1E0B549056170D1F0B7B046B030A040D0326CA1E0916075B048152125FB8
:208CFF001F051F03A6206B027B15484F496B0116171E1590585917171F157B036B0F1E04E3
:208D1F00887B076B1384081259090F1F047B126B067B0F6B030D01271A7B06AA016B0A7B19
:208D3F00056B097B046B087B036B0716091705160717031E05131B7B04121A7B031219257D
:208D5F002B160572F21B7B04121A6B0C7B03121917056B037B0C6B047B18AA0190977B17ED
:208D7F0090957B16977B159517171F150A020D022703CC8D071E1716155B12815240909655
:208D9F00905C961C00431F0B1E0BE603961C00471F151E151F171E171F3F1E3F88E601970B
:208DBF00844290FF72A900021E0BE6031E151F111E111F131E131F191E1988E603978442DE
:208DDF0090FF965C1F1B1E1BF66B1D1E0BF697161590E603429F1B1D1E1BF71E1BF66B1EA7
:208DFF001E0BE60197161590E602429F1B1E1E1BF79096905C93FE1F1F1E0BE6011E151F7D
:208E1F00211E211F231E231F251E2588E60397844272FB1F90FF93FE1F271E0BE6021E15C5
:208E3F001F291E291F2B1E2B1F2F1E2F88E60297844272FB2790FF160B1E0BE6021E151FE2
:208E5F00311E311F331E331F351E3588E6019784429F90F71E0B5C1F371E0BE60290971E06
:208E7F0015E60390421E37FF16151E0BE6031E151F3D1E3D1F051E0588F69784429F90F740
:208E9F001E155C1F2D1E0BE60390971E15E60290421E2DFF1E151C00037F1E0B1C00037FD0
:208EBF00965CE6036B0AE6026B09E6016B08F61643170D164572F909173B887B09190F6B5A
:208EDF003B84190D6B39163BEF021639FFFE16491E4772F93B9F193A979E193995515B40F8
:018EFF0081F1
:00000001FF

127
stm8l.h
View File

@ -111,8 +111,29 @@ typedef unsigned int U16;
#define GPIO_PIN6 (1 << 6)
#define GPIO_PIN7 (1 << 7)
/* -------------------- FLASH/EEPROM -------------------- */
#define FLASH_CR1 *(unsigned char*)0x505A
#define FLASH_CR2 *(unsigned char*)0x505B
#define FLASH_NCR2 *(unsigned char*)0x505C
#define FLASH_FPR *(unsigned char*)0x505D
#define FLASH_NFPR *(unsigned char*)0x505E
#define FLASH_IAPSR *(unsigned char*)0x505F
#define FLASH_PUKR *(unsigned char*)0x5062 // progmem unprotection
#define FLASH_DUKR *(unsigned char*)0x5064 // EEPROM unprotection
/* CLOCK */
#define EEPROM_KEY1 0xAE // keys to manage EEPROM's write access
#define EEPROM_KEY2 0x56
/* ------------------- interrupts ------------------- */
#define EXTI_CR1 *(unsigned char*)0x50A0
#define EXTI_CR2 *(unsigned char*)0x50A1
#define INTERRUPT_HANDLER(fn, num) void fn() __interrupt(num)
#define INTERRUPT_DEFINITION(fn, num) extern void fn() __interrupt(num)
// Reset status register
#define RST_SR *(unsigned char*)0x50B3
/* ------------------- CLOCK ------------------- */
#define CLK_ICKR *(unsigned char*)0x50C0
#define CLK_ECKR *(unsigned char*)0x50C1
#define CLK_CMSR *(unsigned char*)0x50C3
@ -126,7 +147,44 @@ typedef unsigned int U16;
#define CLK_HSITRIMR *(unsigned char*)0x50CC
#define CLK_SWIMCCR *(unsigned char*)0x50CD
/* ------------------- Watchdog ------------------ */
#define WWDG_CR *(unsigned char*)0x50D1
#define WWDG_WR *(unsigned char*)0x50D2
#define IWDG_KR *(unsigned char*)0x50E0
#define IWDG_PR *(unsigned char*)0x50E1
#define IWDG_RLR *(unsigned char*)0x50E2
/* ------------------- AWU, BEEP ------------------- */
#define AWU_CSR1 *(unsigned char*)0x50F0
#define AWU_APR *(unsigned char*)0x50F1
#define AWU_TBR *(unsigned char*)0x50F2
#define BEEP_CSR *(unsigned char*)0x50F3
/* ------------------- SPI ------------------- */
#define SPI_CR1 *(unsigned char*)0x5200
#define SPI_CR2 *(unsigned char*)0x5201
#define SPI_ICR *(unsigned char*)0x5202
#define SPI_SR *(unsigned char*)0x5203
#define SPI_DR *(unsigned char*)0x5204
#define SPI_CRCPR *(unsigned char*)0x5205
#define SPI_RXCRCR *(unsigned char*)0x5206
#define SPI_TXCRCR *(unsigned char*)0x5207
/* ------------------- I2C ------------------- */
#define I2C_CR1 *(unsigned char*)0x5210
#define I2C_CR2 *(unsigned char*)0x5211
#define I2C_FREQR *(unsigned char*)0x5212
#define I2C_OARL *(unsigned char*)0x5213
#define I2C_OARH *(unsigned char*)0x5214
#define I2C_DR *(unsigned char*)0x5216
#define I2C_SR1 *(unsigned char*)0x5217
#define I2C_SR2 *(unsigned char*)0x5218
#define I2C_SR3 *(unsigned char*)0x5219
#define I2C_ITR *(unsigned char*)0x521A
#define I2C_CCRL *(unsigned char*)0x521B
#define I2C_CCRH *(unsigned char*)0x521C
#define I2C_TRISER *(unsigned char*)0x521D
#define I2C_PECR *(unsigned char*)0x521E
/* ------------------- UART ------------------- */
#ifdef STM8S003
@ -265,6 +323,7 @@ typedef unsigned int U16;
/* TIM2 */
#define TIM2_CR1 *(unsigned char*)0x5300
#if defined STM8S105 || defined STM8S103
#define TIM2_IER *(unsigned char*)0x5301
#define TIM2_SR1 *(unsigned char*)0x5302
#define TIM2_SR2 *(unsigned char*)0x5303
@ -285,8 +344,32 @@ typedef unsigned int U16;
#define TIM2_CCR2L *(unsigned char*)0x5312
#define TIM2_CCR3H *(unsigned char*)0x5313
#define TIM2_CCR3L *(unsigned char*)0x5314
#elif defined STM8S003
#define TIM2_IER *(unsigned char*)0x5303
#define TIM2_SR1 *(unsigned char*)0x5304
#define TIM2_SR2 *(unsigned char*)0x5305
#define TIM2_EGR *(unsigned char*)0x5306
#define TIM2_CCMR1 *(unsigned char*)0x5307
#define TIM2_CCMR2 *(unsigned char*)0x5308
#define TIM2_CCMR3 *(unsigned char*)0x5309
#define TIM2_CCER1 *(unsigned char*)0x530A
#define TIM2_CCER2 *(unsigned char*)0x530B
#define TIM2_CNTRH *(unsigned char*)0x530C
#define TIM2_CNTRL *(unsigned char*)0x530D
#define TIM2_PSCR *(unsigned char*)0x530E
#define TIM2_ARRH *(unsigned char*)0x530F
#define TIM2_ARRL *(unsigned char*)0x5310
#define TIM2_CCR1H *(unsigned char*)0x5311
#define TIM2_CCR1L *(unsigned char*)0x5312
#define TIM2_CCR2H *(unsigned char*)0x5313
#define TIM2_CCR2L *(unsigned char*)0x5314
#define TIM2_CCR3H *(unsigned char*)0x5315
#define TIM2_CCR3L *(unsigned char*)0x5316
#endif
/* TIM3 */
#if defined STM8S105 || defined STM8S103
#define TIM3_CR1 *(unsigned char*)0x5320
#define TIM3_IER *(unsigned char*)0x5321
#define TIM3_SR1 *(unsigned char*)0x5322
@ -304,15 +387,25 @@ typedef unsigned int U16;
#define TIM3_CCR1L *(unsigned char*)0x532E
#define TIM3_CCR2H *(unsigned char*)0x532F
#define TIM3_CCR2L *(unsigned char*)0x5330
#endif
/* TIM4 */
#define TIM4_CR1 *(unsigned char*)0x5340
#if defined STM8S105 || defined STM8S103
#define TIM4_IER *(unsigned char*)0x5341
#define TIM4_SR *(unsigned char*)0x5342
#define TIM4_EGR *(unsigned char*)0x5343
#define TIM4_CNTR *(unsigned char*)0x5344
#define TIM4_PSCR *(unsigned char*)0x5345
#define TIM4_ARR *(unsigned char*)0x5346
#elif defined STM8S003
#define TIM4_IER *(unsigned char*)0x5343
#define TIM4_SR *(unsigned char*)0x5344
#define TIM4_EGR *(unsigned char*)0x5345
#define TIM4_CNTR *(unsigned char*)0x5346
#define TIM4_PSCR *(unsigned char*)0x5347
#define TIM4_ARR *(unsigned char*)0x5348
#endif
/* ------------------- ADC ------------------- */
#define ADC_DB0RH *(unsigned char*)0x53E0
@ -354,6 +447,18 @@ typedef unsigned int U16;
/* ------------------- swim control ------------------- */
#define CFG_GCR *(unsigned char*)0x7F60
#define SWIM_CSR *(unsigned char*)0x7F80
/* ------------------- ITC ------------------- */
#define ITC_SPR1 *(unsigned char*)0x7F70
#define ITC_SPR2 *(unsigned char*)0x7F71
#define ITC_SPR3 *(unsigned char*)0x7F72
#define ITC_SPR4 *(unsigned char*)0x7F73
#define ITC_SPR5 *(unsigned char*)0x7F74
#define ITC_SPR6 *(unsigned char*)0x7F75
#define ITC_SPR7 *(unsigned char*)0x7F76
#define ITC_SPR8 *(unsigned char*)0x7F77
/* -------------------- UNIQUE ID -------------------- */
#if defined STM8S105 || defined STM8S103 // maybe some other MCU have this too???
@ -371,25 +476,9 @@ typedef unsigned int U16;
#define U_ID11 (unsigned char*)0x48D8
#endif // defined STM8S105 || defined STM8S103
/* -------------------- FLASH/EEPROM -------------------- */
#define FLASH_CR1 *(unsigned char*)0x505A
#define FLASH_CR2 *(unsigned char*)0x505B
#define FLASH_NCR2 *(unsigned char*)0x505C
#define FLASH_FPR *(unsigned char*)0x505D
#define FLASH_NFPR *(unsigned char*)0x505E
#define FLASH_IAPSR *(unsigned char*)0x505F
#define FLASH_PUKR *(unsigned char*)0x5062 // progmem unprotection
#define FLASH_DUKR *(unsigned char*)0x5064 // EEPROM unprotection
#define EEPROM_KEY1 0xAE // keys to manage EEPROM's write access
#define EEPROM_KEY2 0x56
/* ------------------- interrupts ------------------- */
#define EXTI_CR1 *(unsigned char*)0x50A0
#define EXTI_CR2 *(unsigned char*)0x50A1
#define INTERRUPT_HANDLER(fn, num) void fn() __interrupt(num)
#define INTERRUPT_DEFINITION(fn, num) extern void fn() __interrupt(num)
// CCR REGISTER: bits 3&5 should be 1 if you wanna change EXTI_CRx
#define CCR *(unsigned char*)0x7F0A
#endif // __STM8L_H__
// #define *(unsigned char*)0x