Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 81 lines (67 sloc) 2.019 kb
efe786c @sim- intrc fuses are no longer necessary.
authored
1 ;***************************************************************
2 ;* For HK Blue Series with only n-Channel FETs *
0e6d0ab @sim- Fix factory fuse suggestions for bs*.inc. (CKOPT wasn't set.)
authored
3 ;* Fuses should be set to -U lfuse:w:0x2e:m -U hfuse:w:0xcf:m *
efe786c @sim- intrc fuses are no longer necessary.
authored
4 ;* or similar (even intrc will work now) *
5 ;* 09/2011 *
6 ;* https://github.com/sim-/tgy *
7 ;***************************************************************
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
8
649b556 @sim- Support i2c input with new MK BL-Ctrl protocol support, enabled on Af…
authored
9 .equ F_CPU = 16000000
10 .equ USE_INT0 = 1
11 .equ USE_I2C = 0 ; We could, but FETs are on the I2C ports
7b7d951 @sim- Add UART control (X3D style).
authored
12 .equ USE_UART = 0
649b556 @sim- Support i2c input with new MK BL-Ctrl protocol support, enabled on Af…
authored
13 .equ USE_ICP = 0
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
14
e80c3f0 @sim- Add calibrated dead times for complementary PWM.
authored
15 .equ DEAD_LOW_NS = 300
16 .equ DEAD_HIGH_NS = 300
17
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
18 ;*********************
19 ; PORT D definitions *
20 ;*********************
21 ;.equ = 7
22 ;.equ = 6
23 .equ AnFET = 5
24 .equ ApFET = 4
25 ;.equ = 3
26 .equ rcp_in = 2
27
28 .equ INIT_PD = (1<<ApFET)
29 .equ DIR_PD = (1<<AnFET)+(1<<ApFET)
30
4357387 @sim- Collapse PWM FET driving into single on/off functions regardless of p…
authored
31 .equ AnFET_port = PORTD
32 .equ ApFET_port = PORTD
33
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
34 ;*********************
35 ; PORT C definitions *
36 ;*********************
37 .equ mux_b = 7 ; ADC7
38 .equ mux_a = 6 ; ADC6
39 .equ BpFET = 5
40 .equ BnFET = 4
41 .equ CpFET = 3
37a999f @sim- Add voltage sense information.
authored
42 .equ mux_voltage = 2 ; ADC2 voltage input (220k from Vbat, 51k to gnd, 10.10V -> 1.900V at ADC2)
43 .equ mux_temperature = 1 ; ADC1 temperature input (some boards) (10k NTC to 5V, 820 to gnd)
12cea28 @sim- Whitespace fixes.
authored
44 .equ mux_c = 0 ; ADC0
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
45
37a999f @sim- Add voltage sense information.
authored
46 .equ O_POWER = 220
47 .equ O_GROUND = 51
48
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
49 .equ INIT_PC = (1<<BpFET)+(1<<CpFET)
50 .equ DIR_PC = (1<<BnFET)+(1<<BpFET)+(1<<CpFET)
51
4357387 @sim- Collapse PWM FET driving into single on/off functions regardless of p…
authored
52 .equ BpFET_port = PORTC
53 .equ BnFET_port = PORTC
54 .equ CpFET_port = PORTC
55
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
56 ;*********************
57 ; PORT B definitions *
58 ;*********************
59 ;.equ = 7
60 ;.equ = 6
12cea28 @sim- Whitespace fixes.
authored
61 ;.equ = 5 (sck stk200 interface)
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
62 ;.equ = 4 (miso stk200 interface)
63 ;.equ = 3 (mosi stk200 interface)
8e80c4c @sim- Note that pin B2 is connected to ground on these boards.
authored
64 .equ GND_PIN = 2 ; Seems to be grounded on this board
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
65 ;.equ = 1
66 .equ CnFET = 0
67
68 .equ INIT_PB = 0
8e80c4c @sim- Note that pin B2 is connected to ground on these boards.
authored
69 .equ DIR_PB = (1<<CnFET)
4357387 @sim- Collapse PWM FET driving into single on/off functions regardless of p…
authored
70
71 .equ CnFET_port = PORTB
8febc68 @sim- Add support for HobbyKing BlueSeries ESCs from Heiko Friedel.
authored
72
73 .MACRO RED_on
74 .ENDMACRO
75 .MACRO RED_off
76 .ENDMACRO
77 .MACRO GRN_on
78 .ENDMACRO
79 .MACRO GRN_off
80 .ENDMACRO
Something went wrong with that request. Please try again.