org 000h GOTO a1 org 1ch ;************************************************ ; Main program ;************************************************ a1 BSF STATUS, RP0; Select body 1 BCF STATUS,RP1 MOVLW 00H; Set RD port as output port MOVWF TRISD BCF STATUS, RP0; Select body 0 MOVLW 00H ; MOVWF PORTD; RD port outputs low level CALL M001 ; Delay MOVLW 0FFH ; MOVWF PORTD; RD port outputs high level CALL M001 ; Delay goto a1 ; execute repeatedly ;**************************************************** ; Delay subroutine ;**************************************************** M001 MOVLW 4 MOVWF 30H M002 MOVLW 250 MOVWF 31H M003 MOVLW 248 MOVWF 32H DECFSZ 32H,1 GOTO $-1 DECFSZ 31H,1 GOTO M003 DECFSZ 30H, 1 GOTO M002 RETURN ;******************************************************* ; End of program ;******************************************************* end
Previous article:PIC microcontroller 4-digit hexadecimal number divided by 4-digit hexadecimal number subroutine
Next article:PIC microcontroller digital tube program
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- DSP Learning (4) Bus Structure
- Vehicle LIN communication error frame problem
- [Technical Tips] It turns out that the ARM+Linux audio solution is so simple!
- Selling some development boards, both new and used.
- FAQ Bluetooth transmission questions and answers
- How to enable TI 15.4-Stack to support 470M frequency band
- What is millimeter wave?
- Free Download | Maxim Reference Design Download for Industrial Applications
- Analysis of common causes of copper shedding in PCB factories
- 【micropython】Bluetooth BLE routine