Mercurial > public > hwos_code
comparison src/ostc3.asm @ 113:f3062a611eef
Merge
author | heinrichsweikamp |
---|---|
date | Mon, 23 Jun 2014 16:14:33 +0200 |
parents | 131e6dd9e201 |
children | e2f04bb2539c |
comparison
equal
deleted
inserted
replaced
112:a24581f0b372 | 113:f3062a611eef |
---|---|
52 clrf ODCON2 ; Disable Open Drain capability | 52 clrf ODCON2 ; Disable Open Drain capability |
53 clrf ODCON3 ; Disable Open Drain capability | 53 clrf ODCON3 ; Disable Open Drain capability |
54 | 54 |
55 movlw b'11000000' ; ANSEL, AN7 and AN6 -> Analog inputs, PORTA is digital. | 55 movlw b'11000000' ; ANSEL, AN7 and AN6 -> Analog inputs, PORTA is digital. |
56 movwf ANCON0 | 56 movwf ANCON0 |
57 movlw b'00000000' ; ANSEL | 57 movlw b'00000111' ; ANSEL, AN8, AN9, AN10 -> Analog in |
58 movwf ANCON1 | 58 movwf ANCON1 |
59 movlw b'00000010' ; ANSEL, AN17 -> Analog input | 59 movlw b'00000010' ; ANSEL, AN17 -> Analog input |
60 movwf ANCON2 | 60 movwf ANCON2 |
61 | 61 |
62 banksel common | 62 banksel common |
64 movlw b'00000000' ; 1= Input -> Data TFT_high | 64 movlw b'00000000' ; 1= Input -> Data TFT_high |
65 movwf TRISA | 65 movwf TRISA |
66 movlw b'00000000' ; Init port | 66 movlw b'00000000' ; Init port |
67 movwf PORTA | 67 movwf PORTA |
68 | 68 |
69 movlw b'00001011' ; 1= Input, (RB0, RB1) -> Switches, RB2 -> Power_MCP, RB3 -> lf_data, RB4 -> LED_green, RB5 -> /TFT_POWER | 69 movlw b'00000011' ; 1= Input, (RB0, RB1) -> Switches, RB2 -> Power_MCP, RB3 -> s8_npower, RB4 -> LED_green, RB5 -> /TFT_POWER |
70 movwf TRISB | 70 movwf TRISB |
71 movlw b'00100000' ; Init port | 71 movlw b'00101000' ; Init port |
72 movwf PORTB | 72 movwf PORTB |
73 | 73 |
74 movlw b'10011010' ; 1= Input, (RC0, RC1) -> SOSC, RC2 -> TFT_LED_PWM, (RC3,RC4) -> I²C, RC5 -> MOSI_MS5541, (RC6, RC7) -> UART1 | 74 movlw b'10011010' ; 1= Input, (RC0, RC1) -> SOSC, RC2 -> TFT_LED_PWM, (RC3,RC4) -> I²C, RC5 -> MOSI_MS5541, (RC6, RC7) -> UART1 |
75 movwf TRISC | 75 movwf TRISC |
76 movlw b'00000000' ; Init port | 76 movlw b'00000000' ; Init port |
84 movlw b'00000000' ; 1= Input, RE1 -> Power_IR, RE2 -> CS_MCP, RE3 -> LED_blue, RE4 -> power_sw1, | 84 movlw b'00000000' ; 1= Input, RE1 -> Power_IR, RE2 -> CS_MCP, RE3 -> LED_blue, RE4 -> power_sw1, |
85 movwf TRISE | 85 movwf TRISE |
86 movlw b'00010000' ; Init port | 86 movlw b'00010000' ; Init port |
87 movwf PORTE | 87 movwf PORTE |
88 | 88 |
89 movlw b'00000110' ; 1= Input, (RF1, RF2) -> Analog | 89 movlw b'00111110' ; 1= Input, (RF1, RF2, RF3, RF4, RF5) -> Analog |
90 movwf TRISF | 90 movwf TRISF |
91 movlw b'00000000' ; Init port | 91 movlw b'00000000' ; Init port |
92 movwf PORTF | 92 movwf PORTF |
93 | 93 |
94 movlw b'00001111' ; 1= Input, <7:6> not implemented, RG0 -> SCLK_MCP, RG2 -> RX2, RG3 -> AN17_RSSI, RG4 -> SOSC_OUT, RG5 -> /RESET | 94 movlw b'00001110' ; 1= Input, <7:6> not implemented, RG0 -> TX3_PIEZO_CFG, RG2 -> RX2, RG3 -> AN17_RSSI, RG4 -> SOSC_OUT, RG5 -> /RESET |
95 movwf TRISG | 95 movwf TRISG |
96 movlw b'00000000' ; Init port | 96 movlw b'00000001' ; Init port |
97 movwf PORTG | 97 movwf PORTG |
98 | 98 |
99 movlw b'00000000' ; 1= Input -> Data TFT_low | 99 movlw b'00000000' ; 1= Input -> Data TFT_low |
100 movwf TRISH | 100 movwf TRISH |
101 movlw b'00000000' ; Init port | 101 movlw b'00000000' ; Init port |
102 movwf PORTH | 102 movwf PORTH |
103 | 103 |
104 movlw b'10010000' ; 1= Input, RJ4 -> vusb_in, RJ5 -> power_sw2, RJ6 -> CLK_MS5541, RJ7 -> MISO_MS5541 | 104 movlw b'10010011' ; 1= Input, RJ4 -> vusb_in, RJ5 -> power_sw2, RJ6 -> CLK_MS5541, RJ7 -> MISO_MS5541 |
105 movwf TRISJ | 105 movwf TRISJ |
106 movlw b'00100000' ; Init port | 106 movlw b'00100000' ; Init port |
107 movwf PORTJ | 107 movwf PORTJ |
108 | 108 |
109 | 109 |
161 movlw b'10010000' | 161 movlw b'10010000' |
162 movwf RCSTA1 | 162 movwf RCSTA1 |
163 | 163 |
164 ;init serial port2 (TRISG2) | 164 ;init serial port2 (TRISG2) |
165 banksel BAUDCON2 | 165 banksel BAUDCON2 |
166 movlw b'00100000' ; BRG16=0 | 166 movlw b'00100000' ; BRG16=0 ; inverted for IR |
167 movwf BAUDCON2 | 167 movwf BAUDCON2 |
168 movlw b'00100000' ; BRGH=0, SYNC=0 | 168 movlw b'00100000' ; BRGH=0, SYNC=0 |
169 movwf TXSTA2 | 169 movwf TXSTA2 |
170 movlw .102 ; SPBRGH:SPBRG = .102 : 2403 BAUD @ 16MHz | 170 movlw .102 ; SPBRGH:SPBRG = .102 : 2403 BAUD @ 16MHz |
171 movwf SPBRG2 | 171 movwf SPBRG2 |