0
|
1 ;=============================================================================
|
|
2 ;
|
|
3 ; File ports.inc
|
|
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
|
|
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 mcp_lf_data PORTB,3 ; RX in
|
|
22 #DEFINE LEDg PORTB,4 ; LED green
|
|
23 #DEFINE tft_power PORTB,5 ; via P-MOSFET (Inverted)
|
|
24 #DEFINE icsp_clk PORTB,6 ; ICSP
|
|
25 #DEFINE icsp_dat PORTB,7 ; ICSP
|
|
26 ; TRIS=b'00001011'
|
|
27
|
|
28 ; PORTC
|
|
29 #DEFINE SOSC_RC0 PORTC,0 ; SOSC
|
|
30 #DEFINE SOSC_RC1 PORTC,1 ; SOSC
|
|
31 #DEFINE TFT_PWM PORTC,2 ; TFT Backlight
|
|
32 #DEFINE I2C_RC3 PORTC,3 ; I²C
|
|
33 #DEFINE I2C_RC4 PORTC,4 ; I²C
|
|
34 #DEFINE MS5541_mosi PORTC,5 ; MS5541
|
|
35 #DEFINE uart1_RC6 PORTC,6 ; UART1 (USB)
|
|
36 #DEFINE uart1_RC7 PORTC,7 ; UART1 (USB)
|
|
37 ; TRIS=b'10011010'
|
|
38
|
|
39 ; PORTD
|
|
40 #DEFINE tft_cs PORTD,0 ; /CS
|
|
41 #DEFINE tft_rs PORTD,1 ; RS
|
|
42 #DEFINE tft_nwr PORTD,2 ; /WR
|
|
43 #DEFINE tft_rd PORTD,3 ; RD
|
|
44 #DEFINE flash_mosi PORTD,4 ; MOSI
|
|
45 #DEFINE flash_miso PORTD,5 ; MISO
|
|
46 #DEFINE flash_clk PORTD,6 ; CLK
|
|
47 #DEFINE tft_nreset PORTD,7 ; /RESET
|
|
48 ; TRIS=b'00100000'
|
|
49
|
|
50 ; PORTE
|
|
51 #DEFINE RE0_unused PORTE,0 ; unused
|
|
52 #DEFINE ir_power PORTE,1 ; Power supply for IR
|
|
53 #DEFINE mcp_ncs PORTE,2 ; RX /CS
|
|
54 #DEFINE LEDr PORTE,3 ; LED red
|
|
55 #DEFINE power_sw2 PORTE,4 ; Power supply for switch1 circuit
|
|
56 #DEFINE RE5_unused PORTE,5 ; unused
|
|
57 #DEFINE lightsen_power PORTE,6 ; Power supply for lightsensor
|
|
58 #DEFINE flash_ncs PORTE,7 ; /CS
|
|
59 ; TRIS=b'00000000'
|
|
60
|
|
61 ; PORTF
|
|
62 ; RF1 (AN6, Batt_analog) and RF2 (AN7, Lightsensor)
|
|
63 ; TRIS=b'11000000'
|
|
64
|
|
65 ; PORTG
|
|
66 #DEFINE mcp_clk PORTG,0 ; RX clk
|
|
67 #DEFINE RG1_blocked_by_RS232_2 PORTG,1 ; unused
|
|
68 #DEFINE tsop_rx PORTG,2 ; IR (RX2)
|
|
69 ; RG3 (AN17, RSSI RX)
|
|
70 ; RG4 (32768Hz Clock out)
|
|
71 #DEFINE RG5_unused PORTG,5 ; /MCLR
|
|
72 #DEFINE RG6_unused PORTG,6 ; unavailable
|
|
73 #DEFINE RG7_unused PORTG,7 ; unavailable
|
|
74 ; TRIS=b'10001111'
|
|
75
|
|
76 ; PORTJ
|
|
77 #DEFINE RJ0_unused PORTJ,0 ; unused
|
|
78 #DEFINE RJ1_unused PORTJ,1 ; unused
|
|
79 #DEFINE RJ2_unused PORTJ,2 ; unused
|
|
80 #DEFINE RJ3_unused PORTJ,3 ; unused
|
|
81 #DEFINE vusb_in PORTJ,4 ; external power supply detect, USB enumerated
|
|
82 #DEFINE power_sw1 PORTJ,5 ; Power supply for switch2 circuit
|
|
83 #DEFINE MS5541_clk PORTJ,6 ; MS5541 mH
|
|
84 #DEFINE MS5541_miso PORTJ,7 ; MS5541 mH
|
|
85 ; TRIS=b'10010000'
|
|
86
|