Parcourir la source

Add files via upload

coreWeaver il y a 3 ans
Parent
commit
9ad415f584

+ 31 - 0
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/Font12x16dig.font

@@ -0,0 +1,31 @@
+Font12x16dig:
+$asm
+.db 2,12,24,0
+.db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;  
+.db 0,0,0,0,248,254,254,248,0,0,0,0,0,0,0,0,0,103,103,0,0,0,0,0 ; !
+.db 0,0,76,124,60,0,0,76,124,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; "
+.db 0,0,0,32,224,252,60,32,224,252,60,32,0,0,4,60,63,7,4,60,63,7,0,0 ; #
+.db 0,0,240,248,152,254,254,152,152,16,0,0,0,0,8,25,25,127,127,25,31,15,0,0 ; $
+.db 0,0,112,216,216,112,0,128,192,224,112,56,0,0,48,56,28,14,7,3,57,108,108,56 ; %
+.db 0,0,0,112,248,140,196,124,56,0,0,0,0,0,62,127,99,67,111,60,56,108,68,0 ; &
+.db 0,0,0,0,76,124,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ; '
+.db 0,0,0,224,248,252,14,2,2,0,0,0,0,0,0,7,31,63,112,64,64,0,0,0
+.db 0,0,0,2,2,14,252,248,224,0,0,0,0,0,0,64,64,112,63,31,7,0,0,0
+.db 0,0,0,48,112,192,240,240,192,112,48,0,0,0,0,25,29,7,31,31,7,29,25,0 ; *
+.db 0,0,0,0,0,0,224,224,0,0,0,0,0,0,0,3,3,3,31,31,3,3,3,0 ; +
+.db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,248,120,0,0,0,0 ; ,
+.db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,0 ; -
+.db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,112,112,0,0,0,0 ; .
+.db 0,0,0,0,0,0,128,192,224,112,56,28,0,0,56,28,14,7,3,1,0,0,0,0 ; /
+.db 0,0,240,252,12,6,134,198,102,60,252,240,0,0,15,63,54,99,97,96,96,48,63,15 ; 0
+.db 0,0,0,24,24,28,254,254,0,0,0,0,0,0,0,96,96,96,127,127,96,96,96,0 ; 1
+.db 0,0,56,60,14,6,6,134,198,238,124,56,0,0,112,120,124,110,103,99,97,96,96,96 ; 2
+.db 0,0,24,28,14,134,134,134,134,206,252,120,0,0,24,56,112,97,97,97,97,115,62,28 ; 3
+.db 0,0,128,192,224,112,56,28,254,254,0,0,0,0,15,15,12,12,12,12,127,127,12,12 ; 4
+.db 0,0,240,254,206,198,198,198,198,198,134,6,0,0,24,56,112,96,96,96,96,113,63,31 ; 5
+.db 0,0,128,224,240,184,156,142,134,134,0,0,0,0,31,63,115,97,97,97,97,115,63,30 ; 6
+.db 0,0,6,6,6,6,6,134,230,126,30,6,0,0,0,0,96,120,30,7,1,0,0,0 ; 7
+.db 0,0,0,120,252,206,134,134,206,252,120,0,0,0,30,63,115,97,97,97,97,115,63,30 ; 8
+.db 0,0,120,252,206,134,134,134,134,206,252,248,0,0,0,96,97,97,113,57,29,15,7,1 ; 9
+.db 0,0,0,0,0,224,224,224,0,0,0,0,0,0,0,0,0,56,56,56,0,0,0,0 ; :
+$end asm

+ 7 - 0
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/Fuses Readme.txt

@@ -0,0 +1,7 @@
+"glcd-Nokia3310.lib" must be copied in the bascom library folder.
+
+Don't forget to set the fusebits of the microcontroller !
+
+Fusebits: FF
+Fusebits High: D9
+Fusebits Extended: FF

+ 231 - 0
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/Newfont6x8.font

