0
|
1 ;=============================================================================
|
|
2 ;
|
623
|
3 ; File ports.inc combined next generation V3.0.4b
|
0
|
4 ;
|
|
5 ; Portmap
|
|
6 ;
|
|
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
|
|
8 ;=============================================================================
|
|
9 ; HISTORY
|
|
10 ; 2012-08-13 : [mH] Creation
|
|
11
|
|
12 ;----------------------------- PORTS ---------------------------------
|
|
13
|
|
14 ; PORTA: TFT_HIGH
|
|
15 ; TRIS=b'00000000'
|
|
16
|
|
17 ; PORTB
|
604
|
18 #DEFINE switch_left1 PORTB,1 ; switch
|
|
19 #DEFINE switch_right2 PORTB,0 ; switch
|
|
20 #DEFINE mcp_power PORTB,2 ; RX power supply
|
|
21 #DEFINE s8_npower PORTB,3 ; power supply for S8 bulkhead (inverted)
|
|
22 #DEFINE LEDg PORTB,4 ; LED green / active_reset_ostc_rx (<- do no longer use this LED unless for debugging)
|
|
23 #DEFINE active_reset_ostc_rx PORTB,4 ; set to 1 to hold RX circuity in reset
|
|
24 #DEFINE tft_power PORTB,5 ; via P-MOSFET (inverted)
|
|
25 #DEFINE icsp_clk PORTB,6 ; ICSP
|
|
26 #DEFINE icsp_dat PORTB,7 ; ICSP
|
0
|
27 ; TRIS=b'00001011'
|
|
28
|
|
29 ; PORTC
|
604
|
30 #DEFINE SOSC_RC0 PORTC,0 ; SOSC
|
|
31 #DEFINE SOSC_RC1 PORTC,1 ; SOSC
|
|
32 #DEFINE TFT_PWM PORTC,2 ; TFT backlight
|
|
33 #DEFINE I2C_RC3 PORTC,3 ; I²C
|
|
34 #DEFINE I2C_RC4 PORTC,4 ; I²C
|
|
35 #DEFINE MS5541_mosi PORTC,5 ; MS5541
|
|
36 #DEFINE uart1_RC6 PORTC,6 ; UART1 (USB/BLE)
|
|
37 #DEFINE uart1_RC7 PORTC,7 ; UART1 (USB/BLE)
|
0
|
38 ; TRIS=b'10011010'
|
|
39
|
|
40 ; PORTD
|
604
|
41 #DEFINE tft_cs PORTD,0 ; /CS
|
|
42 #DEFINE tft_rs PORTD,1 ; RS
|
|
43 #DEFINE tft_nwr PORTD,2 ; /WR
|
|
44 #DEFINE tft_rd PORTD,3 ; RD
|
|
45 #DEFINE flash_mosi PORTD,4 ; MOSI
|
|
46 #DEFINE flash_miso PORTD,5 ; MISO
|
|
47 #DEFINE flash_clk PORTD,6 ; CLK
|
|
48 #DEFINE tft_nreset PORTD,7 ; /RESET
|
0
|
49 ; TRIS=b'00100000'
|
|
50
|
|
51 ; PORTE
|
604
|
52 #DEFINE RE0_unused PORTE,0 ; unused
|
|
53 #DEFINE ir_power PORTE,1 ; power supply for IR
|
623
|
54 #DEFINE charge_disable PORTE,2 ; ex. mcp_ncs (RX /CS) (available from hardware rev x.x only)
|
604
|
55 #DEFINE LEDr PORTE,3 ; LED red
|
|
56 #DEFINE power_sw2 PORTE,4 ; power supply for switch1 circuit
|
|
57 #DEFINE RE5_unused PORTE,5 ; unused
|
|
58 #DEFINE lightsen_power PORTE,6 ; power supply for lightsensor
|
|
59 #DEFINE flash_ncs PORTE,7 ; /CS
|
0
|
60 ; TRIS=b'00000000'
|
623
|
61 #DEFINE charge_enable TRISE,2 ; tristating of charge_disable pin
|
0
|
62
|
|
63 ; PORTF
|
623
|
64 ; PORTF,1 ; (AN6, Batt_analog)
|
|
65 ; PORTF,2 ; (AN7, Lightsensor)
|
209
|
66 ; TRIS=b'01111110'
|
604
|
67 #DEFINE NRTS PORTF,6 ; I
|
|
68 #DEFINE NCTS PORTF,7 ; 0
|
0
|
69
|
604
|
70 ; PORTG
|
|
71 #DEFINE TX3_PIEZO_CFG PORTG,0
|
|
72 #DEFINE RG1_blocked_by_RS232_2 PORTG,1 ; unused
|
|
73 #DEFINE tsop_rx PORTG,2 ; IR (RX2)
|
623
|
74 ; PORTG,3 ; (AN17, RSSI RX)
|
|
75 ; PORTG,4 ; (32768Hz Clock out)
|
604
|
76 #DEFINE RG5_unused PORTG,5 ; /MCLR
|
|
77 #DEFINE RG6_unused PORTG,6 ; unavailable
|
|
78 #DEFINE RG7_unused PORTG,7 ; unavailable
|
0
|
79 ; TRIS=b'10001111'
|
|
80
|
|
81 ; PORTJ
|
604
|
82 #DEFINE RJ0_unused PORTJ,0 ; unused
|
|
83 #DEFINE RJ1_unused PORTJ,1 ; unused
|
|
84 #DEFINE CHRG_OUT PORTJ,2 ; CHRG_OUT
|
|
85 #DEFINE CHRG_IN PORTJ,3 ; CHRG_IN
|
|
86 #DEFINE vusb_in PORTJ,4 ; external power supply detect, USB enumerated
|
|
87 #DEFINE power_sw1 PORTJ,5 ; power supply for switch2 circuit
|
|
88 #DEFINE MS5541_clk PORTJ,6 ; MS5541
|
|
89 #DEFINE MS5541_miso PORTJ,7 ; MS5541
|
0
|
90 ; TRIS=b'10010000'
|
|
91
|