diff --git a/Makefile b/Makefile index dbd9d76..08bb8bd 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ SHELL = /bin/bash .SUFFIXES: .inc .hex -ALL_TARGETS = afro.hex afro2.hex afro_hv.hex afro_nfet.hex arctictiger.hex birdie70a.hex bs_nfet.hex bs.hex bs40a.hex dlu40a.hex dlux.hex dys_nfet.hex hk200a.hex hm135a.hex hxt200a.hex kda.hex kda_8khz.hex kda_nfet.hex kda_nfet_ni.hex mkblctrl1.hex rb50a.hex rb70a.hex rb70a2.hex rct50a.hex tbs.hex tbs_hv.hex tp.hex tp_8khz.hex tp_i2c.hex tp_nfet.hex tp70a.hex tgy6a.hex tgy_8mhz.hex tgy.hex +ALL_TARGETS = afro.hex afro2.hex afro_hv.hex afro_nfet.hex arctictiger.hex birdie70a.hex bs_nfet.hex bs.hex bs40a.hex dlu40a.hex dlux.hex dys_nfet.hex hk200a.hex hm135a.hex hw30a.hex hxt200a.hex kda.hex kda_8khz.hex kda_nfet.hex kda_nfet_ni.hex mkblctrl1.hex rb50a.hex rb70a.hex rb70a2.hex rct50a.hex tbs.hex tbs_hv.hex tp.hex tp_8khz.hex tp_i2c.hex tp_nfet.hex tp70a.hex tgy6a.hex tgy_8mhz.hex tgy.hex AUX_TARGETS = afro_pr0.hex afro_pr1.hex diy0.hex all: $(ALL_TARGETS) diff --git a/hw30a.inc b/hw30a.inc new file mode 100644 index 0000000..940cbd6 --- /dev/null +++ b/hw30a.inc @@ -0,0 +1,70 @@ +;*********************************************************** +;* XXD HW30A 30A Brushless Motor ESC * +;* with all nFETs * +;* December.2018 * +;* https://www.banggood.com/Wholesale-XXD-HW30A-30A-Brushless-Motor-ESC-For-Airplane-Quadcopter-p-50621.html * +;* https://github.com/NicksonYap/XXD-HW30A-ESC-Schematic * +;*********************************************************** + +.set F_CPU = 8000000 +.equ USE_INT0 = 1 +.equ USE_I2C = 0 +.equ USE_UART = 0 +.equ USE_ICP = 0 + +.equ DEAD_LOW_NS = 4000 +.equ DEAD_HIGH_NS = 8000 + +;********************* +; PORT D definitions * +;********************* +.equ mux_c = 7 ;i comparator input (AIN0) +.equ c_comp = 6 ;i common comparator input (AIN0) +.equ CpFET = 5 ;o +.equ BpFET = 4 ;o +.equ ApFET = 3 ;o +.equ rcp_in = 2 ;i r/c pulse input + +.equ INIT_PD = 0 +.equ DIR_PD = (1< .918V at ADC0) + +.equ O_POWER = 10 +.equ O_GROUND = 1 + +.equ INIT_PC = 0 +.equ DIR_PC = 0 + +;********************* +; PORT B definitions * +;********************* +;.equ = 7 +;.equ = 6 +;.equ = 5 (sck stk200 interface) +;.equ = 4 (miso stk200 interface) +;.equ = 3 (mosi stk200 interface) +.equ CnFET = 2 +.equ BnFET = 1 +.equ AnFET = 0 + +.equ INIT_PB = 0 +.equ DIR_PB = (1<