;**** **** **** **** ****
;
; BLHeli program for controlling brushless motors in helicopters and multirotors
;
; Copyright 2011, 2012 Steffen Skaug
; This program is distributed under the terms of the GNU General Public License
;
; This file is part of BLHeli.
;
; BLHeli 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 3 of the License, or
; (at your option) any later version.
;
; BLHeli 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 BLHeli. If not, see .
;
;**** **** **** **** ****
;
; Multistar 20A hardware definition file
;
; Notes: None
;
;**** **** **** **** ****
;*********************
; Device Atmega8A
;*********************
.INCLUDE "m8Adef.inc"
;**** **** **** **** ****
; Fuses must be set to external oscillator = 16Mhz
;**** **** **** **** ****
;**** **** **** **** ****
; Constant definitions
;**** **** **** **** ****
.ESEG ; EEprom segment
.ORG 0x40
Eep_ESC_Layout: .DB "#MStar_20A# " ; ESC layout tag
.ORG 0x50
Eep_ESC_MCU: .DB "#BLHELI#Am8A# " ; Project and MCU tag (16 Bytes)
.EQU HIGH_BEC_VOLTAGE = 0 ; Set to 1 or more if high BEC voltage is supported
.EQU DAMPED_MODE_ENABLE = 0 ; Set to 1 if fully damped mode is supported
.EQU NFETON_DELAY = 30 ; Wait delay from pfets off to nfets on
.EQU PFETON_DELAY = 5 ; Wait delay from nfets off to pfets on
.EQU HIGH_DRIVER_PRECHG_TIME = 0 ; Time between commutations use to precharge the high side driver (for all nfet ESCs)
.EQU ADC_LIMIT_L = 109 ; 4.7k/47k divider. Power supply measurement ADC value for which motor power is limited (low byte)
.EQU ADC_LIMIT_H = 0 ; 4.7k/47k divider. Power supply measurement ADC value for which motor power is limited (2 MSBs)
.EQU TEMP_LIMIT = 0 ; No sensor. Temperature measurement ADC value for which main motor power is limited
.EQU TEMP_LIMIT_STEP = 0 ; No sensor. Temperature measurement ADC value increment for which main motor power is further limited
;**** **** **** **** ****
; ESC specific defaults
;**** **** **** **** ****
.EQU DEFAULT_PGM_MAIN_SPOOLUP_TIME = 10 ; Main motor spoolup time
.EQU DEFAULT_PGM_MAIN_STARTUP_PWR = 10 ; 1=0.031 2=0.047 3=0.063 4=0.094 5=0.125 6=0.188 7=0.25 8=0.38 9=0.50 10=0.75 11=1.00 12=1.25 13=1.50
.EQU DEFAULT_PGM_TAIL_STARTUP_PWR = 10 ; 1=0.031 2=0.047 3=0.063 4=0.094 5=0.125 6=0.188 7=0.25 8=0.38 9=0.50 10=0.75 11=1.00 12=1.25 13=1.50
.EQU DEFAULT_PGM_MULTI_STARTUP_PWR = 10 ; 1=0.031 2=0.047 3=0.063 4=0.094 5=0.125 6=0.188 7=0.25 8=0.38 9=0.50 10=0.75 11=1.00 12=1.25 13=1.50
;*********************
; PORT D definitions *
;*********************
.EQU BpFET = 7 ;o
;.EQU = 6 ;i
.EQU CpFET = 5 ;o
.EQU ApFET = 4 ;o
.EQU CnFET = 3 ;o
.EQU Rcp_In = 2 ;i
.EQU AnFET = 1 ;o
.EQU BnFET = 0 ;o
.equ INIT_PD = 0x00
.equ DIR_PD = (1<