diff --git a/Makefile b/old/Makefile similarity index 100% rename from Makefile rename to old/Makefile diff --git a/old/READMEEEEE b/old/READMEEEEE new file mode 100644 index 0000000..922f507 --- /dev/null +++ b/old/READMEEEEE @@ -0,0 +1 @@ +îÅ ÚÁÂÙ×ÁÔØ ÐÏÓÌÅ ÐÒÁ×ËÉ ÓÉÎÈÒÏÎÉÚÉÒÏ×ÁÔØ Ó dropbox! diff --git a/Used_pins b/old/Used_pins similarity index 100% rename from Used_pins rename to old/Used_pins diff --git a/User_protocol b/old/User_protocol similarity index 100% rename from User_protocol rename to old/User_protocol diff --git a/cmsis/arm_common_tables.h b/old/cmsis/arm_common_tables.h similarity index 100% rename from cmsis/arm_common_tables.h rename to old/cmsis/arm_common_tables.h diff --git a/cmsis/arm_math.h b/old/cmsis/arm_math.h similarity index 100% rename from cmsis/arm_math.h rename to old/cmsis/arm_math.h diff --git a/cmsis/core_cm3.h b/old/cmsis/core_cm3.h similarity index 100% rename from cmsis/core_cm3.h rename to old/cmsis/core_cm3.h diff --git a/cmsis/core_cmFunc.h b/old/cmsis/core_cmFunc.h similarity index 100% rename from cmsis/core_cmFunc.h rename to old/cmsis/core_cmFunc.h diff --git a/cmsis/core_cmInstr.h b/old/cmsis/core_cmInstr.h similarity index 100% rename from cmsis/core_cmInstr.h rename to old/cmsis/core_cmInstr.h diff --git a/cmsis/startup_stm32f10x_md.s b/old/cmsis/startup_stm32f10x_md.s similarity index 100% rename from cmsis/startup_stm32f10x_md.s rename to old/cmsis/startup_stm32f10x_md.s diff --git a/cmsis/startup_stm32f10x_md_vl.s b/old/cmsis/startup_stm32f10x_md_vl.s similarity index 100% rename from cmsis/startup_stm32f10x_md_vl.s rename to old/cmsis/startup_stm32f10x_md_vl.s diff --git a/cmsis/stm32f100rb_flash.ld b/old/cmsis/stm32f100rb_flash.ld similarity index 100% rename from cmsis/stm32f100rb_flash.ld rename to old/cmsis/stm32f100rb_flash.ld diff --git a/cmsis/stm32f10x.h b/old/cmsis/stm32f10x.h similarity index 100% rename from cmsis/stm32f10x.h rename to old/cmsis/stm32f10x.h diff --git a/cmsis/system_stm32f10x.c b/old/cmsis/system_stm32f10x.c similarity index 100% rename from cmsis/system_stm32f10x.c rename to old/cmsis/system_stm32f10x.c diff --git a/cmsis/system_stm32f10x.h b/old/cmsis/system_stm32f10x.h similarity index 100% rename from cmsis/system_stm32f10x.h rename to old/cmsis/system_stm32f10x.h diff --git a/hw_config.c b/old/hw_config.c similarity index 100% rename from hw_config.c rename to old/hw_config.c diff --git a/hw_config.h b/old/hw_config.h similarity index 100% rename from hw_config.h rename to old/hw_config.h diff --git a/includes.h b/old/includes.h similarity index 100% rename from includes.h rename to old/includes.h diff --git a/interrupts.c b/old/interrupts.c similarity index 100% rename from interrupts.c rename to old/interrupts.c diff --git a/interrupts.h b/old/interrupts.h similarity index 100% rename from interrupts.h rename to old/interrupts.h diff --git a/leds.c b/old/leds.c similarity index 100% rename from leds.c rename to old/leds.c diff --git a/leds.h b/old/leds.h similarity index 100% rename from leds.h rename to old/leds.h diff --git a/main.c b/old/main.c similarity index 100% rename from main.c rename to old/main.c diff --git a/main.h b/old/main.h similarity index 100% rename from main.h rename to old/main.h diff --git a/onewire.c b/old/onewire.c similarity index 100% rename from onewire.c rename to old/onewire.c diff --git a/onewire.h b/old/onewire.h similarity index 100% rename from onewire.h rename to old/onewire.h diff --git a/stepper_motors.c b/old/stepper_motors.c similarity index 100% rename from stepper_motors.c rename to old/stepper_motors.c diff --git a/stepper_motors.h b/old/stepper_motors.h similarity index 100% rename from stepper_motors.h rename to old/stepper_motors.h diff --git a/stm32_lib/misc.c b/old/stm32_lib/misc.c similarity index 100% rename from stm32_lib/misc.c rename to old/stm32_lib/misc.c diff --git a/stm32_lib/misc.h b/old/stm32_lib/misc.h similarity index 100% rename from stm32_lib/misc.h rename to old/stm32_lib/misc.h diff --git a/stm32_lib/stm32f10x_adc.c b/old/stm32_lib/stm32f10x_adc.c similarity index 100% rename from stm32_lib/stm32f10x_adc.c rename to old/stm32_lib/stm32f10x_adc.c diff --git a/stm32_lib/stm32f10x_adc.h b/old/stm32_lib/stm32f10x_adc.h similarity index 100% rename from stm32_lib/stm32f10x_adc.h rename to old/stm32_lib/stm32f10x_adc.h diff --git a/stm32_lib/stm32f10x_bkp.c b/old/stm32_lib/stm32f10x_bkp.c similarity index 100% rename from stm32_lib/stm32f10x_bkp.c rename to old/stm32_lib/stm32f10x_bkp.c diff --git a/stm32_lib/stm32f10x_bkp.h b/old/stm32_lib/stm32f10x_bkp.h similarity index 100% rename from stm32_lib/stm32f10x_bkp.h rename to old/stm32_lib/stm32f10x_bkp.h diff --git a/stm32_lib/stm32f10x_can.c b/old/stm32_lib/stm32f10x_can.c similarity index 100% rename from stm32_lib/stm32f10x_can.c rename to old/stm32_lib/stm32f10x_can.c diff --git a/stm32_lib/stm32f10x_can.h b/old/stm32_lib/stm32f10x_can.h similarity index 100% rename from stm32_lib/stm32f10x_can.h rename to old/stm32_lib/stm32f10x_can.h diff --git a/stm32_lib/stm32f10x_cec.c b/old/stm32_lib/stm32f10x_cec.c similarity index 100% rename from stm32_lib/stm32f10x_cec.c rename to old/stm32_lib/stm32f10x_cec.c diff --git a/stm32_lib/stm32f10x_cec.h b/old/stm32_lib/stm32f10x_cec.h similarity index 100% rename from stm32_lib/stm32f10x_cec.h rename to old/stm32_lib/stm32f10x_cec.h diff --git a/stm32_lib/stm32f10x_conf.h b/old/stm32_lib/stm32f10x_conf.h similarity index 100% rename from stm32_lib/stm32f10x_conf.h rename to old/stm32_lib/stm32f10x_conf.h diff --git a/stm32_lib/stm32f10x_crc.c b/old/stm32_lib/stm32f10x_crc.c similarity index 100% rename from stm32_lib/stm32f10x_crc.c rename to old/stm32_lib/stm32f10x_crc.c diff --git a/stm32_lib/stm32f10x_crc.h b/old/stm32_lib/stm32f10x_crc.h similarity index 100% rename from stm32_lib/stm32f10x_crc.h rename to old/stm32_lib/stm32f10x_crc.h diff --git a/stm32_lib/stm32f10x_dac.c b/old/stm32_lib/stm32f10x_dac.c similarity index 100% rename from stm32_lib/stm32f10x_dac.c rename to old/stm32_lib/stm32f10x_dac.c diff --git a/stm32_lib/stm32f10x_dac.h b/old/stm32_lib/stm32f10x_dac.h similarity index 100% rename from stm32_lib/stm32f10x_dac.h rename to old/stm32_lib/stm32f10x_dac.h diff --git a/stm32_lib/stm32f10x_dbgmcu.c b/old/stm32_lib/stm32f10x_dbgmcu.c similarity index 100% rename from stm32_lib/stm32f10x_dbgmcu.c rename to old/stm32_lib/stm32f10x_dbgmcu.c diff --git a/stm32_lib/stm32f10x_dbgmcu.h b/old/stm32_lib/stm32f10x_dbgmcu.h similarity index 100% rename from stm32_lib/stm32f10x_dbgmcu.h rename to old/stm32_lib/stm32f10x_dbgmcu.h diff --git a/stm32_lib/stm32f10x_dma.c b/old/stm32_lib/stm32f10x_dma.c similarity index 100% rename from stm32_lib/stm32f10x_dma.c rename to old/stm32_lib/stm32f10x_dma.c diff --git a/stm32_lib/stm32f10x_dma.h b/old/stm32_lib/stm32f10x_dma.h similarity index 100% rename from stm32_lib/stm32f10x_dma.h rename to old/stm32_lib/stm32f10x_dma.h diff --git a/stm32_lib/stm32f10x_exti.c b/old/stm32_lib/stm32f10x_exti.c similarity index 100% rename from stm32_lib/stm32f10x_exti.c rename to old/stm32_lib/stm32f10x_exti.c diff --git a/stm32_lib/stm32f10x_exti.h b/old/stm32_lib/stm32f10x_exti.h similarity index 100% rename from stm32_lib/stm32f10x_exti.h rename to old/stm32_lib/stm32f10x_exti.h diff --git a/stm32_lib/stm32f10x_flash.c b/old/stm32_lib/stm32f10x_flash.c similarity index 100% rename from stm32_lib/stm32f10x_flash.c rename to old/stm32_lib/stm32f10x_flash.c diff --git a/stm32_lib/stm32f10x_flash.h b/old/stm32_lib/stm32f10x_flash.h similarity index 100% rename from stm32_lib/stm32f10x_flash.h rename to old/stm32_lib/stm32f10x_flash.h diff --git a/stm32_lib/stm32f10x_fsmc.c b/old/stm32_lib/stm32f10x_fsmc.c similarity index 100% rename from stm32_lib/stm32f10x_fsmc.c rename to old/stm32_lib/stm32f10x_fsmc.c diff --git a/stm32_lib/stm32f10x_fsmc.h b/old/stm32_lib/stm32f10x_fsmc.h similarity index 100% rename from stm32_lib/stm32f10x_fsmc.h rename to old/stm32_lib/stm32f10x_fsmc.h diff --git a/stm32_lib/stm32f10x_gpio.c b/old/stm32_lib/stm32f10x_gpio.c similarity index 100% rename from stm32_lib/stm32f10x_gpio.c rename to old/stm32_lib/stm32f10x_gpio.c diff --git a/stm32_lib/stm32f10x_gpio.h b/old/stm32_lib/stm32f10x_gpio.h similarity index 100% rename from stm32_lib/stm32f10x_gpio.h rename to old/stm32_lib/stm32f10x_gpio.h diff --git a/stm32_lib/stm32f10x_i2c.c b/old/stm32_lib/stm32f10x_i2c.c similarity index 100% rename from stm32_lib/stm32f10x_i2c.c rename to old/stm32_lib/stm32f10x_i2c.c diff --git a/stm32_lib/stm32f10x_i2c.h b/old/stm32_lib/stm32f10x_i2c.h similarity index 100% rename from stm32_lib/stm32f10x_i2c.h rename to old/stm32_lib/stm32f10x_i2c.h diff --git a/stm32_lib/stm32f10x_iwdg.c b/old/stm32_lib/stm32f10x_iwdg.c similarity index 100% rename from stm32_lib/stm32f10x_iwdg.c rename to old/stm32_lib/stm32f10x_iwdg.c diff --git a/stm32_lib/stm32f10x_iwdg.h b/old/stm32_lib/stm32f10x_iwdg.h similarity index 100% rename from stm32_lib/stm32f10x_iwdg.h rename to old/stm32_lib/stm32f10x_iwdg.h diff --git a/stm32_lib/stm32f10x_pwr.c b/old/stm32_lib/stm32f10x_pwr.c similarity index 100% rename from stm32_lib/stm32f10x_pwr.c rename to old/stm32_lib/stm32f10x_pwr.c diff --git a/stm32_lib/stm32f10x_pwr.h b/old/stm32_lib/stm32f10x_pwr.h similarity index 100% rename from stm32_lib/stm32f10x_pwr.h rename to old/stm32_lib/stm32f10x_pwr.h diff --git a/stm32_lib/stm32f10x_rcc.c b/old/stm32_lib/stm32f10x_rcc.c similarity index 100% rename from stm32_lib/stm32f10x_rcc.c rename to old/stm32_lib/stm32f10x_rcc.c diff --git a/stm32_lib/stm32f10x_rcc.h b/old/stm32_lib/stm32f10x_rcc.h similarity index 100% rename from stm32_lib/stm32f10x_rcc.h rename to old/stm32_lib/stm32f10x_rcc.h diff --git a/stm32_lib/stm32f10x_rtc.c b/old/stm32_lib/stm32f10x_rtc.c similarity index 100% rename from stm32_lib/stm32f10x_rtc.c rename to old/stm32_lib/stm32f10x_rtc.c diff --git a/stm32_lib/stm32f10x_rtc.h b/old/stm32_lib/stm32f10x_rtc.h similarity index 100% rename from stm32_lib/stm32f10x_rtc.h rename to old/stm32_lib/stm32f10x_rtc.h diff --git a/stm32_lib/stm32f10x_sdio.c b/old/stm32_lib/stm32f10x_sdio.c similarity index 100% rename from stm32_lib/stm32f10x_sdio.c rename to old/stm32_lib/stm32f10x_sdio.c diff --git a/stm32_lib/stm32f10x_sdio.h b/old/stm32_lib/stm32f10x_sdio.h similarity index 100% rename from stm32_lib/stm32f10x_sdio.h rename to old/stm32_lib/stm32f10x_sdio.h diff --git a/stm32_lib/stm32f10x_spi.c b/old/stm32_lib/stm32f10x_spi.c similarity index 100% rename from stm32_lib/stm32f10x_spi.c rename to old/stm32_lib/stm32f10x_spi.c diff --git a/stm32_lib/stm32f10x_spi.h b/old/stm32_lib/stm32f10x_spi.h similarity index 100% rename from stm32_lib/stm32f10x_spi.h rename to old/stm32_lib/stm32f10x_spi.h diff --git a/stm32_lib/stm32f10x_tim.c b/old/stm32_lib/stm32f10x_tim.c similarity index 100% rename from stm32_lib/stm32f10x_tim.c rename to old/stm32_lib/stm32f10x_tim.c diff --git a/stm32_lib/stm32f10x_tim.h b/old/stm32_lib/stm32f10x_tim.h similarity index 100% rename from stm32_lib/stm32f10x_tim.h rename to old/stm32_lib/stm32f10x_tim.h diff --git a/stm32_lib/stm32f10x_usart.c b/old/stm32_lib/stm32f10x_usart.c similarity index 100% rename from stm32_lib/stm32f10x_usart.c rename to old/stm32_lib/stm32f10x_usart.c diff --git a/stm32_lib/stm32f10x_usart.h b/old/stm32_lib/stm32f10x_usart.h similarity index 100% rename from stm32_lib/stm32f10x_usart.h rename to old/stm32_lib/stm32f10x_usart.h diff --git a/stm32_lib/stm32f10x_wwdg.c b/old/stm32_lib/stm32f10x_wwdg.c similarity index 100% rename from stm32_lib/stm32f10x_wwdg.c rename to old/stm32_lib/stm32f10x_wwdg.c diff --git a/stm32_lib/stm32f10x_wwdg.h b/old/stm32_lib/stm32f10x_wwdg.h similarity index 100% rename from stm32_lib/stm32f10x_wwdg.h rename to old/stm32_lib/stm32f10x_wwdg.h diff --git a/stm32f10x_conf.h b/old/stm32f10x_conf.h similarity index 100% rename from stm32f10x_conf.h rename to old/stm32f10x_conf.h diff --git a/termo_codes b/old/termo_codes similarity index 100% rename from termo_codes rename to old/termo_codes diff --git a/testproject.bin b/old/testproject.bin similarity index 100% rename from testproject.bin rename to old/testproject.bin diff --git a/usb_conf.h b/old/usb_conf.h similarity index 100% rename from usb_conf.h rename to old/usb_conf.h diff --git a/usb_desc.c b/old/usb_desc.c similarity index 100% rename from usb_desc.c rename to old/usb_desc.c diff --git a/usb_desc.h b/old/usb_desc.h similarity index 100% rename from usb_desc.h rename to old/usb_desc.h diff --git a/usb_istr.c b/old/usb_istr.c similarity index 100% rename from usb_istr.c rename to old/usb_istr.c diff --git a/usb_istr.h b/old/usb_istr.h similarity index 100% rename from usb_istr.h rename to old/usb_istr.h diff --git a/usb_lib/otgd_fs_cal.c b/old/usb_lib/otgd_fs_cal.c similarity index 100% rename from usb_lib/otgd_fs_cal.c rename to old/usb_lib/otgd_fs_cal.c diff --git a/usb_lib/otgd_fs_cal.h b/old/usb_lib/otgd_fs_cal.h similarity index 100% rename from usb_lib/otgd_fs_cal.h rename to old/usb_lib/otgd_fs_cal.h diff --git a/usb_lib/otgd_fs_dev.c b/old/usb_lib/otgd_fs_dev.c similarity index 100% rename from usb_lib/otgd_fs_dev.c rename to old/usb_lib/otgd_fs_dev.c diff --git a/usb_lib/otgd_fs_dev.h b/old/usb_lib/otgd_fs_dev.h similarity index 100% rename from usb_lib/otgd_fs_dev.h rename to old/usb_lib/otgd_fs_dev.h diff --git a/usb_lib/otgd_fs_int.c b/old/usb_lib/otgd_fs_int.c similarity index 100% rename from usb_lib/otgd_fs_int.c rename to old/usb_lib/otgd_fs_int.c diff --git a/usb_lib/otgd_fs_int.h b/old/usb_lib/otgd_fs_int.h similarity index 100% rename from usb_lib/otgd_fs_int.h rename to old/usb_lib/otgd_fs_int.h diff --git a/usb_lib/otgd_fs_pcd.c b/old/usb_lib/otgd_fs_pcd.c similarity index 100% rename from usb_lib/otgd_fs_pcd.c rename to old/usb_lib/otgd_fs_pcd.c diff --git a/usb_lib/otgd_fs_pcd.h b/old/usb_lib/otgd_fs_pcd.h similarity index 100% rename from usb_lib/otgd_fs_pcd.h rename to old/usb_lib/otgd_fs_pcd.h diff --git a/usb_lib/otgd_fs_regs.h b/old/usb_lib/otgd_fs_regs.h similarity index 100% rename from usb_lib/otgd_fs_regs.h rename to old/usb_lib/otgd_fs_regs.h diff --git a/usb_lib/usb_core.c b/old/usb_lib/usb_core.c similarity index 100% rename from usb_lib/usb_core.c rename to old/usb_lib/usb_core.c diff --git a/usb_lib/usb_core.h b/old/usb_lib/usb_core.h similarity index 100% rename from usb_lib/usb_core.h rename to old/usb_lib/usb_core.h diff --git a/usb_lib/usb_def.h b/old/usb_lib/usb_def.h similarity index 100% rename from usb_lib/usb_def.h rename to old/usb_lib/usb_def.h diff --git a/usb_lib/usb_init.c b/old/usb_lib/usb_init.c similarity index 100% rename from usb_lib/usb_init.c rename to old/usb_lib/usb_init.c diff --git a/usb_lib/usb_init.h b/old/usb_lib/usb_init.h similarity index 100% rename from usb_lib/usb_init.h rename to old/usb_lib/usb_init.h diff --git a/usb_lib/usb_int.c b/old/usb_lib/usb_int.c similarity index 100% rename from usb_lib/usb_int.c rename to old/usb_lib/usb_int.c diff --git a/usb_lib/usb_int.h b/old/usb_lib/usb_int.h similarity index 100% rename from usb_lib/usb_int.h rename to old/usb_lib/usb_int.h diff --git a/usb_lib/usb_lib.h b/old/usb_lib/usb_lib.h similarity index 100% rename from usb_lib/usb_lib.h rename to old/usb_lib/usb_lib.h diff --git a/usb_lib/usb_mem.c b/old/usb_lib/usb_mem.c similarity index 100% rename from usb_lib/usb_mem.c rename to old/usb_lib/usb_mem.c diff --git a/usb_lib/usb_mem.h b/old/usb_lib/usb_mem.h similarity index 100% rename from usb_lib/usb_mem.h rename to old/usb_lib/usb_mem.h diff --git a/usb_lib/usb_regs.c b/old/usb_lib/usb_regs.c similarity index 100% rename from usb_lib/usb_regs.c rename to old/usb_lib/usb_regs.c diff --git a/usb_lib/usb_regs.h b/old/usb_lib/usb_regs.h similarity index 100% rename from usb_lib/usb_regs.h rename to old/usb_lib/usb_regs.h diff --git a/usb_lib/usb_sil.c b/old/usb_lib/usb_sil.c similarity index 100% rename from usb_lib/usb_sil.c rename to old/usb_lib/usb_sil.c diff --git a/usb_lib/usb_sil.h b/old/usb_lib/usb_sil.h similarity index 100% rename from usb_lib/usb_sil.h rename to old/usb_lib/usb_sil.h diff --git a/usb_lib/usb_type.h b/old/usb_lib/usb_type.h similarity index 100% rename from usb_lib/usb_type.h rename to old/usb_lib/usb_type.h diff --git a/usb_prop.c b/old/usb_prop.c similarity index 100% rename from usb_prop.c rename to old/usb_prop.c diff --git a/usb_prop.h b/old/usb_prop.h similarity index 100% rename from usb_prop.h rename to old/usb_prop.h diff --git a/usb_pwr.c b/old/usb_pwr.c similarity index 100% rename from usb_pwr.c rename to old/usb_pwr.c diff --git a/usb_pwr.h b/old/usb_pwr.h similarity index 100% rename from usb_pwr.h rename to old/usb_pwr.h diff --git a/user_protocol.c b/old/user_protocol.c similarity index 100% rename from user_protocol.c rename to old/user_protocol.c diff --git a/user_protocol.h b/old/user_protocol.h similarity index 100% rename from user_protocol.h rename to old/user_protocol.h diff --git a/old/with_opencm3.tgz b/old/with_opencm3.tgz new file mode 100644 index 0000000..aee040b Binary files /dev/null and b/old/with_opencm3.tgz differ diff --git a/zakwire.c b/old/zakwire.c similarity index 100% rename from zakwire.c rename to old/zakwire.c diff --git a/zakwire.h b/old/zakwire.h similarity index 100% rename from zakwire.h rename to old/zakwire.h diff --git a/schematic/ALL.pro b/schematic/ALL.pro index 0341989..dfbd180 100644 --- a/schematic/ALL.pro +++ b/schematic/ALL.pro @@ -1,6 +1,6 @@ -update=Ср 01 апр 2015 19:30:22 +update=Ð’Ñ‚ 14 апр 2015 17:10:18 version=1 -last_client=kicad +last_client=eeschema [cvpcb] version=1 NetIExt=net @@ -8,6 +8,51 @@ NetIExt=net EquName1=devcms [general] version=1 +[pcbnew] +version=1 +LastNetListRead=ALL.net +UseCmpFile=1 +PadDrill=0 +PadSizeH=2 +PadSizeV=2.5 +PcbTextSizeV=1.5 +PcbTextSizeH=1.5 +PcbTextThickness=0.3 +ModuleTextSizeV=1.5 +ModuleTextSizeH=1.5 +ModuleTextSizeThickness=0.3 +SolderMaskClearance=0.2 +SolderMaskMinWidth=0 +DrawSegmentWidth=0.4 +BoardOutlineThickness=0.3 +ModuleOutlineThickness=0.3 +[pcbnew/libraries] +LibDir=/home/eddy/kicad;/home/eddy/kicad/CYB3R_from_LOR/kicad;/home/eddy/kicad/Kicad-Libraries/modules;/home/eddy/kicad/kicadlibrary;mod +LibName1=sockets +LibName2=connect +LibName3=discret +LibName4=pin_array +LibName5=divers +LibName6=libcms +LibName7=display +LibName8=led +LibName9=dip_sockets +LibName10=pga_sockets +LibName11=valves +LibName12=open-project +LibName13=dip +LibName14=pinhead +LibName15=pinhead-double +LibName16=pinhead-double-smd +LibName17=qfp +LibName18=smd +LibName19=sot +LibName20=quartz +LibName21=w_crystal +LibName22=capacitors +LibName23=gprm1-45-61 +LibName24=my_modules +LibName25=smd_diodes [eeschema] version=1 LibDir=/home/eddy/kicad;/home/eddy/kicad/Kicad-Libraries/library;/home/eddy/kicad/kicadlibrary @@ -52,23 +97,3 @@ LibName32=my_elements LibName33=STM32f103 LibName34=vreg LibName35=open-project -[pcbnew] -version=1 -PageLayoutDescrFile= -LastNetListRead=ALL.net -UseCmpFile=1 -PadDrill=0.7999999999999999 -PadDrillOvalY=0.7999999999999999 -PadSizeH=1.5 -PadSizeV=2 -PcbTextSizeV=1.5 -PcbTextSizeH=1.5 -PcbTextThickness=0.3 -ModuleTextSizeV=1.5 -ModuleTextSizeH=1.5 -ModuleTextSizeThickness=0.3 -SolderMaskClearance=0.2 -SolderMaskMinWidth=0 -DrawSegmentWidth=0.4 -BoardOutlineThickness=0.3 -ModuleOutlineThickness=0.3 diff --git a/schematic/LEDs_in_box.cmp b/schematic/LEDs_in_box.cmp new file mode 100644 index 0000000..9b3d7d5 --- /dev/null +++ b/schematic/LEDs_in_box.cmp @@ -0,0 +1,115 @@ +Cmp-Mod V01 Created by CvPcb (2013-feb-26)-stable date = Пн 02 мар 2015 09:13:14 + +BeginCmp +TimeStamp = /54F40B18; +Reference = D1; +ValeurCmp = LED; +IdModule = LED-3MM; +EndCmp + +BeginCmp +TimeStamp = /54F40B25; +Reference = D2; +ValeurCmp = LED; +IdModule = LED-3MM; +EndCmp + +BeginCmp +TimeStamp = /54F40BFF; +Reference = D3; +ValeurCmp = LED; +IdModule = LED-3MM; +EndCmp + +BeginCmp +TimeStamp = /54F40BD8; +Reference = D4; +ValeurCmp = LED; +IdModule = LED-3MM; +EndCmp + +BeginCmp +TimeStamp = /54F40BDE; +Reference = D5; +ValeurCmp = LED; +IdModule = LED-3MM; +EndCmp + +BeginCmp +TimeStamp = /54F40D0F; +Reference = HOLE1; +ValeurCmp = HOLE; +IdModule = hole_3mm; +EndCmp + +BeginCmp +TimeStamp = /54F40D1C; +Reference = HOLE2; +ValeurCmp = HOLE; +IdModule = hole_3mm; +EndCmp + +BeginCmp +TimeStamp = /54F40D22; +Reference = HOLE3; +ValeurCmp = HOLE; +IdModule = hole_3mm; +EndCmp + +BeginCmp +TimeStamp = /54F40D28; +Reference = HOLE4; +ValeurCmp = HOLE; +IdModule = hole_3mm; +EndCmp + +BeginCmp +TimeStamp = /54F40B2D; +Reference = K1; +ValeurCmp = CONN_3; +IdModule = PIN_ARRAY_3X1; +EndCmp + +BeginCmp +TimeStamp = /54F40BE4; +Reference = K2; +ValeurCmp = CONN_4; +IdModule = PIN_ARRAY_4x1; +EndCmp + +BeginCmp +TimeStamp = /54F40B6D; +Reference = R1; +ValeurCmp = 330; +IdModule = SM0603; +EndCmp + +BeginCmp +TimeStamp = /54F40B3C; +Reference = R2; +ValeurCmp = 330; +IdModule = SM0603; +EndCmp + +BeginCmp +TimeStamp = /54F40C05; +Reference = R3; +ValeurCmp = 2.2k; +IdModule = SM0603; +EndCmp + +BeginCmp +TimeStamp = /54F40BF0; +Reference = R4; +ValeurCmp = 2.2k; +IdModule = SM0603; +EndCmp + +BeginCmp +TimeStamp = /54F40BEA; +Reference = R5; +ValeurCmp = 6.8k; +IdModule = SM1206; +EndCmp + +EndListe diff --git a/schematic/LEDs_in_box.kicad_pcb b/schematic/LEDs_in_box.kicad_pcb new file mode 100644 index 0000000..20f5ad9 --- /dev/null +++ b/schematic/LEDs_in_box.kicad_pcb @@ -0,0 +1,867 @@ +(kicad_pcb (version 3) (host pcbnew "(2013-feb-26)-stable") + + (general + (links 15) + (no_connects 0) + (area 32.924999 38.924999 65.075001 97.325) + (thickness 1.6) + (drawings 8) + (tracks 50) + (zones 0) + (modules 16) + (nets 13) + ) + + (page A3) + (layers + (15 F.Cu signal) + (0 B.Cu signal) + (16 B.Adhes user) + (17 F.Adhes user) + (18 B.Paste user) + (19 F.Paste user) + (20 B.SilkS user) + (21 F.SilkS user) + (22 B.Mask user) + (23 F.Mask user) + (24 Dwgs.User user) + (25 Cmts.User user) + (26 Eco1.User user) + (27 Eco2.User user) + (28 Edge.Cuts user) + ) + + (setup + (last_trace_width 0.5) + (trace_clearance 0.25) + (zone_clearance 0.4) + (zone_45_only no) + (trace_min 0.254) + (segment_width 0.2) + (edge_width 0.15) + (via_size 1) + (via_drill 0.6) + (via_min_size 0.889) + (via_min_drill 0.508) + (uvia_size 0.508) + (uvia_drill 0.127) + (uvias_allowed no) + (uvia_min_size 0.508) + (uvia_min_drill 0.127) + (pcb_text_width 0.3) + (pcb_text_size 1.5 1.5) + (mod_edge_width 0.15) + (mod_text_size 1.5 1.5) + (mod_text_width 0.15) + (pad_size 1.524 1.524) + (pad_drill 0.762) + (pad_to_mask_clearance 0.2) + (aux_axis_origin 0 0) + (visible_elements FFFFFFBF) + (pcbplotparams + (layerselection 3178497) + (usegerberextensions true) + (excludeedgelayer true) + (linewidth 50000) + (plotframeref false) + (viasonmask false) + (mode 1) + (useauxorigin false) + (hpglpennumber 1) + (hpglpenspeed 20) + (hpglpendiameter 15) + (hpglpenoverlay 2) + (psnegative false) + (psa4output false) + (plotreference true) + (plotvalue true) + (plotothertext true) + (plotinvisibletext false) + (padsonsilk false) + (subtractmaskfromsilk false) + (outputformat 1) + (mirror false) + (drillshape 1) + (scaleselection 1) + (outputdirectory "")) + ) + + (net 0 "") + (net 1 N-000001) + (net 2 N-0000010) + (net 3 N-0000011) + (net 4 N-0000012) + (net 5 N-000002) + (net 6 N-000003) + (net 7 N-000004) + (net 8 N-000005) + (net 9 N-000006) + (net 10 N-000007) + (net 11 N-000008) + (net 12 N-000009) + + (net_class Default "This is the default net class." + (clearance 0.25) + (trace_width 0.5) + (via_dia 1) + (via_drill 0.6) + (uvia_dia 0.508) + (uvia_drill 0.127) + (add_net "") + (add_net N-000001) + (add_net N-0000010) + (add_net N-0000011) + (add_net N-0000012) + (add_net N-000002) + (add_net N-000003) + (add_net N-000004) + (add_net N-000005) + (add_net N-000006) + (add_net N-000007) + (add_net N-000008) + (add_net N-000009) + ) + + (module SM0603 (layer B.Cu) (tedit 4E43A3D1) (tstamp 54F3FCF4) + (at 46.736 86.741 90) + (path /54F40B3C) + (attr smd) + (fp_text reference R2 (at 0 0 90) (layer B.SilkS) + (effects (font (size 0.508 0.4572) (thickness 0.1143)) (justify mirror)) + ) + (fp_text value 330 (at 0 0 90) (layer B.SilkS) hide + (effects (font (size 0.508 0.4572) (thickness 0.1143)) (justify mirror)) + ) + (fp_line (start -1.143 0.635) (end 1.143 0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.143 0.635) (end 1.143 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.143 -0.635) (end -1.143 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.143 -0.635) (end -1.143 0.635) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -0.762 0 90) (size 0.635 1.143) + (layers B.Cu B.Paste B.Mask) + (net 3 N-0000011) + ) + (pad 2 smd rect (at 0.762 0 90) (size 0.635 1.143) + (layers B.Cu B.Paste B.Mask) + (net 4 N-0000012) + ) + (model smd\resistors\R0603.wrl + (at (xyz 0 0 0.001)) + (scale (xyz 0.5 0.5 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module SM0603 (layer B.Cu) (tedit 4E43A3D1) (tstamp 54F3FCFE) + (at 36.83 86.741 90) + (path /54F40B6D) + (attr smd) + (fp_text reference R1 (at 0 0 90) (layer B.SilkS) + (effects (font (size 0.508 0.4572) (thickness 0.1143)) (justify mirror)) + ) + (fp_text value 330 (at 0 0 90) (layer B.SilkS) hide + (effects (font (size 0.508 0.4572) (thickness 0.1143)) (justify mirror)) + ) + (fp_line (start -1.143 0.635) (end 1.143 0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.143 0.635) (end 1.143 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.143 -0.635) (end -1.143 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.143 -0.635) (end -1.143 0.635) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -0.762 0 90) (size 0.635 1.143) + (layers B.Cu B.Paste B.Mask) + (net 3 N-0000011) + ) + (pad 2 smd rect (at 0.762 0 90) (size 0.635 1.143) + (layers B.Cu B.Paste B.Mask) + (net 11 N-000008) + ) + (model smd\resistors\R0603.wrl + (at (xyz 0 0 0.001)) + (scale (xyz 0.5 0.5 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module SM0603 (layer B.Cu) (tedit 4E43A3D1) (tstamp 54F3FD12) + (at 56.515 50.8 90) + (path /54F40BF0) + (attr smd) + (fp_text reference R4 (at 0 0 90) (layer B.SilkS) + (effects (font (size 0.508 0.4572) (thickness 0.1143)) (justify mirror)) + ) + (fp_text value 2.2k (at 0 0 90) (layer B.SilkS) hide + (effects (font (size 0.508 0.4572) (thickness 0.1143)) (justify mirror)) + ) + (fp_line (start -1.143 0.635) (end 1.143 0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.143 0.635) (end 1.143 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.143 -0.635) (end -1.143 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.143 -0.635) (end -1.143 0.635) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -0.762 0 90) (size 0.635 1.143) + (layers B.Cu B.Paste B.Mask) + (net 7 N-000004) + ) + (pad 2 smd rect (at 0.762 0 90) (size 0.635 1.143) + (layers B.Cu B.Paste B.Mask) + (net 8 N-000005) + ) + (model smd\resistors\R0603.wrl + (at (xyz 0 0 0.001)) + (scale (xyz 0.5 0.5 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module SM0603 (layer B.Cu) (tedit 4E43A3D1) (tstamp 54F3FD1C) + (at 36.322 50.673 90) + (path /54F40C05) + (attr smd) + (fp_text reference R3 (at 0 0 90) (layer B.SilkS) + (effects (font (size 0.508 0.4572) (thickness 0.1143)) (justify mirror)) + ) + (fp_text value 2.2k (at 0 0 90) (layer B.SilkS) hide + (effects (font (size 0.508 0.4572) (thickness 0.1143)) (justify mirror)) + ) + (fp_line (start -1.143 0.635) (end 1.143 0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.143 0.635) (end 1.143 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start 1.143 -0.635) (end -1.143 -0.635) (layer B.SilkS) (width 0.127)) + (fp_line (start -1.143 -0.635) (end -1.143 0.635) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -0.762 0 90) (size 0.635 1.143) + (layers B.Cu B.Paste B.Mask) + (net 7 N-000004) + ) + (pad 2 smd rect (at 0.762 0 90) (size 0.635 1.143) + (layers B.Cu B.Paste B.Mask) + (net 9 N-000006) + ) + (model smd\resistors\R0603.wrl + (at (xyz 0 0 0.001)) + (scale (xyz 0.5 0.5 0.5)) + (rotate (xyz 0 0 0)) + ) + ) + + (module PIN_ARRAY_4x1 (layer F.Cu) (tedit 4C10F42E) (tstamp 54F3FD28) + (at 39.243 43.688) + (descr "Double rangee de contacts 2 x 5 pins") + (tags CONN) + (path /54F40BE4) + (fp_text reference K2 (at 0 -2.54) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_text value CONN_4 (at 0 2.54) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.2032))) + ) + (fp_line (start 5.08 1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.254)) + (fp_line (start 5.08 -1.27) (end -5.08 -1.27) (layer F.SilkS) (width 0.254)) + (fp_line (start -5.08 -1.27) (end -5.08 1.27) (layer F.SilkS) (width 0.254)) + (fp_line (start 5.08 1.27) (end 5.08 -1.27) (layer F.SilkS) (width 0.254)) + (pad 1 thru_hole rect (at -3.81 0) (size 1.524 1.524) (drill 1.016) + (layers *.Cu *.Mask F.SilkS) + (net 1 N-000001) + ) + (pad 2 thru_hole circle (at -1.27 0) (size 1.524 1.524) (drill 1.016) + (layers *.Cu *.Mask F.SilkS) + (net 10 N-000007) + ) + (pad 3 thru_hole circle (at 1.27 0) (size 1.524 1.524) (drill 1.016) + (layers *.Cu *.Mask F.SilkS) + (net 5 N-000002) + ) + (pad 4 thru_hole circle (at 3.81 0) (size 1.524 1.524) (drill 1.016) + (layers *.Cu *.Mask F.SilkS) + (net 7 N-000004) + ) + (model pin_array\pins_array_4x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module PIN_ARRAY_3X1 (layer F.Cu) (tedit 4C1130E0) (tstamp 54F3FD34) + (at 57.277 84.963 270) + (descr "Connecteur 3 pins") + (tags "CONN DEV") + (path /54F40B2D) + (fp_text reference K1 (at 0.254 -2.159 270) (layer F.SilkS) + (effects (font (size 1.016 1.016) (thickness 0.1524))) + ) + (fp_text value CONN_3 (at 0 -2.159 270) (layer F.SilkS) hide + (effects (font (size 1.016 1.016) (thickness 0.1524))) + ) + (fp_line (start -3.81 1.27) (end -3.81 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -3.81 -1.27) (end 3.81 -1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 3.81 -1.27) (end 3.81 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start 3.81 1.27) (end -3.81 1.27) (layer F.SilkS) (width 0.1524)) + (fp_line (start -1.27 -1.27) (end -1.27 1.27) (layer F.SilkS) (width 0.1524)) + (pad 1 thru_hole rect (at -2.54 0 270) (size 1.524 1.524) (drill 1.016) + (layers *.Cu *.Mask F.SilkS) + (net 12 N-000009) + ) + (pad 2 thru_hole circle (at 0 0 270) (size 1.524 1.524) (drill 1.016) + (layers *.Cu *.Mask F.SilkS) + (net 2 N-0000010) + ) + (pad 3 thru_hole circle (at 2.54 0 270) (size 1.524 1.524) (drill 1.016) + (layers *.Cu *.Mask F.SilkS) + (net 3 N-0000011) + ) + (model pin_array/pins_array_3x1.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module LED-3MM (layer F.Cu) (tedit 49BFA23B) (tstamp 54F3FD4D) + (at 41 86) + (descr "LED 3mm - Lead pitch 100mil (2,54mm)") + (tags "LED led 3mm 3MM 100mil 2,54mm") + (path /54F40B18) + (fp_text reference D1 (at 1.778 -2.794) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_text value LED (at 0 2.54) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_line (start 1.8288 1.27) (end 1.8288 -1.27) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.27 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.88392 1.01092) (angle 41.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.4097 -0.9906) (angle 40.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.778 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -1.524) (angle 54.4) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.9652 -0.9144) (angle 53.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.45542 0.93472) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 1.524) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.381 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.762 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.889 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.27 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -2.032) (angle 50.1) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.5367 -0.95504) (angle 61.9) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 1.8034 1.31064) (angle 49.7) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 0.254 2.032) (angle 60.2) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.778 0) (angle 28.3) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.47574 1.06426) (angle 31.6) (layer F.SilkS) (width 0.254)) + (pad 1 thru_hole circle (at -1.27 0) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 11 N-000008) + ) + (pad 2 thru_hole circle (at 1.27 0) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 12 N-000009) + ) + (model discret/leds/led3_vertical_verde.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module LED-3MM (layer F.Cu) (tedit 49BFA23B) (tstamp 54F3FD66) + (at 51 86) + (descr "LED 3mm - Lead pitch 100mil (2,54mm)") + (tags "LED led 3mm 3MM 100mil 2,54mm") + (path /54F40B25) + (fp_text reference D2 (at 1.778 -2.794) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_text value LED (at 0 2.54) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_line (start 1.8288 1.27) (end 1.8288 -1.27) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.27 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.88392 1.01092) (angle 41.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.4097 -0.9906) (angle 40.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.778 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -1.524) (angle 54.4) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.9652 -0.9144) (angle 53.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.45542 0.93472) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 1.524) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.381 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.762 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.889 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.27 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -2.032) (angle 50.1) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.5367 -0.95504) (angle 61.9) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 1.8034 1.31064) (angle 49.7) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 0.254 2.032) (angle 60.2) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.778 0) (angle 28.3) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.47574 1.06426) (angle 31.6) (layer F.SilkS) (width 0.254)) + (pad 1 thru_hole circle (at -1.27 0) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 4 N-0000012) + ) + (pad 2 thru_hole circle (at 1.27 0) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 2 N-0000010) + ) + (model discret/leds/led3_vertical_verde.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module LED-3MM (layer F.Cu) (tedit 49BFA23B) (tstamp 54F3FD7F) + (at 61 50 180) + (descr "LED 3mm - Lead pitch 100mil (2,54mm)") + (tags "LED led 3mm 3MM 100mil 2,54mm") + (path /54F40BD8) + (fp_text reference D4 (at 1.778 -2.794 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_text value LED (at 0 2.54 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_line (start 1.8288 1.27) (end 1.8288 -1.27) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.27 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.88392 1.01092) (angle 41.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.4097 -0.9906) (angle 40.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.778 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -1.524) (angle 54.4) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.9652 -0.9144) (angle 53.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.45542 0.93472) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 1.524) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.381 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.762 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.889 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.27 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -2.032) (angle 50.1) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.5367 -0.95504) (angle 61.9) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 1.8034 1.31064) (angle 49.7) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 0.254 2.032) (angle 60.2) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.778 0) (angle 28.3) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.47574 1.06426) (angle 31.6) (layer F.SilkS) (width 0.254)) + (pad 1 thru_hole circle (at -1.27 0 180) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 5 N-000002) + ) + (pad 2 thru_hole circle (at 1.27 0 180) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 8 N-000005) + ) + (model discret/leds/led3_vertical_verde.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module LED-3MM (layer F.Cu) (tedit 49BFA23B) (tstamp 54F3FD98) + (at 51 50 180) + (descr "LED 3mm - Lead pitch 100mil (2,54mm)") + (tags "LED led 3mm 3MM 100mil 2,54mm") + (path /54F40BDE) + (fp_text reference D5 (at 1.778 -2.794 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_text value LED (at 0 2.54 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_line (start 1.8288 1.27) (end 1.8288 -1.27) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.27 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.88392 1.01092) (angle 41.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.4097 -0.9906) (angle 40.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.778 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -1.524) (angle 54.4) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.9652 -0.9144) (angle 53.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.45542 0.93472) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 1.524) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.381 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.762 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.889 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.27 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -2.032) (angle 50.1) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.5367 -0.95504) (angle 61.9) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 1.8034 1.31064) (angle 49.7) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 0.254 2.032) (angle 60.2) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.778 0) (angle 28.3) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.47574 1.06426) (angle 31.6) (layer F.SilkS) (width 0.254)) + (pad 1 thru_hole circle (at -1.27 0 180) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 10 N-000007) + ) + (pad 2 thru_hole circle (at 1.27 0 180) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 6 N-000003) + ) + (model discret/leds/led3_vertical_verde.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module LED-3MM (layer F.Cu) (tedit 49BFA23B) (tstamp 54F3FDB1) + (at 41 50 180) + (descr "LED 3mm - Lead pitch 100mil (2,54mm)") + (tags "LED led 3mm 3MM 100mil 2,54mm") + (path /54F40BFF) + (fp_text reference D3 (at 1.778 -2.794 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_text value LED (at 0 2.54 180) (layer F.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.0889))) + ) + (fp_line (start 1.8288 1.27) (end 1.8288 -1.27) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.27 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.88392 1.01092) (angle 41.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.4097 -0.9906) (angle 40.6) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.778 0) (angle 39.8) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -1.524) (angle 54.4) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.9652 -0.9144) (angle 53.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.45542 0.93472) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 1.524) (angle 52.1) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.381 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end -0.762 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.889 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 1.27 0) (angle 90) (layer F.SilkS) (width 0.1524)) + (fp_arc (start 0.254 0) (end 0.254 -2.032) (angle 50.1) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.5367 -0.95504) (angle 61.9) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 1.8034 1.31064) (angle 49.7) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end 0.254 2.032) (angle 60.2) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.778 0) (angle 28.3) (layer F.SilkS) (width 0.254)) + (fp_arc (start 0.254 0) (end -1.47574 1.06426) (angle 31.6) (layer F.SilkS) (width 0.254)) + (pad 1 thru_hole circle (at -1.27 0 180) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 1 N-000001) + ) + (pad 2 thru_hole circle (at 1.27 0 180) (size 1.6764 1.6764) (drill 0.8128) + (layers *.Cu F.Paste F.SilkS F.Mask) + (net 9 N-000006) + ) + (model discret/leds/led3_vertical_verde.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module hole_3mm (layer F.Cu) (tedit 547491FA) (tstamp 54F3FDBB) + (at 45 79) + (path /54F40D0F) + (fp_text reference HOLE1 (at 0 -2.54) (layer F.SilkS) hide + (effects (font (size 1.5 1.5) (thickness 0.3))) + ) + (fp_text value HOLE (at 0 3.175) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.3))) + ) + (fp_line (start 0 2.5) (end 0 1.5) (layer F.SilkS) (width 0.3)) + (fp_line (start -2.5 0) (end -1.5 0) (layer F.SilkS) (width 0.3)) + (fp_line (start 2.5 0) (end 1.5 0) (layer F.SilkS) (width 0.3)) + (fp_line (start 0 -1.5) (end 0 -2.5) (layer F.SilkS) (width 0.3)) + (fp_circle (center 0 0) (end 2.5 0) (layer F.SilkS) (width 0.3)) + (pad "" thru_hole circle (at 0 0) (size 3 3) (drill 3) + (layers *.Cu F.SilkS) + ) + ) + + (module hole_3mm (layer F.Cu) (tedit 547491FA) (tstamp 54F3FDC5) + (at 45 93) + (path /54F40D1C) + (fp_text reference HOLE2 (at 0 -2.54) (layer F.SilkS) hide + (effects (font (size 1.5 1.5) (thickness 0.3))) + ) + (fp_text value HOLE (at 0 3.175) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.3))) + ) + (fp_line (start 0 2.5) (end 0 1.5) (layer F.SilkS) (width 0.3)) + (fp_line (start -2.5 0) (end -1.5 0) (layer F.SilkS) (width 0.3)) + (fp_line (start 2.5 0) (end 1.5 0) (layer F.SilkS) (width 0.3)) + (fp_line (start 0 -1.5) (end 0 -2.5) (layer F.SilkS) (width 0.3)) + (fp_circle (center 0 0) (end 2.5 0) (layer F.SilkS) (width 0.3)) + (pad "" thru_hole circle (at 0 0) (size 3 3) (drill 3) + (layers *.Cu F.SilkS) + ) + ) + + (module hole_3mm (layer F.Cu) (tedit 547491FA) (tstamp 54F3FDCF) + (at 51 43) + (path /54F40D22) + (fp_text reference HOLE3 (at 0 -2.54) (layer F.SilkS) hide + (effects (font (size 1.5 1.5) (thickness 0.3))) + ) + (fp_text value HOLE (at 0 3.175) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.3))) + ) + (fp_line (start 0 2.5) (end 0 1.5) (layer F.SilkS) (width 0.3)) + (fp_line (start -2.5 0) (end -1.5 0) (layer F.SilkS) (width 0.3)) + (fp_line (start 2.5 0) (end 1.5 0) (layer F.SilkS) (width 0.3)) + (fp_line (start 0 -1.5) (end 0 -2.5) (layer F.SilkS) (width 0.3)) + (fp_circle (center 0 0) (end 2.5 0) (layer F.SilkS) (width 0.3)) + (pad "" thru_hole circle (at 0 0) (size 3 3) (drill 3) + (layers *.Cu F.SilkS) + ) + ) + + (module hole_3mm (layer F.Cu) (tedit 547491FA) (tstamp 54F3FDD9) + (at 51 57) + (path /54F40D28) + (fp_text reference HOLE4 (at 0 -2.54) (layer F.SilkS) hide + (effects (font (size 1.5 1.5) (thickness 0.3))) + ) + (fp_text value HOLE (at 0 3.175) (layer F.SilkS) + (effects (font (size 1.5 1.5) (thickness 0.3))) + ) + (fp_line (start 0 2.5) (end 0 1.5) (layer F.SilkS) (width 0.3)) + (fp_line (start -2.5 0) (end -1.5 0) (layer F.SilkS) (width 0.3)) + (fp_line (start 2.5 0) (end 1.5 0) (layer F.SilkS) (width 0.3)) + (fp_line (start 0 -1.5) (end 0 -2.5) (layer F.SilkS) (width 0.3)) + (fp_circle (center 0 0) (end 2.5 0) (layer F.SilkS) (width 0.3)) + (pad "" thru_hole circle (at 0 0) (size 3 3) (drill 3) + (layers *.Cu F.SilkS) + ) + ) + + (module SM1206 (layer B.Cu) (tedit 42806E24) (tstamp 54F3FD08) + (at 46.609 51.689 90) + (path /54F40BEA) + (attr smd) + (fp_text reference R5 (at 0 0 90) (layer B.SilkS) + (effects (font (size 0.762 0.762) (thickness 0.127)) (justify mirror)) + ) + (fp_text value 6.8k (at 0 0 90) (layer B.SilkS) hide + (effects (font (size 0.762 0.762) (thickness 0.127)) (justify mirror)) + ) + (fp_line (start -2.54 1.143) (end -2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -2.54 -1.143) (end -0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 0.889 1.143) (end 2.54 1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 1.143) (end 2.54 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start 2.54 -1.143) (end 0.889 -1.143) (layer B.SilkS) (width 0.127)) + (fp_line (start -0.889 1.143) (end -2.54 1.143) (layer B.SilkS) (width 0.127)) + (pad 1 smd rect (at -1.651 0 90) (size 1.524 2.032) + (layers B.Cu B.Paste B.Mask) + (net 7 N-000004) + ) + (pad 2 smd rect (at 1.651 0 90) (size 1.524 2.032) + (layers B.Cu B.Paste B.Mask) + (net 6 N-000003) + ) + (model smd/chip_cms.wrl + (at (xyz 0 0 0)) + (scale (xyz 0.17 0.16 0.16)) + (rotate (xyz 0 0 0)) + ) + ) + + (gr_line (start 65 39) (end 33 39) (angle 90) (layer Edge.Cuts) (width 0.15)) + (gr_line (start 65 61) (end 65 39) (angle 90) (layer Edge.Cuts) (width 0.15)) + (gr_line (start 33 61) (end 65 61) (angle 90) (layer Edge.Cuts) (width 0.15)) + (gr_line (start 33 39) (end 33 61) (angle 90) (layer Edge.Cuts) (width 0.15)) + (gr_line (start 59 75) (end 34 75) (angle 90) (layer Edge.Cuts) (width 0.15)) + (gr_line (start 59 97) (end 59 75) (angle 90) (layer Edge.Cuts) (width 0.15)) + (gr_line (start 34 97) (end 59 97) (angle 90) (layer Edge.Cuts) (width 0.15)) + (gr_line (start 34 75) (end 34 97) (angle 90) (layer Edge.Cuts) (width 0.15)) + + (segment (start 35.433 43.688) (end 35.433 45.72) (width 0.5) (layer B.Cu) (net 1)) + (segment (start 35.433 45.72) (end 37.211 47.498) (width 0.5) (layer B.Cu) (net 1) (tstamp 54F40172)) + (segment (start 39.768 47.498) (end 42.27 50) (width 0.5) (layer B.Cu) (net 1) (tstamp 54F40176)) + (segment (start 37.211 47.498) (end 39.768 47.498) (width 0.5) (layer B.Cu) (net 1) (tstamp 54F40174)) + (segment (start 52.27 86) (end 53.192 86) (width 0.5) (layer B.Cu) (net 2)) + (segment (start 54.229 84.963) (end 57.277 84.963) (width 0.5) (layer B.Cu) (net 2) (tstamp 54F3FFAC)) + (segment (start 53.192 86) (end 54.229 84.963) (width 0.5) (layer B.Cu) (net 2) (tstamp 54F3FFAB)) + (segment (start 49.73 86) (end 46.757 86) (width 0.5) (layer B.Cu) (net 4)) + (segment (start 46.757 86) (end 46.736 85.979) (width 0.5) (layer B.Cu) (net 4) (tstamp 54F3FF86)) + (segment (start 40.513 43.688) (end 40.513 44.196) (width 0.5) (layer B.Cu) (net 5)) + (segment (start 40.513 44.196) (end 42.672 46.355) (width 0.5) (layer B.Cu) (net 5) (tstamp 54F401EC)) + (segment (start 42.672 46.355) (end 61.595 46.355) (width 0.5) (layer B.Cu) (net 5) (tstamp 54F401EE)) + (segment (start 61.595 46.355) (end 62.27 47.03) (width 0.5) (layer B.Cu) (net 5) (tstamp 54F401F3)) + (segment (start 62.27 47.03) (end 62.27 50) (width 0.5) (layer B.Cu) (net 5) (tstamp 54F401F5)) + (segment (start 46.609 50.038) (end 49.692 50.038) (width 0.5) (layer B.Cu) (net 6)) + (segment (start 49.692 50.038) (end 49.73 50) (width 0.5) (layer B.Cu) (net 6) (tstamp 54F401C7)) + (segment (start 36.322 51.435) (end 36.322 55.753) (width 0.5) (layer B.Cu) (net 7) (status 400000)) + (segment (start 44.577 55.372) (end 46.609 53.34) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466E8) (status 800000)) + (segment (start 36.703 55.372) (end 44.577 55.372) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466E7)) + (segment (start 36.322 55.753) (end 36.703 55.372) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466E6)) + (segment (start 43.053 43.688) (end 43.053 41.947) (width 0.5) (layer B.Cu) (net 7) (status 400000)) + (segment (start 58.953 54) (end 56.515 51.562) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466D2) (status 800000)) + (segment (start 62 54) (end 58.953 54) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466D0)) + (segment (start 64 52) (end 62 54) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466CD)) + (segment (start 64 44) (end 64 52) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466CB)) + (segment (start 60 40) (end 64 44) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466C9)) + (segment (start 45 40) (end 60 40) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466C7)) + (segment (start 43.053 41.947) (end 45 40) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466C5)) + (segment (start 36.322 51.435) (end 36.322 53.322) (width 0.5) (layer B.Cu) (net 7) (status 400000)) + (segment (start 56.438 51.562) (end 56.515 51.562) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466C1) (status C00000)) + (segment (start 54.66 53.34) (end 56.438 51.562) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466C0) (status 800000)) + (segment (start 36.34 53.34) (end 54.66 53.34) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466BF)) + (segment (start 36.322 53.322) (end 36.34 53.34) (width 0.5) (layer B.Cu) (net 7) (tstamp 54F466BE)) + (segment (start 59.73 50) (end 56.553 50) (width 0.5) (layer B.Cu) (net 8)) + (segment (start 56.553 50) (end 56.515 50.038) (width 0.5) (layer B.Cu) (net 8) (tstamp 54F4012D)) + (segment (start 39.641 49.911) (end 39.73 50) (width 0.5) (layer B.Cu) (net 9) (tstamp 54F40130)) + (segment (start 36.322 49.911) (end 39.641 49.911) (width 0.5) (layer B.Cu) (net 9)) + (segment (start 52.27 50) (end 52.27 49.095) (width 0.5) (layer B.Cu) (net 10)) + (segment (start 52.27 49.095) (end 50.673 47.498) (width 0.5) (layer B.Cu) (net 10) (tstamp 54F401D9)) + (segment (start 50.673 47.498) (end 42.037 47.498) (width 0.5) (layer B.Cu) (net 10) (tstamp 54F401DC)) + (segment (start 37.973 46.101) (end 37.973 43.688) (width 0.5) (layer B.Cu) (net 10) (tstamp 54F401E8)) + (segment (start 40.64 46.101) (end 37.973 46.101) (width 0.5) (layer B.Cu) (net 10) (tstamp 54F401E5)) + (segment (start 42.037 47.498) (end 40.64 46.101) (width 0.5) (layer B.Cu) (net 10) (tstamp 54F401E3)) + (segment (start 36.83 85.979) (end 39.709 85.979) (width 0.5) (layer B.Cu) (net 11)) + (segment (start 39.709 85.979) (end 39.73 86) (width 0.5) (layer B.Cu) (net 11) (tstamp 54F3FF83)) + (segment (start 42.27 86) (end 42.651 86) (width 0.5) (layer B.Cu) (net 12)) + (segment (start 42.651 86) (end 45.339 83.312) (width 0.5) (layer B.Cu) (net 12) (tstamp 54F4000A)) + (segment (start 49.403 82.423) (end 57.277 82.423) (width 0.5) (layer B.Cu) (net 12) (tstamp 54F4000E)) + (segment (start 48.514 83.312) (end 49.403 82.423) (width 0.5) (layer B.Cu) (net 12) (tstamp 54F4000D)) + (segment (start 45.339 83.312) (end 48.514 83.312) (width 0.5) (layer B.Cu) (net 12) (tstamp 54F4000B)) + + (zone (net 7) (net_name N-000004) (layer B.Cu) (tstamp 54F40232) (hatch edge 0.508) + (connect_pads (clearance 0.4)) + (min_thickness 0.25) + (fill (arc_segments 16) (thermal_gap 0.499999) (thermal_bridge_width 0.499999)) + (polygon + (pts + (xy 33 39) (xy 33 61) (xy 65 61) (xy 65 39) + ) + ) + (filled_polygon + (pts + (xy 64.4 60.4) (xy 63.633435 60.4) (xy 63.633435 49.730033) (xy 63.426338 49.228818) (xy 63.045 48.846814) + (xy 63.045 47.03) (xy 62.986007 46.73342) (xy 62.818008 46.481992) (xy 62.143008 45.806992) (xy 61.89158 45.638993) + (xy 61.595 45.58) (xy 53.025351 45.58) (xy 53.025351 42.59897) (xy 52.717712 41.854428) (xy 52.148568 41.28429) + (xy 51.404565 40.975352) (xy 50.59897 40.974649) (xy 49.854428 41.282288) (xy 49.28429 41.851432) (xy 48.975352 42.595435) + (xy 48.974649 43.40103) (xy 49.282288 44.145572) (xy 49.851432 44.71571) (xy 50.595435 45.024648) (xy 51.40103 45.025351) + (xy 52.145572 44.717712) (xy 52.71571 44.148568) (xy 53.024648 43.404565) (xy 53.025351 42.59897) (xy 53.025351 45.58) + (xy 44.451895 45.58) (xy 44.451895 43.895294) (xy 44.424738 43.344181) (xy 44.266082 42.961152) (xy 44.02647 42.891305) + (xy 43.849695 43.06808) (xy 43.849695 42.71453) (xy 43.779848 42.474918) (xy 43.260294 42.289105) (xy 42.709181 42.316262) + (xy 42.326152 42.474918) (xy 42.256305 42.71453) (xy 43.053 43.511225) (xy 43.849695 42.71453) (xy 43.849695 43.06808) + (xy 43.229775 43.688) (xy 44.02647 44.484695) (xy 44.266082 44.414848) (xy 44.451895 43.895294) (xy 44.451895 45.58) + (xy 43.849695 45.58) (xy 42.993016 45.58) (xy 42.165396 44.752381) (xy 42.256305 44.661472) (xy 42.326152 44.901082) + (xy 42.845706 45.086895) (xy 43.396819 45.059738) (xy 43.779848 44.901082) (xy 43.849695 44.66147) (xy 43.053 43.864775) + (xy 43.038857 43.878917) (xy 42.862082 43.702142) (xy 42.876225 43.688) (xy 42.07953 42.891305) (xy 41.839918 42.961152) + (xy 41.73102 43.265642) (xy 41.604701 42.959926) (xy 41.242978 42.597571) (xy 40.770123 42.401225) (xy 40.258123 42.400778) + (xy 39.784926 42.596299) (xy 39.422571 42.958022) (xy 39.2428 43.390959) (xy 39.064701 42.959926) (xy 38.702978 42.597571) + (xy 38.230123 42.401225) (xy 37.718123 42.400778) (xy 37.244926 42.596299) (xy 36.882571 42.958022) (xy 36.720091 43.349318) + (xy 36.720091 42.822029) (xy 36.640333 42.629) (xy 36.492777 42.481186) (xy 36.299887 42.401091) (xy 36.091029 42.400909) + (xy 34.567029 42.400909) (xy 34.374 42.480667) (xy 34.226186 42.628223) (xy 34.146091 42.821113) (xy 34.145909 43.029971) + (xy 34.145909 44.553971) (xy 34.225667 44.747) (xy 34.373223 44.894814) (xy 34.566113 44.974909) (xy 34.658 44.974989) + (xy 34.658 45.72) (xy 34.716993 46.01658) (xy 34.884992 46.268008) (xy 36.662989 48.046004) (xy 36.662992 48.046008) + (xy 36.91442 48.214007) (xy 37.210999 48.273) (xy 37.210999 48.272999) (xy 37.211 48.273) (xy 39.446984 48.273) + (xy 39.810854 48.63687) (xy 39.460033 48.636565) (xy 38.958818 48.843662) (xy 38.665969 49.136) (xy 37.160725 49.136) + (xy 36.998387 49.068591) (xy 36.789529 49.068409) (xy 35.646529 49.068409) (xy 35.4535 49.148167) (xy 35.305686 49.295723) + (xy 35.225591 49.488613) (xy 35.225409 49.697471) (xy 35.225409 50.332471) (xy 35.305167 50.5255) (xy 35.381761 50.602228) + (xy 35.220343 50.76393) (xy 35.125393 50.993726) (xy 35.125501 51.153752) (xy 35.28175 51.310001) (xy 36.197001 51.310001) + (xy 36.197001 51.290001) (xy 36.446999 51.290001) (xy 36.446999 51.310001) (xy 37.36225 51.310001) (xy 37.518499 51.153752) + (xy 37.518607 50.993726) (xy 37.423657 50.76393) (xy 37.345863 50.686) (xy 38.538465 50.686) (xy 38.573662 50.771182) + (xy 38.956801 51.15499) (xy 39.457653 51.362962) (xy 39.999967 51.363435) (xy 40.501182 51.156338) (xy 40.88499 50.773199) + (xy 41.000026 50.496161) (xy 41.113662 50.771182) (xy 41.496801 51.15499) (xy 41.997653 51.362962) (xy 42.539967 51.363435) + (xy 43.041182 51.156338) (xy 43.42499 50.773199) (xy 43.632962 50.272347) (xy 43.633435 49.730033) (xy 43.426338 49.228818) + (xy 43.043199 48.84501) (xy 42.542347 48.637038) (xy 42.002583 48.636567) (xy 40.316008 46.949992) (xy 40.205271 46.876) + (xy 40.318984 46.876) (xy 41.488992 48.046008) (xy 41.74042 48.214007) (xy 42.037 48.273) (xy 50.351984 48.273) + (xy 51.21048 49.131496) (xy 51.11501 49.226801) (xy 50.999973 49.503838) (xy 50.886338 49.228818) (xy 50.503199 48.84501) + (xy 50.002347 48.637038) (xy 49.460033 48.636565) (xy 48.958818 48.843662) (xy 48.57501 49.226801) (xy 48.559978 49.263) + (xy 48.150091 49.263) (xy 48.150091 49.172029) (xy 48.070333 48.979) (xy 47.922777 48.831186) (xy 47.729887 48.751091) + (xy 47.521029 48.750909) (xy 45.489029 48.750909) (xy 45.296 48.830667) (xy 45.148186 48.978223) (xy 45.068091 49.171113) + (xy 45.067909 49.379971) (xy 45.067909 50.903971) (xy 45.147667 51.097) (xy 45.295223 51.244814) (xy 45.488113 51.324909) + (xy 45.696971 51.325091) (xy 47.728971 51.325091) (xy 47.922 51.245333) (xy 48.069814 51.097777) (xy 48.149909 50.904887) + (xy 48.149989 50.813) (xy 48.615407 50.813) (xy 48.956801 51.15499) (xy 49.457653 51.362962) (xy 49.999967 51.363435) + (xy 50.501182 51.156338) (xy 50.88499 50.773199) (xy 51.000026 50.496161) (xy 51.113662 50.771182) (xy 51.496801 51.15499) + (xy 51.997653 51.362962) (xy 52.539967 51.363435) (xy 53.041182 51.156338) (xy 53.42499 50.773199) (xy 53.632962 50.272347) + (xy 53.633435 49.730033) (xy 53.426338 49.228818) (xy 53.043199 48.84501) (xy 52.990959 48.823318) (xy 52.986007 48.79842) + (xy 52.818008 48.546992) (xy 51.401016 47.13) (xy 61.273984 47.13) (xy 61.495 47.351016) (xy 61.495 48.847473) + (xy 61.11501 49.226801) (xy 60.999973 49.503838) (xy 60.886338 49.228818) (xy 60.503199 48.84501) (xy 60.002347 48.637038) + (xy 59.460033 48.636565) (xy 58.958818 48.843662) (xy 58.576814 49.225) (xy 57.262211 49.225) (xy 57.191387 49.195591) + (xy 56.982529 49.195409) (xy 55.839529 49.195409) (xy 55.6465 49.275167) (xy 55.498686 49.422723) (xy 55.418591 49.615613) + (xy 55.418409 49.824471) (xy 55.418409 50.459471) (xy 55.498167 50.6525) (xy 55.574761 50.729228) (xy 55.413343 50.89093) + (xy 55.318393 51.120726) (xy 55.318501 51.280752) (xy 55.47475 51.437001) (xy 56.390001 51.437001) (xy 56.390001 51.417001) + (xy 56.639999 51.417001) (xy 56.639999 51.437001) (xy 57.55525 51.437001) (xy 57.711499 51.280752) (xy 57.711607 51.120726) + (xy 57.616657 50.89093) (xy 57.500929 50.775) (xy 58.577473 50.775) (xy 58.956801 51.15499) (xy 59.457653 51.362962) + (xy 59.999967 51.363435) (xy 60.501182 51.156338) (xy 60.88499 50.773199) (xy 61.000026 50.496161) (xy 61.113662 50.771182) + (xy 61.496801 51.15499) (xy 61.997653 51.362962) (xy 62.539967 51.363435) (xy 63.041182 51.156338) (xy 63.42499 50.773199) + (xy 63.632962 50.272347) (xy 63.633435 49.730033) (xy 63.633435 60.4) (xy 57.711607 60.4) (xy 57.711607 52.003274) + (xy 57.711499 51.843248) (xy 57.55525 51.686999) (xy 56.639999 51.686999) (xy 56.639999 52.34825) (xy 56.796248 52.504499) + (xy 56.962726 52.504607) (xy 57.211366 52.50439) (xy 57.440996 52.409039) (xy 57.616657 52.23307) (xy 57.711607 52.003274) + (xy 57.711607 60.4) (xy 56.390001 60.4) (xy 56.390001 52.34825) (xy 56.390001 51.686999) (xy 55.47475 51.686999) + (xy 55.318501 51.843248) (xy 55.318393 52.003274) (xy 55.413343 52.23307) (xy 55.589004 52.409039) (xy 55.818634 52.50439) + (xy 56.067274 52.504607) (xy 56.233752 52.504499) (xy 56.390001 52.34825) (xy 56.390001 60.4) (xy 53.025351 60.4) + (xy 53.025351 56.59897) (xy 52.717712 55.854428) (xy 52.148568 55.28429) (xy 51.404565 54.975352) (xy 50.59897 54.974649) + (xy 49.854428 55.282288) (xy 49.28429 55.851432) (xy 48.975352 56.595435) (xy 48.974649 57.40103) (xy 49.282288 58.145572) + (xy 49.851432 58.71571) (xy 50.595435 59.024648) (xy 51.40103 59.025351) (xy 52.145572 58.717712) (xy 52.71571 58.148568) + (xy 53.024648 57.404565) (xy 53.025351 56.59897) (xy 53.025351 60.4) (xy 48.250107 60.4) (xy 48.250107 54.225774) + (xy 48.250107 52.454226) (xy 48.155157 52.22443) (xy 47.979496 52.048461) (xy 47.749866 51.95311) (xy 47.501226 51.952893) + (xy 46.890248 51.953001) (xy 46.733999 52.10925) (xy 46.733999 53.215001) (xy 48.09375 53.215001) (xy 48.249999 53.058752) + (xy 48.250107 52.454226) (xy 48.250107 54.225774) (xy 48.249999 53.621248) (xy 48.09375 53.464999) (xy 46.733999 53.464999) + (xy 46.733999 54.57075) (xy 46.890248 54.726999) (xy 47.501226 54.727107) (xy 47.749866 54.72689) (xy 47.979496 54.631539) + (xy 48.155157 54.45557) (xy 48.250107 54.225774) (xy 48.250107 60.4) (xy 46.484001 60.4) (xy 46.484001 54.57075) + (xy 46.484001 53.464999) (xy 46.484001 53.215001) (xy 46.484001 52.10925) (xy 46.327752 51.953001) (xy 45.716774 51.952893) + (xy 45.468134 51.95311) (xy 45.238504 52.048461) (xy 45.062843 52.22443) (xy 44.967893 52.454226) (xy 44.968001 53.058752) + (xy 45.12425 53.215001) (xy 46.484001 53.215001) (xy 46.484001 53.464999) (xy 45.12425 53.464999) (xy 44.968001 53.621248) + (xy 44.967893 54.225774) (xy 45.062843 54.45557) (xy 45.238504 54.631539) (xy 45.468134 54.72689) (xy 45.716774 54.727107) + (xy 46.327752 54.726999) (xy 46.484001 54.57075) (xy 46.484001 60.4) (xy 37.518607 60.4) (xy 37.518607 51.876274) + (xy 37.518499 51.716248) (xy 37.36225 51.559999) (xy 36.446999 51.559999) (xy 36.446999 52.22125) (xy 36.603248 52.377499) + (xy 36.769726 52.377607) (xy 37.018366 52.37739) (xy 37.247996 52.282039) (xy 37.423657 52.10607) (xy 37.518607 51.876274) + (xy 37.518607 60.4) (xy 36.197001 60.4) (xy 36.197001 52.22125) (xy 36.197001 51.559999) (xy 35.28175 51.559999) + (xy 35.125501 51.716248) (xy 35.125393 51.876274) (xy 35.220343 52.10607) (xy 35.396004 52.282039) (xy 35.625634 52.37739) + (xy 35.874274 52.377607) (xy 36.040752 52.377499) (xy 36.197001 52.22125) (xy 36.197001 60.4) (xy 33.6 60.4) + (xy 33.6 39.6) (xy 64.4 39.6) (xy 64.4 60.4) + ) + ) + ) + (zone (net 3) (net_name N-0000011) (layer B.Cu) (tstamp 54F40244) (hatch edge 0.508) + (connect_pads (clearance 0.4)) + (min_thickness 0.25) + (fill (arc_segments 16) (thermal_gap 0.499999) (thermal_bridge_width 0.499999)) + (polygon + (pts + (xy 34 75) (xy 34 97) (xy 59 97) (xy 59 75) + ) + ) + (filled_polygon + (pts + (xy 58.4 96.4) (xy 58.073695 96.4) (xy 58.073695 88.47647) (xy 57.277 87.679775) (xy 57.100225 87.85655) + (xy 57.100225 87.503) (xy 56.30353 86.706305) (xy 56.063918 86.776152) (xy 55.878105 87.295706) (xy 55.905262 87.846819) + (xy 56.063918 88.229848) (xy 56.30353 88.299695) (xy 57.100225 87.503) (xy 57.100225 87.85655) (xy 56.480305 88.47647) + (xy 56.550152 88.716082) (xy 57.069706 88.901895) (xy 57.620819 88.874738) (xy 58.003848 88.716082) (xy 58.073695 88.47647) + (xy 58.073695 96.4) (xy 47.932607 96.4) (xy 47.932607 87.944274) (xy 47.932499 87.784248) (xy 47.77625 87.627999) + (xy 46.860999 87.627999) (xy 46.860999 88.28925) (xy 47.017248 88.445499) (xy 47.183726 88.445607) (xy 47.432366 88.44539) + (xy 47.661996 88.350039) (xy 47.837657 88.17407) (xy 47.932607 87.944274) (xy 47.932607 96.4) (xy 47.025351 96.4) + (xy 47.025351 92.59897) (xy 46.717712 91.854428) (xy 46.611001 91.74753) (xy 46.611001 88.28925) (xy 46.611001 87.627999) + (xy 45.69575 87.627999) (xy 45.539501 87.784248) (xy 45.539393 87.944274) (xy 45.634343 88.17407) (xy 45.810004 88.350039) + (xy 46.039634 88.44539) (xy 46.288274 88.445607) (xy 46.454752 88.445499) (xy 46.611001 88.28925) (xy 46.611001 91.74753) + (xy 46.148568 91.28429) (xy 45.404565 90.975352) (xy 44.59897 90.974649) (xy 43.854428 91.282288) (xy 43.28429 91.851432) + (xy 42.975352 92.595435) (xy 42.974649 93.40103) (xy 43.282288 94.145572) (xy 43.851432 94.71571) (xy 44.595435 95.024648) + (xy 45.40103 95.025351) (xy 46.145572 94.717712) (xy 46.71571 94.148568) (xy 47.024648 93.404565) (xy 47.025351 92.59897) + (xy 47.025351 96.4) (xy 38.026607 96.4) (xy 38.026607 87.944274) (xy 38.026499 87.784248) (xy 37.87025 87.627999) + (xy 36.954999 87.627999) (xy 36.954999 88.28925) (xy 37.111248 88.445499) (xy 37.277726 88.445607) (xy 37.526366 88.44539) + (xy 37.755996 88.350039) (xy 37.931657 88.17407) (xy 38.026607 87.944274) (xy 38.026607 96.4) (xy 36.705001 96.4) + (xy 36.705001 88.28925) (xy 36.705001 87.627999) (xy 35.78975 87.627999) (xy 35.633501 87.784248) (xy 35.633393 87.944274) + (xy 35.728343 88.17407) (xy 35.904004 88.350039) (xy 36.133634 88.44539) (xy 36.382274 88.445607) (xy 36.548752 88.445499) + (xy 36.705001 88.28925) (xy 36.705001 96.4) (xy 34.6 96.4) (xy 34.6 75.6) (xy 58.4 75.6) + (xy 58.4 81.279519) (xy 58.336777 81.216186) (xy 58.143887 81.136091) (xy 57.935029 81.135909) (xy 56.411029 81.135909) + (xy 56.218 81.215667) (xy 56.070186 81.363223) (xy 55.990091 81.556113) (xy 55.99001 81.648) (xy 49.403 81.648) + (xy 49.402999 81.648) (xy 49.10642 81.706993) (xy 48.854992 81.874992) (xy 48.854989 81.874995) (xy 48.192984 82.537) + (xy 47.025351 82.537) (xy 47.025351 78.59897) (xy 46.717712 77.854428) (xy 46.148568 77.28429) (xy 45.404565 76.975352) + (xy 44.59897 76.974649) (xy 43.854428 77.282288) (xy 43.28429 77.851432) (xy 42.975352 78.595435) (xy 42.974649 79.40103) + (xy 43.282288 80.145572) (xy 43.851432 80.71571) (xy 44.595435 81.024648) (xy 45.40103 81.025351) (xy 46.145572 80.717712) + (xy 46.71571 80.148568) (xy 47.024648 79.404565) (xy 47.025351 78.59897) (xy 47.025351 82.537) (xy 45.339 82.537) + (xy 45.04242 82.595993) (xy 44.790992 82.763992) (xy 42.807743 84.74724) (xy 42.542347 84.637038) (xy 42.000033 84.636565) + (xy 41.498818 84.843662) (xy 41.11501 85.226801) (xy 40.999973 85.503838) (xy 40.886338 85.228818) (xy 40.503199 84.84501) + (xy 40.002347 84.637038) (xy 39.460033 84.636565) (xy 38.958818 84.843662) (xy 38.59785 85.204) (xy 37.668725 85.204) + (xy 37.506387 85.136591) (xy 37.297529 85.136409) (xy 36.154529 85.136409) (xy 35.9615 85.216167) (xy 35.813686 85.363723) + (xy 35.733591 85.556613) (xy 35.733409 85.765471) (xy 35.733409 86.400471) (xy 35.813167 86.5935) (xy 35.889761 86.670228) + (xy 35.728343 86.83193) (xy 35.633393 87.061726) (xy 35.633501 87.221752) (xy 35.78975 87.378001) (xy 36.705001 87.378001) + (xy 36.705001 87.358001) (xy 36.954999 87.358001) (xy 36.954999 87.378001) (xy 37.87025 87.378001) (xy 38.026499 87.221752) + (xy 38.026607 87.061726) (xy 37.931657 86.83193) (xy 37.853863 86.754) (xy 38.566562 86.754) (xy 38.573662 86.771182) + (xy 38.956801 87.15499) (xy 39.457653 87.362962) (xy 39.999967 87.363435) (xy 40.501182 87.156338) (xy 40.88499 86.773199) + (xy 41.000026 86.496161) (xy 41.113662 86.771182) (xy 41.496801 87.15499) (xy 41.997653 87.362962) (xy 42.539967 87.363435) + (xy 43.041182 87.156338) (xy 43.42499 86.773199) (xy 43.632962 86.272347) (xy 43.6331 86.113915) (xy 45.660016 84.087) + (xy 48.514 84.087) (xy 48.81058 84.028007) (xy 49.062008 83.860008) (xy 49.724015 83.198) (xy 55.989909 83.198) + (xy 55.989909 83.288971) (xy 56.069667 83.482) (xy 56.217223 83.629814) (xy 56.410113 83.709909) (xy 56.618971 83.710091) + (xy 56.939079 83.710091) (xy 56.548926 83.871299) (xy 56.231671 84.188) (xy 54.229 84.188) (xy 53.93242 84.246993) + (xy 53.680992 84.414992) (xy 53.680989 84.414995) (xy 53.146996 84.948988) (xy 53.043199 84.84501) (xy 52.542347 84.637038) + (xy 52.000033 84.636565) (xy 51.498818 84.843662) (xy 51.11501 85.226801) (xy 50.999973 85.503838) (xy 50.886338 85.228818) + (xy 50.503199 84.84501) (xy 50.002347 84.637038) (xy 49.460033 84.636565) (xy 48.958818 84.843662) (xy 48.576814 85.225) + (xy 47.613576 85.225) (xy 47.605277 85.216686) (xy 47.412387 85.136591) (xy 47.203529 85.136409) (xy 46.060529 85.136409) + (xy 45.8675 85.216167) (xy 45.719686 85.363723) (xy 45.639591 85.556613) (xy 45.639409 85.765471) (xy 45.639409 86.400471) + (xy 45.719167 86.5935) (xy 45.795761 86.670228) (xy 45.634343 86.83193) (xy 45.539393 87.061726) (xy 45.539501 87.221752) + (xy 45.69575 87.378001) (xy 46.611001 87.378001) (xy 46.611001 87.358001) (xy 46.860999 87.358001) (xy 46.860999 87.378001) + (xy 47.77625 87.378001) (xy 47.932499 87.221752) (xy 47.932607 87.061726) (xy 47.837657 86.83193) (xy 47.780826 86.775) + (xy 48.577473 86.775) (xy 48.956801 87.15499) (xy 49.457653 87.362962) (xy 49.999967 87.363435) (xy 50.501182 87.156338) + (xy 50.88499 86.773199) (xy 51.000026 86.496161) (xy 51.113662 86.771182) (xy 51.496801 87.15499) (xy 51.997653 87.362962) + (xy 52.539967 87.363435) (xy 53.041182 87.156338) (xy 53.42499 86.773199) (xy 53.445151 86.724645) (xy 53.48858 86.716007) + (xy 53.740008 86.548008) (xy 54.550015 85.738) (xy 56.232143 85.738) (xy 56.547022 86.053429) (xy 56.8337 86.172468) + (xy 56.550152 86.289918) (xy 56.480305 86.52953) (xy 57.277 87.326225) (xy 58.073695 86.52953) (xy 58.003848 86.289918) + (xy 57.699357 86.18102) (xy 58.005074 86.054701) (xy 58.367429 85.692978) (xy 58.4 85.614538) (xy 58.4 86.749893) + (xy 58.25047 86.706305) (xy 57.453775 87.503) (xy 58.25047 88.299695) (xy 58.4 88.256106) (xy 58.4 96.4) + ) + ) + ) +) diff --git a/schematic/LEDs_in_box.net b/schematic/LEDs_in_box.net new file mode 100644 index 0000000..e86aef3 --- /dev/null +++ b/schematic/LEDs_in_box.net @@ -0,0 +1,200 @@ +(export (version D) + (design + (source /home/eddy/Docs/SAO/ELECTRONICS/STM32/kicad/alltogether/LEDs_in_box.sch) + (date "Пн 02 мар 2015 16:30:01") + (tool "eeschema (2013-feb-26)-stable")) + (components + (comp (ref D1) + (value LED) + (libsource (lib device) (part LED)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40B18)) + (comp (ref D2) + (value LED) + (libsource (lib device) (part LED)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40B25)) + (comp (ref K1) + (value CONN_3) + (libsource (lib conn) (part CONN_3)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40B2D)) + (comp (ref R2) + (value 330) + (footprint SM0603) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40B3C)) + (comp (ref R1) + (value 330) + (footprint SM0603) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40B6D)) + (comp (ref D4) + (value LED) + (libsource (lib device) (part LED)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40BD8)) + (comp (ref D5) + (value LED) + (libsource (lib device) (part LED)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40BDE)) + (comp (ref K2) + (value CONN_4) + (libsource (lib conn) (part CONN_4)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40BE4)) + (comp (ref R5) + (value 6.8k) + (footprint SM1206) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40BEA)) + (comp (ref R4) + (value 2.2k) + (footprint SM0603) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40BF0)) + (comp (ref D3) + (value LED) + (libsource (lib device) (part LED)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40BFF)) + (comp (ref R3) + (value 2.2k) + (footprint SM0603) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40C05)) + (comp (ref HOLE1) + (value HOLE) + (libsource (lib my_elements) (part HOLE)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40D0F)) + (comp (ref HOLE2) + (value HOLE) + (libsource (lib my_elements) (part HOLE)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40D1C)) + (comp (ref HOLE3) + (value HOLE) + (libsource (lib my_elements) (part HOLE)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40D22)) + (comp (ref HOLE4) + (value HOLE) + (libsource (lib my_elements) (part HOLE)) + (sheetpath (names /) (tstamps /)) + (tstamp 54F40D28))) + (libparts + (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) + (field (name Footprint) ~) + (field (name Datasheet) ~)) + (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) + (field (name Footprint) ~) + (field (name Datasheet) ~)) + (pins + (pin (num 1) (name ~) (type passive)) + (pin (num 2) (name ~) (type passive)))) + (libpart (lib conn) (part CONN_3) + (description "Symbole general de connecteur") + (fields + (field (name Reference) K) + (field (name Value) CONN_3)) + (pins + (pin (num 1) (name P1) (type passive)) + (pin (num 2) (name PM) (type passive)) + (pin (num 3) (name P3) (type passive)))) + (libpart (lib conn) (part CONN_4) + (description "Symbole general de connecteur") + (fields + (field (name Reference) P) + (field (name Value) CONN_4)) + (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)))) + (libpart (lib my_elements) (part HOLE) + (description "Simple hole") + (footprints + (fp hole*)) + (fields + (field (name Reference) HOLE) + (field (name Value) HOLE) + (field (name Footprint) ~) + (field (name Datasheet) ~)))) + (libraries + (library (logical device) + (uri /usr/share/kicad/library/device.lib)) + (library (logical conn) + (uri /usr/share/kicad/library/conn.lib)) + (library (logical my_elements) + (uri my_elements.lib))) + (nets + (net (code 1) (name "") + (node (ref D3) (pin 1)) + (node (ref K2) (pin 1))) + (net (code 2) (name "") + (node (ref K2) (pin 3)) + (node (ref D4) (pin 1))) + (net (code 3) (name "") + (node (ref R5) (pin 2)) + (node (ref D5) (pin 2))) + (net (code 4) (name "") + (node (ref R4) (pin 1)) + (node (ref K2) (pin 4)) + (node (ref R5) (pin 1)) + (node (ref R3) (pin 1))) + (net (code 5) (name "") + (node (ref R4) (pin 2)) + (node (ref D4) (pin 2))) + (net (code 6) (name "") + (node (ref R3) (pin 2)) + (node (ref D3) (pin 2))) + (net (code 7) (name "") + (node (ref D5) (pin 1)) + (node (ref K2) (pin 2))) + (net (code 8) (name "") + (node (ref D1) (pin 1)) + (node (ref R1) (pin 2))) + (net (code 9) (name "") + (node (ref D1) (pin 2)) + (node (ref K1) (pin 1))) + (net (code 10) (name "") + (node (ref D2) (pin 2)) + (node (ref K1) (pin 2))) + (net (code 11) (name "") + (node (ref K1) (pin 3)) + (node (ref R2) (pin 1)) + (node (ref R1) (pin 1))) + (net (code 12) (name "") + (node (ref R2) (pin 2)) + (node (ref D2) (pin 1))))) \ No newline at end of file diff --git a/schematic/LEDs_in_box.pro b/schematic/LEDs_in_box.pro new file mode 100644 index 0000000..11a664c --- /dev/null +++ b/schematic/LEDs_in_box.pro @@ -0,0 +1,62 @@ +update=Пн 02 мар 2015 08:59:59 +last_client=cvpcb +[eeschema] +version=1 +LibDir=/home/eddy/Docs/SAO/ELECTRONICS/STM32/kicad/alltogether +NetFmtName= +RptD_X=0 +RptD_Y=100 +RptLab=1 +LabSize=60 +[eeschema/libraries] +LibName1=power +LibName2=device +LibName3=transistors +LibName4=conn +LibName5=linear +LibName6=regul +LibName7=74xx +LibName8=cmos4000 +LibName9=adc-dac +LibName10=memory +LibName11=xilinx +LibName12=special +LibName13=microcontrollers +LibName14=dsp +LibName15=microchip +LibName16=analog_switches +LibName17=motorola +LibName18=texas +LibName19=intel +LibName20=audio +LibName21=interface +LibName22=digital-audio +LibName23=philips +LibName24=display +LibName25=cypress +LibName26=siliconi +LibName27=opto +LibName28=atmel +LibName29=contrib +LibName30=valves +LibName31=my_elements +[cvpcb] +version=1 +NetIExt=net +[cvpcb/libraries] +EquName1=devcms +[pcbnew] +[pcbnew/libraries] +LibName1=sockets +LibName2=connect +LibName3=discret +LibName4=pin_array +LibName5=divers +LibName6=libcms +LibName7=display +LibName8=led +LibName9=dip_sockets +LibName10=pga_sockets +LibName11=valves +LibName12=mod/my_modules +LibDir= diff --git a/schematic/LEDs_in_box.sch b/schematic/LEDs_in_box.sch new file mode 100644 index 0000000..b0ef446 --- /dev/null +++ b/schematic/LEDs_in_box.sch @@ -0,0 +1,269 @@ +EESchema Schematic File Version 2 date Пн 02 мар 2015 16:29:57 +LIBS:power +LIBS:device +LIBS:transistors +LIBS:conn +LIBS:linear +LIBS:regul +LIBS:74xx +LIBS:cmos4000 +LIBS:adc-dac +LIBS:memory +LIBS:xilinx +LIBS:special +LIBS:microcontrollers +LIBS:dsp +LIBS:microchip +LIBS:analog_switches +LIBS:motorola +LIBS:texas +LIBS:intel +LIBS:audio +LIBS:interface +LIBS:digital-audio +LIBS:philips +LIBS:display +LIBS:cypress +LIBS:siliconi +LIBS:opto +LIBS:atmel +LIBS:contrib +LIBS:valves +LIBS:my_elements +LIBS:LEDs_in_box-cache +EELAYER 27 0 +EELAYER END +$Descr A4 11693 8268 +encoding utf-8 +Sheet 1 1 +Title "noname.sch" +Date "2 mar 2015" +Rev "" +Comp "" +Comment1 "" +Comment2 "" +Comment3 "" +Comment4 "" +$EndDescr +$Comp +L LED D1 +U 1 1 54F40B18 +P 5850 2400 +F 0 "D1" H 5850 2500 50 0000 C CNN +F 1 "LED" H 5850 2300 50 0000 C CNN +F 2 "~" H 5850 2400 60 0000 C CNN +F 3 "~" H 5850 2400 60 0000 C CNN + 1 5850 2400 + 1 0 0 -1 +$EndComp +$Comp +L LED D2 +U 1 1 54F40B25 +P 5850 2700 +F 0 "D2" H 5850 2800 50 0000 C CNN +F 1 "LED" H 5850 2600 50 0000 C CNN +F 2 "~" H 5850 2700 60 0000 C CNN +F 3 "~" H 5850 2700 60 0000 C CNN + 1 5850 2700 + 1 0 0 -1 +$EndComp +$Comp +L CONN_3 K1 +U 1 1 54F40B2D +P 6700 2700 +F 0 "K1" V 6650 2700 50 0000 C CNN +F 1 "CONN_3" V 6750 2700 40 0000 C CNN +F 2 "" H 6700 2700 60 0000 C CNN +F 3 "" H 6700 2700 60 0000 C CNN + 1 6700 2700 + 1 0 0 -1 +$EndComp +$Comp +L R R2 +U 1 1 54F40B3C +P 5300 2700 +F 0 "R2" V 5380 2700 40 0000 C CNN +F 1 "330" V 5307 2701 40 0000 C CNN +F 2 "SM0603" V 5230 2700 30 0001 C CNN +F 3 "~" H 5300 2700 30 0000 C CNN + 1 5300 2700 + 0 -1 -1 0 +$EndComp +$Comp +L R R1 +U 1 1 54F40B6D +P 5300 2400 +F 0 "R1" V 5380 2400 40 0000 C CNN +F 1 "330" V 5307 2401 40 0000 C CNN +F 2 "SM0603" V 5230 2400 30 0001 C CNN +F 3 "~" H 5300 2400 30 0000 C CNN + 1 5300 2400 + 0 -1 -1 0 +$EndComp +Wire Wire Line + 5050 2400 5050 2950 +Wire Wire Line + 5550 2700 5650 2700 +Wire Wire Line + 5550 2400 5650 2400 +Wire Wire Line + 6050 2400 6350 2400 +Wire Wire Line + 6350 2400 6350 2600 +Wire Wire Line + 6350 2700 6050 2700 +Wire Wire Line + 5050 2950 6350 2950 +Wire Wire Line + 6350 2950 6350 2800 +Connection ~ 5050 2700 +$Comp +L LED D4 +U 1 1 54F40BD8 +P 5950 4000 +F 0 "D4" H 5950 4100 50 0000 C CNN +F 1 "LED" H 5950 3900 50 0000 C CNN +F 2 "~" H 5950 4000 60 0000 C CNN +F 3 "~" H 5950 4000 60 0000 C CNN + 1 5950 4000 + -1 0 0 1 +$EndComp +$Comp +L LED D5 +U 1 1 54F40BDE +P 5950 4300 +F 0 "D5" H 5950 4400 50 0000 C CNN +F 1 "LED" H 5950 4200 50 0000 C CNN +F 2 "~" H 5950 4300 60 0000 C CNN +F 3 "~" H 5950 4300 60 0000 C CNN + 1 5950 4300 + -1 0 0 1 +$EndComp +$Comp +L CONN_4 K2 +U 1 1 54F40BE4 +P 6800 4250 +F 0 "K2" V 6750 4250 50 0000 C CNN +F 1 "CONN_4" V 6850 4250 40 0000 C CNN +F 2 "" H 6800 4250 60 0000 C CNN +F 3 "" H 6800 4250 60 0000 C CNN + 1 6800 4250 + 1 0 0 -1 +$EndComp +$Comp +L R R5 +U 1 1 54F40BEA +P 5400 4300 +F 0 "R5" V 5480 4300 40 0000 C CNN +F 1 "6.8k" V 5407 4301 40 0000 C CNN +F 2 "SM1206" V 5330 4300 30 0001 C CNN +F 3 "~" H 5400 4300 30 0000 C CNN + 1 5400 4300 + 0 -1 -1 0 +$EndComp +$Comp +L R R4 +U 1 1 54F40BF0 +P 5400 4000 +F 0 "R4" V 5480 4000 40 0000 C CNN +F 1 "2.2k" V 5407 4001 40 0000 C CNN +F 2 "SM0603" V 5330 4000 30 0001 C CNN +F 3 "~" H 5400 4000 30 0000 C CNN + 1 5400 4000 + 0 -1 -1 0 +$EndComp +Wire Wire Line + 5150 3650 5150 4550 +Wire Wire Line + 5650 4300 5750 4300 +Wire Wire Line + 5650 4000 5750 4000 +Wire Wire Line + 5150 4550 6450 4550 +Wire Wire Line + 6450 4550 6450 4400 +Connection ~ 5150 4300 +$Comp +L LED D3 +U 1 1 54F40BFF +P 5950 3650 +F 0 "D3" H 5950 3750 50 0000 C CNN +F 1 "LED" H 5950 3550 50 0000 C CNN +F 2 "~" H 5950 3650 60 0000 C CNN +F 3 "~" H 5950 3650 60 0000 C CNN + 1 5950 3650 + -1 0 0 1 +$EndComp +$Comp +L R R3 +U 1 1 54F40C05 +P 5400 3650 +F 0 "R3" V 5480 3650 40 0000 C CNN +F 1 "2.2k" V 5407 3651 40 0000 C CNN +F 2 "SM0603" V 5330 3650 30 0001 C CNN +F 3 "~" H 5400 3650 30 0000 C CNN + 1 5400 3650 + 0 -1 -1 0 +$EndComp +Wire Wire Line + 5650 3650 5750 3650 +Wire Wire Line + 6150 3650 6450 3650 +Wire Wire Line + 6450 3650 6450 4100 +Connection ~ 5150 4000 +Wire Wire Line + 6150 4000 6300 4000 +$Comp +L HOLE HOLE1 +U 1 1 54F40D0F +P 750 650 +F 0 "HOLE1" H 750 650 60 0000 C CNN +F 1 "HOLE" H 750 550 60 0000 C CNN +F 2 "~" H 750 650 60 0000 C CNN +F 3 "~" H 750 650 60 0000 C CNN + 1 750 650 + 1 0 0 -1 +$EndComp +$Comp +L HOLE HOLE2 +U 1 1 54F40D1C +P 1050 650 +F 0 "HOLE2" H 1050 650 60 0000 C CNN +F 1 "HOLE" H 1050 550 60 0000 C CNN +F 2 "~" H 1050 650 60 0000 C CNN +F 3 "~" H 1050 650 60 0000 C CNN + 1 1050 650 + 1 0 0 -1 +$EndComp +$Comp +L HOLE HOLE3 +U 1 1 54F40D22 +P 1400 650 +F 0 "HOLE3" H 1400 650 60 0000 C CNN +F 1 "HOLE" H 1400 550 60 0000 C CNN +F 2 "~" H 1400 650 60 0000 C CNN +F 3 "~" H 1400 650 60 0000 C CNN + 1 1400 650 + 1 0 0 -1 +$EndComp +$Comp +L HOLE HOLE4 +U 1 1 54F40D28 +P 1700 650 +F 0 "HOLE4" H 1700 650 60 0000 C CNN +F 1 "HOLE" H 1700 550 60 0000 C CNN +F 2 "~" H 1700 650 60 0000 C CNN +F 3 "~" H 1700 650 60 0000 C CNN + 1 1700 650 + 1 0 0 -1 +$EndComp +Wire Wire Line + 6150 4300 6150 4200 +Wire Wire Line + 6150 4200 6450 4200 +Wire Wire Line + 6450 4300 6300 4300 +Wire Wire Line + 6300 4300 6300 4000 +$EndSCHEMATC diff --git a/schematic/STM32_PINS b/schematic/STM32_PINS index e9b810e..cd016cf 100644 --- a/schematic/STM32_PINS +++ b/schematic/STM32_PINS @@ -52,9 +52,9 @@ Functional map of MCU pins 049 VSS GND 050 VDD +3.3V 051 PB12 - -052 PB13 Shtr_cam (signal from camera electronics, 0 to open, high prio) \ -053 PB14 Shtr_man (signal from manual switch, 0 to open, low priority) | External signals connector (at edge of the board) -054 PB15 / +052 PB13 SPI2_SCK \ +053 PB14 SPI2_MISO | SPI connection (near USB connector) +054 PB15 SPI2_MOSI / 055 PD8 - 056 PD9 - 057 PD10 EXT0\ @@ -89,14 +89,14 @@ Functional map of MCU pins 086 PD5 | Tur2 Middle filters turret Hall sensors 087 PD6 / 088 PD7 Tur3_0 Upper filters turret Hall 0 -089 SPI1_SCK \ -090 SPI1_MISO | SPI connection (near USB connector) -091 SPI1_MOSI/I2C_SMBAI/ +089 PB3/SPI1_SCK Shtr_cam (signal from camera electronics, 0 to open, high prio) \ +090 PB4/SPI1_MISO Shtr_man (signal from manual switch, 0 to open, low priority) | External signals connector (near USB) +091 PB5/SPI1_MOSI Shtf_fb (shutter feedback, ==0 when opened) / 092 PB6 Tur3_1 \ Upper filters turret Hall 1,2 093 PB7 Tur3_2 / 094 BOOT BOOT Button to boot from bootloader -095 PB8 LED_status \ LED indicators: status lights when all OK -096 PB9 LED_shutter / shutter LED lights when shutter opened +095 PB8/CanRx LED_status \ LED indicators: status lights when all OK +096 PB9/CanTx LED_shutter / shutter LED lights when shutter opened 097 PE0 DIR_1 direction of SM 1,2 098 PE1 DIR_2 099 VSS GND diff --git a/with_opencm3/hardware_ini.c.worked b/with_opencm3/hardware_ini.c.worked deleted file mode 100644 index cac0d7b..0000000 --- a/with_opencm3/hardware_ini.c.worked +++ /dev/null @@ -1,419 +0,0 @@ -/* - * hardware_ini.c - functions for HW initialisation - * - * Copyright 2014 Edward V. Emelianov - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ - -/* - * All hardware-dependent initialisation & definition should be placed here - * and in hardware_ini.h - * - */ - -#include "main.h" -#include "hardware_ini.h" -#include "onewire.h" - -volatile uint16_t ADC_value[8]; // ADC DMA value - -/* - * Configure SPI ports - */ -/* - * SPI1 remapped: - * SCK - PB3 - * MISO - PB4 - * MOSI - PB5 - */ -void SPI1_init(){ - // enable AFIO & other clocking - rcc_peripheral_enable_clock(&RCC_APB2ENR, - RCC_APB2ENR_SPI1EN | RCC_APB2ENR_AFIOEN | RCC_APB2ENR_IOPBEN); - // remap SPI1 (change pins from PA5..7 to PB3..5); also turn off JTAG - gpio_primary_remap(AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_OFF, AFIO_MAPR_SPI1_REMAP); - // SCK, MOSI - push-pull output - gpio_set_mode(GPIO_BANK_SPI1_RE_SCK, GPIO_MODE_OUTPUT_50_MHZ, - GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_SPI1_RE_SCK); - gpio_set_mode(GPIO_BANK_SPI1_RE_MOSI, GPIO_MODE_OUTPUT_50_MHZ, - GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_SPI1_RE_MOSI); - // MISO - opendrain in - gpio_set_mode(GPIO_BANK_SPI1_RE_MISO, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, GPIO_SPI1_RE_MISO); - spi_reset(SPI1); - /* Set up SPI in Master mode with: - * Clock baud rate: 1/128 of peripheral clock frequency (APB2, 72MHz) - * Clock polarity: Idle High - * Clock phase: Data valid on 2nd clock pulse - * Data frame format: 8-bit - * Frame format: MSB First - */ - spi_init_master(SPI1, SPI_CR1_BAUDRATE_FPCLK_DIV_128, SPI_CR1_CPOL_CLK_TO_1_WHEN_IDLE, - SPI_CR1_CPHA_CLK_TRANSITION_2, SPI_CR1_DFF_8BIT, SPI_CR1_MSBFIRST); - nvic_enable_irq(NVIC_SPI1_IRQ); // enable SPI interrupt -} - -/* - * SPI2: - * SCK - PB13 - * MISO - PB14 - * MOSI - PB15 - */ -void SPI2_init(){ - // turn on clocking - //rcc_periph_clock_enable(RCC_SPI2 | RCC_GPIOB); - rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_SPI2EN); - rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_AFIOEN | RCC_APB2ENR_IOPBEN); - // SCK, MOSI - push-pull output - gpio_set_mode(GPIO_BANK_SPI2_SCK, GPIO_MODE_OUTPUT_50_MHZ, - GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_SPI2_SCK); - gpio_set_mode(GPIO_BANK_SPI2_MOSI, GPIO_MODE_OUTPUT_50_MHZ, - GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_SPI2_MOSI); - // MISO - opendrain in - gpio_set_mode(GPIO_BANK_SPI2_MISO, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, GPIO_SPI2_MISO); - spi_reset(SPI2); - /* Set up SPI in Master mode with: - * Clock baud rate: 1/64 of peripheral clock frequency (APB1, 36MHz) - * Clock polarity: Idle High - * Clock phase: Data valid on 2nd clock pulse - * Data frame format: 8-bit - * Frame format: MSB First - */ - spi_init_master(SPI2, SPI_CR1_BAUDRATE_FPCLK_DIV_64, SPI_CR1_CPOL_CLK_TO_1_WHEN_IDLE, - SPI_CR1_CPHA_CLK_TRANSITION_2, SPI_CR1_DFF_8BIT, SPI_CR1_MSBFIRST); - nvic_enable_irq(NVIC_SPI2_IRQ); // enable SPI interrupt -} - -/** - * GPIO initialisaion: clocking + pins setup - */ -void GPIO_init(){ -/* rcc_periph_clock_enable(RCC_AFIO); - rcc_periph_clock_enable(RCC_SPI1); - rcc_periph_clock_enable(RCC_GPIOC);*/ - rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN | - RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN | RCC_APB2ENR_IOPDEN | - RCC_APB2ENR_IOPEEN); - // USB_DISC: push-pull - gpio_set_mode(USB_DISC_PORT, GPIO_MODE_OUTPUT_2_MHZ, - GPIO_CNF_OUTPUT_PUSHPULL, USB_DISC_PIN); - // USB_POWER: open drain, externall pull down with R7 (22k) - gpio_set_mode(USB_POWER_PORT, GPIO_MODE_INPUT, - GPIO_CNF_INPUT_FLOAT, USB_POWER_PIN); - // AD7794 addr + en - gpio_set_mode(ADC_ADDR_PORT, GPIO_MODE_OUTPUT_2_MHZ, - GPIO_CNF_OUTPUT_PUSHPULL, ADC_ADDR_MASK | ADC_EN_PIN); // ADDRESS: PD10..12; EN: PD13 - gpio_clear(ADC_ADDR_PORT, ADC_ADDR_MASK | ADC_EN_PIN); // clear address & turn switch off -} - -/* - * SysTick used for system timer with period of 1ms - */ -void SysTick_init(){ - systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); // Systyck: 72/8=9MHz - systick_set_reload(8999); // 9000 pulses: 1kHz - systick_interrupt_enable(); - systick_counter_enable(); -} - -/* - * Due to inconvenient pins position on STM32F103VxT6 I had to make this strange location: - * my channel # -> ADC1/2 channel # - * 0 -> 9 PB1 - * 1 -> 8 PB0 - * 2 -> 15 PC5 - * 3 -> 14 PC4 - * 4 -> 7 PA7 - * 5 -> 6 PA6 - * 6 -> 5 PA5 - * 7 -> 4 PA4 - */ -uint8_t adc_channel_array[16] = {9,8,15,14,7,6,5,4}; -#define ADC_CHANNELS_NUMBER 8 - -/** - * Turn on ADC DMA for filling temperatures buffer - */ -void adc_dma_on(){ - // first configure DMA1 Channel1 (ADC1) - dma_channel_reset(DMA1, DMA_CHANNEL1); //DMA_DeInit(DMA1_Channel1); - dma_set_peripheral_address(DMA1, DMA_CHANNEL1, (uint32_t) &(ADC_DR(ADC1))); // DMA_InitStructure.DMA_PeripheralBaseAddr = ADC1_DR_Address; - dma_set_memory_address(DMA1, DMA_CHANNEL1, (uint32_t) ADC_value); // DMA_InitStructure.DMA_MemoryBaseAddr = (uint32_t)&ADC_value; - dma_set_number_of_data(DMA1, DMA_CHANNEL1, ADC_CHANNELS_NUMBER); // DMA_InitStructure.DMA_BufferSize = 1; - dma_set_read_from_peripheral(DMA1, DMA_CHANNEL1); // DMA_InitStructure.DMA_DIR = DMA_DIR_PeripheralSRC; - dma_enable_memory_increment_mode(DMA1, DMA_CHANNEL1); // DMA_InitStructure.DMA_MemoryInc = DMA_MemoryInc_Disable; - dma_disable_peripheral_increment_mode(DMA1, DMA_CHANNEL1); // DMA_InitStructure.DMA_PeripheralInc = DMA_PeripheralInc_Disable; - dma_set_peripheral_size(DMA1, DMA_CHANNEL1, DMA_CCR_PSIZE_16BIT); // DMA_InitStructure.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; - dma_set_memory_size(DMA1, DMA_CHANNEL1, DMA_CCR_MSIZE_16BIT); // DMA_InitStructure.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; - dma_enable_circular_mode(DMA1, DMA_CHANNEL1); // DMA_InitStructure.DMA_Mode = DMA_Mode_Circular; DMA_InitStructure.DMA_M2M = DMA_M2M_Disable; - dma_set_priority(DMA1, DMA_CHANNEL1, DMA_CCR_PL_HIGH); // DMA_InitStructure.DMA_Priority = DMA_Priority_High; - nvic_disable_irq(NVIC_DMA1_CHANNEL1_IRQ); - dma_disable_transfer_error_interrupt(DMA1, DMA_CHANNEL1); - dma_disable_transfer_complete_interrupt(DMA1, DMA_CHANNEL1); - dma_enable_channel(DMA1, DMA_CHANNEL1); // DMA_Cmd(DMA1_Channel1, ENABLE); -} - -void ADC_init(){ - rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_ADC1EN); // enable clocking - rcc_periph_clock_enable(RCC_ADC1); - rcc_set_adcpre(RCC_CFGR_ADCPRE_PCLK2_DIV4); - rcc_periph_clock_enable(RCC_GPIOA | RCC_GPIOB | RCC_GPIOC); // clocking for ADC ports - // channels 4-7: PA7-PA4 - gpio_set_mode(GPIOA, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO4|GPIO5|GPIO6|GPIO7); - // channels 0,1: PB1, PB0 - gpio_set_mode(GPIOB, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO0|GPIO1); - // channels 2,3: PC5, PC4 - gpio_set_mode(GPIOC, GPIO_MODE_INPUT, GPIO_CNF_INPUT_ANALOG, GPIO4|GPIO5); - - // Make sure the ADC doesn't run during config - adc_off(ADC1); - rcc_periph_clock_enable(RCC_DMA1); - - adc_dma_on(); - - // Configure ADC as continuous scan mode with DMA - adc_set_dual_mode(ADC_CR1_DUALMOD_IND); // ADC_InitStructure.ADC_Mode = ADC_Mode_Independent; - adc_enable_scan_mode(ADC1); // ADC_InitStructure.ADC_ScanConvMode = ENABLE; - adc_set_continuous_conversion_mode(ADC1); // ADC_InitStructure.ADC_ContinuousConvMode = ENABLE; - adc_disable_external_trigger_regular(ADC1); // ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None; - adc_set_right_aligned(ADC1); // ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right; - adc_set_sample_time_on_all_channels(ADC1, ADC_SMPR_SMP_239DOT5CYC); // ADC_SampleTime_239Cycles5 - //adc_set_sample_time(ADC1, ADC_CHANNEL8, ADC_SMPR_SMP_239DOT5CYC); // ADC_RegularChannelConfig(ADC1, ADC_Channel_8, 1, ADC_SampleTime_239Cycles5); - adc_enable_dma(ADC1); // ADC_DMACmd(ADC1, ENABLE); - adc_power_on(ADC1); // ADC_Cmd(ADC1, ENABLE); -} - -/** - * Starts ADC calibration & after it runs ADC in continuous conversion mode - * First call ADC_init(), than wait a little and call this function - */ -void ADC_calibrate_and_start(){ - adc_set_regular_sequence(ADC1, ADC_CHANNELS_NUMBER, adc_channel_array); - adc_reset_calibration(ADC1); - adc_calibration(ADC1); - adc_start_conversion_regular(ADC1); // ADC_SoftwareStartConvCmd(ADC1, ENABLE); - adc_start_conversion_direct(ADC1); -} - - - - - - -uint16_t tim2_buff[TIM2_DMABUFF_SIZE]; -uint16_t tim2_inbuff[TIM2_DMABUFF_SIZE]; -int tum2buff_ctr = 0; -uint8_t ow_done = 1; -/** - * this function sends bits of ow_byte (LSB first) to 1-wire line - * @param ow_byte - byte to convert - * @param Nbits - number of bits to send - * @param ini - 1 to zero counter - */ -uint8_t OW_add_byte(_U_ uint8_t ow_byte, _U_ uint8_t Nbits, _U_ uint8_t ini){ - uint8_t i, byte; - if(ini) tum2buff_ctr = 0; - if(Nbits == 0) return 0; - if(Nbits > 8) Nbits = 8; - for(i = 0; i < Nbits; i++){ - if(ow_byte & 0x01){ - byte = OW_1; - }else{ - byte = OW_0; - } - tim2_buff[tum2buff_ctr++] = byte; - if(tum2buff_ctr == TIM2_DMABUFF_SIZE) return 0; // avoid buffer overflow - ow_byte = ow_byte >> 1; - } - return 1; -} - -/** - * Fill output buffer with data from 1-wire - * @param start_idx - index from which to start (bit number) - * @param N - data length (in **bytes**) - * @outbuf - where to place data - */ -void read_from_OWbuf(_U_ uint8_t start_idx, _U_ uint8_t N, _U_ uint8_t *outbuf){ - uint8_t i, j, last = start_idx + N * 8, byte; - if(last >= TIM2_DMABUFF_SIZE) last = TIM2_DMABUFF_SIZE; - for(i = start_idx; i < last;){ - byte = 0; - for(j = 0; j < 8; j++){ - byte >>= 1; - if(tim2_inbuff[i++] < OW_READ1) - byte |= 0x80; - } - *outbuf++ = byte; - } -} -// there's a mistake in opencm3, so redefine this if needed (TIM_CCMR2_CC3S_IN_TI1 -> TIM_CCMR2_CC3S_IN_TI4) -#ifndef TIM_CCMR2_CC3S_IN_TI4 -#define TIM_CCMR2_CC3S_IN_TI4 (2) -#endif -void init_ow_dmatimer(){ // tim2_ch4 - PA3, no remap - gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ, - GPIO_CNF_OUTPUT_ALTFN_OPENDRAIN, GPIO3); - rcc_periph_clock_enable(RCC_TIM2); - rcc_periph_clock_enable(RCC_DMA1); - timer_reset(TIM2); - // timers have frequency of 1MHz -- 1us for one step - // 36MHz of APB1 - timer_set_mode(TIM2, TIM_CR1_CKD_CK_INT, TIM_CR1_CMS_EDGE, TIM_CR1_DIR_UP); - // 72MHz div 72 = 1MHz - TIM2_PSC = 71; // prescaler is (div - 1) - TIM2_CR1 &= ~(TIM_CR1_OPM | TIM_CR1_UDIS); // continuous mode & enable update events - TIM2_CR1 |= TIM_CR1_ARPE; // changing period immediately - TIM2_ARR = OW_BIT; // default period of timer - // PWM_OUT: TIM2_CH4; capture: TIM2_CH3 - // PWM edge-aligned mode & enable preload for CCR4, CC3 takes input from TI4 - TIM2_CCMR2 = TIM_CCMR2_OC4M_PWM1 | TIM_CCMR2_OC4PE | TIM_CCMR2_CC3S_IN_TI4; - TIM2_CCR4 = 0; // set output value to 1 by clearing CCR4 - TIM2_EGR = TIM_EGR_UG; // update values of ARR & CCR4 - // set low polarity for CC4, high for CC4 & enable CC4 out and CC3 in - TIM2_CCER = TIM_CCER_CC4P | TIM_CCER_CC4E | TIM_CCER_CC3E; -} - -void run_dmatimer(){ - ow_done = 0; - DMA1_IFCR = DMA_ISR_TEIF7|DMA_ISR_HTIF7|DMA_ISR_TCIF7|DMA_ISR_GIF7 | - DMA_ISR_TEIF1|DMA_ISR_HTIF1|DMA_ISR_TCIF1|DMA_ISR_GIF1; // clear flags - - init_ow_dmatimer(); - - // TIM2_CH4 - DMA1, channel 7 - dma_channel_reset(DMA1, DMA_CHANNEL7); - dma_set_peripheral_address(DMA1, DMA_CHANNEL7, (uint32_t) &(TIM_CCR4(TIM2))); - dma_set_read_from_memory(DMA1, DMA_CHANNEL7); - dma_enable_memory_increment_mode(DMA1, DMA_CHANNEL7); - dma_disable_peripheral_increment_mode(DMA1, DMA_CHANNEL7); - dma_set_peripheral_size(DMA1, DMA_CHANNEL7, DMA_CCR_PSIZE_16BIT); - dma_set_memory_size(DMA1, DMA_CHANNEL7, DMA_CCR_MSIZE_16BIT); - dma_enable_transfer_error_interrupt(DMA1, DMA_CHANNEL7); - dma_enable_transfer_complete_interrupt(DMA1, DMA_CHANNEL7); - dma_set_memory_address(DMA1, DMA_CHANNEL7, (uint32_t)tim2_buff); - // TIM2_CH4 - DMA1, channel 7 - dma_channel_reset(DMA1, DMA_CHANNEL1); - dma_set_peripheral_address(DMA1, DMA_CHANNEL1, (uint32_t) &(TIM_CCR3(TIM2))); - dma_set_read_from_peripheral(DMA1, DMA_CHANNEL1); - dma_enable_memory_increment_mode(DMA1, DMA_CHANNEL1); - dma_disable_peripheral_increment_mode(DMA1, DMA_CHANNEL1); - dma_set_peripheral_size(DMA1, DMA_CHANNEL1, DMA_CCR_PSIZE_16BIT); - dma_set_memory_size(DMA1, DMA_CHANNEL1, DMA_CCR_MSIZE_16BIT); - dma_enable_transfer_error_interrupt(DMA1, DMA_CHANNEL1); - dma_enable_transfer_complete_interrupt(DMA1, DMA_CHANNEL1); - nvic_enable_irq(NVIC_DMA1_CHANNEL1_IRQ); - nvic_enable_irq(NVIC_DMA1_CHANNEL7_IRQ); // enable dma1_channel7_isr - - TIM2_SR = 0; // clear all flags - TIM2_CR1 &= ~TIM_CR1_OPM; // continuous mode - timer_set_period(TIM2, OW_BIT); // bit length - timer_generate_event(TIM2, TIM_EGR_UG); // update values - dma_set_memory_address(DMA1, DMA_CHANNEL7, (uint32_t)tim2_buff); - dma_set_number_of_data(DMA1, DMA_CHANNEL7, tum2buff_ctr); - - //for(i = 0; i < TIM2_DMABUFF_SIZE; i++) tim2_inbuff[i] = 0; - dma_set_memory_address(DMA1, DMA_CHANNEL1, (uint32_t) tim2_inbuff); - dma_set_number_of_data(DMA1, DMA_CHANNEL1, tum2buff_ctr); - - dma_enable_channel(DMA1, DMA_CHANNEL7); - dma_enable_channel(DMA1, DMA_CHANNEL1); - - timer_set_dma_on_compare_event(TIM2); - TIM2_CCER |= TIM_CCER_CC3E; // enable input capture - TIM2_DIER = TIM_DIER_CC4DE | TIM_DIER_CC3DE; // enable DMA events - // set low polarity, enable cc out & enable input capture - TIM2_CCER |= TIM_CCER_CC4P | TIM_CCER_CC4E | TIM_CCER_CC3E; - TIM2_CR1 |= TIM_CR1_CEN; // run timer - -} - -uint16_t rstat = 0, lastcc3; -void ow_reset(){ - ow_done = 0; - rstat = 0; - TIM2_SR = 0; // clear all flags - TIM2_DIER = 0; // disable timer interrupts - TIM2_ARR = OW_RESET_TIME; // set period to 1ms - TIM2_CCR4 = OW_RESET; // zero pulse length - TIM2_EGR = TIM_EGR_UG; // update values of ARR & CCR4 - TIM2_CR1 |= TIM_CR1_OPM | TIM_CR1_CEN; // we need only single pulse & run timer - TIM2_SR = 0; // clear update flag generated after timer's running - TIM2_DIER = TIM_DIER_UIE | TIM_DIER_CC3IE; // generate interrupts on update event & cc - nvic_enable_irq(NVIC_TIM2_IRQ); -} - -void tim2_isr(){ - if(TIM2_SR & TIM_SR_UIF){ // update interrupt - TIM2_SR &= ~TIM_SR_UIF; // clear flag - TIM2_DIER = 0; // disable all timer interrupts - TIM2_CCR4 = 0; // set output value to 1 - TIM2_EGR |= TIM_EGR_UG; // generate update event to change value in CCR4 - TIM2_CR1 &= ~TIM_CR1_CEN; // timer_disable_counter(TIM2); - nvic_disable_irq(NVIC_TIM2_IRQ); - ow_done = 1; - rstat = lastcc3; - print_int(rstat, lastsendfun); - MSG("\n"); - } - if(TIM2_SR & TIM_SR_CC3IF){ // we need this interrupt to store CCR3 value - TIM2_SR = 0; // clear flag (we've manage TIM_SR_UIF before, so can simply do =0) - lastcc3 = TIM2_CCR3; - //TIM2_DIER &= ~TIM_DIER_CC3IE; // disable CCR3 interrupts - } -} - - -void dma1_channel7_isr(){ - if(DMA1_ISR & DMA_ISR_TCIF7) { - DMA1_IFCR = DMA_IFCR_CTCIF7; - dma_disable_channel(DMA1, DMA_CHANNEL7); - timer_disable_irq(TIM2, TIM_DIER_CC4DE); - }else if(DMA1_ISR & DMA_ISR_TEIF7){ - DMA1_IFCR = DMA_IFCR_CTEIF7; - MSG("out transfer error\n"); - } -} - -void dma1_channel1_isr(){ - int i; - if(DMA1_ISR & DMA_ISR_TCIF1) { - DMA1_IFCR = DMA_IFCR_CTCIF1; - // TIM2_CCER &= ~TIM_CCER_CC4P; //timer_set_oc_polarity_high(TIM2, TIM_OC4); - TIM2_CR1 &= ~TIM_CR1_CEN; // timer_disable_counter(TIM2); - timer_disable_irq(TIM2, TIM_DIER_CC3DE); - // gpio_set(GPIOA, GPIO3); - dma_disable_channel(DMA1, DMA_CHANNEL1); - nvic_disable_irq(NVIC_DMA1_CHANNEL1_IRQ); - ow_done = 1; - for(i = 0; i < tum2buff_ctr; i++){ - print_int(tim2_inbuff[i], lastsendfun); - MSG(" "); - } - MSG("\n"); - }else if(DMA1_ISR & DMA_ISR_TEIF1){ - DMA1_IFCR = DMA_IFCR_CTEIF1; - MSG("in transfer error\n"); - } -} - -uint8_t OW_get_reset_status(){ - print_int(rstat, lastsendfun); - MSG("\n"); - if(rstat < OW_PRESENT) return 0; // no devices - return 1; -} - diff --git a/with_opencm3/ircontroller.bin b/with_opencm3/ircontroller.bin index c88648d..1fbc514 100755 Binary files a/with_opencm3/ircontroller.bin and b/with_opencm3/ircontroller.bin differ diff --git a/with_opencm3/onewire.c.old b/with_opencm3/onewire.c.old deleted file mode 100644 index 3f574ee..0000000 --- a/with_opencm3/onewire.c.old +++ /dev/null @@ -1,259 +0,0 @@ -/* - * onewire.c - functions to work with 1-wire devices - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - */ -#include "onewire.h" - -#define OW_0 0x00 -#define OW_1 0xff -#define OW_R 0xff -#define OW_RST 0xf0 - - -uint8_t dev_amount = 0; // amount of 1-wire devices -uint8_t ID_buf[64] = {0}; // 1-wire devices ID buffer (8 bytes for every device) -uint8_t NUM_buf[8] = {0}; // numerical identificators for each sensor - -/** - * this function sends bits of ow_byte (LSB first) to 1-wire line - * @param ow_byte - byte to convert - * @param Nbits - number of bits to send - */ -void OW_SendBits(uint8_t ow_byte, uint8_t Nbits){ - uint8_t i, byte; - if(Nbits == 0) return; - if(Nbits > 8) Nbits = 8; - for(i = 0; i < Nbits; i++){ - if(ow_byte & 0x01){ - byte = OW_1; - }else{ - byte = OW_0; - } - fill_uart_buff(OW_USART_X, byte); // send next "bit" - ow_byte = ow_byte >> 1; - } -} - -void OW_ClearBuff(){ - UART_buff *curbuff = get_uart_buffer(OW_USART_X); - curbuff->end = 0; -} - -/* - * Inverce conversion - read data (not more than 8 bits) - */ -uint8_t OW_ConvertByte(uint8_t *bits, uint8_t L){ - uint8_t ow_byte = 0, i, *st = bits; - if(L > 8) L = 8; // forget all other data - for(i = 0; i < L; i++, st++){ - ow_byte = ow_byte >> 1; // prepare for next bit filling - if(*st == OW_1){ - ow_byte |= 0x80; // MSB = 1 - } - } - ow_byte >>= (8 - L); -print_hex(bits, L, lastsendfun); -lastsendfun(' '); -print_hex(&ow_byte, 1, lastsendfun); -newline(lastsendfun); - return ow_byte; // shift to the end: L could be != 8 ??? -} - - -/* - * Configure peripherial ports (USART2) for 1-wire - */ -void OW_Init(){ - struct usb_cdc_line_coding owlc = { - .dwDTERate = 115200, - .bCharFormat = USB_CDC_1_STOP_BITS, - .bParityType = USB_CDC_NO_PARITY, - .bDataBits = 8, - }; - UART_init(OW_USART_X); - UART_setspeed(OW_USART_X, &owlc); -} - -/* - * 1-wire reset - * Reset procedure: USART settings are 9600,8,n,1, - * send 0xf0 then check what we get - * if not 0xf0 line is busy. - * Other operations work with next USART settings: 115200,8,n,1 - * - * return 1 in case of 1-wire devices present; otherwise return 0 - */ -uint8_t OW_Reset(){ - uint8_t ow_presence; - UART_buff *curbuff; - // change speed to 9600 - usart_set_baudrate(OW_USART_X, 9600); - //USART_ClearFlag(OW_USART_X, USART_FLAG_TC); - fill_uart_buff(OW_USART_X, OW_RST); // send 1 byte data - // wait for end of transmission - while(!(USART_SR(OW_USART_X) & USART_SR_TC)); - curbuff = get_uart_buffer(OW_USART_X); - if(!curbuff || !(curbuff->end)) return 0; // error reading - curbuff->end = 0; // zero counter - ow_presence = curbuff->buf[0]; - // change speed back - usart_set_baudrate(OW_USART_X, 115200); - // if there is any device on bus, it will pull it, so we'll get not 0xf0 - if(ow_presence != OW_RST){ - return 1; - } - // we get 0xf0 -> there's nothing on the bus - return 0; -} - -/** - * Procedure of 1-wire communications - * variables: - * @param sendReset - send RESET before transmission - * @param command - bytes sent to the bus (if we want to read, send OW_READ_SLOT) - * @param cLen - command buffer length (how many bytes to send) - * @return 1 if succeed, 0 if failure - */ -uint8_t OW_Send(uint8_t sendReset, uint8_t *command, uint8_t cLen){ - // if reset needed - send RESET and check bus - if(sendReset){ - if(OW_Reset() == 0){ - return 0; - } - } - while(cLen-- > 0){ - OW_SendBits(*command, 8); - command++; - } - return 1; -} - -/** - * Check USART IN buffer for ready & fill user buffer with data on success - * @param buflen - expected buffer length - * @param data - pointer for reading buffer (if reading needed must be at least buflen-readStart bytes) - * @param readStart - first byte to read (starts from 0) or OW_NO_READ (not read) - * @return 0 if buffer not ready; 1 if OK - */ -uint8_t OW_Get(uint8_t buflen, uint8_t *data, uint8_t readStart){ - UART_buff *curbuff = get_uart_buffer(OW_USART_X); - uint8_t *buff = curbuff->buf; - if(curbuff->end < buflen/8) return 0; - while(buflen-- > 0){ - if(readStart == 0){ - *data++ = OW_ConvertByte(buff, 8); - }else{ - if(readStart != OW_NO_READ){ - readStart--; - } - } - buff += 8; - } - curbuff->end = 0; // zero counter - return 1; -} - -/* - * scan 1-wire bus - * WARNING! The procedure works in real-time, so it is VERY LONG - * num - max number of devices - * buf - array for devices' ID's (8*num bytes) - * return amount of founded devices - * -uint8_t OW_Scan(uint8_t *buf, uint8_t num){ - unsigned long path,next,pos; - uint8_t bit,chk; - uint8_t cnt_bit, cnt_byte, cnt_num; - path=0; - cnt_num=0; - do{ - //(issue the 'ROM search' command) - if( 0 == OW_WriteCmd(OW_SEARCH_ROM) ) return 0; - OW_Wait_TX(); - OW_ClearBuff(); // clear RX buffer - next = 0; // next path to follow - pos = 1; // path bit pointer - for(cnt_byte = 0; cnt_byte != 8; cnt_byte++){ - buf[cnt_num*8 + cnt_byte] = 0; - for(cnt_bit = 0; cnt_bit != 8; cnt_bit++){ - //(read two bits, 'bit' and 'chk', from the 1-wire bus) - OW_SendBits(OW_R, 2); - OW_Wait_TX(); - bit = -----OW_ReadByte(); - chk = bit & 0x02; // bit 1 - bit = bit & 0x01; // bit 0 - if(bit && chk) return 0; // error - if(!bit && !chk){ // collision, both are zero - if (pos & path) bit = 1; // if we've been here before - else next = (path&(pos-1)) | pos; // else, new branch for next - pos <<= 1; - } - //(save this bit as part of the current ROM value) - if (bit) buf[cnt_num*8 + cnt_byte]|=(1< 8) Nbits = 8; - for(i = 0; i < Nbits; i++){ - if(ow_byte & 0x01){ - byte = OW_1; - }else{ - byte = OW_0; - } - fill_uart_buff(OW_USART_X, byte); // send next "bit" - ow_byte = ow_byte >> 1; - } -} - -/* - * Inverce conversion - read data (not more than 8 bits) - */ -uint8_t OW_ReadByte(){ - UART_buff *curbuff = get_uart_buffer(OW_USART_X); - uint8_t ow_byte = 0, i, L, *buf; - if(!curbuff || !(L = curbuff->end)) return 0; // no data? - if(L > 8) L = 8; // forget all other data - buf = curbuff->buf; - for(i = 0; i < L; i++, buf++){ - ow_byte = ow_byte >> 1; // prepare for next bit filling - if(*buf == OW_1){ - ow_byte |= 0x80; // MSB = 1 - } - } - return ow_byte >> (8 - L); // shift to the end: L could be != 8 ??? -} - - -/* - * Configure peripherial ports (USART2) for 1-wire - */ -void OW_Init(){ - struct usb_cdc_line_coding owlc = { - .dwDTERate = 115200, - .bCharFormat = USB_CDC_1_STOP_BITS, - .bParityType = USB_CDC_NO_PARITY, - .bDataBits = 8, - }; - UART_init(OW_USART_X); - UART_setspeed(OW_USART_X, &owlc); -} - -/* - * 1-wire reset - * Reset procedure: USART settings are 9600,8,n,1, - * send 0xf0 then check what we get - * if not 0xf0 line is busy. - * Other operations work with next USART settings: 115200,8,n,1 - * - * return 1 in case of 1-wire devices present; otherwise return 0 - */ -uint8_t OW_Reset() { - uint8_t ow_presence; - UART_buff *curbuff; - // change speed to 9600 - usart_set_baudrate(OW_USART_X, 9600); - //USART_ClearFlag(OW_USART_X, USART_FLAG_TC); - fill_uart_buff(OW_USART_X, OW_RST); // send 1 byte data - // wait for end of transmission - while(!(USART_SR(OW_USART_X) & USART_SR_TC)); - curbuff = get_uart_buffer(OW_USART_X); - if(!curbuff || !(curbuff->end)) return 0; // error reading - curbuff->end = 0; // zero counter - ow_presence = curbuff->buf[0]; - // change speed back - usart_set_baudrate(OW_USART_X, 115200); - // if there is any device on bus, it will pull it, so we'll get not 0xf0 - if(ow_presence != OW_RST){ - return 1; - } - // we get 0xf0 -> there's nothing on the bus - return 0; -} - -/* - * Procedure of 1-wire communications - * variables: - * sendReset - send RESET before transmission - * command - bytes sent to the bus (if we want to read, send OW_READ_SLOT) - * cLen - command buffer length (how many bytes to send) - * data - pointer for reading buffer (if reading needed) - * readStart - first byte to read (starts from 0) or OW_NO_READ (not read) - * - * return 1 if succeed, 0 if failure - */ -uint8_t OW_Send(uint8_t sendReset, uint8_t *command, uint8_t cLen, - uint8_t *data, uint8_t dLen, uint8_t readStart) { - // if reset needed - send RESET and check bus - if(sendReset){ - if(OW_Reset() == 0){ - return 0; - } - } - while(cLen > 0){ - OW_SendBits(*command, 8); - command++; - cLen--; - // wait for EOT - while(!(USART_SR(OW_USART_X) & USART_SR_TC)); - // put data from bus into user buffer - if(readStart == 0 && dLen > 0){ - *data = OW_ReadByte(); - data++; - dLen--; - }else{ - if(readStart != OW_NO_READ){ - readStart--; - } - } - } - return 1; -} - -/* - * scan 1-wire bus - * num - max number of devices - * buf - array for devices' ID's (8*num bytes) - * return amount of founded devices - */ -uint8_t OW_Scan(uint8_t *buf, uint8_t num) { - unsigned long path,next,pos; - uint8_t bit,chk; - uint8_t cnt_bit, cnt_byte, cnt_num; - path=0; - cnt_num=0; - do{ - //(issue the 'ROM search' command) - if( 0 == OW_WriteCmd(OW_SEARCH_ROM) ) return 0; - next=0; // next path to follow - pos=1; // path bit pointer - for(cnt_byte = 0; cnt_byte != 8; cnt_byte++){ - buf[cnt_num*8 + cnt_byte] = 0; - for(cnt_bit = 0; cnt_bit != 8; cnt_bit++){ - //(read two bits, 'bit' and 'chk', from the 1-wire bus) - OW_SendBits(OW_R, 2); - bit = OW_ReadByte(); - chk = bit & 0x02; // bit 1 - bit = bit & 0x01; // bit 0 - //bit = (ow_buf[0] == OW_1); chk = (ow_buf[1] == OW_1); - if(bit && chk) return 0; // error - if(!bit && !chk){ // collision, both are zero - if (pos & path) bit = 1; // if we've been here before - else next = (path&(pos-1)) | pos; // else, new branch for next - pos <<= 1; - } - //(save this bit as part of the current ROM value) - if (bit) buf[cnt_num*8 + cnt_byte]|=(1<