-
1. 本程序使用一个定时器和任意 2 个 I/O 口模拟一个串行口。
2. 1位起始位,8位数据位,1位停止位。发数据位时先发低位。
3. 支持半双...
1. 本程序使用一个定时器和任意 2 个 I/O 口模拟一个串行口。
2. 1位起始位,8位数据位,1位停止位。发数据位时先发低位。
3. 支持半双工通讯。收、发波特率相同。
4. 应把定时器中断优先级设置为最高级。
5. 本程序每接收一个字节后就把它放到一个队列缓冲区中(也可使用环行缓冲区),
待缓冲区满后,将缓冲区中的内容原样发回。这是为了测试多字节连续收发的
能力和简化程序。实际应用中应防止缓冲区溢出。
6. 由接收转换到发送时要先调用 soft_send_enable ();
由发送转换到接收时要先调用 soft_receive_enable ()。
7. 发送最后一个字节后如果要立刻转为接收,必须等待最后一个字节后发送完毕
while ( rs_f_TI == 0) // 等待最后一个字节发送完毕-err
- 2022-06-19 08:35:11下载
- 积分:1
-
工程师在用Keil开发程序时,在代码性能要求较高的场合,需要对代码段的执行时间作统计。比如在做LED显示屏软件扫描程序,或一些定时采集数据程序,如果在软件仿真的...
工程师在用Keil开发程序时,在代码性能要求较高的场合,需要对代码段的执行时间作统计。比如在做LED显示屏软件扫描程序,或一些定时采集数据程序,如果在软件仿真的时候就能够清晰知道代码段的运行时间,那就可以对程序进行优化,或者插入汇编代码(asm)达到最高运行速度。
关键字:Keil DLL C语言 ASM 汇编-engineers in the development process with Keil, the code performance requirements higher occasions, need to block the execution time statistics. For example, in the software do LED scanning procedures, or some regular data collection procedures, If the software simulation time can understand clearly code of the running time, it can process optimization, or insert code compilation (asm2) to achieve maximum speed. Keywords : Keil DLL C language compilation ASM
- 2022-09-10 18:40:02下载
- 积分:1
-
atmel公司atmega单片机bootloader的源代码
atmel公司atmega单片机bootloader的源代码-ATmega Atmel single-chip companies bootloader source code
- 2022-10-16 06:15:03下载
- 积分:1
-
STM32F103 cortex
STM32F103 cortex-m3
can总线例程-STM32F103 cortex-m3can bus routines
- 2023-06-13 08:10:03下载
- 积分:1
-
公司打印机适配器板部分的主要功能的小代码…
公司打印机转接板的一段小代码 主要功能是从ARM上通过I2C读取数据,然后用并口控制打印机打印,使用单片机控制-companies printer adapter plate section of the main functions of the small code is adopted from ARM I2C read data, and then use the parallel port printer control, the use of SCM control
- 2023-08-13 20:40:02下载
- 积分:1
-
模拟交通灯,并带有数字显示的程序。初始时全为红灯,显示“HELLO”字样。然后交通灯以“红绿、红黄、绿红、黄红”四种状态做循环,而且黄灯会闪烁,每种状态都带有到...
模拟交通灯,并带有数字显示的程序。初始时全为红灯,显示“HELLO”字样。然后交通灯以“红绿、红黄、绿红、黄红”四种状态做循环,而且黄灯会闪烁,每种状态都带有到数记时。当按下P3_2时,变成“红红”状态,并显示“STOP”字样!
-simulated traffic lights and figures with the procedure. When all of the initial red, shows that the "hello" words. Then traffic lights to the "black, red and yellow, green, red, yellow red" state to do four cycle, but the yellow light flashes, each state will have a few to remember when. When pressed P3_2, into a "red" state, and shows that the "STOP" word!
- 2022-01-26 03:16:31下载
- 积分:1
-
32位arm9微处理器S3C2410的lcd彩色液晶屏测试源代码
32位arm9微处理器S3C2410的lcd彩色液晶屏测试源代码-32-bit ARM9 microprocessor S3C2410 the lcd color LCD screen test source code
- 2022-01-21 20:36:55下载
- 积分:1
-
图silver18f2620(与PIC18F2620使银证)
schematic silver18F2620 (make silver card with PIC18F2620)
- 2022-12-30 10:10:07下载
- 积分:1
-
LCD
LCD-7279的经过调试多次已经能够实现在指定的位置显示特定的数据。
程序lcd1.c实现基本的功能,即:键盘输入0、1、2、3、4、5、6、7、8、9、acdef 在液晶的指定位置显示实现满屏或半屏显示点阵和字符,调入一幅图画的代码进行显示;-LCD-7279 after the repeated testing has been able to achieve the specified location-specific data. Lcd1.c procedures to achieve the basic functions, namely : the keyboard input 0, ,36.2. 8,9. a b c d e f in the designated location LCD realize Manping or semi-Screen Display and characters, transferred to a picture of the code display;
- 2022-04-18 07:30:19下载
- 积分:1
-
数电\_数字控制系统――原理、硬件与软件
数电\_数字控制系统――原理、硬件与软件-few-- _ digital control system-- including hardware and software
- 2022-12-05 17:40:04下载
- 积分:1