comparison src/ostc3.asm @ 204:93085f540746

minor
author heinrichsweikamp
date Sun, 23 Nov 2014 22:33:41 +0100
parents dcd513840c6c
children 56276a2418f9
comparison
equal deleted inserted replaced
203:dd9b167e82dc 204:93085f540746
154 154
155 155
156 ;init serial port1 (TRISC6/7) 156 ;init serial port1 (TRISC6/7)
157 movlw b'00001000' ; BRG16=1 157 movlw b'00001000' ; BRG16=1
158 movwf BAUDCON1 158 movwf BAUDCON1
159 movlw b'00100100' ; BRGH=1, SYNC=0 159 ; movlw b'00100100' ; BRGH=1, SYNC=0
160 movwf TXSTA1 160 ; movwf TXSTA1
161 movlw .34 ; SPBRGH:SPBRG = .34 : 114285 BAUD @ 16MHz (+0,79% Error to 115200 BAUD) 161 movlw .34 ; SPBRGH:SPBRG = .34 : 114285 BAUD @ 16MHz (+0,79% Error to 115200 BAUD)
162 movwf SPBRG1 ; SPBRGH:SPBRG = .207 : 19230 BAUD @ 16MHz (-0,16% Error to 19200 BAUD) 162 movwf SPBRG1 ; SPBRGH:SPBRG = .207 : 19230 BAUD @ 16MHz (-0,16% Error to 19200 BAUD)
163 clrf SPBRGH1 ; 163 clrf SPBRGH1 ;
164 movlw b'10010000' 164 ; movlw b'10010000'
165 movwf RCSTA1 165 ; movwf RCSTA1
166
167 clrf RCSTA1
168 clrf TXSTA1 ; UART disable
169 bcf PORTC,6 ; TX hard to GND
166 170
167 ;init serial port2 (TRISG2) 171 ;init serial port2 (TRISG2)
168 banksel BAUDCON2 172 banksel BAUDCON2
169 movlw b'00100000' ; BRG16=0 ; inverted for IR 173 movlw b'00100000' ; BRG16=0 ; inverted for IR
170 movwf BAUDCON2 174 movwf BAUDCON2
257 bra $-4 261 bra $-4
258 bsf power_sw2 262 bsf power_sw2
259 btfss power_sw2 263 btfss power_sw2
260 bra $-4 264 bra $-4
261 265
266 movlw d'2'
267 movwf speed_setting ; Normal
268
269
262 return 270 return
263 271
264 ;============================================================================= 272 ;=============================================================================
265 global speed_eco 273 global speed_eco
266 speed_eco: 274 speed_eco: