登录
首页 » 嵌入式系统 » stm32 串口程序

stm32 串口程序

于 2022-03-15 发布 文件大小:1.42 MB
0 220
下载积分: 2 下载次数: 1

代码说明:

STM32的串口是相当丰富的,功能也很强劲。最多可提供5路串口(MiniSTM32使用的是STM32F103RBT6,具有3个串口),有分数波特率发生器、支持单线光通信和半双工单线通讯、支持LIN、智能卡协议和IrDASIR ENDEC规范(仅串口3支持)、具有DMA等。 串口最基本的设置,就是波特率的设置。STM32的串口使用起来还是蛮简单的,只要你开启了串口时钟,并设置相应IO口的模式,然后配置一下波特率,数据位长度,奇偶校验位等信息,就可以使用了。下面,我们就简单介绍下这几个与串口基本配置直接相关的寄存器。1,串口时钟使能。串口作为STM32的一个外设,其时钟由外设时钟使能寄存器控制,这里我们使用的串口1是在APB2ENR寄存器的第14位。APB2ENR寄存器在之前已经介绍过了,这里不再介绍。只是说明一点,就是除了串口1的时钟使能在APB2ENR寄存器,其他串口的时钟使能位都在APB1ENR。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • DE2 练习源码2-2
    FPGA DE2开发板  实验2第一部分VHDL硬件语言练习源码 Part II You are to design a circuit that converts a four-bit binary number V = v3v2v1v0 into its two-digit decimal equivalent D = d1d0. Table 1 shows the required output values. A partial design of this circuit is given in Figure 1. It includes a comparator that checks when the value of V is greater than 9, and uses the output of this comparator in the control of the 7-segment displays. You are to complete the design of this circuit by creating a VHDL entity which includes the comparator, multiplexers, and circuit A (d
    2022-05-07 21:56:50下载
    积分:1
  • 让蜂鸣器唱歌的程序,利用从音乐中提取出的文件资料,控制发音长短来实现...
    让蜂鸣器唱歌的程序,利用从音乐中提取出的文件资料,控制发音长短来实现-Let buzzer to sing procedures, the use of music extracted from the documents, control the length of pronunciation to achieve
    2022-02-05 07:45:40下载
    积分:1
  • Encryption
    这项工作提供了一个洞察RSA密码系统的实施使用Verilog最终导致一个IC。完整的实现包括密钥生成、加密和解密三个阶段。为了生成密钥,我们使用了随机数生成器和GCD块。而对于加密和解密过程,则实现了模乘和模幂运算。最后拿出一个IC,SoC在Cadence中的遭遇是已经用过了工作还强调了对Cadence和Verilog的介绍。文中还重点介绍了使用Verilog在Cadence中实现一些基本系统的细节。
    2022-03-04 07:33:08下载
    积分:1
  • 四轴飞行器四维空间算法与PID控制调速
    资源描述本程序采用最新一代红晶单片机编写的主控程序。代码包括了无线通信。3轴陀螺仪的算法。PID双闭环算法控制系统。四维空间算法与PID配合,完美的完成了空中的一键悬停功能。飞行控制灵活,方向控制无死角。程序经过批量生产的产品。属于第三版本第二代产品。
    2022-08-24 18:31:15下载
    积分:1
  • MPC860 Scc2配置HDLC的示例代码
    MPC860的SCC2配置HDLC示例代码-MPC860 SCC2 configuration HDLC sample code
    2022-03-01 04:04:45下载
    积分:1
  • Shift Register Display
    AVR微控制器与drivin16七段显示移位寄存器的接口
    2022-05-15 15:03:00下载
    积分:1
  • 用C实现的另一个串口通信程序,版本较新^_^
    用C实现的另一个串口通信程序,版本较新^_^-C achieved another serial communication procedures, the newer version ^ _ ^
    2022-05-31 01:50:33下载
    积分:1
  • C implementation using automatic device 1 advertisement light box, DC motor cont...
    用C实现广告灯箱自动装置1、直流电机控制系统,控制广告牌的升降。 2、定时翻转广告,可由按键设定时长。 3、时间设置,5:00-22:00正常工作,其余时间不工作,时间可以调整。 4、到达广告的边缘部分广告停止翻转。 5、广告可以由按键设置升/降。 6、白天时间广告灯不亮,光线较暗时广告灯才亮,测试灯的好坏时可以手动控制灯光。 7、断电时保存时间及按键的设置,使广告牌到达边缘部分。 -C implementation using automatic device 1 advertisement light box, DC motor control system, control the rise and fall of advertising. 2, ads from time to time reversal, length of time set by the keys. 3, time set ,5:00-22: 00 normal job, the rest of the time does not work, time to adjust. 4, Get ads ads stop some of the edge flip. 5, ads can be set up by the button/drop. 6, ads during the day time lights are not bright, low light only bright lights when the ads to test the quality of light can control the lights manually. 7, when power-off time and save the settings button so that the edge part of advertising arrival.
    2022-04-20 13:31:19下载
    积分:1
  • 24c01
    24c01-24c16读写驱动程序--Driver program for reading/writing 24c01-24c16.
    2023-05-22 18:50:03下载
    积分:1
  • 2500驱动,适合TI cc5
    2500驱动,适合TI cc5-2500 driver for TI cc5
    2022-02-18 15:36:14下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载