comparison code_part1/OSTC_code_asm_part1/eeprom_rs232.asm @ 283:4ec488f046f4

Battery sign color coded, work on new uart-started 115200Baud bootloader (Do NOT use yet!)
author heinrichsweikamp
date Tue, 19 Apr 2011 19:31:16 +0200
parents c97c5514b165
children 908d0013727e
comparison
equal deleted inserted replaced
282:aa4b62840c69 283:4ec488f046f4
196 ; timeout occoured (about 20ms) 196 ; timeout occoured (about 20ms)
197 bcf RCSTA,CREN ; Clear receiver status 197 bcf RCSTA,CREN ; Clear receiver status
198 bsf RCSTA,CREN 198 bsf RCSTA,CREN
199 bsf rs232_recieve_overflow ; set flag 199 bsf rs232_recieve_overflow ; set flag
200 return ; and return anyway 200 return ; and return anyway
201
202 uart_115k_bootloader:
203 bcf PIE1,RCIE ; disable interrupt for RS232
204 bcf RCSTA,CREN ; Clear receiver status
205 bsf RCSTA,CREN
206 bcf PIR1,RCIF ; clear flag
207 call PLED_ClearScreen ; Clear screen
208 movlw color_red
209 call PLED_set_color ; Set to Red
210 DISPLAYTEXTH d'302' ; Bootloader
211 WAITMS d'250'
212 WAITMS d'250'
213 WAITMS d'50'
214 btfss PIR1,RCIF ; New byte in UART?
215 bra uart_115k_bootloader2 ; No, Abort
216 movlw 0xC1
217 cpfseq RCREG ; 115200Baud Bootloader request?
218 bra uart_115k_bootloader2 ; No, Abort
219 DISPLAYTEXTH d'303' ; Yes, "Please wait!"
220 clrf INTCON ; Interrupts disabled
221 bcf PIR1,RCIF ; clear flag
222 goto 0x17F56 ; Enter straight into bootloader. Good luck!
223 uart_115k_bootloader2:
224 DISPLAYTEXTH d'304' ; Aborted!
225 WAITMS d'250'
226 WAITMS d'250'
227 WAITMS d'250'
228 WAITMS d'250'
229 WAITMS d'250'
230 WAITMS d'250'
231 WAITMS d'250'
232 WAITMS d'250'
233 goto restart
234
235