PIC12F629 decoding PT2262IR (asm program)

Publisher:tgdddtLatest update time:2022-01-29 Source: eefocusKeywords:PIC12F629 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This program is used in a colorful infrared remote control decoding program. The microcontroller uses PIC12F629. The software simulates three-way PWM output to drive the red, green and blue LEDs into eight groups with a total of 24 LEDs, realizing nine patterns such as single LED gradually bright and dim, two LEDs one bright and one dark, and colorful. It has a power-off memory function. The following is the decoding program.

;--------------------------------------------------------

;filename: 24LED_Remote.asm

;     mcu: PIC12f629

;   clock: 4 MHz for INTRC

;    date: 2006/02/25

;  writer: aLin

; IC type: PT2262IR

;    Rosc: 470K

;--------------------------------------------------------

 

        list p=pic12f629

        #i nclude"p12f629.inc"

       

        #define B_LED gpio,0 ; Green LED output port

        #define G_LED gpio,1 ; Blue LED output port

        #define R_LED gpio,2 ; Red LED output port

        #define rem gpio,3 ;GP3/MCLR, define remote control input terminal

                

; Because when you hold down the PT2262 button

;PT2262 will continuously send out the code

; Set the ENABLE bit to detect whether the key has been released.

; If not released, no response         

;For remote control type

       

        #define enable user_reg,0 ;Receive enable bit

        #define on_off user_reg,1 ;When this bit is 0, pressing the pattern selection key is invalid

        #define go_next user_reg,2 ;When this bit is 1, jump to the next section

        #define reset user_reg,3 ;When this bit is 1, turn off the display 

        #define unlock user_reg,4 ; used to coordinate with on_off position

;---------------------------------------------------------

; Define variables

;

        r1 equ 20h ; used for d5ms subroutine

        r2    equ  


Keywords:PIC12F629 Reference address:PIC12F629 decoding PT2262IR (asm program)

Previous article:PIC16F877A microcontroller (IIC bus + AT24C02 chip)
Next article:PIC microcontroller-stamping discharge monitoring

Recommended posts

[AB32VG1 development board review] TF card and file reading and writing applications
TheAB32VG1developmentboardisequippedwithaTFcardslot,anditsinterfaceisshowninFigure2.WhenaTFcardisinserted,file-leveloperationscanbeperformedwiththecooperationofthefilesystemthroughprogramprocessing.Sincethec
jinglixixi Domestic Chip Exchange
What if the IoT meter sends the data to my server first, and my server then pushes the data to the client's server?
IftheIoTmetersendsthedatatomyserverfirst,andmyserverthenpushesthedatatotheclient'sserver,youseethemeaningisnotexpressedclearly,andthetitlewordlimitisreached.Alas,itisveryinconvenient.Ihavemadesuggestions
深圳小花 MCU
Principles of Automatic Control (Shiqun)
Adetailedandpractical"AutomaticControlPrinciples(includingModernControlTheory)VideoTutorial"taughtaccordingtothepostgraduateentranceexaminationstandards!ThisseriesofvideotutorialsistaughtbyShiQun,aPh.D.fromTsinghua
EE大学堂 Training Edition
FPGA Basics (I)
Thanksforsharing Goodinformation,thanksforsharing!
至芯科技FPGA大牛 FPGA/CPLD
Support the e-sports competition and get gifts for grabbing the building~~
【EventIntroduction】 The2019CollegeStudentElectronicDesignCompetitionisabouttobegin.Netizenswhoarepreparingtoparticipatethisyearhavealreadyenteredthebattlepreparationstate.Inordertoalloweveryonetofullycomm
okhxyyo Electronics Design Contest
【2024 DigiKey Creative Competition】+ Realization of motion control mini-game
#PrefaceThisdesignisjustasmalldesignthatrealizesthemovementofthecontrolledobjectthroughthesensorandrealizesthesomatosensorygame.Timeistight,manydetailsoftheoriginaldesignarenotrealized,andthesimplestcontrolled
zsy-s DigiKey Technology Zone
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号