-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathi2c_lcd.src
672 lines (565 loc) · 17.6 KB
/
i2c_lcd.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
;************************************************
; 8039 Quarz = 3,6864 Mhz *
; f = 3,6864 Mhz / 3 = 1,2288 Mhz *
; ALE = CLK / 5 = 245,76 kHz = 4,069 us *
; TCLK int = ALE / 32 = 7,68 kHz = 130,2083 us *
; 1 cyc = 4,069 us *
; 1 timer tick = 130 us *
; Syntax: Telemark TASM Version 3.2 *
;************************************************
#include "mc1000.inc";
#include "io.inc";
#include "i2c.inc";
#include "lcd_i2c.inc";
#include "macros.inc"
MAJOR = 2
MINOR = 2
;*** Values of freerunning timer interrupt
Ttick_10ms = 77 ; 10,02 ms/130 us = 77
Ttick_5ms = 38 ; 4,9 ms /130 us = 38
Ttick_1ms = 8 ; 1,04 ms / 130 us = 8
Ttime = Ttick_1ms;
TSCALE = (256 - Ttime) ; TSCALE + Ttime => Timeroverflow (FF -> 00)
.org 0000h
_RESET jmp INIT ; reset sprungadresse
nop
_INT jmp INTERRUPT ; interrupt sprungadresse
nop
nop
_TINT jmp TIMERINT ; timer interrupt sprungadresse
nop
; ------- MiniPro EPROM ID 16 Byte ------------
.org 0010h
; reserved for MiniPro 16 Byte EPROM ID/sertial numbers
; "2021-02-16 16:23"
ROMDAT .byte "2021-xx-xx yy:yy"
.byte $00
; ---------------- init --------------------
INIT dis i ; (1 cyc) disable interrupt
en tcnti ; (1 cyc) enable timer interrupt
call I2CINIT
mov a,#TSCALE ; load 1ms timerinterrupt prescaler
mov t,a ; load timer
strt t ; start timer
ent0 clk ; enable output T0 processor clock
call wait100 ; waitstate for LCD power up
call I2CSTART ; I2C start sequence
;*** set LCD Address
mov a,#I2CLCDWR ; i2c 7-bit LCD write address
call I2COUT ; write to I2C
call INITLCD ; run LCD initsequence
mov a,#lcd_Line1 ; Zeile 1, Pos 0
call LCDPOS ; set cursor position
mov a,#$LB(LOGO) ; load start of string
call PRINTP3LCD ; print on LCD
mov a,#lcd_Line2 ; Zeile 2, Pos 0
call LCDPOS ; set cursor position
mov a,#$LB(VERSION) ; load start of string
call PRINTP3LCD ; print on LCD
mov a,#MAJOR ; load major version number
add a,#$30 ; convert to ASCII
call LCDDAT ; print single major version on LCD
mov a,#'.' ; load ASCII '.'
call LCDDAT ; print on LCD
mov a,#MINOR ; load minor version number
add a,#$30 ; convert to ASCII
call LCDDAT ; print single minor version on LCD
call wait001 ; wait 1ms
mov a,#lcd_Line4 ; Zeile 4, Pos 0
call LCDPOS ; set cursor position
mov a,#$LB(ROM) ; load start of string
call PRINTP3LCD ; print on LCD
call wait001 ; wait 1ms
call ROMDAT2LCD ; print timestamp of ROM burning
call wait001 ; wait 1ms
mov a,#lcd_Line3 ; Zeile 3, Pos 0
call LCDPOS ; set cursor position
mov a,#$LB(TIMERTICK) ; load start of string
call PRINTP3LCD ; print on LCD
call wait001 ; wait 1ms
mov a,#Ttime ; load Ttime
add a,#$30 ; add P3 textstart
call PRINTP3LCD ; print on LCD
call I2CSTOP ; I2C stop sequence
jmp $ ; loop to yourself
;*****************************************
; print string from P3 to LCD *
; A= Startaddress of Text within Page3 *
;*****************************************
PRINTP3LCD
mov r1,a ; set A to textstart
PP3LCD_1
mov a,r1 ; lade text index
movp3 a,@a ; hole zeichen aus P3, index akku
jz PP3LCD_2 ; null byte endekennung?
call LCDDAT ; print chr on LCD
call wait001 ; wait 1ms
inc r1 ; text index++
jmp PP3LCD_1 ;
PP3LCD_2
ret ;
;*****************************************
; print ROM burning date to LCD *
; R1= start of string *
;*****************************************
ROMDAT2LCD
mov r1,#ROMDAT ; set A to textstart within Pge3
RD1 mov a,r1 ; lade text index
movp a,@a ; hole zeichen aus ROM, index akku
jz RD2 ; null byte endekennung?
call LCDDAT ; print chr on LCD
call wait001 ; wait 1ms
inc r1 ; text index++
jmp RD1 ; loop
RD2 ret ; Bye
.org $0100
;*****************************************
; Init sequence for LCD 4-bit mode *
;*****************************************
INITLCD ;*** Init Try 1
mov r5,#EXPWRCMD ; preset for P0-P3 expander, K=1, E=1, RW=0, RS=0
mov a,#$(%00110000) ; Function Set #1, DL=1 8bit datalength
call LCDCMDI ; write high nibble LCD cmd
call wait005 ; 5ms
;*** Init Try 2
mov r5,#EXPWRCMD ; preset for P0-P3 expander, K=1, E=1, RW=0, RS=0
mov a,#$(%00110000) ; Function Set #2, DL=1 8bit datalength
call LCDCMDI ; write high nibble LCD cmd
call wait001 ; 1ms
;*** Init Try 3
mov r5,#EXPWRCMD ; P0-P3 expander, K=1, E=1, RW=0, RS=0
mov a,#$(%00110000) ; Function Set #3, DL=1 8bit datalength
call LCDCMDI ; write high nibble LCD cmd
call wait001 ; 1ms
; Init set 4bit mode
mov r5,#EXPWRCMD ; preset P0-P3 expander, K=1, E=1, RW=0, RS=0
mov a,#$(%00101100) ; Function Set, DL=0 4bit datalength, E=1, RS=0
call LCDCMDI ; write high nibble LCD cmd
call wait001 ; 1ms
;***** start valid Init sequence
; set 'Function Set'
mov a,#$(%00101000) ; Function set: DL=0 4bit, N=1 2lines, F=0 5x7 dots
call LCDCMD ; write 8-bit LCD command
call wait001 ; 1ms
; set 'Display Control'
mov a,#$(%00001100) ; display control: D=1 display on, C=0 cursor off, B=0 blink cursor off
call LCDCMD ; write 8-bit LCD command
call wait001 ; 1ms
; set 'Clear Control'
mov a,#$(%00000001) ; clear display
call LCDCMD ; write 8-bit LCD command
call wait001 ; 1ms
; set 'Entry mode'
mov a,#$(%00000110) ; entry mode: I/D=1 increment, S=0 with display shift no
call LCDCMD ; write 8-bit LCD command
call wait001 ; 1ms
; set 'Cursor At Home'
mov a,#$(%00000010) ; 'Cursor At Home'
call LCDCMD ; write 8-bit LCD command
call wait001 ; 1ms
ret ;bye
;*****************************************
; Set CG/DD RAM address only, Write LCD 4-bit value
; A= CG/DD LCD 8bit-RAM address ($00 - $7F) only
; r5= temp Port expander PCF8574
; r6= temp LCD 8bit-value
;*****************************************
LCDCGR orl a,#$(%01000000) ; set CG RAM
jmp LCDR
LCDPOS orl a,#$(%10000000) ; set DD RAM
LCDR mov r5,#EXPWRCMD ; P0-P3 expander, K=1, E=1, RW=0, RS=0
; set high nibble LCD command
mov r6,a ; store full 8-bit LCD-value
anl a,#$F0 ; cut low nibble from LCD-value
add a,r5 ; add P0-P3 expander, (K, E, RW, RS)
mov r5,a ; store expander full 8-bit port
call I2COUT ; write to I2C
mov a,r5 ; load expander full 8-bit
anl a,#$(%11111011) ; falling edge E=0
call I2COUT ; write to I2C
; set low nibble LCD command
mov a,r6 ; load full 8-bit LCD-value
swap a ; xchange nibble, low -> high
mov r6,a ; store modified full 8bit LCD-value
mov a,r5 ; load expander full 8-bit
anl a,#$0f ; extract K, E, RW, RS
mov r5,a ; store P0-P3 expander, (K, E, RW, RS)
mov a,r6 ; load full 8-bit LCD-value
anl a,#$F0 ; cut low nibble LCD-value
add a,r5 ; add P0-P3 expander, (K, E, RW, RS)
mov r5,a ; store expander full 8-bit
call I2COUT ; write to I2C
mov a,r5 ; load expander full 8-bit
anl a,#$(%11111011) ; falling edge E=0
call I2COUT ; write to I2C
ret ; bye
;*****************************************
; Write LCD 4-bit value
; A= LCD 8bit-command
; r5= temp Port expander PCF8574
; r6= temp LCD 8bit-value
;*****************************************
LCDCMD mov r5,#EXPWRCMD ; P0-P3 expander, K=1, E=1, RW=0, RS=0
jmp LCD ;
LCDDAT mov r5,#EXPWRDAT ; P0-P3 expander, K=1, E=1, RW=0, RS=1
; set high nibble LCD command
LCD mov r6,a ; store full 8-bit LCD-value
anl a,#$F0 ; cut low nibble from LCD-value
add a,r5 ; add P0-P3 expander, (K, E, RW, RS)
mov r5,a ; store expander full 8-bit port
call I2COUT ; write to I2C
mov a,r5 ; load expander full 8-bit
anl a,#$(%11111011) ; falling edge E=0
call I2COUT ; write to I2C
; set low nibble LCD command
mov a,r6 ; load full 8-bit LCD-value
swap a ; xchange nibble, low -> high
mov r6,a ; store modified full 8bit LCD-value
mov a,r5 ; load expander full 8-bit
anl a,#$0f ; extract K, E, RW, RS
mov r5,a ; store P0-P3 expander, (K, E, RW, RS)
mov a,r6 ; load full 8-bit LCD-value
LCDCMDI anl a,#$F0 ; cut low nibble LCD-value
add a,r5 ; add P0-P3 expander, (K, E, RW, RS)
mov r5,a ; store expander full 8-bit
call I2COUT ; write to I2C
mov a,r5 ; load expander full 8-bit
anl a,#$(%11111011) ; falling edge E=0
call I2COUT ; write to I2C
ret ; bye
;*****************************************
; I2C read data
; SDA & SCL should be low before
; r0= temp bitcounter
; r3= temp data
; A= data
;*****************************************
I2CIN
; SDA & SCL should here be low
mov r0,#$08 ; set bitcounter to 8-bit
; loop over 8-bit data
I2CO01
orl p1,#$(1 << SCL) ; SCL high, clock rising
in a,p1 ; read P1x (SDA)
anl p1,#~(1 << SCL) ; SCL low, clock falling
clr c ; C=0
jb1 I2CO02 ; SDA=1 (P1x)
jmp I2CO03 ; SDA=0 (P1x)
I2CO02 cpl c ; C=1
I2CO03 mov a,r3 ; lopad temp data
rlc a ; shift carry into A
mov r3,a ; save temp data
djnz r0,I2CO01 ; decrement bitcounter,next loop r0>0
; check bit-9 AKN/NAKN
orl p1,#$(1 << SCL) ; SCL high, clock rising
in a,p1 ; read P1x
nop ; carry to be define
anl p1,#~(1 << SCL) ; SCL low, clock falling
ret
;*****************************************
; I2C write out address/date
; SDA & SCL should be low before
; data must be stable before and after clock
; A= address/data -> R3
; r0= temp bitcounter
; r3= temp address/data
;*****************************************
I2COUT ; SDA & SCL should here be low
mov r0,#$08 ; set bitcounter to 8-bit
; loop over 8-bit adress+RW/data
I2CB01 mov r3,a ; set A to temp adress/data
clr c ; prerpare carry
mov a,r3 ; load temp adress/data
rlc a ; shift bit out into carry
jc I2CB1 ; bit set
jmp I2CB2 ; bit clear
I2CB1 orl p1,#$(1 << SDA) ; SDA high, bit rising
I2CB2 orl p1,#$(1 << SCL) ; SCL high, clock rising
anl p1,#~(1 << SCL) ; SCL low, clock falling
anl p1,#~(1 << SDA) ; SDA low, bit falling
djnz r0,I2CB01 ; decrement bitcounter,next loop r0>0
; check bit-9 AKN/NAKN
orl p1,#$(1 << SCL) ; SCL high, clock rising
in a,p1 ; read P1x
nop ; result of AKN/NAKN TBD
anl p1,#~(1 << SCL) ; SCL low, clock falling
ret ; Bye
;*****************************************
; I2C init sequence
;*****************************************
I2CINIT
orl p1,#$((1 << SDA)|(1 << SCL)) ; SDA & SCL high
ret ; Bye
;*****************************************
; I2C start sequence
;*****************************************
I2CSTART
orl p1,#$((1 << SDA)|(1 << SCL)) ; SDA & SCL high
anl p1,#~(1 << SDA) ; SDA low, SCL high
anl p1,#~((1 << SDA)|(1 << SCL)) ; SDA & SCL low
ret ; Bye
;*****************************************
; I2C stop sequence
;*****************************************
I2CSTOP
orl p1,#$(1 << SCL) ; SCL high
orl p1,#$((1 << SDA)|(1 << SCL)) ; SDA & SCL high
ret ; Bye
.org $0200
;************************************************
; Load SW1/SW2
; R3/R4= temporary result of SW1/SW2
; P10-13= used for address counting
; $20= result of SW1
; $21= result of SW2
;************************************************
rdSW12:
mov a,#$10 ; init value-corunter
mov r2,a ; with %00010000
L0332:
mov a,r3 ; move SW counter from r3
mov r4,a ; to SW counter r4
L0334:
dec r2 ; value-counter r2--
in a,p1 ; load current value of port1
anl a,#$F0 ; cut low nibble
orl a,r2 ; "add" value-counter r2 into
outl p1,a ; write back to port1
mov a,r3 ; load A with r3
clr c ; clear carry
jt1 L033F ; SW is "On"?
cpl c ; set carry (inverted val)
L033F:
rlc a ; fill value with carry from right
mov r3,a ; store result to counter r3
mov a,r2 ; load counter r2
jb3 L0332 ; bit 3 set (SW2 active)?
anl a,#$0F ; cut high nibble
jz L034A ; value-counter clear
jmp L0334 ; next loop, SW counter -> r4
L034A:
mov r0,#ZP_SW1 ; set index ZP $20
mov a,r3 ; store result from r3
mov @r0,a ; to RAM $20
mov r0,#ZP_SW2 ; set index ZP $21
mov a,r4 ; store result from r4
mov @r0,a ; to RAM $21
ret ; bye
;*****************************************
; watchdog impuls |_|- high->low -> high *
; must be execute at least each ~630ms *
;*****************************************
WATCHDOG:
anl p2,#$(~b_WD) ; (2 cyc) P27 Watchdog low
orl p2,#b_WD ; (2 cyc) P27 Watchdog high
ret ; (2 cyc)
;********************************************
; waitXXX only valid when TimerTick running *
; r7 = 1ms * delay value *
;********************************************
wait001 mov a,#1 ; set 1*1ms timer counter
mov r7,a
jmp wait
wait005 mov a,#5 ; set 5*1ms timer counter
mov r7,a
jmp wait
wait010 mov a,#10 ; set 10*1ms timer counter
mov r7,a
jmp wait
wait100 mov a,#100 ; set 100*1ms timer counter
mov r7,a
jmp wait
wait mov a,r7 ; load timer counter, decrement on each TimerInt
jnz wait ; loop until zero
ret ; Bye
.org $0300
;************************************************
; load textfile for strings on page3
;************************************************
#include "text.inc";
.org $0400
;************************************************
; convert 8bit to ASCII Hex
; A= 8bit value
; r0= temp value
; $22= rescued val of 8bit
; $23= low nibble 0-F
; $24= high nibble 0-F
; $25= temp working nibble result
;************************************************
b82HEX:
mov r0,#ZP_22 ; set index
mov @r0,a ; rescue 8b value to RAM $22
anl a,#$F0 ; cut low nibble
swap a ; swap nibble to create low nibble
mov r0,#ZP_25 ; save nibble result
mov @r0,a ; to RAM $25
add a,#$F6 ; A = 0-9?
jc L03B5 ; A = A-F?
mov r0,#ZP_25 ; read nibble result
mov a,@r0 ; from RAM $25
add a,#$30 ; add '0'
mov r0,#ZP_HNIB ; save 0-9 result
mov @r0,a ; in RAM $23
jmp L03BA ; check 8b low nibble
L03B5: add a,#$41 ; add 'A'
mov r0,#ZP_HNIB ; save A-F result
mov @r0,a ; in RAM $23
L03BA:
mov r0,#ZP_22 ; load rescued value
mov a,@r0 ; from RAM $22
anl a,#$0F ; cut high nibble
mov r0,#ZP_25 ; save nibble result
mov @r0,a ; to RAM $25
add a,#$F6 ; A = 0-9?
jc L03D0 ; A = A-F?
mov r0,#ZP_25 ; read nibble result
mov a,@r0 ; from RAM $25
add a,#$30 ; add '0'
mov r0,#ZP_LNIB ; save 0-9 result
mov @r0,a ; in RAM $24
jmp L03D5 ; jump to RET
L03D0: add a,#$41 ; add 'A'
mov r0,#ZP_LNIB ; save A-F result
mov @r0,a ; in RAM $24
L03D5:
ret ;
;*****************************************************
; Timer interrupt routine, call every timer overflow *
; decrement r7 until zero on each interrup *
;*****************************************************
TIMERINT:
sel rb1 ; switch to registerbank #1
mov r6,a ; rescue akku on registerbank #1
sel rb0 ; switch to registerbank #0
mov a,#TSCALE ; load timer prescale
mov t,a ; set timer
mov a,r7 ; load timertick register
jz TIMERINT0 ; timer register zero?
dec r7 ; r7-- decremt timertick register on interrupt/overflow
TIMERINT0:
call WATCHDOG ; P27
sel rb1 ; switch to registerbank #1
mov a,r6 ; restore akku back from registerbank #1
sel rb0 ; switch to registerbank #0
retr ;
;***********************************************
; interrupt routine *
;***********************************************
INTERRUPT:
retr ; (2 cyc) return mit PSW restore
;**************************************************
; place for comment out uf code snippets/routines *
;**************************************************
;
; mov a,#Ttime ; load Ttime
; call b82HEX ; convert 8bit into ASCII Hex
; mov r0,#$24 ; result high nible
; mov a,@r0 ; load high nibble
; call LCDDAT ; print ASCII 0-F on LCD
; call wait010 ; wait 10ms
; mov r0,#$23 ; result low nibble
; mov a,@r0 ; low nibble
; call LCDDAT ; print ASCII 0-F on LCD
;
; ;*** create textbuffer (size = double of textlength)
; ; calculate buffer and clrear with whitespace
; mov a,#$(LOGO_E - LOGO)
; rl a ; make double of textlength
; add a,#$STARTTXTBUF ; add address of buffer start
; mov r0,a ; store indexcounter max of textbuffer
;ab0 mov @r0,#' ' ; fill whitespace into complete textbuffer
; djnz r0,ab0 ; index r0--
;
; ; write text into start of textbuffer
; mov r0,#$STARTTXTBUF ; set index to start of textbuffer
; mov r1,#$0300 - LOGO ; set index to start of text in ROM
;ab01 mov a,r1 ; lade text index
; movp3 a,@a ; get char from Page3 of ROM
; jz ab2 ; zero byte - end of text?
; mov @r0,a ; store char into RAM buffer
; inc r0 ; increment index textbuffer
; inc r1 ; incremwent index text ROM
; jmp ab01 ; loop next chr
;ab2
; ; print buffer text to LCD
; sel rb1
; mov r4,#$00 ; set bufferpointer to start
; mov r1,#$(LOGO_E - LOGO) ; set length of loop
; mov r2,#$00 ; startindex each loop
;
;ab10 sel rb0
; mov a,#$00
; call LCDPOS ; set cursor to Address $00
; sel rb1
;
;
; mov r5,#$(LOGO_E - LOGO) ; set length of text
;
;ab11 mov a,r4 ; load buffer index
; add a,#$STARTTXTBUF ; add buffer startaddress RAM
; mov r0,a ; store bufferaddress pointer t0 r0
; mov a,@r0 ; get char from buffer by r0
;
; sel rb0
; call LCDDAT ; print chr on LCD
; call wait010
; call wait010
; call wait010
; sel rb1
;
; inc r4 ; buffer pointer++
; djnz r5,ab11 ; textlength--
;
; inc r2 ; startindex++
; mov a,r2 ; move startindex
; mov r4,a ; to index startbuffer
; djnz r1,ab10
;
; sel rb0
; ; print text to LCD
; mov r1,#$0300 - LOGO ; set index to 0
;p_1 mov a,r1 ; lade text index
; movp3 a,@a ; hole zeichen aus P3, index akku
; jz x1 ; null byte endekennung?
; call LCDDAT ; print chr on LCD
;
; mov r7,#01 ; set timercounter 25 * 10 ms = 250ms
;wait0 mov a,r7 ; check timercounter
; jnz wait0 ; loop until zero
;
;x00 inc r1 ; text index++
; jmp p_1 ; loop next character
;x1 mov a,#MAJOR
; add a,#$30
; call LCDDAT ; print chr on LCD
; mov a,#'.'
; call LCDDAT ; print chr on LCD
; mov a,#MINOR
; add a,#$30
; call LCDDAT ; print chr on LCD
;
; call I2CSTOP ; stop I2C sequence
;
;x2 nop ;
; jmp x2
; write bitmap into CGRAM
; mov a,#$08
; call LCDCGR
; mov a,#$(%10000001)
; call LCDDAT
; mov a,#$(%01000010)
; call LCDDAT
; mov a,#$(%00100100)
; call LCDDAT
; mov a,#$(%00011000)
; call LCDDAT
; mov a,#$(%00011000)
; call LCDDAT
; mov a,#$(%00000100)
; call LCDDAT
; mov a,#$(%00001010)
; call LCDDAT
; mov a,#$(%00010001)
; call LCDDAT
.end