Commit 6b5a1548 authored by Jan Wagemakers's avatar Jan Wagemakers

OT=OutsideTemp

parent e019bf5a
......@@ -127,15 +127,16 @@ WAITms MACRO TIME
;
btCounter
;
btIN ; 0 : S S P O
btIN1 ; 1 : P P V P
btIN2 ; 2 : = ? ? ?
btIN3 ; 3 : 2
btIN4 ; 4 : 0
btIN5 ; 5 : .
btIN6 ; 6 : 7
btIN7 ;
btIN ; 0 : S S P O O
btIN1 ; 1 : P P V P T
btIN2 ; 2 : = ? ? ? =
btIN3 ; 3 : 2 -
btIN4 ; 4 : 0 1
btIN5 ; 5 : . 0
btIN6 ; 6 : 7 .
btIN7 ; 0
btIN8 ;
btIN9 ;
endc
; ---------------------------------------------------------------------------
......@@ -329,9 +330,9 @@ read:
movff RCREG, INDF0 ; --> buffer
call clearUART
movlw D'8' ; W = 8
movlw D'9' ; W = 9
cpfslt btCounter
bra again ; if W => 8 then avoid buffer overflow
bra again ; if W => 9 then avoid buffer overflow
; (ignore received chars)
incf btCounter ; btCounter++
......@@ -346,10 +347,6 @@ read:
call printManAuto
; movlw H'94'
; call SendINS ; goto line 3 off LCD
;PRINT prompt
; show the given command on the display
lfsr 0, btIN
dsploop:
......@@ -364,11 +361,6 @@ disp:
dispDone:
movlw " "
call SendCHAR
; movlw H'D4'
; call SendINS ; goto line 4 off LCD
; PRINT spc20 ; clear line 4
; movlw H'D4'
; call SendINS ; goto line 4 off LCD
movlw "?"
cpfseq btIN2
......@@ -504,10 +496,37 @@ equal:
; w = .X * 16 / 10 | digit converted to fraction
iorwf L_SOLL ; add fraction to L_SOLL
skipSP:
bra sendSP
equal2:
movlw "O"
cpfseq btIN
bra equal3
movlw "T"
cpfseq btIN1
bra equal3
; -----------------------------------------------------------------
; Command OT=
; -----------------------------------------------------------------
movlw H'94' ; goto line 3 of LCD
call SendINS
clrw
call SendCHAR ; thermometer symbol
lfsr 0, btIN3
L3:
movlw D'13'
cpfseq INDF0 ; ENTER?
bra L3NEXT
call printCelsius
goto again
L3NEXT:
WAITms D'250'
movf POSTINC0, w
movwf TXREG ; Send OT back to BlueTooth
call SendCHAR ; Send OT to display
bra L3
equal3:
; -----------------------------------------------------------------
; add check's for other commands below
; -----------------------------------------------------------------
......@@ -709,6 +728,7 @@ printTemp
call SendCHAR ; PRINT .
movf ASCII_FRACTION, w
call SendCHAR
printCelsius
movlw D'1' ; PRINT °C
call SendCHAR
movlw " " ; print " "
......@@ -748,28 +768,8 @@ convTemp
mullw D'16' ; PRODH = (fraction * 10 + 8)/16
movf PRODH, w ; w = (fraction * 10 + 8)/16
; ;==============================================================;
; ; Calculate .X ;
; ; ------------ ;
; ; See DS18B20.gnumeric ;
; ;==============================================================;
; clrw ; XX.0
; btfsc fraction, 3 ; If bit 3 = 1 then
; ADDLW D'5' ; W = W + 5
; btfsc fraction, 2 ; If bit 2 = 1 then
; ADDLW D'3' ; W = W + 3
; btfsc fraction, 1 ; If bit 1 = 1 then
; ADDLW D'1' ; W = W + 1
; btfss fraction, 0 ; If bit 0 = 1
; bra ready ; and bit 2 <> 1 then
; btfss fraction, 2 ; W = W + 1
; ADDLW D'1'
;ready:
;
addlw '0'
movwf ASCII_FRACTION
;
return
; ---------------------------------------------------------------------------
......
:020000040000FA
:10000000600ED36E806A816A110EC26E6F0EC16E71
:10001000BE0EC06E200E926E130E936E100EC4ECC8
:10001000BE0EC06E200E926E130E936E100EE1ECAB
:1000200002F0010E0E6E4B0E0F6E5A0E156E010E83
:10003000166E176E186EB7EC02F02DEC02F0400E43
:1000400070EC02F0040E66EC02F00A0E66EC02F0B0
:100050000A0E66EC02F00A0E66EC02F0110E66EC77
:1000600002F01F0E66EC02F00E0E66EC02F0000EBF
:1000700066EC02F0180E66EC02F0180E66EC02F068
:10008000030E66EC02F0040E66EC02F0040E66EC61
:1000900002F0040E66EC02F0030E66EC02F0000EB5
:1000A00066EC02F0080E66EC02F0100E66EC02F050
:1000B000080E66EC02F0130E66EC02F0030E66EC1E
:1000C00002F0020E66EC02F0020E66EC02F0000E88
:1000D00066EC02F0000E66EC02F0000E66EC02F038
:1000E0000A0E66EC02F0150E66EC02F0110E66ECDC
:1000F00002F00A0E66EC02F0040E66EC02F0000E4E
:1001000066EC02F0000E66EC02F0000E66EC02F007
:100110000A0E66EC02F01F0E66EC02F01F0E66EC93
:1001200002F00E0E66EC02F0040E66EC02F0000E19
:1001300066EC02F0800E70EC02F0000EF86E060E17
:10014000F76E300EF66E09005EEC02F0190EAF6E1F
:10003000166E176E186ED4EC02F04AEC02F0400E09
:100040008DEC02F0040E83EC02F00A0E83EC02F059
:100050000A0E83EC02F00A0E83EC02F0110E83EC20
:1000600002F01F0E83EC02F00E0E83EC02F0000E85
:1000700083EC02F0180E83EC02F0180E83EC02F011
:10008000030E83EC02F0040E83EC02F0040E83EC0A
:1000900002F0040E83EC02F0030E83EC02F0000E7B
:1000A00083EC02F0080E83EC02F0100E83EC02F0F9
:1000B000080E83EC02F0130E83EC02F0030E83ECC7
:1000C00002F0020E83EC02F0020E83EC02F0000E4E
:1000D00083EC02F0000E83EC02F0000E83EC02F0E1
:1000E0000A0E83EC02F0150E83EC02F0110E83EC85
:1000F00002F00A0E83EC02F0040E83EC02F0000E14
:1001000083EC02F0000E83EC02F0000E83EC02F0B0
:100110000A0E83EC02F01F0E83EC02F01F0E83EC3C
:1001200002F00E0E83EC02F0040E83EC02F0000EDF
:1001300083EC02F0800E8DEC02F0000EF86E060EDD
:10014000F76E6A0EF66E09007BEC02F0190EAF6EC8
:10015000B06AAA96AC94AC98AB8EAB88AC8A196A9C
:1001600000EE1AF053EC01F09EAAFCD7AECFEFFFE1
:100170004FEC01F0080E1960F2D7192A0D0EEE624D
:10018000F1D7D40E70EC02F0000EF86E060EF76E8A
:100190004E0EF66E09005EEC02F0E2EC01F000EEAD
:1001A0001AF00D0EEF6201D004D0EE5066EC02F0B2
:1001B000F8D7200E66EC02F03F0E1C623FD0500EC6
:1001600000EE1AF070EC01F09EAAFCD7AECFEFFFC4
:100170006CEC01F0090E1960F2D7192A0D0EEE622F
:10018000F1D7D40E8DEC02F0000EF86E060EF76E6D
:10019000880EF66E09007BEC02F0FFEC01F000EE39
:1001A0001AF00D0EEF6201D004D0EE5083EC02F095
:1001B000F8D7200E83EC02F03F0E1C623FD0500EA9
:1001C0001A6223D0560E1B6220D010C00CF011C052
:1001D0000DF010EC02F01250AD6E66EC02F0FA0E6B
:1001E000C4EC02F01350AD6E66EC02F0FA0EC4ECF3
:1001F00002F02E0EAD6E66EC02F0FA0EC4EC02F0C8
:100200001450AD6E66EC02F040D0530E1A6208D066
:1001D0000DF02DEC02F01250AD6E83EC02F0FA0E31
:1001E000E1EC02F01350AD6E83EC02F0FA0EE1EC9C
:1001F00002F02E0EAD6E83EC02F0FA0EE1EC02F08E
:100200001450AD6E83EC02F05DD0530E1A6208D02C
:10021000500E1B6205D00EC00CF00FC00DF0D9D7E8
:100220004F0E1A620AD0500E1B6207D0300E80BEED
:10023000310EAD6E66EC02F028D023D03D0E1C626C
:1002400020D0530E1A621DD0500E1B621AD02E0EF3
:10023000310EAD6E83EC02F045D040D03D0E1C6215
:100240003DD0530E1A621DD0500E1B621AD02E0ED6
:100250001F6217D080BA14D0300E1D5C0A0D300E0C
:100260001E5CF324100DF4CF0EF0F3CF0FF0300E20
:10027000205C100DF350CD0DF450200DF4500F12F2
:10028000CAD73F0EAD6E66EC02F0FA0EC4EC02F077
:100290000D0EAD6EFA0EC4EC02F0AFEF00F0ABB293
:1002A000AB98AB881200C2B20AD0D890C432C33225
:1002B00080AA04D0C4CF0EF0C3CF0FF0C282172E95
:1002C0001200D30E70EC02F01850010B02E1030E85
:1002D00001D0040E66EC02F0182E12000400C00ECD
:1002E00070EC02F0E86A66EC02F010C00CF011C08D
:1002F0000DF0FBEC01F0020E66EC02F00EC00CF00B
:100300000FC00DF0FBEC01F080BE0AD0000EF86EBD
:10031000060EF76E4A0EF66E09005EEC02F009D08A
:10032000000EF86E060EF76E460EF66E09005EECD5
:1003300002F00E50106401D00FD0106001D004D034
:100340000F50116401D008D0162A155016640ED033
:1003500015C016F0808E06D0D8801606D8B00AD008
:10036000166A809E200E66EC02F007D02B0E66EC1B
:1003700002F003D02D0E66EC02F0E2EC01F0D3ECBB
:1003800002F009A0FCD7CC0EE7EC02F0440EE7EC3B
:1003900002F09F0E086ECDEC02F0D3EC02F009A043
:1003A000EED7CC0EE7EC02F0BE0EE7EC02F0FDEC6F
:1003B00002F00AC006F0FDEC02F00AC010F006C020
:1003C00011F01200D40E70EC02F080BA0AD0000EC8
:1003D000F86E060EF76E640EF66E09005EEC02F023
:1003E00009D0000EF86E060EF76E6A0EF66E090062
:1003F0005EEC02F0120010EC02F0125066EC02F01B
:10040000135066EC02F02E0E66EC02F0145066EC0F
:1004100002F0010E66EC02F0200E66EC02F0120013
:100420000CC00AF00DC006F0076AD89006320732F9
:10043000063207320632073206320732073A0A38E6
:100440000610ABEC02F007500A0D080EF326F3502D
:10045000100DF450300F146E1200280EC4EC02F090
:100460008098030E7AEC02F0050EC4EC02F0808C4A
:10047000809C1F0E086ECDEC02F0808C809C1F0EBD
:10048000086ECDEC02F08098020E7AEC02F01F0E9E
:10049000086ECDEC02F0280E70EC02F0100E70EC3D
:1004A00002F0060E70EC02F00C0E70EC02F0010E81
:1004B00070EC02F0050EC4EC02F01200F550D8B456
:1004C000120066EC02F00900F9D7300F016E013816
:1004D00080887AEC02F0015080887AEC02F01200F9
:1004E000016E013880987AEC02F0015080987AEC25
:1004F00002F01200026E809680948092809002B684
:10050000808602B4808402B2808202B08080808CB7
:10051000809C1F0E086ECDEC02F01200036A0438B6
:1005200004240F0BD8B2160FD8B2060F060FD8A2AC
:10053000FA0F04B81B0FD8A2FA0F04BA300F04BC8C
:10054000600F04BE200F600F033603A0A00F056EDE
:1005500004BE032A1200046E8EEC02F005380F0B65
:10056000300F126E05500F0B300F136E1200FA0E83
:10057000C4EC02F0FA0EC4EC02F0FA0EC4EC02F085
:10058000FA0EC4EC02F01200006EC70E086ECDEC3D
:1005900002F0002EC5EF02F0120000000000082E4D
:1005A000CDEF02F0000C938A096A819A939A630E48
:1005B000086ECDEC02F0938A0D0E086ECDEC02F0C1
:1005C00081AA092A550E086ECDEC02F0000C0A6EC5
:1005D000080E0B6E819A939A0000000000000A3208
:1005E000D8B0938A0B0E086ECDEC02F0938A00000F
:1005F00000000B2EEAEF02F0000C080E0B6E819A41
:10060000939A000000000000000000000000938AA0
:1006100000000000000000008150200BFF0F0A3294
:10062000090E086ECDEC02F00B2EFFEF02F0000C6D
:10063000202D204A616E20576167656D616B657280
:1006400073202D2000005F5F5F005F2F5F00202080
:10065000202020202020202020202020202020209A
:10066000202000004155544F2000204D414E2000D5
:10028000CAD74F0E1A621AD0540E1B6217D0940EA2
:100290008DEC02F0E86A83EC02F000EE1DF00D0E2A
:1002A000EF6204D026EC02F0AFEF00F0FA0EE1ECC2
:1002B00002F0EE50AD6E83EC02F0F1D73F0EAD6E62
:1002C00083EC02F0FA0EE1EC02F00D0EAD6EFA0EC8
:1002D000E1EC02F0AFEF00F0ABB2AB98AB881200EC
:1002E000C2B20AD0D890C432C33280AA04D0C4CFDC
:1002F0000EF0C3CF0FF0C282172E1200D30E8DEC7A
:1003000002F01850010B02E1030E01D0040E83EC41
:1003100002F0182E12000400C00E8DEC02F0E86A04
:1003200083EC02F010C00CF011C00DF018EC02F0DC
:10033000020E83EC02F00EC00CF00FC00DF018ECB2
:1003400002F080BE0AD0000EF86E060EF76E840E24
:10035000F66E09007BEC02F009D0000EF86E060E76
:10036000F76E800EF66E09007BEC02F00E50106402
:1003700001D00FD0106001D004D00F50116401D013
:1003800008D0162A155016640ED015C016F0808EAF
:1003900006D0D8801606D8B00AD0166A809E200EE5
:1003A00083EC02F007D02B0E83EC02F003D02D0E6D
:1003B00083EC02F0FFEC01F0F0EC02F009A0FCD7B6
:1003C000CC0E04EC03F0440E04EC03F09F0E086E18
:1003D000EAEC02F0F0EC02F009A0EED7CC0E04EC4F
:1003E00003F0BE0E04EC03F01AEC03F00AC006F0B2
:1003F0001AEC03F00AC010F006C011F01200D40E7F
:100400008DEC02F080BA0AD0000EF86E060EF76E80
:100410009E0EF66E09007BEC02F009D0000EF86E1D
:10042000060EF76EA40EF66E09007BEC02F01200C9
:100430002DEC02F0125083EC02F0135083EC02F02A
:100440002E0E83EC02F0145083EC02F0010E83ECCC
:1004500002F0200E83EC02F012000CC00AF00DC076
:1004600006F0076AD89006320732063207320632A3
:10047000073206320732073A0A380610C8EC02F093
:1004800007500A0D080EF326F350100DF450300FEC
:10049000146E1200280EE1EC02F08098030E97EC27
:1004A00002F0050EE1EC02F0808C809C1F0E086EBD
:1004B000EAEC02F0808C809C1F0E086EEAEC02F0E1
:1004C0008098020E97EC02F01F0E086EEAEC02F024
:1004D000280E8DEC02F0100E8DEC02F0060E8DEC65
:1004E00002F00C0E8DEC02F0010E8DEC02F0050E08
:1004F000E1EC02F01200F550D8B4120083EC02F0E7
:100500000900F9D7300F016E0138808897EC02F0AE
:100510000150808897EC02F01200016E013880983B
:1005200097EC02F00150809897EC02F01200026EF6
:10053000809680948092809002B6808602B48084F7
:1005400002B2808202B08080808C809C1F0E086E78
:10055000EAEC02F01200036A043804240F0BD8B24C
:10056000160FD8B2060F060FD8A2FA0F04B81B0F49
:10057000D8A2FA0F04BA300F04BC600F04BE200FDB
:10058000600F033603A0A00F056E04BE032A1200FD
:10059000046EABEC02F005380F0B300F126E0550F5
:1005A0000F0B300F136E1200FA0EE1EC02F0FA0E90
:1005B000E1EC02F0FA0EE1EC02F0FA0EE1EC02F0EE
:1005C0001200006EC70E086EEAEC02F0002EE2EF99
:1005D00002F0120000000000082EEAEF02F0000C0A
:1005E000938A096A819A939A630E086EEAEC02F084
:1005F000938A0D0E086EEAEC02F081AA092A550EC4
:10060000086EEAEC02F0000C0A6E080E0B6E819A7E
:10061000939A0000000000000A32D8B0938A0B0EB3
:10062000086EEAEC02F0938A000000000B2E07EF40
:1006300003F0000C080E0B6E819A939A00000000E4
:100640000000000000000000938A0000000000008D
:1006500000008150200BFF0F0A32090E086EEAECF1
:1006600002F00B2E1CEF03F0000C202D204A616ECF
:1006700020576167656D616B657273202D200000E6
:100680005F5F5F005F2F5F00202020202020202060
:100690002020202020202020202020200000415544
:0A06A000544F2000204D414E200071
:020000040030CA
:0E000000FFC80D1FFF0081FF03C003E0034097
:00000001FF
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