comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 56:0338aac9a267

surfacemode
author heinrichsweikamp
date Wed, 04 Aug 2010 18:23:50 +0200
parents 56aea9fcdd8f
children 2972a06b0785
comparison
equal deleted inserted replaced
55:a63d63a8612e 56:0338aac9a267
561 ostc_debug 'c' 561 ostc_debug 'c'
562 562
563 ;If > 0 display surface_interval:2 and clock changing every 5 seconds 563 ;If > 0 display surface_interval:2 and clock changing every 5 seconds
564 ;use timeout_counter for this 564 ;use timeout_counter for this
565 WIN_TOP .50 565 WIN_TOP .50
566 WIN_LEFT .0 566 WIN_LEFT .1
567 WIN_FONT FT_SMALL 567 WIN_FONT FT_SMALL
568 WIN_INVERT .0 ; Init new Wordprocessor 568 WIN_INVERT .0 ; Init new Wordprocessor
569 call PLED_standard_color 569 call PLED_standard_color
570 570
571 lfsr FSR2,letter 571 lfsr FSR2,letter
830 PLED_temp_surfmode: 830 PLED_temp_surfmode:
831 ostc_debug 'e' 831 ostc_debug 'e'
832 movff temperature+0,last_temperature+0 832 movff temperature+0,last_temperature+0
833 movff temperature+1,last_temperature+1 833 movff temperature+1,last_temperature+1
834 WIN_TOP .100 834 WIN_TOP .100
835 WIN_LEFT .0 835 WIN_LEFT .1
836 WIN_FONT FT_SMALL 836 WIN_FONT FT_SMALL
837 WIN_INVERT .0 ; Init new Wordprocessor 837 WIN_INVERT .0 ; Init new Wordprocessor
838 call PLED_standard_color 838 call PLED_standard_color
839 839
840 lfsr FSR2,letter 840 lfsr FSR2,letter
1690 1690
1691 1691
1692 PLED_desaturation_time: 1692 PLED_desaturation_time:
1693 ostc_debug 'h' 1693 ostc_debug 'h'
1694 WIN_TOP .150 1694 WIN_TOP .150
1695 WIN_LEFT .0 1695 WIN_LEFT .1
1696 WIN_FONT FT_SMALL 1696 WIN_FONT FT_SMALL
1697 WIN_INVERT .0 ; Init new Wordprocessor 1697 WIN_INVERT .0 ; Init new Wordprocessor
1698 call PLED_standard_color 1698 call PLED_standard_color
1699 1699
1700 lfsr FSR2,letter 1700 lfsr FSR2,letter
1718 return 1718 return
1719 1719
1720 PLED_nofly_time: 1720 PLED_nofly_time:
1721 ostc_debug 'g' 1721 ostc_debug 'g'
1722 WIN_TOP .125 1722 WIN_TOP .125
1723 WIN_LEFT .0 1723 WIN_LEFT .1
1724 WIN_FONT FT_SMALL 1724 WIN_FONT FT_SMALL
1725 WIN_INVERT .0 ; Init new Wordprocessor 1725 WIN_INVERT .0 ; Init new Wordprocessor
1726 call PLED_standard_color 1726 call PLED_standard_color
1727 1727
1728 lfsr FSR2,letter 1728 lfsr FSR2,letter
1753 btfsc premenu ; Do not update when "Menu?" is displayed! 1753 btfsc premenu ; Do not update when "Menu?" is displayed!
1754 return 1754 return
1755 1755
1756 ostc_debug 'b' ; Sends debug-information to screen if debugmode active 1756 ostc_debug 'b' ; Sends debug-information to screen if debugmode active
1757 WIN_TOP .25 1757 WIN_TOP .25
1758 WIN_LEFT .0 1758 WIN_LEFT .1
1759 WIN_FONT FT_SMALL 1759 WIN_FONT FT_SMALL
1760 WIN_INVERT .0 ; Init new Wordprocessor 1760 WIN_INVERT .0 ; Init new Wordprocessor
1761 call PLED_standard_color 1761 call PLED_standard_color
1762 1762
1763 lfsr FSR2,letter 1763 lfsr FSR2,letter
1789 movlw d'1' 1789 movlw d'1'
1790 cpfseq lo ; =1? 1790 cpfseq lo ; =1?
1791 bra update_batt_voltage2 ; No, show symbol 1791 bra update_batt_voltage2 ; No, show symbol
1792 1792
1793 WIN_TOP .175 1793 WIN_TOP .175
1794 WIN_LEFT .0 1794 WIN_LEFT .1
1795 WIN_FONT FT_SMALL 1795 WIN_FONT FT_SMALL
1796 WIN_INVERT .0 ; Init new Wordprocessor 1796 WIN_INVERT .0 ; Init new Wordprocessor
1797 call PLED_standard_color 1797 call PLED_standard_color
1798 1798
1799 lfsr FSR2,letter 1799 lfsr FSR2,letter
1817 movff WREG,box_temp+0 ; Data 1817 movff WREG,box_temp+0 ; Data
1818 movlw .174 1818 movlw .174
1819 movff WREG,box_temp+1 ; row top (0-239) 1819 movff WREG,box_temp+1 ; row top (0-239)
1820 movlw .194 1820 movlw .194
1821 movff WREG,box_temp+2 ; row bottom (0-239) 1821 movff WREG,box_temp+2 ; row bottom (0-239)
1822 movlw .0 1822 movlw .1
1823 movff WREG,box_temp+3 ; column left (0-159) 1823 movff WREG,box_temp+3 ; column left (0-159)
1824 movlw .31 1824 movlw .32
1825 movff WREG,box_temp+4 ; column right (0-159) 1825 movff WREG,box_temp+4 ; column right (0-159)
1826 call PLED_frame 1826 call PLED_frame
1827 1827
1828 ; 4100-Vbatt 1828 ; 4100-Vbatt
1829 movlw LOW d'4100' 1829 movlw LOW d'4100'
1857 movwf xB+0 1857 movwf xB+0
1858 clrf xB+1 1858 clrf xB+1
1859 call div16x16 ;xA/xB=xC with xA as remainder 1859 call div16x16 ;xA/xB=xC with xA as remainder
1860 ; xC is between 0 and 30 1860 ; xC is between 0 and 30
1861 movff xC+0,wait_temp ;save value 1861 movff xC+0,wait_temp ;save value
1862 1862 incf wait_temp,F ; +1
1863 movlw d'2' 1863
1864 movlw d'3'
1864 cpfsgt wait_temp 1865 cpfsgt wait_temp
1865 movwf wait_temp ; Minimum = 2 1866 movwf wait_temp ; Minimum = 3
1866 1867
1867 update_batt_voltage2a: 1868 update_batt_voltage2a:
1868 GETCUSTOM8 d'35' ; Standard output color 1869 GETCUSTOM8 d'35' ; Standard output color
1869 movff WREG,box_temp+0 ; Data 1870 movff WREG,box_temp+0 ; Data
1870 movlw .181 1871 movlw .181
1871 movff WREG,box_temp+1 ; row top (0-239) 1872 movff WREG,box_temp+1 ; row top (0-239)
1872 movlw .187 1873 movlw .187
1873 movff WREG,box_temp+2 ; row bottom (0-239) 1874 movff WREG,box_temp+2 ; row bottom (0-239)
1874 movlw .31 1875 movlw .32
1875 movff WREG,box_temp+3 ; column left (0-159) 1876 movff WREG,box_temp+3 ; column left (0-159)
1876 movlw .33 1877 movlw .34
1877 movff WREG,box_temp+4 ; column right (0-159) 1878 movff WREG,box_temp+4 ; column right (0-159)
1878 call PLED_box ; Full Cap 1879 call PLED_box ; Full Cap
1879 1880
1880 ; GETCUSTOM8 d'35' ; Standard output color 1881 ; GETCUSTOM8 d'35' ; Standard output color
1881 ; movff WREG,box_temp+0 ; Data 1882 ; movff WREG,box_temp+0 ; Data
1894 movff WREG,box_temp+0 ; Color Data 1895 movff WREG,box_temp+0 ; Color Data
1895 movlw .176 1896 movlw .176
1896 movff WREG,box_temp+1 ; row top (0-239) 1897 movff WREG,box_temp+1 ; row top (0-239)
1897 movlw .192 1898 movlw .192
1898 movff WREG,box_temp+2 ; row bottom (0-239) 1899 movff WREG,box_temp+2 ; row bottom (0-239)
1899 movlw .1 1900 movlw .2
1900 movff WREG,box_temp+3 ; column left (0-159) 1901 movff WREG,box_temp+3 ; column left (0-159)
1901 movff wait_temp,box_temp+4 ; column right (0-159) 1902 movff wait_temp,box_temp+4 ; column right (0-159)
1902 call PLED_box 1903 call PLED_box
1903 1904
1904 call PLED_standard_color 1905 call PLED_standard_color
2011 return 2012 return
2012 2013
2013 update_date: 2014 update_date:
2014 ostc_debug 'd' 2015 ostc_debug 'd'
2015 WIN_TOP .75 2016 WIN_TOP .75
2016 WIN_LEFT .0 2017 WIN_LEFT .1
2017 WIN_FONT FT_SMALL 2018 WIN_FONT FT_SMALL
2018 WIN_INVERT .0 ; Init new Wordprocessor 2019 WIN_INVERT .0 ; Init new Wordprocessor
2019 call PLED_standard_color 2020 call PLED_standard_color
2020 2021
2021 lfsr FSR2,letter 2022 lfsr FSR2,letter
2274 2275
2275 2276
2276 PLED_serial: ; Writes OSTC #Serial and Firmware version in surfacemode 2277 PLED_serial: ; Writes OSTC #Serial and Firmware version in surfacemode
2277 ostc_debug 'a' ; Sends debug-information to screen if debugmode active 2278 ostc_debug 'a' ; Sends debug-information to screen if debugmode active
2278 WIN_TOP .0 2279 WIN_TOP .0
2279 WIN_LEFT .0 2280 WIN_LEFT .1
2280 WIN_FONT FT_SMALL 2281 WIN_FONT FT_SMALL
2281 WIN_INVERT .0 ; Init new Wordprocessor 2282 WIN_INVERT .0 ; Init new Wordprocessor
2282 call PLED_standard_color 2283 call PLED_standard_color
2283 2284
2284 2285
3343 read_int_eeprom d'64' 3344 read_int_eeprom d'64'
3344 movlw d'1' 3345 movlw d'1'
3345 cpfseq EEDATA ; Custom text active? 3346 cpfseq EEDATA ; Custom text active?
3346 bra PLED_clear_custom_text ; No, Delete row 3347 bra PLED_clear_custom_text ; No, Delete row
3347 WIN_TOP .200 3348 WIN_TOP .200
3348 WIN_LEFT .0 3349 WIN_LEFT .1
3349 WIN_FONT FT_SMALL 3350 WIN_FONT FT_SMALL
3350 WIN_INVERT .0 ; Init new Wordprocessor 3351 WIN_INVERT .0 ; Init new Wordprocessor
3351 call PLED_divemask_color ; Set Color for Divemode mask 3352 call PLED_divemask_color ; Set Color for Divemode mask
3352 3353
3353 lfsr FSR2,letter 3354 lfsr FSR2,letter