1. MCU's I2C is implemented by IO port simulation;
2. MCU establishes communication with timing chip RX-8025SA as I2C master device;
3. Realize the functions of timed alarm, timed wake-up and sleep;
Debugging process:
1. The code for IO port simulation I2C can be found on the Internet. However, in specific projects, due to the difference in clock timing control, it needs to be debugged again.
1) The address of an I2C device can be described using 7 bits or 8 bits.
Note that as long as the code is consistent with the actual device address, it is fine. The usage of the 7-bit address is nothing more than describing the upper 7 bits of the 8-bit address, because the last bit is fixed. (It is 1 when reading and 0 when writing).
2) The I2C communication protocol itself does not specify the number of bytes transmitted during the communication process. However, some devices may only allow the transmission of 1 byte, or 2 bytes, or bytes within a fixed number of bits. The specific rules should be determined by the device specification.
2. If I2C communication is OK, you need to implement the timing function required by the project according to the RX-8025SA specification.
Take the alarm clock function as an example: (Please refer to the specification of RX-8025SA)
1. There is an alarm D function in the 8025 chip:
And whether the current device is in the shutdown state. When RA5 = L and the device is in the power-on state,
The MCU notifies the device, and the device then determines whether to issue an alarm based on relevant settings.
3. Attach the code for simulating I2C communication (search it online):
Previous article:GPRS module sends information code
Next article:51 single chip microcomputer control of relay
- 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
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- 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
- [GD32F310 Review] Communication USART Configuration and ECHO Routine
- Help interpret the battery charging curve
- Independent buttons control the addition and subtraction of the digital tube. Then reduce it to 0 and press it again. The first light tube will turn on.
- Disassembling the world's first automotive LiDAR
- How to Design an RF Power Amplifier
- The simulation of multiplication floating point IP in quartus, has anyone used it?
- LED downlight replacement dimmable power supply
- There are some problems with the PFC circuit power-on process. Please consult
- LM358 audio amplifier circuit (loudspeaker)
- CircuitPython OLED Watch/Bracelet