Subversion Repositories FlightCtrl

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
897 harrie 1
This branch v0.69k_J16J17 is a copy of v0.69k and has support for switchting J16 (POTI2 in Koptertool) and J17 (POTI3 in Koptertool) on the FC board:
2
 
3
 
4
DIFFERENCES:
5
 
6
main.c -> line 119:
7
DDRC changed from 0x81 (128+1) to 0x8D (128+8+4+1) to make PC2 and PC3 outputs
8
 
9
main.h -> lines 22-25:
10
defined references for J16 (=PortC2 output2) and J17 (=PortC output3):
11
#define J16_ON   PORTC |= 0x04
12
#define J16_OFF  PORTC &=~0x04
13
#define J17_ON   PORTC |= 0x08
14
#define J17_OFF  PORTC &=~0x08
15
 
16
fc.c -> line 634-637:
17
added switching behaviour based on POTI2 and POTI3
18
if POTI2 >  75, output PC2 (J16) will switch to ground = ON
19
if POTI2 <= 75, output PC2 (J16) will remain open collector = OFF
20
if POTI3 >  75, output PC3 (J17) will switch to ground = ON
21
if POTI3 <= 75, output PC3 (J17) will remain open collector = OFF
22
 
23
 
24
NOTE on J16/J17 usage:
25
- use an optocoupler to switch external devices like camera's
26
- you can drive a LED straight on J16 or J17 (cathode on J16/J17, anode on +5V), but do not exceed 100mA (otherwise 7805 stabiliser gets too hot). T1 and T2 can handle each max. 500mA but mind the 7805 on the FC
27
- if you want to drive higher currents (for external high power LED's): use an extra FET or a BD transistor (eg: BD138 PNP) via the battery supply (not the +5V from the FC)
28
 
29
 
30
Good Luck!
31
Harrie - MosaKopter