BSF STATUS,RP0
CLRF EEADR ;Address 0
MOVLW .9
MOVWF EEDAT ;The data to be written is 9
BSF EECON1,WREN ;Enable writing
MOVLW 0X55
MOVWF EECON2
MOVLW 0XAA
MOVWF EECON2
BSF EECON1,WR ;Start writing
NOP
NOP ;Several NOPs are added for fear of affecting the following operations
MOVLW .7
MOVWF EEADR ;Address 7
MOVLW .6
MOVWF EEDAT ;The data to be written is 6
MOVLW 0X55
MOVWF EECON2
MOVLW 0XAA
MOVWF EECON2
BSF EECON1,WR
NOP
BCF EECON1,WREN ;Disable writing
MOVLW .0 ;Address 0
MOVWF EEADR
BSF EECON1,RD ;Read
MOVF EEDAT,W ;Here the simulated content of W is 9, and the actual readout is also 9.
.
;Display and delay program
.
MOVLW .7 ;Address 7
MOVWF EEADR
BSF EECON1,RD ;Read
MOVF EEDAT,W ;Here the simulated content of W is 6, but the actual run, the readout is 9
Previous article:Key wake-up method for PIC16C5X microcontroller in sleep state
Next article:PIC microcontroller timer interrupt source program
- Popular Resources
- Popular amplifiers
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
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- STM32F401CC spi flash recognition problem
- [Raspberry Pi 4B Review] + Building an OPENCV Environment
- Design and Application of Saber Simulation Software
- [2022 Digi-Key Innovation Design Competition] ESP32S2 button control RGB light
- New wearable technology developed, more skin-friendly and stronger
- Switch OUT?! Nintendo's latest recruitment may be aimed at the next generation console
- 【ST NUCLEO-H743ZI Review】+ 3. Key input
- Award-winning live broadcast: Focus on "TI FPD-Link III automotive chipset" Ideal solution for automotive video transmission
- Playing with Zynq Serial 1——Zynq Linux boot process
- 【AT-START-F425 Review】Overclocking Performance of AT32F425