Commit b26bc1c4 authored by Jan Wagemakers's avatar Jan Wagemakers

Pressure PIC side

parent 1360f7de
......@@ -128,20 +128,26 @@ WAITms MACRO TIME
;
btCounter
;
YY
YY1
YY ; Year - 2000
YY1
;
MM
MM ; Month
MM1
;
DD
DD ; day
DD1
;
hh
hh ; hours
hh1
;
mm
mm ; minutes
mm1
;
P1 ; pressure
P2
P3
P4
;
btIN ; 0 : S S P O O Y M D h m
btIN1 ; 1 : P P V P T Y M D h m
btIN2 ; 2 : = ? ? ? = = = = = =
......@@ -536,13 +542,38 @@ equal:
iorwf L_SOLL ; add fraction to L_SOLL
skipSP:
bra sendSP
IsItOA:
movlw "A"
cpfseq btIN1
bra equal3
; -----------------------------------------------------------------
; Command OA= ; yes, I do write spaghetti code ;-)
; -----------------------------------------------------------------
movf btIN3, w
movwf P1
call tx
WAITms D'250'
movf btIN4, w
movwf P2
call tx
WAITms D'250'
movf btIN5, w
movwf P3
call tx
WAITms D'250'
movf btIN6, w
movwf P4
call tx
WAITms D'250'
call updateHPA
bra sendRETURN
equal2:
movlw "O"
cpfseq btIN
bra equal3
movlw "T"
cpfseq btIN1
bra equal3
bra IsItOA
; -----------------------------------------------------------------
; Command OT=
; -----------------------------------------------------------------
......@@ -560,11 +591,7 @@ OT:
movlw H'94' ; goto line 3 of LCD
call SendINS
PRINT spc20 ; clear line 3
movlw H'94' ; goto line 3 of LCD
call SendINS
movlw D'5' ; flag symbol
call SendCHAR
call updateHPA
bra OTLOOP
OTEND:
call printCelsius
......@@ -712,6 +739,22 @@ tx: ; send X to serial port and display
call SendCHAR
return
updateHPA:
movlw H'94' ; goto line 3 of LCD
call SendINS
movlw D'5' ; flag symbol
call SendCHAR
movf P1, w
call SendCHAR
movf P2, w
call SendCHAR
movf P3, w
call SendCHAR
movf P4, w
call SendCHAR
PRINT hPa
return
updateDateTime:
movf btIN3, w
movwf POSTINC0
......@@ -1178,13 +1221,13 @@ DSRXLP:
; ---------------------------------------------------------------------------
; Strings used in the program
; ---------------------------------------------------------------------------
jan db " - Jan Wagemakers - ",0
aan db "___",0
uit db "_/_",0
spc20 db " ",0
auto db "AUTO ", 0
man db " MAN ", 0
jan db " - Jan Wagemakers - ",0
aan db "___",0
uit db "_/_",0
spc20 db " ",0
auto db "AUTO ", 0
man db " MAN ", 0
hPa db "hPa ",0
; ---------------------------------------------------------------------------
; END
; ---------------------------------------------------------------------------
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment