You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DeveloperAlpha 48b48663ce -u origin main 3 months ago
..
EIDE -u origin main 3 months ago
EWARM -u origin main 3 months ago
Inc -u origin main 3 months ago
MDK-ARM -u origin main 3 months ago
Src -u origin main 3 months ago
readme.txt -u origin main 3 months ago

readme.txt

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

================================================================================
                                样例使用说明
                             Sample Description
================================================================================
功能描述:
此样例演示了I2C通过中断方式进行通讯主机先向从机发送15byte数据然后再接收从机
发送的15byte数据,主机、从机接收数据成功后,主机和从机板上的小灯处于“常亮”状态。

Function descriptions:
This sample demonstrates communication between I2C devices using interrupts. 
The master device sends 15 bytes of data to the slave device and then receives 
15 bytes of data from the slave. After successful data transmission and 
reception between the master and slave, the LEDs on both boards remain 
constantly lit.
================================================================================
测试环境:
测试用板PY32F403_STK
MDK版本 5.28
IAR版本 9.20
GCC版本GNU Arm Embedded Toolchain 10.3-2021.10

Test environment:
Test board: PY32F403_STK
MDK Version: 5.28
IAR Version: 9.20
GCC Version: GNU Arm Embedded Toolchain 10.3-2021.10
================================================================================
使用步骤:
1. 编译下载程序到MCU并运行
2. 先复位从机,然后再复位主机
3. 复位完成后按下主机user按键主从开始通讯
4. 观察主从机的LED灯当主机和从机LED灯由常暗转为常亮状态则表明主机、从机收发数
据成功当主机或从机LED灯处于闪烁状态则表明主机、从机收发数据失败。

Example execution steps:
1.Compile and download the program to the MCU and run it.
2.Reset the slave device first, then reset the master device.
3.After the reset is complete, press the user button on the master device to 
initiate communication between the master and slave.
4.Observe the LEDs on the master and slave boards. When the LEDs on both the 
master and slave boards transition from being constantly dim to constantly lit, 
it indicates successful data transmission and reception between the master and 
slave. If the LEDs on the master or slave board are blinking, it indicates data 
transmission or reception failure.
================================================================================
注意事项:
PB6  -------> I2C1_SCL
PB7  -------> I2C1_SDA
主机程序为I2C_TwoBoard_CommunicationMaster_IT
从机程序为I2C_TwoBoard_CommunicationSlave_IT
如需修改速率直接修改I2C_SPEEDCLOCK即可

Notes:
PB6  -------> I2C1_SCL
PB7  -------> I2C1_SDA
Master program: I2C_TwoBoard_CommunicationMaster_IT
Slave program: I2C_TwoBoard_CommunicationSlave_IT
To modify the speed, simply modify the I2C_SPEEDCLOCK.
================================================================================