USART1中断方式接收调试完成。功能是将PC机发送来的代码通过中断方式接收,并将接收内容直接返回。程序主循环是LED流水灯。PC端使用串口调试助手。
主程序及中断程序代码如下:
myUSART_led_int.rar
下一步调试液晶。
主程序及中断程序代码如下:
myUSART_led_int.rar
下一步调试液晶。
看这里就知道了:
/*******************************************************************************
* Function Name : LCD_WriteReg
* Description : Writes to the selected LCD register.
* Input : - LCD_Reg: address of the selected register.
* - LCD_RegValue: value to write to the selected register.
* Output : None
* Return : None
*******************************************************************************/
void LCD_WriteReg(u16 LCD_Reg,u16 LCD_RegValue)
{
/* Write 16-bit Index, then Write Reg */
ClrCs
LCD->LCD_REG = LCD_Reg;
/* Write 16-bit Reg */
LCD->LCD_RAM = LCD_RegValue;
SetCs
}
/*******************************************************************************
* Function Name : LCD_WriteReg
* Description : Writes to the selected LCD register.
* Input : - LCD_Reg: address of the selected register.
* - LCD_RegValue: value to write to the selected register.
* Output : None
* Return : None
*******************************************************************************/
void LCD_WriteReg(u16 LCD_Reg,u16 LCD_RegValue)
{
/* Write 16-bit Index, then Write Reg */
ClrCs
LCD->LCD_REG = LCD_Reg;
/* Write 16-bit Reg */
LCD->LCD_RAM = LCD_RegValue;
SetCs
}
回复
我要赚赏金打赏帖 |
|
|---|---|
| 设备功耗web监控界面(ESP32C5)被打赏¥28元 | |
| OrangePiZero2W系统被打赏¥33元 | |
| Linux环境下以模拟方式快速实现出入管理功能测试被打赏¥24元 | |
| 树莓派3+Klipper,老3D打印机满血升级被打赏¥33元 | |
| OK1126B-S开发板下串口屏及其应用被打赏¥21元 | |
| 低功耗超声波液位测距仪(ESP32S3)被打赏¥27元 | |
| 在K230DBOX上实现多时段语音提示功能被打赏¥14元 | |
| 使K230DBOX实现相机持续拍照功能被打赏¥12元 | |
| 基于K230DBOX的文本管理器设计被打赏¥14元 | |
| 基于K230DBOX的彩色画板功能实现被打赏¥15元 | |


我要赚赏金
