📄 fireplace.l
字号:
744 03C1 76 55 01 tm temp_sensor,#01h
745 03C4 6B 03 jr z,remote_sound_judge
746
747 03C6 46 E0 80 or p0,#10000000B ;set p0.7 enble LIGHTS
748
749 03C9 remote_sound_judge:
750 03C9 A6 13 01 cp sound_status,#01H
751 03CC 6B 05 jr eq,remote_sound_judge1
752 03CE F6 08 CA call sound_close
753 03D1 8B 03 jr remote_lamp_judge
754 03D3 remote_sound_judge1:
755 03D3 F6 08 C1 call sound_open
756
757 03D6 remote_lamp_judge:
758 03D6 A6 12 01 cp lamp_status,#01H
759 03D9 6B 05 jr eq,remote_lamp_judge1
760 03DB F6 08 D7 call lamp_close
761 03DE 8B 03 jr remote_fire_control_end
762 03E0 remote_lamp_judge1:
763 03E0 F6 08 CE call lamp_open
764
765 03E3 remote_fire_control_end:
766 03E3 E6 24 01 ld beep_flag,#01h
767
768 03E6 E6 53 00 ld remote_value,#00h
769 03E9 AF ret
770 ;*********************************************************************************
771 03EA remote_fire_inc:
772 03EA A6 14 0A cp fire_value,#0ah
773 03ED 6B 27 jr z,remote_fire_inc_end
774
775 03EF 76 10 01 tm fire_status,#01H
776 03F2 6B 22 jr z,remote_fire_inc_end ;fire off ,exit
777
778 03F4 20 14 inc fire_value ;fire+
779
780 03F6 A6 14 01 cp fire_value,#01H
781 03F9 7B 07 jr ult,remote_fire_min
782 03FB A6 14 0A cp fire_value,#0AH
783 03FE BB 07 jr ugt,remote_fire_max
784 0400 8B 08 jr remote_fire_inc1
785 0402 remote_fire_min:
786 0402 E6 14 01 ld fire_value,#01H
787 0405 8B 03 jr remote_fire_inc1
788 0407 remote_fire_max:
789 0407 E6 14 0A ld fire_value,#0AH
790
791 040A remote_fire_inc1:
792 040A E4 14 19 ld I2C_data,fire_value
793 040D E6 1A 14 ld I2C_dress,#fire_value_dress
794 0410 F6 09 D4 call WR_24C02
795 0413 E6 24 01 ld beep_flag,#01h
796 0416 remote_fire_inc_end:
797 ;ld remote_again,#00 ;#00h
798 0416 E6 53 01 ld remote_value,#01h
799 0419 AF ret
800 ;**********************************************************************************
801 041A remote_fire_dec:
802
803 041A A6 14 01 cp fire_value,#01H
804 041D 6B 27 jr z,remote_fire_dec_end
805
806 041F 76 10 01 tm fire_status,#01H
807 0422 6B 22 jr z,remote_fire_dec_end ;fire off ,exit
808 0424 00 14 dec fire_value ;fire-
809 0426 A6 14 01 cp fire_value,#01H
810 0429 7B 07 jr ult,remote_fire_min_1
811 042B A6 14 0A cp fire_value,#0AH
812 042E BB 07 jr ugt,remote_fire_max_2
813 0430 8B 08 jr remote_fire_dec1
814 0432 remote_fire_min_1:
815 0432 E6 14 01 ld fire_value,#01H
816 0435 8B 03 jr remote_fire_dec1
817 0437 remote_fire_max_2:
818 0437 E6 14 0A ld fire_value,#0AH
819
820 043A remote_fire_dec1:
821 043A E4 14 19 ld I2C_data,fire_value
822 043D E6 1A 14 ld I2C_dress,#fire_value_dress
823 0440 F6 09 D4 call WR_24C02
824 0443 E6 24 01 ld beep_flag,#01h
825 0446 remote_fire_dec_end:
826 ;ld remote_again,#00 ;#00h
827 0446 E6 53 02 ld remote_value,#02h
828 0449 AF ret
829 ;**********************************************************************************
830 044A remote_temp_control:
831
832 044A 76 11 01 tm temp_status,#01H
833 044D 6B 08 jr z,remote_temp_on ;if temp_status=0=off jump to temp on
834
835 044F remote_temp_off: ;if temp_status=1=on to temp off
836 044F E6 11 00 ld temp_status,#00H
837 0452 F6 0A E7 call temp_ad_off
838 0455 8B 03 jr remote_temp_control1
839
840 0457 remote_temp_on:
841 0457 E6 11 01 ld temp_status,#01H
842
843 045A remote_temp_control1:
844 045A E6 24 01 ld beep_flag,#01h
845
846 045D remote_temp_control_end:
847 045D E6 53 00 ld remote_value,#00h
848 0460 AF ret
849 ;**********************************************************************************
850 0461 remote_temp_inc:
851
852 0461 A6 15 0A cp temp_value,#0ah
853 0464 6B 27 jr z,remote_temp_inc_end
854
855 0466 76 11 01 tm temp_status,#01H
856 0469 6B 22 jr z,remote_temp_inc_end ;temp off ,exit
857
858 046B 20 15 inc temp_value ;temp+
859
860 046D A6 15 01 cp temp_value,#01H
861 0470 7B 07 jr ult,remote_temp_min
862 0472 A6 15 0A cp temp_value,#0AH
863 0475 BB 07 jr ugt,remote_temp_max
864 0477 8B 08 jr remote_temp_inc1
865 0479 remote_temp_min:
866 0479 E6 15 01 ld temp_value,#01H
867 047C 8B 03 jr remote_temp_inc1
868 047E remote_temp_max:
869 047E E6 15 0A ld temp_value,#0AH
870
871 0481 remote_temp_inc1:
872 0481 E4 15 19 ld I2C_data,temp_value
873 0484 E6 1A 15 ld I2C_dress,#temp_value_dress
874 0487 F6 09 D4 call WR_24C02
875
876 048A E6 24 01 ld beep_flag,#01h
877 048D remote_temp_inc_end:
878
879 ;ld remote_again,#00 ;#00h
880 048D E6 53 03 ld remote_value,#03h
881 0490 AF ret
882 ;**********************************************************************************
883 0491 remote_temp_dec:
884 0491 A6 15 01 cp temp_value,#01H
885 0494 6B 27 jr z,remote_temp_dec_end
886
887
888
889 0496 76 11 01 tm temp_status,#01H
890 0499 6B 22 jr z,remote_temp_dec_end ;temp off ,exit
891
892 049B 00 15 dec temp_value ;temp-
893 049D A6 15 01 cp temp_value,#01H
894 04A0 7B 07 jr ult,remote_temp_min_1
895 04A2 A6 15 0A cp temp_value,#0AH
896 04A5 BB 07 jr ugt,remote_temp_max_2
897 04A7 8B 08 jr remote_temp_dec1
898 04A9 remote_temp_min_1:
899 04A9 E6 15 01 ld temp_value,#01H
900 04AC 8B 03 jr remote_temp_dec1
901 04AE remote_temp_max_2:
902 04AE E6 15 0A ld temp_value,#0AH
903
904 04B1 remote_temp_dec1:
905 04B1 E4 15 19 ld I2C_data,temp_value
906 04B4 E6 1A 15 ld I2C_dress,#temp_value_dress
907 04B7 F6 09 D4 call WR_24C02
908
909 04BA E6 24 01 ld beep_flag,#01h
910 04BD remote_temp_dec_end:
911 ;ld remote_again,#00 ;#00h
912 04BD E6 53 04 ld remote_value,#04h
913 04C0 AF ret
914 ;**********************************************************************************
915 04C1 remote_sound_control:
916
917 04C1 76 10 01 tm fire_status,#01H
918 04C4 6B 1F jr z,remote_sound_control_end
919
920 04C6 76 13 01 tm sound_status,#01H
921 04C9 6B 08 jr z,remote_sound_on ;if sound_status=0=off jump to sound on
922
923 04CB remote_sound_off: ;if sound_status=1=on to sound off
924 04CB E6 13 00 ld sound_status,#00H
925
926 04CE F6 08 CA call sound_close
927 04D1 8B 06 jr remote_sound_control1
928
929 04D3 remote_sound_on:
930 04D3 E6 13 01 ld sound_status,#01H
931
932 04D6 F6 08 C1 call sound_open
933
934 04D9 remote_sound_control1:
935 04D9 E4 13 19 ld I2C_data,sound_status
936 04DC E6 1A 13 ld I2C_dress,#sound_status_dress
937 04DF F6 09 D4 call WR_24C02
938 04E2 E6 24 01 ld beep_flag,#01h
939
940 04E5 remote_sound_control_end:
941 04E5 E6 53 00 ld remote_value,#00h
942 04E8 AF ret
943 ;***********************************************************************************
944 04E9 remote_lamp_control:
945
946 04E9 76 10 01 tm fire_status,#01H
947 04EC 6B 1F jr z,remote_lamp_control_end
948
949 04EE 76 12 01 tm lamp_status,#01H
950 04F1 EB 08 jr nz,remote_lamp_off ;if lamp_status=0=off jump to lamp on
951
952 04F3 remote_lamp_on:
953 04F3 E6 12 01 ld lamp_status,#01H
954 04F6 F6 08 CE call lamp_open
955 04F9 8B 06 jr remote_lamp_control1
956
957
958 04FB remote_lamp_off: ;if lamp_status=1=on to lamp off
959 04FB E6 12 00 ld lamp_status,#00H
960 04FE F6 08 D7 call lamp_close
961
962 0501 remote_lamp_control1:
963 0501 E4 12 19 ld I2C_data,lamp_status
964 0504 E6 1A 12 ld I2C_dress,#lamp_status_dress
965 0507 F6 09 D4 call WR_24C02
966 050A E6 24 01 ld beep_flag,#01h
967 050D remote_lamp_control_end:
968 050D E6 53 00 ld remote_value,#00h
969 0510 AF ret
970 ;***********************************************************************************
971
972
973 ;*******************************************************************
974 0511 counter_check:
975
976 ;ld key_first_delay,01h
977
978 0511 76 26 01 tm common_flag,#01h
979 0514 6D 05 D3 jp z,counter_check_end
980
981
982 0517 20 66 inc AD_convert_time1
983 0519 A6 66 C8 cp AD_convert_time1,#200
984 051C 7B 06 jr ult,counter_check0
985 051E E6 66 00 ld AD_convert_time1,#00
986 0521 E6 65 01 ld AD_convert_time,#01h
987
988
989 0524 counter_check0:
990
991 0524 76 05 01 tm key_hold_down,#01H ;key hold counter 120us*10*255=306ms
992 0527 6B 21 jr z,counter_check1
993
994 0529 20 01 inc key_press_time1
995 052B A6 01 64 cp key_press_time1,#100
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -