Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/oled_samsung.asm @ 426:07f5b0baaa57
Adding temperature & ceiling curves
* Pink Temperature curve, using fixed scale minTp .. minTp+10.0?C.
* Vertical line fill for ceiling.
* Dark red coloring when overflowing ceiling, dark green if ok.
author | JeanDo |
---|---|
date | Sun, 31 Jul 2011 13:27:23 +0200 |
parents | e6e1b89b7c3e |
children | 05ec97e106da |
comparison
equal
deleted
inserted
replaced
425:a76c5a3e9e96 | 426:07f5b0baaa57 |
---|---|
125 movlw 0x21 ; Start Address Vertical (.0 - .319) | 125 movlw 0x21 ; Start Address Vertical (.0 - .319) |
126 rcall PLED_CmdWrite | 126 rcall PLED_CmdWrite |
127 bra PLED_DataWrite_PROD | 127 bra PLED_DataWrite_PROD |
128 | 128 |
129 ;----------------------------------------------------------------------------- | 129 ;----------------------------------------------------------------------------- |
130 ; Writes a vertical line of half-pixel at position (win_top,win_leftx2,win_height). | |
131 ; Inputs: win_leftx2, win_top, win_height, win_color:2 | |
132 ; Trashed: WREG, PROD, TABLAT, TBLPTRL | |
133 half_vertical_line: | |
134 movff win_leftx2,WREG ; Init X position. | |
135 mullw 2 | |
136 rcall pixel_write_col320 ; Start Address Vertical (.0 - .319) | |
137 | |
138 clrf TABLAT ; Loop index. | |
139 | |
140 half_vertical_line_loop: | |
141 movff win_height,WREG ; Index reached height (Bank0 read) ? | |
142 xorwf TABLAT,W | |
143 btfsc STATUS,Z ; Equals ? | |
144 return ; Yes: done. | |
145 movff win_top,WREG ; Y = top + index (Bank0 read) | |
146 addwf TABLAT,W | |
147 rcall half_pixel_write_1 | |
148 incf TABLAT,F ; index++ | |
149 bra half_vertical_line_loop | |
150 | |
151 ;----------------------------------------------------------------------------- | |
130 ; Writes one half-pixel at position (win_top,win_leftx2). | 152 ; Writes one half-pixel at position (win_top,win_leftx2). |
131 ; Inputs: win_leftx2, win_top, win_color:2 | 153 ; Inputs: win_leftx2, win_top, win_color:2 |
132 ; Trashed: WREG, PROD | 154 ; Trashed: WREG, PROD |
133 half_pixel_write: | 155 half_pixel_write: |
134 movff win_top,WREG ; d'0' ... d'239' | 156 movff win_top,WREG ; d'0' ... d'239' |
135 | 157 |
158 ; Variant with Y position in WREG. | |
159 half_pixel_write_1: | |
136 movff win_flags,PRODL ; BEWARE: bank0 bit-test | 160 movff win_flags,PRODL ; BEWARE: bank0 bit-test |
137 btfsc PRODL,0 ; 180° rotation ? | 161 btfsc PRODL,0 ; 180° rotation ? |
138 sublw .239 ; 239-Y --> Y | 162 sublw .239 ; 239-Y --> Y |
139 | 163 |
140 mullw 1 ; Copy row to PRODH:L | 164 mullw 1 ; Copy row to PRODH:L |