Mercurial > public > mk2
annotate code_part1/OSTC_code_asm_part1/oled_samsung.asm @ 126:ed275788a291
Re-indent c-code. Add .o file.
author | JeanDo |
---|---|
date | Tue, 04 Jan 2011 01:55:49 +0100 |
parents | 6a94f96e9cea |
children | 06c4899ddb4b |
rev | line source |
---|---|
0 | 1 ; OSTC - diving computer code |
2 ; Copyright (C) 2009 HeinrichsWeikamp GbR | |
3 | |
4 ; This program is free software: you can redistribute it and/or modify | |
5 ; it under the terms of the GNU General Public License as published by | |
6 ; the Free Software Foundation, either version 3 of the License, or | |
7 ; (at your option) any later version. | |
8 | |
9 ; This program is distributed in the hope that it will be useful, | |
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 ; GNU General Public License for more details. | |
13 | |
14 ; You should have received a copy of the GNU General Public License | |
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | |
17 | |
18 ; hardware routines for S6E6D6 Samsung OLED Driver IC | |
19 ; written by: Matthias Heinrichs, info@heinrichsweikamp.com | |
20 ; written: 090801 | |
21 ; last updated: 090830 | |
22 ; known bugs: | |
23 ; ToDo: Optimise PLED_box calls | |
24 | |
25 WIN_FONT macro win_font_input | |
26 movlw win_font_input | |
27 movff WREG,win_font | |
28 endm | |
29 | |
30 WIN_TOP macro win_top_input | |
31 movlw win_top_input | |
32 movff WREG,win_top | |
33 endm | |
34 | |
35 WIN_LEFT macro win_left_input | |
36 movlw win_left_input | |
37 movff WREG,win_leftx2 | |
38 endm | |
39 | |
40 WIN_INVERT macro win_invert_input | |
41 movlw win_invert_input | |
42 movff WREG,win_invert | |
43 endm | |
44 | |
45 WIN_COLOR macro win_color_input | |
46 movlw win_color_input | |
47 call PLED_set_color | |
48 endm | |
49 | |
50 word_processor: ; word_processor: | |
123 | 51 clrf POSTINC2 ; Required, to mark end of string. |
83
3e351e25f5d1
adding anti-aliased fonts frame and merging some patches from Jeando
heinrichsweikamp
parents:
81
diff
changeset
|
52 call aa_wordprocessor |
3e351e25f5d1
adding anti-aliased fonts frame and merging some patches from Jeando
heinrichsweikamp
parents:
81
diff
changeset
|
53 movlb b'00000001' ; Back to Rambank1 |
0 | 54 return |
55 | |
56 ; ----------------------------- | |
57 ; PLED_SetColumnPixel: | |
58 ; ----------------------------- | |
59 PLED_SetColumnPixel: | |
123 | 60 movwf win_leftx2 ; d'0' ... d'159' |
61 mullw 2 ; Copy to POD, times 2. | |
62 | |
0 | 63 movlw 0x21 ; Start Address Vertical (.0 - .319) |
64 rcall PLED_CmdWrite | |
123 | 65 bra PLED_DataWrite_PROD |
0 | 66 |
67 ; ----------------------------- | |
68 ; PLED_SetRow: | |
123 | 69 ; Backup WREG --> win_top, for the next write pixel. |
70 ; Setup OLED pixel horizontal address. | |
0 | 71 ; ----------------------------- |
72 PLED_SetRow: | |
123 | 73 movff WREG,win_top ; d'0' ... d'239' |
74 mullw 1 ; Copy row to PRODH:L | |
0 | 75 movlw 0x20 ; Horizontal Address START:END |
76 rcall PLED_CmdWrite | |
123 | 77 bra PLED_DataWrite_PROD |
0 | 78 |
79 ; ----------------------------- | |
80 ; PLED Write Two Pixel | |
81 ; ----------------------------- | |
123 | 82 |
0 | 83 PLED_PxlWrite: |
123 | 84 rcall PLED_PxlWrite_Single ; Write first pixel. |
0 | 85 |
123 | 86 ; Write 2nd Pixel on same row but one column to the right |
87 movwf win_leftx2,W ; Increment column address. | |
88 mullw 2 | |
89 incf PRODL | |
90 clrf WREG ; Does not reset CARRY... | |
91 addwfc PRODH | |
0 | 92 movlw 0x21 ; Start Address Vertical (.0 - .319) |
93 rcall PLED_CmdWrite | |
123 | 94 rcall PLED_DataWrite_PROD |
95 ; Continue with PLED_PxlWrite_Single... | |
0 | 96 |
97 ; ----------------------------- | |
98 ; PLED Write One Pixel | |
99 ; ----------------------------- | |
100 PLED_PxlWrite_Single: | |
101 movlw 0x22 ; Start Writing Data to GRAM | |
102 rcall PLED_CmdWrite | |
103 bsf oled_rs ; Data! | |
104 movff win_color1, PORTD | |
105 bcf oled_rw | |
106 bsf oled_rw ; Upper | |
107 movff win_color2, PORTD | |
108 bcf oled_rw | |
109 bsf oled_rw ; Lower | |
110 return | |
111 | |
112 ; ----------------------------- | |
113 ; PLED Display Off | |
114 ; ----------------------------- | |
115 PLED_DisplayOff: | |
116 clrf PORTD | |
117 bcf oled_hv | |
118 bcf oled_vdd | |
119 bcf oled_cs | |
120 bcf oled_e_nwr | |
121 bcf oled_rw | |
122 bcf oled_nreset | |
123 return | |
124 | |
123 | 125 ;============================================================================= |
126 ; PLED_frame : draw a frame around current box with current color. | |
127 ; Inputs: win_top, win_leftx2, win_height, win_width, win_color1, win_color2 | |
128 ; Outputs: (none) | |
129 ; Trashed: WREG, PROD, aa_start:2, aa_end:2, win_leftx2, win_width:1 | |
0 | 130 |
123 | 131 PLED_frame: |
132 movff win_top,aa_start+0 ; Backup everything. | |
133 movff win_height,aa_start+1 | |
134 movff win_leftx2,aa_end+0 | |
135 movff win_width,aa_end+1 | |
0 | 136 |
123 | 137 ;---- TOP line ----------------------------------------------------------- |
138 movlw 1 ; row ~ height=1 | |
139 movff WREG,win_height | |
140 rcall PLED_box | |
0 | 141 |
123 | 142 ;---- BOTTOM line -------------------------------------------------------- |
143 movff aa_start+0,PRODL ; Get back top, | |
144 movff aa_start+1,WREG ; and height | |
145 addwf PRODL,W ; top+height | |
146 decf WREG ; top+height-1 | |
147 movff WREG,win_top ; top+height-1 --> top | |
148 rcall PLED_box | |
0 | 149 |
123 | 150 ;---- LEFT column -------------------------------------------------------- |
151 movff aa_start+0,win_top ; Restore top/height. | |
152 movff aa_start+1,win_height | |
153 movlw 1 ; column ~ width=1 | |
154 movff WREG,win_width | |
155 rcall PLED_box | |
0 | 156 |
123 | 157 ;---- RIGHT column ------------------------------------------------------- |
158 movff aa_end+0,WREG | |
159 movff aa_end+1,PRODL | |
160 addwf PRODL,W | |
161 decf WREG | |
162 movff WREG,win_leftx2 | |
163 bra PLED_box | |
0 | 164 |
123 | 165 ;============================================================================= |
166 ; PLED_box : fills current box with current color. | |
167 ; Inputs: win_top, win_leftx2, win_height, win_width, win_color1, win_color2 | |
168 ; Outputs: (none) | |
169 ; Trashed: WREG, PROD | |
0 | 170 |
171 PLED_box: | |
123 | 172 ;---- Define Window ------------------------------------------------------ |
0 | 173 movlw 0x35 ; VerticalStartAddress HIGH:LOW |
174 rcall PLED_CmdWrite | |
123 | 175 movff win_leftx2,WREG |
176 mullw 2 | |
177 rcall PLED_DataWrite_PROD | |
0 | 178 |
179 movlw 0x36 ; VerticalEndAddress HIGH:LOW | |
180 rcall PLED_CmdWrite | |
123 | 181 movff win_width,PRODL ; Bank-safe addressing |
182 movff win_leftx2,WREG | |
183 addwf PRODL,W ; left+width | |
184 decf WREG ; left+width-1 | |
185 mullw 2 ; times 2 --> rightx2 | |
186 rcall PLED_DataWrite_PROD | |
0 | 187 |
188 movlw 0x37 ; HorizontalAddress START:END | |
189 rcall PLED_CmdWrite | |
123 | 190 movff win_top,PRODH ; Start row. |
191 movff win_height,PRODL ; height | |
192 movf PRODH,W | |
193 addwf PRODL,F ; top + height | |
194 decf PRODL,F ; top + height - 1 --> bottom. | |
195 rcall PLED_DataWrite_PROD | |
0 | 196 |
123 | 197 ;---- Start pointer ------------------------------------------------------ |
0 | 198 movlw 0x20 ; Start Address Horizontal (.0 - .239) |
199 rcall PLED_CmdWrite | |
123 | 200 movff win_top,WREG |
201 mullw 1 | |
202 rcall PLED_DataWrite_PROD | |
0 | 203 |
204 movlw 0x21 ; Start Address Vertical (.0 - .319) | |
205 rcall PLED_CmdWrite | |
123 | 206 movff win_leftx2,WREG |
207 mullw 2 | |
208 rcall PLED_DataWrite_PROD | |
0 | 209 |
123 | 210 ;---- Fill Window -------------------------------------------------------- |
0 | 211 movlw 0x22 ; Start Writing Data to GRAM |
212 rcall PLED_CmdWrite | |
213 | |
123 | 214 movff win_height,PRODH |
0 | 215 bsf oled_rs ; Data! |
216 | |
123 | 217 PLED_box2: ; Loop height times |
218 movff win_width,PRODL | |
219 PLED_box3: ; loop width times | |
0 | 220 movff win_color1,PORTD |
221 bcf oled_rw | |
222 bsf oled_rw ; Upper | |
223 movff win_color2,PORTD | |
224 bcf oled_rw | |
225 bsf oled_rw ; Lower | |
226 | |
227 movff win_color1,PORTD | |
228 bcf oled_rw | |
229 bsf oled_rw ; Upper | |
230 movff win_color2,PORTD | |
231 bcf oled_rw | |
232 bsf oled_rw ; Lower | |
233 | |
123 | 234 decfsz PRODL,F |
0 | 235 bra PLED_box3 |
123 | 236 decfsz PRODH,F |
0 | 237 bra PLED_box2 |
238 | |
239 movlw 0x00 ; NOP, to stop Address Update Counter | |
123 | 240 bra PLED_CmdWrite |
0 | 241 |
123 | 242 ;============================================================================= |
243 ; PLED_ClearScreen: An optimized version of PLEX_box, for ful screen black. | |
244 ; Trashed: WREG, PROD | |
0 | 245 |
246 PLED_ClearScreen: | |
247 movlw 0x35 ; VerticalStartAddress HIGH:LOW | |
248 rcall PLED_CmdWrite | |
123 | 249 mullw 0 |
250 rcall PLED_DataWrite_PROD | |
0 | 251 |
252 movlw 0x36 ; VerticalEndAddress HIGH:LOW | |
253 rcall PLED_CmdWrite | |
254 movlw 0x01 | |
123 | 255 rcall PLED_DataWrite |
0 | 256 movlw 0x3F |
123 | 257 rcall PLED_DataWrite |
0 | 258 |
259 movlw 0x37 ; HorizontalAddress START:END | |
260 rcall PLED_CmdWrite | |
261 movlw 0x00 | |
123 | 262 rcall PLED_DataWrite |
0 | 263 movlw 0xEF |
123 | 264 rcall PLED_DataWrite |
0 | 265 |
266 movlw 0x20 ; Start Address Horizontal (.0 - .239) | |
267 rcall PLED_CmdWrite | |
123 | 268 rcall PLED_DataWrite_PROD |
0 | 269 |
270 movlw 0x21 ; Start Address Vertical (.0 - .319) | |
271 rcall PLED_CmdWrite | |
123 | 272 rcall PLED_DataWrite_PROD |
0 | 273 |
274 movlw 0x22 ; Start Writing Data to GRAM | |
275 rcall PLED_CmdWrite | |
276 | |
83
3e351e25f5d1
adding anti-aliased fonts frame and merging some patches from Jeando
heinrichsweikamp
parents:
81
diff
changeset
|
277 ; See Page 101 of OLED Driver IC Datasheet how to handle rs/rw clocks |
0 | 278 bsf oled_rs ; Data! |
279 | |
123 | 280 movlw .160 |
281 movwf PRODH | |
0 | 282 PLED_ClearScreen2: |
123 | 283 movlw .240 |
284 movwf PRODL | |
0 | 285 PLED_ClearScreen3: |
286 | |
81
31fa973a70fd
Kludges to emulate inexisting devices when debugged with the MPLAB software SIMulator.
JeanDo
parents:
3
diff
changeset
|
287 clrf PORTD ; Need to generate trace here too. |
0 | 288 bcf oled_rw |
289 bsf oled_rw ; Upper | |
81
31fa973a70fd
Kludges to emulate inexisting devices when debugged with the MPLAB software SIMulator.
JeanDo
parents:
3
diff
changeset
|
290 |
31fa973a70fd
Kludges to emulate inexisting devices when debugged with the MPLAB software SIMulator.
JeanDo
parents:
3
diff
changeset
|
291 clrf PORTD ; Need to generate trace here too. |
0 | 292 bcf oled_rw |
293 bsf oled_rw ; Lower | |
294 | |
123 | 295 clrf PORTD ; Need to generate trace here too. |
296 bcf oled_rw | |
297 bsf oled_rw ; Upper | |
298 | |
299 clrf PORTD ; Need to generate trace here too. | |
300 bcf oled_rw | |
301 bsf oled_rw ; Lower | |
302 | |
303 decfsz PRODL,F | |
0 | 304 bra PLED_ClearScreen3 |
123 | 305 decfsz PRODH,F |
0 | 306 bra PLED_ClearScreen2 |
307 | |
308 movlw 0x00 ; NOP, to stop Address Update Counter | |
123 | 309 bra PLED_CmdWrite |
0 | 310 |
311 ; ----------------------------- | |
312 ; PLED Write Cmd via W | |
313 ; ----------------------------- | |
314 PLED_CmdWrite: | |
315 bcf oled_rs ; Command! | |
316 movwf PORTD ; Move Data to PORTD | |
317 bcf oled_rw | |
318 bsf oled_rw | |
319 return | |
320 | |
321 ; ----------------------------- | |
322 ; PLED Write Display Data via W | |
323 ; ----------------------------- | |
324 PLED_DataWrite: | |
123 | 325 bsf oled_rs ; Data! |
326 movwf PORTD ; Move Data to PORTD | |
327 bcf oled_rw | |
328 bsf oled_rw | |
329 return | |
0 | 330 |
331 ; ----------------------------- | |
332 ; PLED Data Cmd via W | |
333 ; ----------------------------- | |
123 | 334 PLED_DataWrite_PROD: |
0 | 335 bsf oled_rs ; Data! |
123 | 336 movff PRODH,PORTD ; Move high byte to PORTD (OLED is bigendian) |
337 bcf oled_rw | |
338 bsf oled_rw | |
339 movff PRODL,PORTD ; Move low byte to PORTD | |
0 | 340 bcf oled_rw |
341 bsf oled_rw | |
342 return | |
343 | |
344 ; ----------------------------- | |
345 ; PLED boot | |
346 ; ----------------------------- | |
347 PLED_boot: | |
348 bcf oled_hv | |
349 WAITMS d'32' | |
350 bsf oled_vdd | |
351 nop | |
352 bcf oled_cs | |
353 nop | |
354 bsf oled_nreset | |
3 | 355 ; WAITMS d'10' ; Quick wake-up |
356 WAITMS d'250' ; Standard wake-up | |
0 | 357 bsf oled_e_nwr |
358 nop | |
359 bcf oled_nreset | |
360 WAIT10US d'2' | |
361 bsf oled_nreset | |
362 WAITMS d'10' | |
363 | |
364 movlw 0x24 ; 80-System 8-Bit Mode | |
365 rcall PLED_CmdWrite | |
366 | |
367 movlw 0x02 ; RGB Interface Control (S6E63D6 Datasheet page 42) | |
368 rcall PLED_CmdWrite | |
369 movlw 0x00 ; X X X X X X X RM | |
123 | 370 rcall PLED_DataWrite |
0 | 371 movlw 0x00 ; DM X RIM1 RIM0 VSPL HSPL EPL DPL |
123 | 372 rcall PLED_DataWrite ; System Interface: RIM is ignored, Internal Clock |
0 | 373 |
374 movlw 0x03 ; Entry Mode (S6E63D6 Datasheet page 46) | |
375 rcall PLED_CmdWrite | |
376 movlw 0x00 ; =b'00000000' CLS MDT1 MDT0 BGR X X X SS 65k Color | |
123 | 377 rcall PLED_DataWrite |
0 | 378 movlw b'00110000' ; =b'00110000' X X I/D1 I/D0 X X X AM |
123 | 379 rcall PLED_DataWrite |
0 | 380 |
381 movlw 0x18 | |
382 rcall PLED_CmdWrite | |
383 movlw 0x00 | |
123 | 384 rcall PLED_DataWrite |
0 | 385 movlw 0x28 |
123 | 386 rcall PLED_DataWrite |
0 | 387 |
388 movlw 0xF8 | |
389 rcall PLED_CmdWrite | |
390 movlw 0x00 | |
123 | 391 rcall PLED_DataWrite |
0 | 392 movlw 0x0F |
123 | 393 rcall PLED_DataWrite |
0 | 394 |
395 movlw 0xF9 | |
396 rcall PLED_CmdWrite | |
397 movlw 0x00 | |
123 | 398 rcall PLED_DataWrite |
0 | 399 movlw 0x0F |
123 | 400 rcall PLED_DataWrite |
0 | 401 |
402 movlw 0x10 | |
403 rcall PLED_CmdWrite | |
404 movlw 0x00 | |
123 | 405 rcall PLED_DataWrite |
0 | 406 movlw 0x00 |
123 | 407 rcall PLED_DataWrite |
0 | 408 |
409 ; Now Gamma settings... | |
410 rcall PLED_brightness_full | |
2 | 411 ;rcall PLED_brightness_low |
0 | 412 ; End Gamma Settings |
413 | |
414 rcall PLED_ClearScreen | |
415 | |
416 bsf oled_hv | |
417 WAITMS d'32' | |
418 | |
419 movlw 0x05 | |
420 rcall PLED_CmdWrite | |
421 movlw 0x00 | |
123 | 422 rcall PLED_DataWrite |
0 | 423 movlw 0x01 |
123 | 424 rcall PLED_DataWrite ; Display ON |
0 | 425 return |
426 | |
427 | |
428 PLED_brightness_full: | |
429 movlw 0x70 | |
430 rcall PLED_CmdWrite | |
431 movlw 0x1F | |
123 | 432 rcall PLED_DataWrite |
0 | 433 movlw 0x00 |
123 | 434 rcall PLED_DataWrite |
0 | 435 movlw 0x71 |
436 rcall PLED_CmdWrite | |
437 movlw 0x23 | |
123 | 438 rcall PLED_DataWrite |
0 | 439 movlw 0x80 |
123 | 440 rcall PLED_DataWrite |
0 | 441 movlw 0x72 |
442 rcall PLED_CmdWrite | |
443 movlw 0x2A | |
123 | 444 rcall PLED_DataWrite |
0 | 445 movlw 0x80 |
123 | 446 rcall PLED_DataWrite |
0 | 447 |
448 movlw 0x73 | |
449 rcall PLED_CmdWrite | |
450 movlw 0x15 | |
123 | 451 rcall PLED_DataWrite |
0 | 452 movlw 0x11 |
123 | 453 rcall PLED_DataWrite |
0 | 454 movlw 0x74 |
455 rcall PLED_CmdWrite | |
456 movlw 0x1C | |
123 | 457 rcall PLED_DataWrite |
0 | 458 movlw 0x11 |
123 | 459 rcall PLED_DataWrite |
0 | 460 |
461 movlw 0x75 | |
462 rcall PLED_CmdWrite | |
463 movlw 0x1B | |
123 | 464 rcall PLED_DataWrite |
0 | 465 movlw 0x15 |
123 | 466 rcall PLED_DataWrite |
0 | 467 movlw 0x76 |
468 rcall PLED_CmdWrite | |
469 movlw 0x1A | |
123 | 470 rcall PLED_DataWrite |
0 | 471 movlw 0x15 |
123 | 472 rcall PLED_DataWrite |
0 | 473 |
474 movlw 0x77 | |
475 rcall PLED_CmdWrite | |
476 movlw 0x1C | |
123 | 477 rcall PLED_DataWrite |
0 | 478 movlw 0x18 |
123 | 479 rcall PLED_DataWrite |
0 | 480 movlw 0x78 |
481 rcall PLED_CmdWrite | |
482 movlw 0x21 | |
123 | 483 rcall PLED_DataWrite |
0 | 484 movlw 0x15 |
123 | 485 rcall PLED_DataWrite |
0 | 486 |
487 return | |
488 | |
489 PLED_brightness_low: | |
490 movlw 0x70 | |
491 rcall PLED_CmdWrite | |
492 movlw 0x14 | |
123 | 493 rcall PLED_DataWrite |
0 | 494 movlw 0x00 |
123 | 495 rcall PLED_DataWrite |
0 | 496 movlw 0x71 |
497 rcall PLED_CmdWrite | |
498 movlw 0x17 | |
123 | 499 rcall PLED_DataWrite |
0 | 500 movlw 0x00 |
123 | 501 rcall PLED_DataWrite |
0 | 502 movlw 0x72 |
503 rcall PLED_CmdWrite | |
504 movlw 0x15 | |
123 | 505 rcall PLED_DataWrite |
0 | 506 movlw 0x80 |
123 | 507 rcall PLED_DataWrite |
0 | 508 |
509 movlw 0x73 | |
510 rcall PLED_CmdWrite | |
511 movlw 0x15 | |
123 | 512 rcall PLED_DataWrite |
0 | 513 movlw 0x11 |
123 | 514 rcall PLED_DataWrite |
0 | 515 movlw 0x74 |
516 rcall PLED_CmdWrite | |
517 movlw 0x14 | |
123 | 518 rcall PLED_DataWrite |
0 | 519 movlw 0x0B |
123 | 520 rcall PLED_DataWrite |
0 | 521 |
522 movlw 0x75 | |
523 rcall PLED_CmdWrite | |
524 movlw 0x1B | |
123 | 525 rcall PLED_DataWrite |
0 | 526 movlw 0x15 |
123 | 527 rcall PLED_DataWrite |
0 | 528 movlw 0x76 |
529 rcall PLED_CmdWrite | |
530 movlw 0x13 | |
123 | 531 rcall PLED_DataWrite |
0 | 532 movlw 0x0E |
123 | 533 rcall PLED_DataWrite |
0 | 534 |
535 movlw 0x77 | |
536 rcall PLED_CmdWrite | |
537 movlw 0x1C | |
123 | 538 rcall PLED_DataWrite |
0 | 539 movlw 0x18 |
123 | 540 rcall PLED_DataWrite |
0 | 541 movlw 0x78 |
542 rcall PLED_CmdWrite | |
543 movlw 0x15 | |
123 | 544 rcall PLED_DataWrite |
0 | 545 movlw 0x0E |
123 | 546 rcall PLED_DataWrite |
0 | 547 |
548 return | |
549 | |
550 PLED_set_color:;Converts 8Bit RGB b'RRRGGGBB' into 16Bit RGB b'RRRRRGGGGGGBBBBB' | |
551 movwf oled1_temp ; Get 8Bit RGB b'RRRGGGBB' | |
552 movff oled1_temp, oled2_temp ; Copy | |
553 | |
554 ; Mask Bit 7,6,5,4,3,2 | |
555 movlw b'00000011' | |
556 andwf oled2_temp,F | |
557 | |
558 movlw b'00000000' | |
559 dcfsnz oled2_temp,F | |
560 movlw b'01010000' | |
561 dcfsnz oled2_temp,F | |
562 movlw b'10100000' | |
563 dcfsnz oled2_temp,F | |
564 movlw b'11111000' | |
565 movwf oled3_temp ; Blue done. | |
566 | |
567 movff oled1_temp, oled2_temp ; Copy | |
568 ; Mask Bit 7,6,5,1,0 | |
569 movlw b'00011100' | |
570 andwf oled2_temp,F | |
571 rrncf oled2_temp,F | |
572 rrncf oled2_temp,F | |
573 | |
574 movlw b'00000000' | |
575 dcfsnz oled2_temp,F | |
576 movlw b'00000100' | |
577 dcfsnz oled2_temp,F | |
578 movlw b'00001000' | |
579 dcfsnz oled2_temp,F | |
580 movlw b'00001100' | |
581 dcfsnz oled2_temp,F | |
582 movlw b'00010000' | |
583 dcfsnz oled2_temp,F | |
584 movlw b'00010100' | |
585 dcfsnz oled2_temp,F | |
586 movlw b'00100000' | |
587 dcfsnz oled2_temp,F | |
588 movlw b'00111111' | |
589 movwf oled4_temp | |
590 | |
591 rrcf oled4_temp,F | |
592 rrcf oled3_temp,F | |
593 | |
594 rrcf oled4_temp,F | |
595 rrcf oled3_temp,F | |
596 | |
597 rrcf oled4_temp,F | |
598 rrcf oled3_temp,F ; oled3_temp (b'GGGBBBBB') done. | |
599 | |
600 movff oled1_temp, oled2_temp ; Copy | |
601 clrf oled1_temp | |
602 | |
603 rrcf oled4_temp,F | |
604 rrcf oled1_temp,F | |
605 | |
606 rrcf oled4_temp,F | |
607 rrcf oled1_temp,F | |
608 | |
609 rrcf oled4_temp,F | |
610 rrcf oled1_temp,F ; Green done. | |
611 | |
612 ; Mask Bit 4,3,2,1,0 | |
613 movlw b'11100000' | |
614 andwf oled2_temp,F | |
615 | |
616 rrncf oled2_temp,F | |
617 rrncf oled2_temp,F | |
618 rrncf oled2_temp,F | |
619 rrncf oled2_temp,F | |
620 rrncf oled2_temp,F | |
621 | |
622 movlw b'00000000' | |
623 dcfsnz oled2_temp,F | |
624 movlw b'00000100' | |
625 dcfsnz oled2_temp,F | |
626 movlw b'00001000' | |
627 dcfsnz oled2_temp,F | |
628 movlw b'00001100' | |
629 dcfsnz oled2_temp,F | |
630 movlw b'00010000' | |
631 dcfsnz oled2_temp,F | |
632 movlw b'00010100' | |
633 dcfsnz oled2_temp,F | |
634 movlw b'00100000' | |
635 dcfsnz oled2_temp,F | |
636 movlw b'00111111' | |
637 movwf oled4_temp | |
638 | |
639 rrcf oled4_temp,F | |
640 rrcf oled1_temp,F | |
641 | |
642 rrcf oled4_temp,F | |
643 rrcf oled1_temp,F | |
644 | |
645 rrcf oled4_temp,F | |
646 rrcf oled1_temp,F | |
647 | |
648 rrcf oled4_temp,F | |
649 rrcf oled1_temp,F | |
650 | |
651 rrcf oled4_temp,F | |
652 rrcf oled1_temp,F ; Red done. | |
653 | |
654 movff oled1_temp,win_color1 | |
655 movff oled3_temp,win_color2 ; Set Bank0 Color registers... | |
656 return | |
657 |