Standard infrared remote control receiver-songhan assembler source code

Source: Internet
Author: User
/*************************************** * ************ Name: the 4byte platform for the standard redfa remote control receiver is: the sn8p2511 mode is set to 100u *************************** **************************/; register definition sts1 DS 1f_irecok equ sts1. 0; receive a pair of Data t_irsta DS 1t_irnumposi DS 1; High level counter r_irdat1 DS 1; Receive Buffer r_irdat2 DS 1r_irdat3 DS 1r_irdat4 DS limit DS 1; the data received successfully; the constant defines vt_level0 equ 10; 1msvt_level1 equ 20; 2 ms; The following is the interruption receiving program -- 100u enters the interruption once; &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&; first receive r_irdat4 and finally receive r_irdat1; r_irdat4 r_irdat3 r_irdat2 r_irdat1 respectively indicate the address code, the data code, and the data code bts0 f_irecok; when the data is not retrieved, the system does not receive the new data JMP l_irexit CLR t_irsta bts1 p_ir incms t_irsta bts1 t_irsta. 1 JMP resume:; the current value is 0 mov A, t_irnumposi 1_fz JMP l_irexit mov A, t_irnumposi sub A, # vt_level1; when the high level time is greater than data 1, the initial value fc jmp l_initirdat bts0. 0 bset f_irecok; receives a batch of Data mov A, t_irnumposi sub A, # vt_level0; when the High-Level time is greater than DATA 0, it is deemed that the received data is 1 rrcm r_irdat1 rrcm r_irdat2 rrcm r_irdat3 rrcm r_irdat4 CLR t_irnumposi JMP l_irexitl_initirdat:; after receiving the start code,, #0x80 mov r_irdat1, a clr r_irdat2 CLR r_irdat3 CLR r_irdat4; BCLR f_irecok JMP l_irexit; ------------------------------- l_irposi:; currently 1 incms t_irnumposi NOP l_irexit:; exit the receiver; &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&&&&&&&&&&&&&&&&&&&&&&

Standard infrared remote control receiver-songhan assembler source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.