comparison src/calibrate.asm @ 352:5c6da9fa5cb0

add setpoint change to first sample in CCR mode
author heinrichsweikamp
date Tue, 28 Jul 2015 13:23:09 +0200
parents 653a3ab08062
children aadfe9f2edaf
comparison
equal deleted inserted replaced
351:de8c45fb2ab9 352:5c6da9fa5cb0
397 movff xC+0,o2_mv_sensor3+0 ; in 100uV steps 397 movff xC+0,o2_mv_sensor3+0 ; in 100uV steps
398 398
399 bcf new_s8_data_available ; Clear flag 399 bcf new_s8_data_available ; Clear flag
400 return ; Done. 400 return ; Done.
401 401
402 global transmit_setpoint ; Transmit current setpoint from WREG (in cbar) to external electronics
403 transmit_setpoint:
404 btfss s8_digital ; S8 Digital?
405 return ; No, ignore
406
407 ; Yes, transmit setpoint from WREG
408 movwf temp2 ; Store setpoint
409 clrf temp1 ; Chksum
410 movlw 0xAA ; Start Byte
411 addwf temp1,F
412 movff WREG,TXREG2
413 call rs232_wait_tx2
414
415 movlw 0x60 ; New SP
416 addwf temp1,F
417 movff WREG,TXREG2
418 call rs232_wait_tx2
419
420 movff temp2,WREG ; SP in cbar
421 addwf temp1,F
422 movff WREG,TXREG2
423 call rs232_wait_tx2
424
425 movff temp1,TXREG2 ; Chksum
426 call rs232_wait_tx2
427 return
402 428
403 429
404 END 430 END