@@ -0,0 +1,231 @@
+Newfont6x8:
+$asm
+.db 1 , 6 , 6 , 0
+.db 0 , 0 , 0 , 0 , 0 , 0 ;
+.db 0 , 0 , 95 , 0 , 0 , 0 ; !
+.db 0 , 3 , 0 , 3 , 0 , 0 ; ""
+.db 20 , 127 , 20 , 127 , 20 , 0 ; #
+.db 4 , 42 , 127 , 42 , 16 , 0 ; $
+.db 35 , 19 , 8 , 100 , 98 , 0 ; %
+.db 54 , 73 , 86 , 32 , 80 , 0 ; &
+.db 0 , 3 , 0 , 0 , 0 , 0 ;                                 '
+.db 0 , 28 , 34 , 65 , 0 , 0
+.db 65 , 34 , 28 , 0 , 0 , 0
+.db 42 , 28 , 127 , 28 , 42 , 0 ; *
+.db 8 , 8 , 62 , 8 , 8 , 0 ; +
+.db 0 , 64 , 112 , 48 , 0 , 0 ; ,
+.db 8 , 8 , 8 , 8 , 8 , 0 ; -
+.db 0 , 0 , 96 , 96 , 0 , 0 ; .
+.db 96 , 16 , 8 , 4 , 3 , 0 ; /
+.db 62 , 81 , 73 , 69 , 62 , 0 ; 0
+.db 0 , 66 , 127 , 64 , 0 , 0 ; 1
+.db 98 , 81 , 73 , 73 , 70 , 0 ; 2
+.db 34 , 65 , 73 , 73 , 54 , 0 ; 3
+.db 24 , 20 , 18 , 17 , 127 , 0 ; 4
+.db 39 , 69 , 69 , 69 , 57 , 0 ; 5
+.db 62 , 69 , 69 , 69 , 57 , 0 ; 6
+.db 1 , 97 , 17 , 9 , 7 , 0 ; 7
+.db 54 , 73 , 73 , 73 , 54 , 0 ; 8
+.db 14 , 81 , 81 , 81 , 62 , 0 ; 9
+.db 0 , 0 , 54 , 54 , 0 , 0 ; :
+.db 0 , 64 , 118 , 54 , 0 , 0 ; ;
+.db 0 , 8 , 20 , 34 , 0 , 0 ; <
+.db 20 , 20 , 20 , 20 , 20 , 0 ; =
+.db 0 , 34 , 20 , 8 , 0 , 0 ; >
+.db 2 , 1 , 81 , 9 , 6 , 0 ; Print
+.db 62 , 73 , 85 , 85 , 14 , 0 ; @
+.db 124 , 18 , 17 , 18 , 124 , 0 ; A
+.db 127 , 73 , 73 , 73 , 54 , 0 ; B
+.db 62 , 65 , 65 , 65 , 34 , 0 ; C
+.db 127 , 65 , 65 , 34 , 28 , 0 ; D
+.db 127 , 73 , 73 , 73 , 65 , 0 ; E
+.db 127 , 9 , 9 , 9 , 1 , 0 ; F
+.db 62 , 65 , 65 , 81 , 114 , 0 ; G
+.db 127 , 8 , 8 , 8 , 127 , 0 ; H
+.db 0 , 65 , 127 , 65 , 0 , 0 ; I
+.db 32 , 64 , 65 , 63 , 1 , 0 ; J
+.db 127 , 8 , 20 , 34 , 65 , 0 ; K
+.db 127 , 64 , 64 , 64 , 96 , 0 ; L
+.db 127 , 2 , 12 , 2 , 127 , 0 ; M
+.db 127 , 2 , 4 , 8 , 127 , 0 ; N
+.db 62 , 65 , 65 , 65 , 62 , 0 ; O
+.db 127 , 17 , 17 , 17 , 14 , 0 ; P
+.db 62 , 65 , 81 , 97 , 126 , 0 ; Q
+.db 127 , 9 , 25 , 41 , 70 , 0 ; R
+.db 38 , 73 , 73 , 73 , 50 , 0 ; S
+.db 1 , 1 , 127 , 1 , 1 , 0 ; T
+.db 63 , 64 , 64 , 64 , 63 , 0 ; U
+.db 31 , 32 , 64 , 32 , 31 , 0 ; V
+.db 63 , 64 , 56 , 64 , 63 , 0 ; W
+.db 99 , 20 , 8 , 20 , 99 , 0 ; X
+.db 7 , 8 , 112 , 8 , 7 , 0 ; Y
+.db 97 , 81 , 73 , 69 , 67 , 0 ; Z
+.db 0 , 0 , 127 , 65 , 65 , 0 ; [
+.db 3 , 4 , 8 , 16 , 96 , 0 ; \
+.db 65 , 65 , 127 , 0 , 0 , 0 ; ]
+.db 4 , 2 , 1 , 2 , 4 , 0 ; ^
+.db 64 , 64 , 64 , 64 , 64 , 64
+.db 1 , 2 , 0 , 0 , 0 , 0 ; `
+.db 48 , 74 , 74 , 60 , 64 , 0 ; A
+.db 127 , 72 , 72 , 72 , 48 , 0 ; B
+.db 56 , 68 , 68 , 68 , 32 , 0 ; C
+.db 48 , 72 , 72 , 72 , 127 , 0 ; D
+.db 56 , 84 , 84 , 84 , 24 , 0 ; E
+.db 0 , 8 , 126 , 9 , 0 , 0 ; F
+.db 8 , 84 , 84 , 84 , 56 , 0 ; G
+.db 127 , 8 , 4 , 4 , 120 , 0 ; H
+.db 0 , 72 , 122 , 64 , 0 , 0 ; I
+.db 0 , 32 , 64 , 61 , 0 , 0 ; J
+.db 127 , 16 , 16 , 40 , 68 , 0 ; K
+.db 0 , 0 , 127 , 0 , 0 , 0 ; L
+.db 124 , 4 , 124 , 4 , 120 , 0 ; M
+.db 124 , 8 , 4 , 4 , 120 , 0 ; N
+.db 56 , 68 , 68 , 68 , 56 , 0 ; O
+.db 124 , 20 , 20 , 20 , 8 , 0 ; P
+.db 8 , 20 , 20 , 124 , 64 , 0 ; Q
+.db 124 , 8 , 4 , 4 , 8 , 0 ; R
+.db 72 , 84 , 84 , 84 , 36 , 0 ; S
+.db 0 , 4 , 63 , 68 , 0 , 0 ; T
+.db 60 , 64 , 64 , 32 , 124 , 0 ; U
+.db 28 , 32 , 64 , 32 , 28 , 0 ; V
+.db 60 , 64 , 48 , 64 , 60 , 0 ; W
+.db 68 , 40 , 16 , 40 , 68 , 0 ; X
+.db 12 , 80 , 80 , 80 , 60 , 0 ; Y
+.db 68 , 100 , 84 , 76 , 68 , 0 ; Z
+.db 0 , 0 , 8 , 54 , 65 , 0 ; {
+.db 0 , 0 , 127 , 0 , 0 , 0 ; |
+.db 65 , 54 , 8 , 0 , 0 , 0 ; }
+.db 8 , 4 , 8 , 4 , 0 , 0 ; ~
+.db 0 , 0 , 0 , 0 , 0 , 0 ; 
+.db 0 , 0 , 0 , 0 , 0 , 0 ; €
+.db 0 , 0 , 0 , 0 , 0 , 0 ; �
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ‚
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ƒ
+.db 0 , 0 , 0 , 0 , 0 , 0 ; „
+.db 64 , 0 , 64 , 0 , 64 , 0 ; …
+.db 0 , 0 , 0 , 0 , 0 , 0 ; †
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ‡
+.db 20 , 62 , 85 , 85 , 65 , 0 ; ˆ
+.db 19 , 8 , 100 , 2 , 96 , 0 ; ‰
+.db 0 , 0 , 0 , 0 , 0 , 0 ; Š
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ‹
+.db 0 , 0 , 0 , 0 , 0 , 0 ; Œ
+.db 0 , 0 , 0 , 0 , 0 , 0 ; �
+.db 0 , 0 , 0 , 0 , 0 , 0 ; Ž
+.db 0 , 0 , 0 , 0 , 0 , 0 ; �
+.db 0 , 0 , 0 , 0 , 0 , 0 ; �
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ‘
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ’
+.db 0 , 0 , 0 , 0 , 0 , 0 ; “
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ”
+.db 0 , 24 , 60 , 60 , 24 , 0 ; •
+.db 0 , 0 , 0 , 0 , 0 , 0 ; –
+.db 0 , 0 , 0 , 0 , 0 , 0 ; —
+.db 0 , 60 , 36 , 36 , 60 , 0 ; ˜
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ™
+.db 0 , 0 , 0 , 0 , 0 , 0 ; Š
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ›
+.db 0 , 0 , 0 , 0 , 0 , 0 ; Œ
+.db 0 , 0 , 0 , 0 , 0 , 0 ; �
+.db 0 , 0 , 0 , 0 , 0 , 0 ; Ž
+.db 0 , 0 , 0 , 0 , 0 , 0 ; Ÿ
+.db 0 , 0 , 0 , 0 , 0 , 0 ;  
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ¡
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ¢
+.db 0 , 0 , 0 , 0 , 0 , 0 ; £
+.db 0 , 90 , 36 , 36 , 90 , 0 ; ¤
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ¥
+.db 0 , 0 , 119 , 0 , 0 , 0 ; ¦
+.db 0 , 0 , 0 , 0 , 0 , 0 ; §
+.db 124 , 85 , 84 , 85 , 84 , 0 ; ¨
+.db 62 , 65 , 93 , 85 , 65 , 62 ; ©
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ª
+.db 8 , 20 , 42 , 20 , 34 , 0 ; «
+.db 2 , 2 , 2 , 2 , 14 , 0 ; ¬
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ­
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ®
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ¯
+.db 6 , 9 , 9 , 6 , 0 , 0 ; °
+.db 0 , 36 , 46 , 36 , 0 , 0 ; ±
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ²
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ³
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ´
+.db 252 , 32 , 64 , 64 , 60 , 0 ; µ
+.db 4 , 14 , 126 , 2 , 126 , 0 ; ¶
+.db 0 , 0 , 8 , 0 , 0 , 0 ; ·
+.db 56 , 85 , 84 , 85 , 24 , 0 ; ¸
+.db 120 , 16 , 32 , 126 , 2 , 0 ; ¹
+.db 0 , 0 , 0 , 0 , 0 , 0 ; º
+.db 34 , 20 , 42 , 20 , 8 , 0 ; »
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ¼
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ½
+.db 0 , 0 , 0 , 0 , 0 , 0 ; ¾
+.db 0 , 2 , 120 , 2 , 0 , 0 ; ¿
+.db 124 , 18 , 17 , 18 , 124 , 0 ; À
+.db 127 , 73 , 73 , 73 , 48 , 0 ; Á
+.db 127 , 73 , 73 , 73 , 54 , 0 ; Â
+.db 127 , 1 , 1 , 1 , 1 , 0 ; Ã
+.db 64 , 126 , 65 , 127 , 64 , 0 ; Ä
+.db 127 , 73 , 73 , 73 , 65 , 0 ; Å
+'my custom char
+.db 127 , 127 , 127 , 127 , 0 , 0 ; Æ
+'.db 119 , 8 , 126 , 8 , 119 , 0 ; Æ
+.db 34 , 65 , 73 , 73 , 54 , 0 ; Ç
+.db 127 , 32 , 16 , 8 , 127 , 0 ; È
+.db 127 , 32 , 17 , 8 , 127 , 0 ; É
+.db 127 , 8 , 20 , 34 , 65 , 0 ; Ê
+.db 64 , 62 , 1 , 1 , 127 , 0 ; Ë
+.db 127 , 2 , 4 , 2 , 127 , 0 ; Ì
+.db 127 , 8 , 8 , 8 , 127 , 0 ; Í
+.db 62 , 65 , 65 , 65 , 62 , 0 ; Î
+.db 127 , 1 , 1 , 1 , 127 , 0 ; Ï
+.db 127 , 9 , 9 , 9 , 6 , 0 ; Ð
+.db 62 , 65 , 65 , 65 , 34 , 0 ; Ñ
+.db 1 , 1 , 127 , 1 , 1 , 0 ; Ò
+.db 7 , 72 , 72 , 72 , 63 , 0 ; Ó
+.db 12 , 18 , 127 , 18 , 12 , 0 ; Ô
+.db 99 , 20 , 8 , 20 , 99 , 0 ; Õ
+.db 63 , 32 , 32 , 63 , 96 , 0 ; Ö
+.db 7 , 8 , 8 , 8 , 127 , 0 ; ×
+.db 127 , 64 , 124 , 64 , 127 , 0 ; Ø
+.db 63 , 32 , 60 , 32 , 63 , 96 ; Ù
+.db 1 , 127 , 72 , 72 , 48 , 0 ; Ú
+.db 127 , 72 , 48 , 0 , 127 , 0 ; Û
+.db 127 , 72 , 72 , 72 , 48 , 0 ; Ü
+.db 34 , 65 , 73 , 73 , 62 , 0 ; Ý
+.db 127 , 8 , 62 , 65 , 62 , 0 ; Þ
+.db 70 , 41 , 25 , 9 , 127 , 0 ; ß
+.db 32 , 84 , 84 , 84 , 120 , 0 ; À
+.db 120 , 84 , 84 , 84 , 32 , 0 ; Á
+.db 124 , 84 , 84 , 84 , 40 , 0 ; Â
+.db 124 , 4 , 4 , 4 , 4 , 0 ; Ã
+.db 8 , 84 , 84 , 84 , 56 , 0 ; Ä
+.db 56 , 84 , 84 , 84 , 24 , 0 ; Å
+.db 108 , 16 , 120 , 16 , 108 , 0 ; Æ
+.db 40 , 68 , 84 , 84 , 40 , 0 ; Ç
+.db 60 , 64 , 64 , 64 , 124 , 0 ; È
+.db 60 , 64 , 68 , 64 , 124 , 0 ; É
+.db 124 , 16 , 16 , 40 , 68 , 0 ; Ê
+.db 64 , 56 , 4 , 4 , 124 , 0 ; Ë
+.db 124 , 8 , 16 , 8 , 124 , 0 ; Ì
+.db 124 , 16 , 16 , 16 , 124 , 0 ; Í
+.db 56 , 68 , 68 , 68 , 56 , 0 ; Î
+.db 124 , 4 , 4 , 4 , 124 , 0 ; Ï
+.db 124 , 20 , 20 , 20 , 8 , 0 ; Ð
+.db 56 , 68 , 68 , 68 , 40 , 0 ; Ñ
+.db 124 , 4 , 124 , 4 , 120 , 0 ; Ò
+.db 12 , 80 , 80 , 80 , 60 , 0 ; Ó
+.db 8 , 20 , 124 , 20 , 8 , 0 ; Ô
+.db 68 , 40 , 16 , 40 , 68 , 0 ; Õ
+.db 28 , 32 , 32 , 60 , 96 , 0 ; Ö
+.db 12 , 16 , 16 , 16 , 124 , 0 ; ÷
+.db 60 , 64 , 120 , 64 , 124 , 0 ; Ø
+.db 28 , 32 , 56 , 32 , 60 , 96 ; Ù
+.db 4 , 124 , 80 , 80 , 32 , 0 ; Ú
+.db 124 , 80 , 32 , 0 , 124 , 0 ; Û
+.db 124 , 80 , 80 , 80 , 32 , 0 ; Ü
+.db 40 , 68 , 84 , 84 , 56 , 0 ; Ý
+.db 124 , 16 , 56 , 68 , 56 , 0 ; Þ
+.db 8 , 84 , 52 , 20 , 124 , 0 ; Ÿ
+
+$end Asm

BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/b100.bgf


BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/b50.bgf


BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/b75.bgf


BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/blow1.bgf


BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/blow2.bgf


BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/cap_s.bgf


+ 576 - 0
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/fw10.bas

@@ -0,0 +1,576 @@
+'--------------------------------------------------------------------------------------------------------
+'                         LC Meter Firmware
+'      June 2020 - coreWeaver / ioCONNECTED
+'--------------------------------------------------------------------------------------------------------
+
+
+' Copyright <2020> <coreWeaver / ioCONNECTED>
+
+' Permission is hereby granted, free of charge,
+' to any person obtaining a copy of this software and associated documentation files (the "Software"),
+' to deal in the Software without restriction, including without limitation the rights to use,
+' copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+' and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+' The above copyright notice and this permission notice shall be included in all copies or
+' substantial portions of the Software.
+
+' The Software Is Provided "AS IS" , Without Warranty Of Any Kind , Express Or Implied ,
+' Including But Not Limited To The Warranties Of Merchantability , Fitness For A Particular Purpose
+' And Noninfringement. In No Event Shall The Authors Or Copyright Holders Be Liable For Any Claim ,
+' Damages Or Other Liability , Whether In An Action Of Contract , Tort Or Otherwise , Arising From ,
+' Out Of Or In Connection With The Software Or The Use Or Other Dealings In The Software.
+
+'--------------------------------------------------------------------------------------------------------
+'--------------------------------------------------------------------------------------------------------
+
+
+
+$regfile = "m328pdef.dat"
+$crystal = 8000000
+$baud = 19200
+$hwstack = 256
+$swstack = 256
+$framesize = 256
+
+
+' UART Config
+Config Com1 = 19200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
+Open "com1:" For Binary As #1
+Config Serialin0 = Buffered , Size = 30 , Bytematch = All
+
+' Use ADC's Channel_5 to measure VBAT
+Config Adc = Single , Prescaler = Auto , Reference = Avcc
+Start Adc
+
+'using watchdog for SW RST
+Config Watchdog = 128                                       'ovf after 128ms and resets the uC
+
+' Timers Usage:
+' Timer0 is used to count the incoming pulses on T0 (PD4)
+' Timer1 is used to generate a 1sec time interval for frequency measurement
+' Timer2 is used to raise a flag (Ok_to_read_Vbat) every 4 seconds
+
+
+' Frequency Counter from 4 Hz to 5 MHz
+
+' Timer1 Config (1 Second time interval)
+On Timer1 Timer1_routine
+Tccr1a = &B00000000
+Tccr1b = &B00000101                                         ' Prescaller 1024
+
+Timsk2 = &B00000001                                         ' Interrupt for Timer 2 active
+Timsk1 = &B00000001                                         ' Interrupt for Timer 1 active
+Timsk0 = &B00000001                                         ' Interrupt for Timer 0 active
+
+Sreg = &B10000000                                           ' Global Interrupts on
+
+Timer1 = 57644
+' this value was found by using a resonator (4MHz)
+' and adjusting the value of timer1 to match the 4000000 Hz output
+
+
+' Timer0 Config
+On Timer0 Timer0_routine
+Tccr0 = &B00000111                                          ' Count external Signals on Rising Edge
+
+
+' Timer2 Config (read and display the battery voltage every 4 seconds)
+On Timer2 Timer2_routine
+Tccr2a = &B00000000
+Tccr2b = &B00000101                                         ' Prescaller 1024
+Timer2 = 178                                                ' OVF each 10 ms
+' count 4 seconds in INT routine then raise Ok_to_read_vbat Flag
+
+
+Enable Interrupts
+
+$lib "glcd-Nokia3310.lib"
+
+' LCD Rst & Cs1 are not used
+Config Graphlcd = 128x64sed , Rst = Portd.3 , A0 = Portb.4 , Si = Portb.3 , Sclk = Portb.5
+
+'Const Negative_lcd = 1                                      ' Invert screen
+Const Rotate_lcd = 0
+
+' LEDs
+Config Portd.5 = Output
+Blue_led Alias Portd.5
+Reset Blue_led
+
+Config Portd.6 = Output
+Red_led Alias Portd.6
+Reset Red_led
+
+' Keys
+Config Pinb.1 = Input
+Key1 Alias Pinb.1
+Portb.1 = 1
+
+
+Config Pind.2 = Input
+Key2 Alias Pind.2
+Portd.2 = 1
+
+' Reed Relay (adds Calibration Capacitor)
+Config Portb.2 = Output
+Calibrate Alias Portb.2
+Set Calibrate                                               ' disconnect Ccal
+
+' Measure Mode
+' double relay
+' SET   (Normally Open)  >> C Mode
+' RESET (Normally Close) >> L Mode
+Config Portb.0 = Output
+Measure_mode Alias Portb.0
+Reset Measure_mode
+
+Dim Overflowed As Long
+Dim Pulses As Long
+Dim I As Byte , J As Byte , K As Byte
+Dim Tim2var As Integer
+
+Const Pi = 3.141592653589793
+Const 2pi = 6.283185307179586
+Const Ccal = 0.000000001006                                 ' Farads or 1006 [pF]
+
+Const Milli = 0.001
+Const Micro = 0.000001
+Const Nano = 0.000000001
+Const Pico = 0.000000000001
+
+Const Cr = &H0D
+Const Lf = &H0A
+
+
+
+Dim F1 As Single                                            ' Oscillator's base freq. (Ccal, C_det & L_det disconnected)
+Dim F2 As Single                                            ' Calibration freq. (Ccal connected, C_det & L_det disconnected)
+Dim F3 As Single                                            ' Ccal disconnected, C_det connected, L_det disconnected
+Dim F4 As Single                                            ' Ccal disconnected, C_det disconnected, L_det disconnected
+
+Dim Dvar1 As Single
+Dim Dvar2 As Single
+
+Dim Svar1 As Single
+
+Dim C_measured As Single
+Dim L_measured As Single
+
+Dim Scaled_val As Single
+Dim New_str_value As String * 20
+
+Dim Adcval As Word
+Dim Vbat As Single
+Dim Vbat_str As String * 5
+
+Dim X As Byte
+
+Dim Lbat_pic As Bit
+Reset Lbat_pic
+
+Dim Ok_to_read_vbat As Bit
+Reset Ok_to_read_vbat
+
+Dim A As Byte
+Dim Rx_buffer As String * 30 , Rx_string As String * 30
+Dim Full_buffer As Bit , Rx_flag As Bit
+Reset Full_buffer : Reset Rx_flag
+
+Declare Sub Read_vbat
+Declare Sub Calibration
+Declare Sub Measure_c
+Declare Sub Measure_l
+Declare Sub Convert(value As Single)
+
+' Initialize LCD
+Initlcd
+Glcdcmd 33 : Glcdcmd 200                                    ' Normal Contrast
+Cls
+
+' select Capacity Mode
+Set Measure_mode
+
+Print "LC-Meter.ioConnected.OK"
+
+Setfont Newfont6x8
+Showpic 1 , 1 , Splash
+Waitms 1000
+Cls
+Lcdat 3 , 10 , "ioConnected"
+Lcdat 4 , 52 , "2020"
+Waitms 2000
+
+Print "Ready"
+Waitms 500
+
+Call Calibration
+Print
+Print
+
+Do
+   If Ok_to_read_vbat = 1 Then Call Read_vbat
+   If Key1 = 0 Then
+      Print "Measuring Capacitance >>>>"
+      Waitms 500
+      If Key2 = 0 Then
+         Call Calibration
+      Else
+         Call Measure_c
+      End If
+   End If
+
+
+   If Key2 = 0 Then
+      Print "Measuring Inductance >>>>"
+      Waitms 500
+      If Key1 = 0 Then
+         Call Calibration
+      Else
+         Call Measure_l
+      End If
+   End If
+
+   If Rx_flag = 1 Then
+      Select Case Rx_string
+         Case "rst!":
+            Start Watchdog
+      End Select
+   End If
+
+
+
+Loop
+End
+
+
+
+$include "newfont6x8.font"
+$include "font12x16dig.font"
+Splash:
+$bgf "splash_s.bgf"
+Battery100:
+$bgf "b100.bgf"
+Battery75:
+$bgf "b75.bgf"
+Battery50:
+$bgf "b50.bgf"
+Batterylow1:
+$bgf "blow1.bgf"
+Batterylow2:
+$bgf "blow2.bgf"
+Inductor:
+$bgf "ind_s.bgf"
+Capacitor:
+$bgf "cap_s.bgf"
+
+Serial0bytereceived:
+   Pushall
+   If Ischarwaiting() > 0 Then
+      A = Inkey()
+      If A <> 10 And A <> 13 Then
+         Rx_buffer = Rx_buffer + Chr(a)
+      End If
+      If Len(rx_buffer) >= 20 Then Set Full_buffer
+   End If
+   If A = 10 Or Full_buffer = 1 Then
+      Reset Full_buffer
+      Set Rx_flag
+      Rx_string = Rx_buffer
+      Rx_buffer = ""
+   End If
+   Popall
+Return
+
+Timer1_routine:
+   'Timer1 = 57898
+   'Timer1 = 57880
+   'Timer1 = 57870
+   Timer1 = 57644
+   Overflowed = Overflowed * 255
+   Pulses = Overflowed + Timer0
+   Overflowed = 0
+   Timer0 = 0
+Return
+
+Timer0_routine:
+   Incr Overflowed
+Return
+
+Timer2_routine:
+   Timer2 = 178                                             ' OVF every 10mS
+   Incr Tim2var
+   If Tim2var >= 400 Then
+      Tim2var = 0
+      Ok_to_read_vbat = 1
+   End If
+Return
+
+
+Sub Read_vbat
+   Ok_to_read_vbat = 0
+   Adcval = Getadc(5)
+   Vbat = Adcval * 4.92
+   ' Vbat is measured through a voltage divider (R1=R2)
+   Vbat = Vbat * 2.01                                       ' R2's measured resistance is slightly smaller
+   ' show in Volts
+   Vbat = Vbat / 1000
+   Vbat_str = Fusing(vbat , "#.&&")
+
+   'Print : Print "Battery Voltage= " ; Vbat_str ; " [V]"
+
+   Select Case Vbat
+      Case Is > 8.3 : Showpic 72 , 1 , Battery100
+      Case 7.8 To 8.3 : Showpic 72 , 1 , Battery75
+      Case 7.2 To 7.8 : Showpic 72 , 1 , Battery50
+      Case Is < 7.2 :
+         Toggle Lbat_pic
+         If Lbat_pic = 0 Then
+            Showpic 72 , 1 , Batterylow2
+         Else
+            Showpic 72 , 1 , Batterylow1
+            Print "Battery low !"
+         End If
+   End Select
+
+End Sub
+
+Sub Calibration
+   Ok_to_read_vbat = 0
+   Cls
+   Print "Calibration"
+   Print "make sure to remove any L or C from the Measuring Terminals"
+   Print
+   Print "please wait ..."
+   Lcdat 2 , 1 , "Calibration" ;
+   Lcdat 3 , 1 , "please wait .." ;
+   Waitms 400
+   Lcdat 5 , 1 , "Æ"
+   Print "^"
+   Reset Red_led
+   Reset Blue_led
+
+   ' prepare to measure the Frequency without Calibration Capacity
+   Set Calibrate                                            ' disconnect Ccal
+
+   Lcdat 5 , 1 , "Æ"
+   Print "^"
+   I = 0
+   J = 0
+   K = 0
+   For I = 1 To 6
+      'Print I
+      Incr J
+      Waitms 500
+      X = I * 6
+      X = X + 1
+      Lcdat 5 , X , "Æ"
+      Print "^"
+      If J = 2 Then
+         Incr K
+         J = 0
+         Print "F1= " ; Pulses ; " [Hz] (base frequency)"
+         If K = 3 Then
+            F1 = Pulses
+            Print "F1= " ; F1 ; " [Hz] (base frequency)"
+            ' now prepare to measure the Frequency with added Calibration Capacitance
+            Reset Calibrate                                 ' connect Ccal
+         End If
+      End If
+   Next
+
+   Lcdat 5 , 43 , "Æ"
+   Print "^"
+   Waitms 500
+   Lcdat 5 , 49 , "Æ"
+   Print "^"
+
+   J = 0
+   K = 0
+   For I = 9 To 14
+      'Print I
+      Incr J
+      Waitms 500
+      X = I * 6
+      X = X + 1
+      Lcdat 5 , X , "Æ"
+      Print "^"
+      If J = 2 Then
+         Incr K
+         J = 0
+         Print "F2= " ; Pulses ; " [Hz] (calibration frequency)"
+         If K = 3 Then
+            K = 0
+            F2 = Pulses
+            Print "F2= " ; F2 ; " [Hz] (calibration frequency)"
+         End If
+      End If
+   Next
+   Cls
+   Lcdat 2 , 1 , "Calibration"
+   Lcdat 3 , 1 , "complete !"
+   Print "Calibration complete !"
+   Waitms 2000
+   Cls
+   Lcdat 5 , 1 , "L-Mode  C-Mode"
+   Print "C Done !"
+   Print
+   Print
+
+End Sub
+
+Sub Measure_c
+   Ok_to_read_vbat = 1
+   Cls
+   Lcdat 1 , 1 , "Capacitance"
+   Showpic 14 , 10 , Capacitor
+   Waitms 2000
+   Set Blue_led
+
+   Set Measure_mode                                         ' select Capacitance Mode
+   Set Calibrate                                            ' disconnect Ccal
+
+   For I = 1 To 4
+      Waitms 250
+   Next
+   I = 0
+
+   Do
+      F3 = Pulses
+      Print "F3= " ; F3 ; " [Hz] (frequency for C_det)"
+
+      Dvar1 = F1 / F3
+      Dvar1 = Dvar1 * Dvar1
+      Dvar1 = Dvar1 - 1
+
+      Dvar2 = F1 / F2
+      Dvar2 = Dvar2 * Dvar2
+      Dvar2 = Dvar2 - 1
+
+      Dvar1 = Dvar1 / Dvar2
+      C_measured = Dvar1
+      C_measured = C_measured * Ccal
+      Call Convert(c_measured)
+      If New_str_value <> "Error !" Then
+         New_str_value = "C= " + New_str_value
+         New_str_value = New_str_value + "F]"
+      End If
+      Print New_str_value
+      Lcdat 4 , 1 , "               "
+      Lcdat 4 , 1 , New_str_value
+      Incr I
+
+      Waitms 1000
+   Loop Until I > 4
+   Reset Blue_led
+   Lcdat 5 , 1 , "L-Mode  C-Mode"
+   Print "CM Done !"
+End Sub
+
+Sub Measure_l
+   Ok_to_read_vbat = 1
+   Cls
+   Lcdat 1 , 1 , "Inductance "
+   Showpic 14 , 12 , Inductor
+   Waitms 2000
+   Set Red_led
+
+   Reset Measure_mode                                       ' select Inductance Mode
+   Set Calibrate                                            ' disconnect Ccal
+
+   For I = 1 To 4
+      Waitms 250
+   Next
+   I = 0
+
+   Do
+      F4 = Pulses
+      Print "F4= " ; F4 ; " [Hz] (frequency for L_det)"
+
+      Dvar1 = F1 / F4
+      Dvar1 = Dvar1 * Dvar1
+      Dvar1 = Dvar1 - 1
+
+      Dvar2 = F1 / F2
+      Dvar2 = Dvar2 * Dvar2
+      Dvar2 = Dvar2 - 1
+
+      Dvar1 = Dvar1 * Dvar2
+
+      Svar1 = F1
+      Svar1 = 2pi * Svar1
+      Svar1 = 1 / Svar1
+      Svar1 = Svar1 ^ 2
+
+      L_measured = Dvar1
+      L_measured = L_measured / Ccal
+      L_measured = L_measured * Svar1
+      Call Convert(l_measured)
+      If New_str_value <> "Error !" Then
+         New_str_value = "L= " + New_str_value
+         New_str_value = New_str_value + "H]"
+      End If
+      Print New_str_value
+      Lcdat 4 , 1 , "               "
+      Lcdat 4 , 1 , New_str_value
+      Incr I
+
+      Waitms 1000
+   Loop Until I > 4
+   Reset Red_led
+   Lcdat 5 , 1 , "L-Mode  C-Mode"
+   Print "LM Done !"
+End Sub
+
+Sub Convert(value As Single)
+   New_str_value = ""
+   If Value > 0 Then
+      If Value < Nano Then
+         Scaled_val = Value * 1000000000000
+         New_str_value = Fusing(scaled_val , "#.&&")
+         New_str_value = New_str_value + " [p"
+      Else
+         If Value < Micro Then
+            Scaled_val = Value * 1000000000
+            New_str_value = Fusing(scaled_val , "#.&&")
+            New_str_value = New_str_value + " [n"
+         Else
+            If Value < Milli Then
+               Scaled_val = Value * 1000000
+               New_str_value = Fusing(scaled_val , "#.&&")
+               New_str_value = New_str_value + " [u"
+            Else
+               If Value < 1 Then
+                  New_str_value = Fusing(scaled_val , "#.&&&")
+                  New_str_value = New_str_value + " [m"
+               Else
+                  If Value < 10 Then
+                     New_str_value = Fusing(scaled_val , "#.&")
+                     New_str_value = New_str_value + " ["
+                  Else
+                     New_str_value = "Error !"
+                  End If
+               End If
+            End If
+         End If
+      End If
+   Else
+      New_str_value = "Error !"
+   End If
+End Sub
+
+
+
+' "glcd-Nokia3310.lib" must be copied in the bascom library folder.
+
+' Don't forget to set the fusebits of the microcontroller.
+
+
+' Fusebits : FF
+' Fusebits High : D9
+' Fusebits Extended : FF
+
+
+
+' coreWeaver / ioCONNECTED
+' last updated - May 3rd, 2021

BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/fw10.bin


+ 761 - 0
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/fw10.hex

@@ -0,0 +1,761 @@
+:100000000C94340018950000189500001895000015
+:10001000189500001895000018950000189500002C
+:10002000189500000C945C071895000018950000C6
+:10003000189500000C94B90618950000189500005A
+:100040000C942107189500000C94F21118950000EB
+:1000500018950000189500001895000018950000EC
+:1000600018950000189500008FEF8DBFC0E0E8E103
+:100070004E2E88E08EBFD8E0F6E05F2EA89584B7BC
+:10008000082E877F84BF88E1992780936000909332
+:100090006000EEEFF7E0A0E0B1E088278D933197A4
+:1000A000E9F789E18093C40080E08093C50088E18E
+:1000B0008093C100662489E18093C40080E080932E
+:1000C000C5007091C0007D7F7093C00088E180936F
+:1000D000C10086E08093C2007091C1007068709387
+:1000E000C10086E880937A0080E480937C00709160
+:1000F0007A00706870937A0074B7777F74BF8BE171
+:100100008093600083E08093600070E070938000D3
+:1001100075E07093810071E07093700071E07093EE
+:100120006F0071E070936E0070E87FBF8CE291EE1B
+:10013000909385008093840077E075BD70E07093A4
+:10014000B00075E07093B10072EB7093B2007894D8
+:10015000539A249A239A259A0E945410559A5D988E
+:10016000569A5E982198299A52985A9A229A2A9ACF
+:10017000209A289870917D017F7770937D0170910E
+:100180007D017F7B70937D0170917D017F7D7093F8
+:100190007D0170917D017F7E70937D010E945410DE
+:1001A00081E20E94681088EC0E9468100E948A1008
+:1001B000289AEAE6FDE20E94370F0E943E0FE8EE21
+:1001C000F2E0A1E2B1E0ED93FC9381E08A9381E05B
+:1001D0008A9380E08A93E8EBFAE0882780932501F0
+:1001E0000E94461188EE93E00E94620F0E948A10DE
+:1001F00083E0809323018AE0809324018827809301
+:100200002501E2E8FDE20E94500F84E08093230183
+:1002100084E380932401882780932501EEE8FDE2A2
+:100220000E94500F80ED97E00E94620FE4E9FDE22A
+:100230000E94370F0E943E0F84EF91E00E94620FF0
+:100240000E94CE080E943E0F0E943E0FADE7B1E033
+:100250008C9186FB16F00C942F010E94AE07199921
+:100260000C944501EAE9FDE20E94370F0E943E0F1F
+:1002700084EF91E00E94620F4A990C9443010E941E
+:10028000CE080C9445010E94AB0A4A990C945B017C
+:10029000E6EBFDE20E94370F0E943E0F84EF91E0F3
+:1002A0000E94620F19990C9459010E94CE080C9477
+:1002B0005B010E940B0CADE7B1E08C9184FB16F062
+:1002C0000C947001AEE9B1E0E0EDFDE20E941C1378
+:1002D00011F00C9470018091600088608093600040
+:1002E0000C942601F894FFCF0106060000000000E0
+:1002F000000000005F000000000300030000147F06
+:10030000147F1400042A7F2A10002313086462005B
+:10031000364956205000000300000000001C224116
+:10032000000041221C0000002A1C7F1C2A00080833
+:100330003E08080000407030000008080808080067
+:100340000000606000006010080403003E51494551
+:100350003E0000427F400000625149494600224170
+:1003600049493600181412117F00274545453900C8
+:100370003E454545390001611109070036494949A3
+:1003800036000E5151513E0000003636000000404C
+:10039000763600000008142200001414141414000F
+:1003A0000022140800000201510906003E4955557B
+:1003B0000E007C1211127C007F49494936003E41F3
+:1003C000414122007F4141221C007F4949494100AF
+:1003D0007F09090901003E41415172007F08080868
+:1003E0007F0000417F4100002040413F01007F0825
+:1003F000142241007F40404060007F020C027F00D9
+:100400007F0204087F003E4141413E007F111111EF
+:100410000E003E4151617E007F09192946002649A0
+:100420004949320001017F0101003F4040403F0047
+:100430001F2040201F003F4038403F006314081435
+:100440006300070870080700615149454300000038
+:100450007F41410003040810600041417F0000001B
+:1004600004020102040040404040404001020000FC
+:100470000000304A4A3C40007F4848483000384439
+:1004800044442000304848487F00385454541800F1
+:1004900000087E0900000854545438007F08040402
+:1004A000780000487A4000000020403D00007F10A6
+:1004B0001028440000007F0000007C047C047800C9
+:1004C0007C08040478003844444438007C14141434
+:1004D00008000814147C40007C08040408004854F8
+:1004E0005454240000043F4400003C4040207C0061
+:1004F0001C2040201C003C4030403C004428102878
+:1005000044000C5050503C004464544C44000000E3
+:100510000836410000007F0000004136080000005E
+:1005200008040804000000000000000000000000B3
+:1005300000000000000000000000000000000000BB
+:1005400000000000000000000000400040004000EB
+:10055000000000000000000000000000143E55559F
+:100560004100130864026000000000000000000069
+:10057000000000000000000000000000000000007B
+:10058000000000000000000000000000000000006B
+:10059000000000000000000000000000000000005B
+:1005A0000000000000000000000000183C3C1800A3
+:1005B000000000000000000000000000003C2424B7
+:1005C0003C000000000000000000000000000000EF
+:1005D000000000000000000000000000000000001B
+:1005E000000000000000000000000000000000000B
+:1005F00000000000000000000000000000000000FB
+:1006000000000000005A24245A00000000000000EE
+:100610000000770000000000000000007C555455E9
+:1006200054003E415D55413E0000000000000814AA
+:100630002A142200020202020E0000000000000044
+:10064000000000000000000000000000060909068C
+:10065000000000242E240000000000000000000024
+:1006600000000000000000000000FC2040403C00B2
+:10067000040E7E027E00000008000000385554552C
+:1006800018007810207E02000000000000002214F4
+:100690002A14080000000000000000000000000014
+:1006A0000000000000000002780200007C1211121D
+:1006B0007C007F49494930007F49494936007F0124
+:1006C00001010100407E417F40007F4949494100CE
+:1006D0007F7F7F7F00002241494936007F2010083C
+:1006E0007F007F2011087F007F0814224100403ED8
+:1006F00001017F007F0204027F007F0808087F005D
+:100700003E4141413E007F0101017F007F0909090F
+:1007100006003E414141220001017F0101000748DE
+:1007200048483F000C127F120C0063140814630049
+:100730003F20203F6000070808087F007F407C4082
+:100740007F003F203C203F60017F484830007F48C9
+:1007500030007F007F4848483000224149493E0030
+:100760007F083E413E00462919097F002054545419
+:1007700078007854545420007C54545428007C044D
+:1007800004040400085454543800385454541800D5
+:100790006C1078106C002844545428003C404040B1
+:1007A0007C003C4044407C007C10102844004038D1
+:1007B00004047C007C0810087C007C1010107C0075
+:1007C0003844444438007C0404047C007C14141431
+:1007D00008003844444428007C047C0478000C5011
+:1007E00050503C0008147C14080044281028440091
+:1007F0001C20203C60000C1010107C003C40784015
+:100800007C001C2038203C60047C505020007C5030
+:1008100020007C007C505050200028445454380064
+:100820007C1038443800085434147C00020C180042
+:1008300000000000000000000000000000000000B8
+:10084000000000000000000000000000F8FEFEF8BC
+:1008500000000000000000000067670000000000CA
+:1008600000004C7C3C00004C7C3C00000000000080
+:10087000000000000000000000000020E0FC3C2020
+:10088000E0FC3C200000043C3F07043C3F07000024
+:100890000000F0F898FEFE9898100000000008197B
+:1008A000197F7F191F0F0000000070D8D8700080DA
+:1008B000C0E07038000030381C0E0703396C6C380B
+:1008C00000000070F88CC47C3800000000003E7FFF
+:1008D00063436F3C386C4400000000004C7C3C00DB
+:1008E0000000000000000000000000000000000008
+:1008F000000000E0F8FC0E0202000000000000070B
+:100900001F3F70404000000000000002020EFCF893
+:10091000E00000000000004040703F1F07000000A2
+:100920000000003070C0F0F0C0703000000000190E
+:100930001D071F1F071D1900000000000000E0E058
+:10094000000000000000000303031F1F0303030057
+:100950000000000000000000000000000000000097
+:100960000098F8780000000000000000000000007F
+:10097000000000000000000303030303030303005F
+:100980000000000000000000000000000000000067
+:10099000007070700000000000000000000080C0C7
+:1009A000E070381C0000381C0E0703010000000036
+:1009B0000000F0FC0C0686C6663CFCF000000F3F11
+:1009C0003663616060303F0F00000018181CFEFEA7
+:1009D000000000000000006060607F7F60606000D9
+:1009E0000000383C0E060686C6EE7C3800007078A3
+:1009F0007C6E6763616060600000181C0E868686EE
+:100A000086CEFC78000018387061616161733E1C0D
+:100A1000000080C0E070381CFEFE000000000F0FD8
+:100A20000C0C0C0C7F7F0C0C0000F0FECEC6C6C672
+:100A3000C6C68606000018387060606060713F1F8F
+:100A4000000080E0F0B89C8E8686000000001F3F0A
+:100A50007361616161733F1E00000606060606862B
+:100A6000E67E1E060000000060781E070100000000
+:100A700000000078FCCE8686CEFC780000001E3F89
+:100A80007361616161733F1E000078FCCE868686CB
+:100A900086CEFCF800000060616171391D0F07010E
+:100AA0000000000000E0E0E00000000000000000A6
+:100AB0000038383800000000305400AA0F00E0F081
+:100AC000AA02F000AA0B00E0F0AA09F0E000AA03D5
+:100AD00000F0AA02F0E0C000AA0500C0E0F0AA02FF
+:100AE000F000AA2300FFAA03FF00AA0B00FFAA033D
+:100AF000FF00AA0B00FFAA03FF1F3F7CF8AA01F822
+:100B00007C3F1FFFAA03FF00AA230007AA01070FCB
+:100B1000AA080F0E00AA030007AA01070FAA080FD0
+:100B20000700AA0300070FAA020F00AA020001AAE9
+:100B3000010100AA02000FAA020F0700AA3D000847
+:100B400038C800C8380800AA010004FC00AA020046
+:100B500080AA018000F804AA0204F800AA4000015B
+:100B600000AA030001AA04010001AA010100AA01D0
+:100B70000001AA020100AA680000080C1FAA081FB1
+:100B80000E00AA010000080C1FAA061F111F0E006C
+:100B9000AA010000080C1FAA041F11AA02111F0EAF
+:100BA00000AA0100080C1F11AA06111F0E00AA01BD
+:100BB0000000080C00AA0B001030C0E0AA01E0C041
+:100BC000AA02C0E0703818AA01183870E0C0E070BE
+:100BD0003818AA01183870E0C0E0703818AA011857
+:100BE0003870E0C0E0703818AA01183870E0C0AA68
+:100BF00003C0E0AA01E0C00001AA010100AA290087
+:100C000001AA01010000103000AA030060F0AA024E
+:100C1000F060AA0C60FFAA01FF00AA0100F8FE6FB5
+:100C2000676160AA0960F0AA02F06000AA18000FCC
+:100C3000AA010F00AA010001070F0E0800AA110067
+:100C40000F921F922F923F924F925F927F92AF929C
+:100C5000BF920F931F932F933F934F935F936F9385
+:100C60007F938F939F93AF93BF93CF93DF93EF9334
+:100C7000FF938FB78F930E94000F082F003018F05A
+:100C800011F00C9445060C9475060E94060FAEE711
+:100C9000B1E08C9300917E010A3081E009F480E09C
+:100CA0008F9300917E010D3081E009F480E09F91E7
+:100CB0008923882311F40C946706AEE7B1E08C9188
+:100CC000AFE7B1E00E94F90E8D9388278C93AFE7D0
+:100CD000B1E00E941613082F043110F40C9475062D
+:100CE00070917D01706270937D0100917E010A30E8
+:100CF00081E009F080E08F93ADE7B1E08C9185FB56
+:100D000081E00EF080E09F91892B882311F40C94F0
+:100D10009D0670917D017F7D70937D0170917D01B5
+:100D2000706170937D01EFE7F1E0AEE9B1E00E9400
+:100D3000DF12AFE7B1E00E94EA118F918FBFFF9100
+:100D4000EF91DF91CF91BF91AF919F918F917F9163
+:100D50006F915F914F913F912F911F910F91BF9094
+:100D6000AF907F905F904F903F902F901F900F908B
+:100D700008950F921F922F923F924F925F927F920F
+:100D8000AF92BF920F931F932F933F934F935F9315
+:100D90006F937F938F939F93AF93BF93CF93DF9383
+:100DA000EF93FF938FB78F938CE291EE9093850032
+:100DB00080938400A6E2B1E00D911D912D913C91AC
+:100DC0004FEF50E060E070E00E94A611A6E2B1E0B3
+:100DD0000D931D932D933D93A6E2B1E00D911D91CE
+:100DE0002D913C9186B5482F5527662777270E947D
+:100DF0007912AAE2B1E00D931D932D933D93A6E2E3
+:100E0000B1E00E94EC1170E076BD8F918FBFFF9131
+:100E1000EF91DF91CF91BF91AF919F918F917F9192
+:100E20006F915F914F913F912F911F910F91BF90C3
+:100E3000AF907F905F904F903F902F901F900F90BA
+:100E400018950F921F922F923F924F925F927F922E
+:100E5000AF92BF920F931F932F933F934F935F9344
+:100E60006F937F938F939F93AF93BF93CF93DF93B2
+:100E7000EF93FF938FB78F93A6E2B1E00E94E50E48
+:100E80008F918FBFFF91EF91DF91CF91BF91AF9184
+:100E90009F918F917F916F915F914F913F912F9192
+:100EA0001F910F91BF90AF907F905F904F903F90B8
+:100EB0002F901F900F9018950F921F922F923F9294
+:100EC0004F925F927F92AF92BF920F931F932F9397
+:100ED0003F934F935F936F937F938F939F93AF93C2
+:100EE000BF93CF93DF93EF93FF938FB78F9372EB03
+:100EF0007093B200A1E3B1E00E94F20EA1E3B1E071
+:100F00000D911C91003951E015070CF002C00C94B2
+:100F10009207A1E3B1E00E94EA1170917D01706433
+:100F200070937D018F918FBFFF91EF91DF91CF91F2
+:100F3000BF91AF919F918F917F916F915F914F91F1
+:100F40003F912F911F910F91BF90AF907F905F9035
+:100F50004F903F902F901F900F90189570917D01AA
+:100F60007F7B70937D0100917C00007F0560009382
+:100F70007C000E94CF11A0E7B1E08D939C93E2E248
+:100F8000FDE20E942A15E0E7F1E0D190E080FF2425
+:100F900000270E94D8130E948114EDE0F0E0A2E740
+:100FA000B1E00E94E412E6E2FDE20E942A15E2E7C7
+:100FB000F1E00E946B130E948114EDE0F0E0A2E7E3
+:100FC000B1E00E94E412EAE2FDE20E942A15E2E7A3
+:100FD000F1E00E946B130E942814EDE0F0E0A2E71C
+:100FE000B1E00E94E412A0E0B6E0AF93BF93E2E765
+:100FF000F1E00E946B130E94710F112702E0BF9174
+:10100000AF910E943112E0E0F6E0A6E7B1E00E9465
+:10101000DF12E2E7F1E00E946B13EEE2FDE20E94D4
+:101020002A150E94521318F011F00C9419080C9410
+:10103000280888E48A9381E08A9380E08A93EAE72B
+:10104000FBE08827809325010E9446110C94CD086F
+:10105000E2E7F1E00E946B13E2E3FDE20E942A1551
+:101060000E94521381E008F480E08F93E2E7F1E000
+:101070000E946B13EEE2FDE20E942A150E945213B9
+:1010800081E010F009F080E09F918923882311F41A
+:101090000C94590888E48A9381E08A9380E08A93CB
+:1010A000E6E8FBE08827809325010E9446110C9416
+:1010B000CD08E2E7F1E00E946B13E6E3FDE20E9457
+:1010C0002A150E94521381E008F480E08F93E2E732
+:1010D000F1E00E946B13E2E3FDE20E942A150E94F8
+:1010E000521381E010F009F080E09F91892388235A
+:1010F00011F40C948A0888E48A9381E08A9380E052
+:101100008A93E4E9FBE08827809325010E94461139
+:101110000C94CD08E2E7F1E00E946B13E6E3FDE2F8
+:101120000E942A150E94521310F00C94CD08ADE7CE
+:10113000B1E08C9187FB882780F9809580FBADE733
+:10114000B1E08C9187F98C93ADE7B1E08C9187FB8E
+:1011500016F40C94BA0888E48A9381E08A9380E0BC
+:101160008A93E2EBFBE08827809325010E944611D9
+:101170000C94CD0888E48A9381E08A9380E08A9376
+:10118000E4EAFBE08827809325010E944611E6ED02
+:10119000FDE20E94370F0E943E0F089570917D017D
+:1011A0007F7B70937D010E948A10E4EEFDE20E9435
+:1011B000370F0E943E0FE0EFFDE20E94370F0E94C2
+:1011C0003E0F0E943E0FECE2FEE20E94370F0E94AB
+:1011D0003E0F82E08093230181E0809324018827E1
+:1011E00080932501E4EEFDE20E94500F83E080939E
+:1011F000230181E080932401882780932501ECE37B
+:10120000FEE20E94500F80E991E00E94620F85E0AB
+:101210008093230181E08093240188278093250116
+:10122000ECE4FEE20E94500FEEE4FEE20E94370F73
+:101230000E943E0F5E985D982A9A85E08093230174
+:1012400081E080932401882780932501ECE4FEE26D
+:101250000E94500FEEE4FEE20E94370F0E943E0F04
+:1012600080E080932E0180E080932F0180E08093C6
+:10127000300181E080932E0100912E01063018F09C
+:1012800011F00C94B909AFE2B1E08C918F5F8C93AF
+:1012900084EF91E00E94620F00912E0146E0049FCE
+:1012A000ACE7B1E00C92ACE7B1E08C918F5F8C932E
+:1012B00085E08093230180917C018093240188271D
+:1012C00080932501ECE4FEE20E94500FEEE4FEE282
+:1012D0000E94370F0E943E0F00912F01023011F043
+:1012E0000C94B109A0E3B1E08C918F5F8C9380E006
+:1012F00080932F01E0E5FEE20E94370FA0E0B6E008
+:10130000EAE2F1E00E948F120E942F0FE6E5FEE272
+:101310000E94370F0E943E0F00913001033011F000
+:101320000C94B109EAE2F1E00E946B130E94F01301
+:10133000A3E3B1E00E947513E0E5FEE20E94370FDF
+:10134000A0E0B6E0E3E3F1E00E946B130E94710FAE
+:101350000E942F0FE6E5FEE20E94370F0E943E0F2B
+:101360002A98AEE2B1E08C918F5F8C9310F40C94CC
+:101370003C0985E0809323018BE280932401882738
+:1013800080932501ECE4FEE20E94500FEEE4FEE2C1
+:101390000E94370F0E943E0F84EF91E00E94620F7F
+:1013A00085E08093230181E3809324018827809343
+:1013B0002501ECE4FEE20E94500FEEE4FEE20E9402
+:1013C000370F0E943E0F80E080932F0180E08093D2
+:1013D000300189E080932E0100912E010E3018F02B
+:1013E00011F00C946B0AAFE2B1E08C918F5F8C939B
+:1013F00084EF91E00E94620F00912E0146E0049F6D
+:10140000ACE7B1E00C92ACE7B1E08C918F5F8C93CC
+:1014100085E08093230180917C01809324018827BB
+:1014200080932501ECE4FEE20E94500FEEE4FEE220
+:101430000E94370F0E943E0F00912F01023011F0E1
+:101440000C94630AA0E3B1E08C918F5F8C9380E0F1
+:1014500080932F01EEE6FEE20E94370FA0E0B6E097
+:10146000EAE2F1E00E948F120E942F0FE4E7FEE211
+:101470000E94370F0E943E0F00913001033011F09F
+:101480000C94630A80E080933001EAE2F1E00E946C
+:101490006B130E94F013A7E3B1E00E947513EEE610
+:1014A000FEE20E94370FA0E0B6E0E7E3F1E00E9421
+:1014B0006B130E94710F0E942F0FE4E7FEE20E945F
+:1014C000370F0E943E0FAEE2B1E08C918F5F8C939C
+:1014D00010F40C94EC090E948A1082E0809323019E
+:1014E00081E080932401882780932501E4EEFDE2CA
+:1014F0000E94500F83E08093230181E080932401B8
+:10150000882780932501E2E9FEE20E94500FEEE970
+:10151000FEE20E94370F0E943E0F80ED97E00E948E
+:10152000620F0E948A1085E08093230181E08093FE
+:101530002401882780932501E6EBFEE20E94500FEC
+:10154000E6ECFEE20E94370F0E943E0F0E943E0F23
+:101550000E943E0F089570917D01706470937D012B
+:101560000E948A1081E08093230181E0809324010E
+:10157000882780932501E0EDFEE20E94500F8EE067
+:101580008A938AE08A9380E08A93E6E0FCE08827E9
+:10159000809325010E94461180ED97E00E94620F22
+:1015A0005D9A289A2A9A81E080932E0100912E015B
+:1015B000043018F011F00C94E90A8AEF90E00E94D0
+:1015C000620FAEE2B1E08C918F5F8C9310F40C94BB
+:1015D000D60A80E080932E01EAE2F1E00E946B13CC
+:1015E0000E94F013ABE3B1E00E947513ECEDFEE254
+:1015F0000E94370FA0E0B6E0EBE3F1E00E946B132E
+:101600000E94710F0E942F0FE2EEFEE20E94370F40
+:101610000E943E0FEBE3F1E00E947013E3E3F1E080
+:101620000E946B130E942814EDE0F0E0A3E4B1E007
+:101630000E94E412E3E4F1E00E947013E3E4F1E0BD
+:101640000E946B130E948114EDE0F0E0A3E4B1E08E
+:101650000E94E412EAE3FDE20E942A15E3E4F1E0CD
+:101660000E946B130E94C014EDE0F0E0A3E4B1E02F
+:101670000E94E412E7E3F1E00E947013E3E3F1E07B
+:101680000E946B130E942814EDE0F0E0A7E4B1E0A3
+:101690000E94E412E7E4F1E00E947013E7E4F1E055
+:1016A0000E946B130E948114EDE0F0E0A7E4B1E02A
+:1016B0000E94E412EAE3FDE20E942A15E7E4F1E069
+:1016C0000E946B130E94C014EDE0F0E0A7E4B1E0CB
+:1016D0000E94E412E7E4F1E00E947013E3E4F1E019
+:1016E0000E946B130E942814EDE0F0E0A3E4B1E047
+:1016F0000E94E412E3E4F1E0AFE4B1E00E94E412FE
+:10170000EEE3FDE20E942A15EFE4F1E00E946B1384
+:101710000E948114EDE0F0E0AFE4B1E00E94E41239
+:10172000AFE4B1E0BA93AA930E94B10D2296ABE563
+:10173000B1E0EEEFFEE20E941C1311F40C94C40B16
+:1017400086E10E94A011EBE5F1E0A881B9810E9439
+:10175000DF12ABE5B1E0E6E0FFE20E94C911E881EB
+:10176000F981ABE5B1E00E94F90E0E94DF1286E13B
+:10177000481A80E0580A2296ABE5B1E00E94F90EC3
+:10178000EAE0FFE20E94C911ABE5B1E00E94310F2F
+:101790000E943E0F84E08093230181E08093240126
+:1017A000882780932501EEE0FFE20E94500F84E03D
+:1017B0008093230181E08093240188278093250171
+:1017C000ABE5B1E00E944A0FAEE2B1E08C918F5FD1
+:1017D0008C9388EE93E00E94620F00912E010430FA
+:1017E00018F011F00C94F60B0C94EC0A5D9885E05F
+:1017F0008093230181E08093240188278093250131
+:10180000E6EBFEE20E94500FEEE1FFE20E94370F8E
+:101810000E943E0F089570917D01706470937D0168
+:101820000E948A1081E08093230181E0809324014B
+:10183000882780932501E8E2FFE20E94500F8EE0A6
+:101840008A938CE08A9380E08A93E8EBFBE0882718
+:10185000809325010E94461180ED97E00E94620F5F
+:101860005E9A28982A9A81E080932E0100912E0199
+:10187000043018F011F00C94490C8AEF90E00E94AB
+:10188000620FAEE2B1E08C918F5F8C9310F40C94F8
+:10189000360C80E080932E01EAE2F1E00E946B13A7
+:1018A0000E94F013AFE3B1E00E947513E4E3FFE29E
+:1018B0000E94370FA0E0B6E0EFE3F1E00E946B1367
+:1018C0000E94710F0E942F0FEAE3FFE20E94370F80
+:1018D0000E943E0FEFE3F1E00E947013E3E3F1E0BA
+:1018E0000E946B130E942814EDE0F0E0A3E4B1E045
+:1018F0000E94E412E3E4F1E00E947013E3E4F1E0FB
+:101900000E946B130E948114EDE0F0E0A3E4B1E0CB
+:101910000E94E412EAE3FDE20E942A15E3E4F1E00A
+:101920000E946B130E94C014EDE0F0E0A3E4B1E06C
+:101930000E94E412E7E3F1E00E947013E3E3F1E0B8
+:101940000E946B130E942814EDE0F0E0A7E4B1E0E0
+:101950000E94E412E7E4F1E00E947013E7E4F1E092
+:101960000E946B130E948114EDE0F0E0A7E4B1E067
+:101970000E94E412EAE3FDE20E942A15E7E4F1E0A6
+:101980000E946B130E94C014EDE0F0E0A7E4B1E008
+:101990000E94E412E7E4F1E00E947013E3E4F1E056
+:1019A0000E946B130E948114EDE0F0E0A3E4B1E02B
+:1019B0000E94E412E3E3F1E0ABE4B1E00E94E41240
+:1019C000EBE4F1E00E947013E2E4FDE20E941D15D9
+:1019D0000E948114EDE0F0E0ABE4B1E00E94E4127B
+:1019E000EBE4F1E00E947013EAE3FDE20E941D15B2
+:1019F0000E942814EDE0F0E0ABE4B1E00E94E412B4
+:101A0000E6E4FDE20E942A15EBE4F1E00E946B138C
+:101A10000E941916EDE0F0E0ABE4B1E00E94E412A0
+:101A2000E3E4F1E0A3E5B1E00E94E412EEE3FDE2BD
+:101A30000E942A15E3E5F1E00E946B130E9428142E
+:101A4000EDE0F0E0A3E5B1E00E94E412EBE4F1E0A8
+:101A50000E947013E3E5F1E00E946B130E94811471
+:101A6000EDE0F0E0A3E5B1E00E94E412A3E5B1E00F
+:101A7000BA93AA930E94B10D2296ABE5B1E0EEEFC6
+:101A8000FEE20E941C1311F40C946A0D86E10E9480
+:101A9000A011EBE5F1E0A881B9810E94DF12ABE56E
+:101AA000B1E0E6E5FFE20E94C911E881F981ABE50A
+:101AB000B1E00E94F90E0E94DF1286E1481A80E030
+:101AC000580A2296ABE5B1E00E94F90EEAE5FFE282
+:101AD0000E94C911ABE5B1E00E94310F0E943E0F98
+:101AE00084E08093230181E0809324018827809300
+:101AF0002501EEE0FFE20E94500F84E08093230175
+:101B000081E080932401882780932501ABE5B1E033
+:101B10000E944A0FAEE2B1E08C918F5F8C9388EE09
+:101B200093E00E94620F00912E01043018F011F032
+:101B30000C949C0D0C944C0C5E9885E080932301D2
+:101B400081E080932401882780932501E6EBFEE263
+:101B50000E94500FEEE5FFE20E94370F0E943E0FF9
+:101B60000895ABE5B1E00E94EA11E881F9810E9495
+:101B70006B13EAE4FDE20E942A150E94521318F04A
+:101B800011F00C94C50D0C94DE0EE881F9810E94D1
+:101B90006B13EEE4FDE20E942A150E94521310F02E
+:101BA0000C94020EE2E5FDE20E942A15E881F9811B
+:101BB0000E946B130E948114EDE0F0E0A7E5B1E014
+:101BC0000E94E412A0E0B6E0AF93BF93E7E5F1E036
+:101BD0000E946B130E94710F112702E0BF91AF9119
+:101BE0000E943112E0E0F6E0ABE5B1E00E94DF12C6
+:101BF000ABE5B1E00E94F90EE8E6FFE20E94C911F0
+:101C00000C94DC0EE881F9810E946B13E6E5FDE29D
+:101C10000E942A150E94521310F00C943F0EEAE520
+:101C2000FDE20E942A15E881F9810E946B130E944F
+:101C30008114EDE0F0E0A7E5B1E00E94E412A0E03D
+:101C4000B6E0AF93BF93E7E5F1E00E946B130E940B
+:101C5000710F112702E0BF91AF910E943112E0E0B5
+:101C6000F6E0ABE5B1E00E94DF12ABE5B1E00E9427
+:101C7000F90EECE6FFE20E94C9110C94DC0EE8813B
+:101C8000F9810E946B13EEE5FDE20E942A150E9485
+:101C9000521310F00C947C0EE2E6FDE20E942A152D
+:101CA000E881F9810E946B130E948114EDE0F0E05D
+:101CB000A7E5B1E00E94E412A0E0B6E0AF93BF93C5
+:101CC000E7E5F1E00E946B130E94710F112702E01B
+:101CD000BF91AF910E943112E0E0F6E0ABE5B1E0D8
+:101CE0000E94DF12ABE5B1E00E94F90EE0E7FFE2EF
+:101CF0000E94C9110C94DC0EE881F9810E946B13DB
+:101D0000EAE3FDE20E942A150E94521310F00C949F
+:101D1000A90EA0E0B6E0AF93BF93E7E5F1E00E9423
+:101D20006B130E94710F112703E0BF91AF910E94C6
+:101D30003112E0E0F6E0ABE5B1E00E94DF12ABE586
+:101D4000B1E00E94F90EE4E7FFE20E94C9110C9491
+:101D5000DC0EE881F9810E946B13E6E6FDE20E9449
+:101D60002A150E94521310F00C94D60EA0E0B6E093
+:101D7000AF93BF93E7E5F1E00E946B130E94710FF0
+:101D8000112701E0BF91AF910E943112E0E0F6E02F
+:101D9000ABE5B1E00E94DF12ABE5B1E00E94F90EC5
+:101DA000E8E7FFE20E94C9110C94DC0EABE5B1E05C
+:101DB000EEEFFEE20E94C9110C94E40EABE5B1E037
+:101DC000EEEFFEE20E94C91108950D911D912D9133
+:101DD0003C910F5F1F4F2F4F3F4F3C932E931E930D
+:101DE0000E930895ED91FC91EF5FFF4FFC93EE93FE
+:101DF00008958F938D918823E9F711978F91089516
+:101E000080912001882309F081E0089580912001CC
+:101E1000882309F408950F929F93AF93BF937F9304
+:101E2000809120018823E1F3F894809120018A9524
+:101E30008093200190911E01A0E0B1E0A90F002441
+:101E4000B01D8C9193959E3109F4992790931E01B2
+:101E500078947F91BF91AF919F910F900895A0E0EA
+:101E6000B6E08D91882311F00CD0FBCF08950E942D
+:101E7000E611802D11F005D0FACF08958DE001D044
+:101E80008AE00090C00005FEFCCF8093C600089554
+:101E9000A0E0B6E08D91882311F009D0FBCF089522
+:101EA0000E94E611802D11F002D0FACF08950C9413
+:101EB0009A103197F1F70895689462F80895E894BC
+:101EC00062F80895EF93FF93EE27E82BE92B31F0AA
+:101ED000E0EDF7E03197F1F70197D1F7FF91EF913E
+:101EE00008958DE207FD8D938F2D881F802F881F09
+:101EF0008F57082F6894F7F8802F87FF15C08095BB
+:101F00008395082F80E38D938EE28D93802F8152ED
+:101F100028F080E38D9399279C93089544270A9590
+:101F2000802F09F196D01FC0805230F09EE49D931F
+:101F300081E48D939D93EFCF4427DF92EF92FF9240
+:101F40000F938FE1801B11F0082F83D089D09EE280
+:101F50009D930F91FF90EF90DF90442703950032FF
+:101F600009F4D7CF2BD03F93E2EFFFE138E12F2DDB
+:101F70001E2D0D2DFF24EE24DD244427000F111FFC
+:101F8000221FA8F42F923F920E94E611102C0E946B
+:101F9000E611202C0E94E611302C0E94E6113197A8
+:101FA000410DD21CE31CF01C3F902F9001C03396D2
+:101FB00031963A9519F73F9107D0AFCFDD0CEE1C63
+:101FC000FF1C0A95D9F70895002719E058D08F9380
+:101FD000802B11F0039501C08F911A95B9F7802FCE
+:101FE000882309F496CF8F91805D8D930A95D9F758
+:101FF00092CF0065CD1D80B2E60E40597307A0ACAC
+:10200000B90350D6DC01286BEE0094357700CA9AEC
+:102010003B0065CD1D00B2E60E0059730700ACB958
+:102020000300D6DC01006BEE0000357700009A3B20
+:102030000000CD1D0000E60E000073070000B9038C
+:102040000000DC010000EE000000770000003B0013
+:102050000000F694E794D79447950A95D1F7089530
+:1020600000270DD08F9303958F2D8E298D29842BDA
+:10207000C1F78F91805D8D930A95D9F74CCF1F934F
+:102080000F93002710E2440FDD1CEE1CFF1C001F05
+:10209000802F9AE0890B10F0082F43951A9599F735
+:1020A000802F0F911F9108955B9884E699270E94D5
+:1020B000620F5B9A2D9881E20BD088EC09D086E004
+:1020C00007D083E105D080E203D08CE001D00895F1
+:1020D0002C9801C02C9A7F9398E0880F10F42B9ACB
+:1020E00001C02B980000000000000000000000006C
+:1020F0000000000000002D9A000000000000000019
+:10210000000000000000000000002D989A9529F7BB
+:102110007F91089580E2DCDF80E4DADF80E8D8DFB9
+:1021200000E014E58827D6DF1A95E9F70395063015
+:10213000D1F70895EF93FF93509123015F9370902F
+:102140002401E0912101F09122010E94E611202D4D
+:102150000E94E611302D0E94E611002D0E94E6112A
+:10216000602D8052482F0E94FA12E40FF51FCC24F4
+:102170001124E22E603059F1DD24DA94CD2CFF24B5
+:10218000032F0E94E61121F00A95E00FF11D03C014
+:10219000F3940A95B1F7FD1408F4DF2CEA9479F76B
+:1021A000E22EFF24032F3197C895002021F00A95D5
+:1021B000E01BF10903C0F3940A95A9F7FC1408F495
+:1021C000CF2CEA9471F7D31611F4D62ECC2470924A
+:1021D0002401732F7C1940912401509123015F93B6
+:1021E0000E9434115F91603041F0DD2031F05D2DAF
+:1021F0000E94E6115A95E1F77D190E94E611802DA3
+:1022000050912501552309F08095409124014535D1
+:1022100014F40E946A1050912401539550932401A4
+:102220007A9559F7EC0DF11D603081F05091250140
+:10223000762F8827552309F080950E946A107A9599
+:10224000C1F750912401560F50932401509123015E
+:102250005395509323012A9509F0B9CF5F9150937C
+:102260002301FF91EF9108954A955A9580E230DF5E
+:1022700080E4850F2DDF80E8840F2ACF772321F0BB
+:10228000AA27BB270C94F0120C94E61111242224E7
+:10229000332479910E943E11002D48E00E940613DC
+:1022A0000A930E943E110A920A920B8148E00E9412
+:1022B00006130B834C81F42E5B81D8DF131479F461
+:1022C0000E943E11202C802D8A3A39F00E943E1146
+:1022D000802D8A3A39F031970DC031960BC01A948F
+:1022E00069F308C00E943E11802D882311F43297B3
+:1022F00001C0102C822D90912501992309F0809521
+:102300008F934F2D5B81B2DF8F9144351CF4573092
+:102310000CF4E0DEF39489818A95898379F68B81C8
+:1023200083958B83888189838A818A958A8311F436
+:1023300025960895BFCF0191119121913081089583
+:1023400099275A924A92480E591E08950F921F9249
+:102350002F92C801D901489F80014A9F90014B9F4D
+:10236000202C499F100D211D321D5A9F202C589F53
+:10237000100D211D321D599F200D311D689F200D0C
+:10238000311D699F300D789F300D2F901F900F9059
+:1023900008950E94E6110D920020D9F708957091DA
+:1023A0007A00706470937A0000907A0006FCFCCF8B
+:1023B00070917A00706470937A0000907A0006FC45
+:1023C000FCCF80917800909179000895C89531965E
+:1023D0000020089582E001C084E099279D938A95AA
+:1023E000E9F708957F930F93AF93BF938F939F93D4
+:1023F0008FB78F93E894809120010EE1081B29F498
+:102400009091C6000E945C0F14C000911F01A0E0D3
+:10241000B1E077279091C600A00FB71F9C936894F6
+:1024200083958093200103950E3109F400270093D2
+:102430001F010E9420068F918FBF9F918F91BF91A6
+:10244000AF910F917F91189599278D91939588233E
+:10245000E1F7939511968C9311978E919A95D1F7F8
+:102460000895EA2FFB2F00244C918D9103948E3216
+:10247000E1F711248D9113948823E1F71A94101633
+:1024800040F41197202F2119239580E38D932A95ED
+:10249000E9F7113039F59927AE2FBF2FA00DB91FDD
+:1024A000A00FB91F8C919C93853308F421C031E0B3
+:1024B0008E918E32E9F38D3241F0830F8A3319F415
+:1024C00080E331E001C033278C93AE1789F73323C3
+:1024D00041F0AE2FBF2FB8DF81E34D3209F43196C2
+:1024E000808308958827E00DF81FE00FF81F808390
+:1024F0000895040F151F261F371F0895000F111F81
+:10250000221F331F089500951095209530950F5F79
+:102510001F4F2F4F3F4F0895019110810CC00E9413
+:102520009B110BC00191108117FF05C03FEF2FEFEA
+:1025300004C0008111272227332737FF03C0E3DFC0
+:102540008DE28D93CF92DF92EF92AA24BB24CC240C
+:10255000DD24EE2440E2EAE0FF2755E093E38081AA
+:10256000890F87FD9F7083FD907F891B81935A950A
+:10257000A9F7C4DFAA1CBB1CCC1CDD1CEE1C4A95B1
+:1025800051F7E894EFE0FF2782910CD0EB30E0F7B1
+:102590001EF068948A2D0AD088278D93EF90DF90E3
+:1025A000CF900895982F829501D0892F8F70805DEC
+:1025B00026F0803309F4089568948D9308958191ED
+:1025C0008D938823E1F7089594E081918D939A95F6
+:1025D000E1F70895F999FECFE1BDF2BD3196089576
+:1025E00091E001C092E0F6DFF89A80B58D939A955C
+:1025F000D1F70895FF935527F8E0469508F4500F5A
+:1026000057954795FA95D1F7FF910895FF93881B49
+:10261000F9E0001FFA9511F4FF910895881F841BBB
+:1026200018F4840F8894F5CF0894F3CF8FEF839537
+:102630009D919923E1F70895689401C0E894AF93C0
+:10264000BF938D9116F0919103C00E94E611902DD9
+:10265000891718F011F48823A1F7BF91AF9108955D
+:10266000B7FE089590E8B91611F4D0FE08959FEFD3
+:10267000D91AE90AF90A09F40395089588E00FB612
+:10268000F8945A924A92E42DF52DA42DB52D480EBA
+:102690008827581E0FBE08950FB6F8944990599098
+:1026A0000FBE08950F928F939F93D216E306F40600
+:1026B0000FB680E890E8802795270FBE890739F08C
+:1026C0000FB6892B87FD02C081E008260FBE9F91BF
+:1026D0008F910F900895D190E190F190019108951C
+:1026E00021913191419151910895DD92ED92FD92A8
+:1026F0000C930895502F2D2D3E2D4F2D612F0895B1
+:10270000EADF992711278F2D880F80E8F82A802F7C
+:10271000881F08F41FEF41F08F57082F07FD04C0F2
+:10272000003240F08FEF01C08827982FD82EE82E76
+:10273000F82E09C08FE1801B082FF694E794D794F8
+:1027400097950A95D1F7112351F09095D094E09484
+:10275000F09481E0980F8827D81EE81EF81E0F2DF0
+:10276000FE2CED2CD92E0895D094E094F09491E0B5
+:10277000D90E9927E91EF91E10950895652F90E846
+:10278000440F551F5927990F47956078102F90E8EF
+:10279000FF0C001F0927990FF7941078003808954F
+:1027A000FF0C90E89027110F9795F794092F089543
+:1027B0001127BD2CDE2CEF2CF02E0EE1FF2039F47A
+:1027C000FE2CED2CDB2CBB240850C2F775C032F078
+:1027D0000A95BB0CDD1CEE1CFF1CF9CF41DFE0CFDE
+:1027E000102FBD2CDE2CEF2CF02E11234AF4B094C8
+:1027F000D094E094F0949FEFB91AD90AE90AF90A43
+:102800000EE1FF2039F4FE2CED2CDB2CBB2408500C
+:10281000C2F752C032F00A95BB0CDD1CEE1CFF1C47
+:10282000F9CF1EDFBDCF2DEC3CEC4CEC5DE3662711
+:102830000FC051DF5FDFDD24EE2490E8F92E0FE3B7
+:1028400007C04EDF05C02227332740E251E4662748
+:10285000552351F1002381F191DF71F116270058C2
+:1028600050580894050B18F407FD03C025C007FD58
+:1028700023C0469537952795F694E794D79425D0AD
+:10288000FF202AF0DD0CEE1CFF1C015073F09D2D83
+:10289000969548F0DD203AF4EE202AF491E0D90E26
+:1028A0009927E91EF91E7CCF07C09FE7092FF92A57
+:1028B0009FEFD92EE92E0895DD24EE24FF24002772
+:1028C000112708950FE79FEFF2CF9F929924AA2432
+:1028D000BB2488E1D216E306F40628F0D21AE30AF4
+:1028E000F40A089401C08894991CAA1CBB1CDD0C36
+:1028F000EE1CFF1C8A9571F7D92CEA2CFB2C9F90BB
+:1029000008953CDFD9F05038C9F016270058952FAC
+:1029100090580894091F12F418F40EC008F00EC065
+:102920000FD0FF202AF0BB0CDD1CEE1CFF1C02C0E8
+:10293000039513F095DE34CF0C9455140C945C146D
+:102940009F92FF92EF928D2DFF24EE24DD24BB2475
+:1029500093E0849F1001829FB00CD11CE21CF31CF9
+:10296000839FD00CE11C2224F21C9A9531F0BD2CDF
+:10297000DE2CEF2CFF248F91ECCF9F900895B0DEDA
+:10298000FDDE503829F090E869270CC00AF045D0E8
+:1029900007CF5FE322273327442701C0A1DEEEDE05
+:1029A0005038B1F3003899F3902F951B8BF312F444
+:1029B00034D0FACF983118F02227332744279830A3
+:1029C00028F0232F342F44279850F9CF992329F04A
+:1029D0004695379527959A95D9F7912F962742F0E6
+:1029E00014D0B0F6F794E794D7940F5F8BF65DCFD1
+:1029F00010D051F008F4B8DEFF2052F2DD0CEE1CCE
+:102A0000FF1C0150CBF751CF57CFD20EE31EF41E5F
+:102A10000895D21AE30AF40A0895DF92EF92FF9222
+:102A20000F931F93D22EE32EF42E052F162F6F91A6
+:102A30005F914F913F912F9108950E94E611D02C04
+:102A40000E94E611E02C0E94E611F02C0E94E61193
+:102A5000002D08950E94E611202D0E94E611302DD0
+:102A60000E94E611402D0E94E611502D0895002489
+:102A70000D280E280F28002A0020089545D17EDE5B
+:102A80000395AAF087E1DD0CEE1CFF1C8A9589F006
+:102A90000A95CAF7FF205AF000240D280E280F28A7
+:102AA000002039F00A95DD0CEE1CFF1CDAF70A95C0
+:102AB00030C102CF01CF28D10023E2F30E943715A5
+:102AC00019F4F3DE0068089585E0D9DDFF0C001FDE
+:102AD00004830FE70695F79412D1506860DF05DE96
+:102AE000139721E438E743ED5BEB0BDF27E831ED8B
+:102AF00043E15DE39AD02EE03CE343EC5DEB95D0FF
+:102B000022E83DEA4BE25EE390D02CEE32E846E765
+:102B10005EEB8BD020E931EE49EA5EE386D020E817
+:102B20003FEE4FEF5EEB81D024EC3FEF4FE75FE3EA
+:102B30007CD0DBDD139784818F5799F02AF4D82E4F
+:102B40000FEFE02EF02E04C0D82EEE24FF24002735
+:102B500047DE28E132E741E35FE3D3DEC1DD3497AE
+:102B60001EDF9ACDA2DE98CDCFD086E088DD05832A
+:102B70000F772BE33AEA48EB5FE3C3DEB6DD13974A
+:102B800041D028F4858188236AF796DE85CD8F773A
+:102B90008483BAD0349773DFA8DD139723E632E439
+:102BA00046E357EBAEDE29ED37EA4AE159E33DD083
+:102BB00026E538E14EEA5AEB38D026E53CE84DE10F
+:102BC0005CE333D02DEC37E543E65DEB2ED02DEE04
+:102BD0003DEF45E75EE329D028E132E741E35FEBD3
+:102BE00024D08DD0DCDE86DDDD24EE24FF240481BC
+:102BF0008FE7080F0695F7942BDE8581881F08F470
+:102C000019DE4ACD0E94BE138827039512F48894DA
+:102C1000089507301AF0812F08940895FF1C881F2B
+:102C20000A95E2F7812B88940895B9DE59DD34972F
+:102C300068CE0F93FF92EF92EDB7FEB7DF925F93EE
+:102C40004F933F93ADB7BEB72F9306D0EDB7FEB706
+:102C50003896EDBFFEBF089588278A93FA93EA93CA
+:102C6000BA93AA930E948416EA2FFB2F0E94701336
+:102C70000E94BE13503819F40038B1F13BC000383F
+:102C800019F457FD2CC02DC00F3771F15F3761F17A
+:102C900017FF11C0E881F9810E9480138827D0FABC
+:102CA00087F98C830E94F013E881F9810E947013E8
+:102CB0000E945213C9F4EA81FB810E9484160F77A7
+:102CC0000E945C15E881F9810E9470130E948114B2
+:102CD0000E94B5158C8187FB07F9259608950FE7AB
+:102CE00001C00027882702C00FE78FEFF82EE82EDB
+:102CF000D82EF3CF0FE380E8F82E8827F8CF5FE3D4
+:102D000040E8332722270895D190E190F190019176
+:102D10000895FF0C90E89027110F9795F794092FCD
+:102D20000895A4709D40D7A3004000007A44CDCC04
+:102D300004419A99F9406666E6400000803F7A4374
+:102D40008A30DB0FC94000000040000000005F70C7
+:102D50008930A5D46853BD378635286B6E4E6F1207
+:102D6000833A00247449000020414C432D4D657482
+:102D700065722E696F436F6E6E65637465642E4F66
+:102D80004B00696F436F6E6E65637465640032302B
+:102D9000323000005265616479004D65617375726F
+:102DA000696E672043617061636974616E63652059
+:102DB0003E3E3E3E00004D6561737572696E672050
+:102DC000496E64756374616E6365203E3E3E3E00ED
+:102DD00072737421000042617474657279206C6FA3
+:102DE0007720210043616C6962726174696F6E00C3
+:102DF0006D616B65207375726520746F2072656DEF
+:102E00006F766520616E79204C206F7220432066BA
+:102E1000726F6D20746865204D6561737572696E9F
+:102E200067205465726D696E616C7300706C6561CA
+:102E300073652077616974202E2E2E00706C656199
+:102E400073652077616974202E2E0000C6005E0035
+:102E500046313D200000205B487A5D202862617386
+:102E600065206672657175656E637929000046326A
+:102E70003D200000205B487A5D202863616C696218
+:102E8000726174696F6E206672657175656E6379C3
+:102E90002900636F6D706C657465202100004361CB
+:102EA0006C6962726174696F6E20636F6D706C65BE
+:102EB0007465202100004C2D4D6F64652020432D4A
+:102EC0004D6F646500004320446F6E652021000053
+:102ED00043617061636974616E63650046333D20D0
+:102EE0000000205B487A5D20286672657175656E0A
+:102EF000637920666F7220435F64657429004572B0
+:102F0000726F72202100433D2000465D00002020AA
+:102F10002020202020202020202020202000434D81
+:102F200020446F6E65202100496E64756374616E84
+:102F30006365200046343D200000205B487A5D2018
+:102F4000286672657175656E637920666F72204CB4
+:102F50005F64657429004C3D2000485D00004C4DC5
+:102F600020446F6E65202100205B7000205B6E00A6
+:0C2F7000205B7500205B6D00205B000002
+:00000001FF

+ 560 - 0
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/glcd-Nokia3310.lib

@@ -0,0 +1,560 @@
+Copyright = 
+Www = 
+Email = 
+Comment = Nokia 3310 Graphic Display Library
+Libversion = 1.0
+Date = February 2014
+Statement = 
+History=
+
+[_GLCD]
+$EXTERNAL _LPMBYTE,WAITMS
+_Init_lcd:
+_LCD_INIT:
+_SET_DISPLAY:
+*#If varexist("_GLCD_PORT_RST")
+* cbi _GLCD_PORT_RST,_glcd_rst		;  reset low
+#Endif 
+  Ldi r24,100				; reset 100 mS
+  Clr R25
+* Call _Waitms
+*#If varexist("_GLCD_PORT_RST")
+* sbi _GLCD_PORT_RST,_glcd_rst		;  reset high
+#Endif 
+* cbi _GLCD_PORT_SCL,_glcd_scl		;  clock low
+*#If varexist("_GLCD_PORT_CS1")
+* sbi _GLCD_PORT_CS1,_glcd_cs1		; disable chip
+#Endif 
+ ldi r24,&H21				; Extended command mode
+ rcall _gwrite_cmd
+ ldi r24,&HC8				; Middle contrast (&H80...&HFF)
+ rcall _gwrite_cmd
+ ldi r24,&H06				; Temperature setting
+ rcall _gwrite_cmd
+ ldi r24,&H13				; Bias 1:48
+ rcall _gwrite_cmd
+ ldi r24,&H20				; Normal command mode
+ rcall _gwrite_cmd
+ ldi r24,&H0C				; Uninverted Screen
+ rcall _gwrite_cmd
+ Ret
+
+; send command or data to LCD =====================================================================
+_gwrite_cmd:
+_Lcd_control:
+* cbi _GLCD_PORT_a0,_glcd_a0 		; command -  DC=0
+  Rjmp _Gwrite_DataMisc 			; same code
+
+_gwrite_data:
+*  sbi _GLCD_PORT_a0,_glcd_a0		; data -  DC=1
+  
+* #IF varexist("Negative_lcd")
+*   #IF Negative_lcd > 0 
+      com r24				; Inverted Screen 
+   #Endif
+#Endif 
+
+*#If varexist("Rotate_lcd")
+  *#If Rotate_lcd>0
+   mov r25,r24
+   bst r25,0
+   bld r24,7
+   bst r25,1
+   bld r24,6
+   bst r25,2
+   bld r24,5
+   bst r25,3
+   bld r24,4
+   bst r25,4
+   bld r24,3
+   bst r25,5
+   bld r24,2
+   bst r25,6
+   bld r24,1
+   bst r25,7
+   bld r24,0
+    #Endif
+#Endif 
+
+_gwrite_datamisc:
+  push r23
+*#If varexist("_GLCD_PORT_CS1")
+*  cbi _GLCD_PORT_CS1,_glcd_cs1        	; enable chip -  CS=0 
+#Endif 
+  ldi r25,8                            	; 8 bits
+_gwrite_datamisc8:
+  lsl r24                              	; bit into carry
+  brcc _gwrite_datamisc_0             	; bit was 0
+*  sbi  _GLCD_PORT_SI, _glcd_si		; set bit
+  rjmp _gwrite_datamisc_next
+_gwrite_datamisc_0:
+* cbi  _GLCD_PORT_SI, _glcd_si		; clear bit
+_gwrite_datamisc_next:
+  @genus(1)
+* sbi _GLCD_PORT_SCL,_glcd_scl		; SCL=1
+  @genus(1)
+* cbi _GLCD_PORT_SCL,_glcd_scl		; SCL=0
+ dec r25
+ brne _gwrite_datamisc8			; do 8 bits
+*#If varexist("_GLCD_PORT_CS1")
+* sbi _GLCD_PORT_CS1,_glcd_cs1		; disable chip -  CS=1
+#Endif 
+ pop r23
+ret
+
+
+;there is no difference between clear text and clear graphics!==================================================
+_clear_graph:
+_clear_text:
+  Ldi r24,&H20				; normal command mode
+  Rcall _gwrite_cmd
+  Ldi r24,&H40				; row 0
+  Rcall _gwrite_cmd
+  Ldi r24,&H80				; column 0
+  Rcall _gwrite_cmd				 
+  ldi r16,0
+  Ldi r17,84				; 84 pages
+  Clr r24
+_clear_graph1:
+  rcall _GWrite_data			; write 0
+  Dec r17
+  Brne _clear_graph1			; write 84 times
+  Inc r16
+  Cpi r16,6 				; 6 rows 
+  Brne _clear_graph1
+ret
+
+
+;character in r24  ============================================================================
+;in order to draw multiple fontsizes the fontdata stores the
+;number of bytes and the number of rows.
+;  .db 1,8,8,0  , means 1 row, 8 bits width, block size total, last param is spacing for true type fonts
+_gwrite_lcdchar:
+$EXTERNAL _LPMBYTE, _MUL8, _GLOCATE
+  Push r30                      ; save registers
+  Push r31
+  lds r21,{___lcdrow}           ; the row
+  push r21                  	; save it
+  lds r7,{___lcdcol}
+  Lds r30 ,{___fonttable}	; start of font data
+  Lds r31 ,{___fonttable +1}
+#IF _ROMSIZE>65536
+* In R3,RAMPZ                   ; save RAMPZ page
+* Lds r0,{___fonttable +2}      ; load page number for the used font
+* Out RampZ,r0                  ; set page number
+#ENDIF
+  Call _lpmbyte                 ; Get Y Bytes 1 For Example
+  mov r18,r0                    ; save Y
+  call _lpmbyte                 ; get X bytes , 8 for  an 8*8 font
+  mov r19,r0                    ; save X
+  call _lpmbyte                 ; get blocksize
+  mov r16,r0                    ; in accu
+  call _lpmbyte                 ; get blocksize
+  mov r22,r0                    ; spacing, should be 1 or 2
+
+  subi r24,32                   ; chars start at 32 (space)
+  mov r20,r24
+  call _mul8                    ; get offset
+
+  Add r30,r20                   ; add to start of font data
+  Adc r31,r21
+#IF _ROMSIZE>65536
+  rcall _glcd_rampcheck_inc     ; check boundery
+#ENDIF
+ ;--------optional true type option ----
+ clr r12
+ ;we need to determine the left space of the character so that we can skip these zeros
+ ;we store the left in r15
+ clr r1                                  ; we need a reg with zero
+ mov r14,r18                             ; Y bytes
+ cpi r22,0                               ; test for 0
+ breq _gwrite_lcdchar_rows               ; it is 0 so skip this option
+ clr r13
+ dec r13                                 ; put 255 into r13
+ mov r12,r13                             ; and also in r12
+_truetypey:
+ clr r15
+ mov r16,r19                             ; x bits
+_trueTypeX:
+  call _lpmbyte                          ; get data in r0
+  breq _trueType1                        ; it is zero so skip
+  dec r16                                ; adjust
+  Add r30,r16                            ; skip the rest of the bytes
+  Adc r31,r1                             ; add zero
+#IF _ROMSIZE>65536
+  rcall _glcd_rampcheck_inc              ; check boundery
+#ENDIF
+  rjmp  _truetype2                       ; skip code
+_truetype1:
+  inc r15                                ; inc zero bytes counter
+  dec r16
+brne _trueTypeX                          ; check the other x bytes
+_truetype2:
+ cp r15,r13                              ; check the previous with the new value
+ brsh _truetype3                         ; if r15 same or higher then we skip
+ mov r13,r15                             ;save the smallest in r13
+_truetype3:
+ dec r14                                 ; next row of bytes
+ brne _trueTypeY                         ; check again for Y
+ ;now r13 contains the number of left bytes to skip
+ ;we now check the same in reverse so we get the rgt space and the Z pointe is at the right pos
+ mov r14,r18                             ; Y bytes
+_truetypeyr:
+ clr r15
+ mov r16,r19                             ; x bits
+_truetypexr:
+  sbiw r30,1                             ; dec Z pointer
+#IF _ROMSIZE>65536
+  rcall _glcd_rampcheck_dec              ; check boundery
+#ENDIF
+ lpm                                     ; get byte
+ tst r0                                  ; test for zero
+ breq _truetype1R
+ dec r16
+ sub r30,r16
+ sbc r31,r1
+#IF _ROMSIZE>65536
+  rcall _glcd_rampcheck_dec              ; check boundery
+#ENDIF
+ rjmp _truetype2R
+_truetype1r:
+ inc r15
+ dec r16
+ brne _truetypeXR
+_truetype2r:
+ cp r15,r12
+ brsh _truetype3R
+ mov r12,r15
+_truetype3r:
+ dec r14
+ brne _truetypeYR
+ ;now R12 contains right space
+ cp r13,r19                             ; check if left is empty char
+ brne  _gwrite_lcdchar_rows             ; no so continue
+ mov r13,r22                            ; use defined spaces since a space would be all zero
+ clr r12                                ; clear right space otherwise it mess up
+_gwrite_lcdchar_rows:
+ sts {___lcdcol},r7                     ; restore column
+ mov r23,r19                            ; x bits 8 12 or 16
+ sub r23,r12                            ; minus right space
+
+_gwrite_lcdchar1:
+  lds r20,{___lcdcol}
+  lds r21,{___lcdrow}  
+  push r21
+
+*#If varexist("Rotate_lcd")		
+  *#If Rotate_lcd>0
+  push r25
+  ldi r25,7				; row position
+  sub r25,r21 
+  mov r21,r25
+  pop r25
+    #Endif
+#Endif							
+
+  call _Glocate				; set right position ------------------------------------------------ LOCATE 
+    pop r21
+
+  cpi r22,0					; test for 0
+  breq  _gwrite_lcdchar2		; normal font
+  tst r13						; check spaces
+  breq  _gwrite_lcdchar2		; if zero then skip
+  mov r21,r13				; skips
+_gwrite_lcdcharSkips:
+  call _lpmbyte				; get byte
+  dec r21
+  brne _gwrite_lcdcharSkips
+  sub r23,r13					; adjust x bits
+_gwrite_lcdchar2:
+  call _lpmbyte				; get byte
+  mov r24,r0
+  lds r21,{___LCDrev}		; reverse display?
+  tst r21
+  breq _gwrite_lcdchar3
+  com r24					; not 0 so complement
+_gwrite_lcdchar3:
+ lds r20,{___lcdcol}
+ cpi r20,85				; is it Horisontal offscreen?
+ brge _skip_offscreen 
+
+*#If varexist("Rotate_lcd")		
+  *#If Rotate_lcd>0
+     push r24
+     ldi r24,83					; col position
+     sub r24,r20
+     sbr r24,$80				
+     call _GWrite_cmd
+     pop r24
+     cpi r20,84				; is it Horisontal offscreen?
+     brge _skip_offscreen
+    #Endif
+#Endif
+
+ call _GWrite_data                       ; write char data ------------------------------------------- WRITE DATA
+_skip_offscreen:
+lds r21,{___lcdcol}                     ; increase column
+ inc r21
+ sts {___lcdcol},r21
+ dec r23                                 	; dec bits dones
+ brne _gwrite_lcdchar2		; write all X bytes
+ add r30,r12                             	; move z pointer with right space so we keep the proper pointer value
+ adc r31,r1                              	; r1 was 0
+#IF _ROMSIZE>65536
+  rcall _glcd_rampcheck_inc	; check boundery
+#ENDIF
+ ;now add some space
+ cpi r22,0					; is it true type?
+ breq _gwrite_lcdchar5		; no so exit
+ lds r21,{___LCDrev}			; reverse display?
+ mov r23,r22				; right space columns
+_gwrite_rightspace:
+ clr r24
+ tst r21						; test inverse
+ breq _gwrite_rightspace2	; skip if normal
+ com r24					; inverse
+_gwrite_rightspace2:
+ call _GWrite_data			; write char data -----------------------------------------------------------	
+ dec r23
+ brne _gwrite_rightspace
+ lds r21,{___lcdcol}			; increase column
+ add r21,r22
+ sts {___lcdcol},r21
+_gwrite_lcdchar5:
+ lds r21,{___lcdrow}			; inc row
+ inc r21
+ sts {___lcdrow},r21
+ dec r18						; dec rows
+ breq _gwrite_lcdchar4		; all done so skip code
+ rjmp _gwrite_lcdchar_rows	; for all rows
+
+_gwrite_lcdchar4:
+ pop r21						; get original row back
+ sts {___lcdrow},r21			; restore
+
+#IF _ROMSIZE>65536
+*  OUT RAMPZ, R3			; restore RAMPZ for next character
+#ENDIF
+
+ Pop R31
+ Pop R30
+ret
+
+
+
+#IF _ROMSIZE>65536
+_glcd_rampcheck_inc:
+  Brcc _glcd_rampcheck_inc1                ; no boundery
+  In R2,RAMPZ
+  Inc R2
+  Out RAMPZ,R2
+_glcd_rampcheck_inc1:
+ret
+
+_glcd_rampcheck_dec:
+  Brcc _glcd_rampcheck_dec1                ; no boundery
+  In R2,RAMPZ
+  Dec R2
+  Out RAMPZ,R2
+_glcd_rampcheck_dec1:
+ret
+
+#ENDIF
+[END]
+
+
+[_GLOCATE]
+; called with R21 row  R20 col
+_glocate:
+  Dec r20					; adjust column
+  Dec r21					; adjust row
+_setcol:
+  Ldi r24,&H20				; normal command mode
+  Rcall _gwrite_cmd
+  ldi r24,&H40	
+  add r24,r21
+  rcall _GWrite_cmd			; row address 
+  ldi r24,&H80
+  add r24,r20				
+  rjmp _GWrite_cmd			; column address
+[END]
+
+
+;r22 - x2
+;r20- x1
+;r21 - y
+[_CLS_LINE]
+$EXTERNAL  _GLOCATE
+_Cls_Line:
+  rcall _glocate  ; select right location
+_Cls_Line_loop:
+  lds r24,{___LCDrev}  ;read value to use from reverse
+  rcall _gwrite_data  ; clear
+;  inc r21                    >>> Edit by MWS <<<
+;  cp r21,r22                 >>> Edit by MWS <<<
+  inc r20                    ;>>> Added by MWS <<<
+  cp r20,r22                 ;>>> Added by MWS <<<
+  brlo _Cls_Line_loop
+Ret
+[END]
+
+
+[_getbytefromrom_eprom]
+$EXTERNAL _READEEPROM, _LPMBYTE
+; get a byte from code ROM or from EEPROM
+;you could write code to get the data from an external EEPROM
+_getbytefromrom:
+  Tst R23                          ; is it 0 ?
+  Breq _GetByteFromROM1            ; yes get from flash
+  Clr R26                          ; point to R0
+  Clr R27
+  jmp _ReadEEPROM1                ; get data in r0
+
+_getbytefromrom1:
+  jmp _LpmByte                    ; returns data in r0
+[END]
+
+
+
+[_showpicture]
+$EXTERNAL _DIV8 , _MUL8 , _GETBYTEFROMROM_EPROM , _GLOCATE
+; RLE encoded. When the data after the byte is AA, it means it is a repeating
+; sequence and the byte after it hold the number of repeats
+; AB, AC , AF,AA, EE means show AB,AC and AF EE times
+; needs more code but needs less picture data!
+; show a picture with ShowPic x,y , label
+; y+2 holds X, y+1 holds Y , y+0 holds EPROM/ROM flag, Z points to picture data
+; The calling code uses for example
+; clr r20
+; clr r21
+; st -y,r20      this way it will be referred to with  y+4
+; st -y,r21                   and                      y+3
+
+; ldi zl,low(plaatje * 2)        to point to picture data
+; ldi zh,high(plaatje * 2)
+; in the SED data is stored column after column with 8 rows of data
+_showpicture:
+ CLR R1                           ; repeats
+ CLR R2                           ; char to repeat
+ clr r3                           ; temp register
+ ld r23,y+                        ; 255 means get from EEPROM, 0 means get from flash
+ Call _getbytefromrom             ; Get Height Of Picture In Pixels
+ Mov r16,r0                       ;
+ Ldi r20,8
+ Call _Div8                       ; divide by 8
+ St -y,r16                        ; y+2  number of rows to do
+
+ Call _getbytefromrom             ; Get Width Of Picture In Pixels
+ st -y,r0                         ; number of cols into  y+1
+ st -y,r0                         ; number of cols into  y+0
+
+ ld r16,y+3                       ; get Y pos
+ Ldi R20 , 8			
+ Call _div8                       ; Correct
+ st y+3,r16                       ; save row
+_showpicture1:
+ ld r20,y+4                       ; get X
+mov r15,r20
+ ld r21,y+3                       ; get Y
+ Rcall _setcol                    ; set address  -----------------------------------------------
+
+_showpicture2:
+; *** New RLE encoding routine ***
+  cp r1,r3                        ; is repeats 0 ?
+  brne _ShowPicture8              ; no
+  Call _getbytefromrom            ; Get Next Char
+  mov r2,r0                       ; save char
+  mov r24,r0
+  cpi r24,&HAA                    ; test for repeat char must always be shown
+  breq _ShowPicture9              ; we need to show AA
+  Call _getbytefromrom            ; Is It Rle print
+  mov r24,r0
+  cpi r24,&HAA                    ; is it a RLE encoded char?
+  breq _ShowPicture10             ; yes
+  sbiw R30,1                      ; no readjust pointer to graphic data
+  rjmp _ShowPicture11             ; show it
+
+_showpicture9:
+  adiw r30,1			  ; skip 0
+  rjmp _ShowPicture11
+_showpicture8:
+  ;we are repeating
+  dec r1                          ; adjust repeat counter
+  breq _showpicture2
+  rjmp _ShowPicture11             ; show it
+_showpicture10:
+  Call _getbytefromrom            ; Get Number Of Repeats
+  Mov r24,r0
+  Tst r24                         ; is it zero?
+  Brne _showpicture15             ; no a real sequenc
+  Sbiw r30,2                      ; adjust pointer
+  Rjmp _showpicture11             ; skip somebytes
+_showpicture15:
+  mov r1,r0                       ; save number of repeats
+_showpicture11:
+  mov r24,r2
+; *** end of RLE code ***
+
+;--------------
+  lds r25,{___LCDrev}             ; reverse display?
+  tst r25
+  breq _showpicture12
+  com r24
+_showpicture12:
+;---------------
+  push r24
+  mov r20,r15 
+  ldd r21,y+3
+
+*#If varexist("Rotate_lcd")		
+  *#If Rotate_lcd>0
+  push r20
+  push r21
+  ldi r24,83
+  sub r24,r20
+  mov r20,r24
+  ldi r24,5
+  sub r24,r21
+  mov r21,r24
+    #Endif
+#Endif
+
+Rcall _setcol                    ; set address -----------------------------------------
+
+*#If varexist("Rotate_lcd")		
+  *#If Rotate_lcd>0
+  pop r21
+  pop r20
+     #Endif
+#Endif
+ 
+  pop r24
+  cpi r20,84			; is it Horisontal offscreen?
+  brge _offscreen  
+  cpi r21,7			; is it Vertical offscreen?
+  brge _offscreen
+  rcall _Gwrite_Data		;-------------------------------------------------------	
+_offscreen:
+  inc r15
+
+  ld r24,y+1                      ; get column counter
+  dec r24
+  st y+1,r24                     ; save col counter
+  brne _ShowPicture2	; for all columns
+
+  ld r24,y+3                      ; next page
+  inc r24
+  st y+3,r24
+
+  ld r24,y+0                      ; get num of cols
+  st y+1,r24                      ; save for the new row
+
+  ld r24,y+2                      ; get row counter
+  dec r24
+  st y+2,r24
+  brne _showpicture1a              ; for all rows
+  adiw r28,5                      ; adjust soft stack
+  Ret
+ _showpicture1a:
+   Rjmp _showpicture1
+[END]

BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/ind_s.bgf


BIN
LC Meter v1.0/2a. Updated Firmware (May 3rd, 2021)/splash_s.bgf