资源简介
这个程序实现串口接收到字符,触发接收中断,执行USART的中断服务程序,将接收到的数据再发送出去~~

代码片段和文件信息
#include “stm8l15x.h“
#include “stm8l15x_conf.h“
unsigned char Buf;
void delayms(unsigned int x)
{
unsigned int j=0i=0;
for(;i for(;j<65535;j++);
}
void main()
{
GPIO_Init(GPIOCGPIO_Pin_2GPIO_Mode_In_PU_No_IT);
GPIO_Init(GPIOCGPIO_Pin_3GPIO_Mode_Out_PP_Low_Fast);
CLK_PeripheralClockConfig(CLK_Peripheral_USART1ENABLE);
USART_Init(USART19600USART_WordLength_8bUSART_StopBits_1USART_Parity_No(USART_Mode_TypeDef)(USART_Mode_Rx|USART_Mode_Tx));
USART_ClockInit(USART1USART_Clock_DisableUSART_CPOL_LowUSART_CPHA_2EdgeUSART_LastBit_Disable); //配置USART1->CR3
USART_ClearITPendingBit(USART1USART_IT_RXNE); //配置USART1->SR
USART_ITConfig(USART1USART_IT_RXNEENABLE); //配置USART1->CR2的RIEN位
USART_Cmd(USART1ENABLE);
enableInterrupts();
while (1)
{
}
}
//该程序实现串口接收到字符,触发接收中断,执行USART的中断服务程序,将接收到的数据再发送出去
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-09-07 09:07 usart_IT_test\
目录 0 2012-09-07 09:07 usart_IT_test\Library\
目录 0 2012-09-07 09:21 usart_IT_test\Library\inc\
文件 123422 2012-09-06 16:14 usart_IT_test\Library\inc\stm8l15x.h
文件 18574 2012-02-23 10:04 usart_IT_test\Library\inc\stm8l15x_clk.h
文件 1231 2012-09-07 09:21 usart_IT_test\Library\inc\stm8l15x_conf.h
文件 9471 2012-08-29 12:44 usart_IT_test\Library\inc\stm8l15x_exti.h
文件 6453 2012-02-23 10:04 usart_IT_test\Library\inc\stm8l15x_gpio.h
文件 3844 2012-08-30 10:12 usart_IT_test\Library\inc\stm8l15x_it.h
文件 11129 2011-10-26 11:51 usart_IT_test\Library\inc\stm8l15x_itc.h
文件 15039 2012-02-23 10:04 usart_IT_test\Library\inc\stm8l15x_usart.h
文件 3813 2012-02-27 14:25 usart_IT_test\Library\inc\stm8l_it.h
目录 0 2012-09-07 11:16 usart_IT_test\Library\src\
文件 999 2012-09-07 11:16 usart_IT_test\Library\src\main.c
文件 20400 2012-09-06 19:06 usart_IT_test\Library\src\stm8l15x_clk.c
文件 13107 2012-09-07 10:25 usart_IT_test\Library\src\stm8l15x_exti.c
文件 8998 2012-09-06 18:14 usart_IT_test\Library\src\stm8l15x_gpio.c
文件 10210 2012-09-07 11:09 usart_IT_test\Library\src\stm8l15x_it.c
文件 9843 2012-08-30 11:26 usart_IT_test\Library\src\stm8l15x_itc.c
文件 27193 2012-09-07 11:06 usart_IT_test\Library\src\stm8l15x_usart.c
目录 0 2012-09-07 11:16 usart_IT_test\Project\
目录 0 2012-09-07 09:07 usart_IT_test\Project\Debug\
目录 0 2012-09-07 11:06 usart_IT_test\Project\Debug\Exe\
文件 67192 2012-09-07 11:06 usart_IT_test\Project\Debug\Exe\usart_test.out
目录 0 2012-09-06 17:01 usart_IT_test\Project\Debug\List\
目录 0 2012-09-07 11:16 usart_IT_test\Project\Debug\Obj\
文件 7468 2012-09-07 11:06 usart_IT_test\Project\Debug\Obj\main.o
文件 50036 2012-09-07 11:06 usart_IT_test\Project\Debug\Obj\stm8l15x_clk.o
文件 22381 2012-09-07 11:06 usart_IT_test\Project\Debug\Obj\stm8l15x_exti.o
文件 22943 2012-09-07 11:06 usart_IT_test\Project\Debug\Obj\stm8l15x_gpio.o
文件 44985 2012-09-07 11:06 usart_IT_test\Project\Debug\Obj\stm8l15x_it.o
............此处省略13个文件信息
- 上一篇:StreamChange.rar
- 下一篇:Protege5.2.0
相关资源
- MQTT+串口(usart)透传
- STM32F103 USART+DMA
- 4_USART串口通信(空闲中断+DMA.zip
- stm32f105-usart-DMA收发demo
- FEATURE SELECTION FOR KNOWLEDGE DISCOVERY AND
- FreeModbus_Slave+STM32F407+USART2代码亲测可
- 单片机串口printf函数自实现第二版
- Discovery of Reversible and Persistent Electri
- CP2102驱动WIN7、WIN10、32位、64位
- STM8L中文参考手册1-4全
- STM8L_MPU6500_DMP_震动唤醒
- ubnt-discovery-v2.3
- Keil5下的STM32F407程序
- USART基于hal库stm32f407串口通讯.rar
- STM32_USART 多机通信学习笔记
- STM32F103采用DMA实现USART2接收和发送
- STM32F103采用DMA实现USART3接收和发送
- 基于SM32F103C8T6的环境传感器
- STM32F429DISCOVERY外接SD卡使用SDIO4BIT方式
- STM32F407串口1-6 CAN1&2测试例程
- STM32F103 ADC+USART
- STM8L051 低功耗运行模式 库函数例程
- STM8L051.串口接收IDLE中断.zip
- FreeModbus_For_STM32_USART1_RS485移植分享
- stm32f429discovery的USB_HID移植
- 串口接收字符串控制LED
- hypertrm超级终端Win7
- STM32F103_FREERTOS_MPU6050DMP_USART_Timer输入捕
- 额温枪STM8L方案含原理图和代码.rar
- STM32F103RCT6单片机在串口屏上打印正弦
评论
共有 条评论