comparison code_part1/OSTC_code_asm_part1/ms5535.asm @ 4:2b5c52ae3923

1.52 beta rc
author heinrichsweikamp
date Sun, 14 Feb 2010 20:09:25 +0100
parents 96a35aeda5f2
children 31fa973a70fd
comparison
equal deleted inserted replaced
3:3cf8af30b36e 4:2b5c52ae3923
276 movff dMSB,D2+1 276 movff dMSB,D2+1
277 movff dLSB,D2+0 277 movff dLSB,D2+0
278 return 278 return
279 279
280 get_calibration_data: 280 get_calibration_data:
281 ; read addional temperature correction from internal EEPROM 0x100 281 ; ; read addional temperature correction from internal EEPROM 0x100
282 bsf no_sensor_int ; No sensor interupt! 282 ; bsf no_sensor_int ; No sensor interupt!
283 clrf temperature_correction ; clear compensation value 283 ; clrf temperature_correction ; clear compensation value
284 movlw LOW 0x100 284 ; movlw LOW 0x100
285 movwf EEADR 285 ; movwf EEADR
286 movlw HIGH 0x100 286 ; movlw HIGH 0x100
287 movwf EEADRH 287 ; movwf EEADRH
288 call read_eeprom 288 ; call read_eeprom
289 clrf EEADRH ; Only 256Bytes used in normal program 289 ; clrf EEADRH ; Only 256Bytes used in normal program
290 movlw d'200' ; limit value 290 ; movlw d'200' ; limit value
291 cpfsgt EEDATA ; EEDATA>200? 291 ; cpfsgt EEDATA ; EEDATA>200?
292 movff EEDATA, temperature_correction ; No, Store for compensation 292 ; movff EEDATA, temperature_correction ; No, Store for compensation
293 293 ;
294 rcall reset_MS5535A 294 rcall reset_MS5535A
295 movlw d'13' 295 movlw d'13'
296 movwf clock_count 296 movwf clock_count
297 movlw b'01010100' ;+3*high as start and 1+low as stop! 297 movlw b'01010100' ;+3*high as start and 1+low as stop!
298 movwf isr1_temp 298 movwf isr1_temp