-
C#flyod最短路代码
Floyd算法又称为插点法,是一种利用动态规划的思想寻找给定的加权图中多源点之间最短路径的算法,与Dijkstra算法类似。该算法名称以创始人之一、1978年图灵奖获得者、斯坦
- 2022-07-24 14:20:13下载
- 积分:1
-
example6_TIM
本例展示了如何设置TIM,用它来测量一个外部输入信号的频率和占空比。
TIM2时钟设置为72MHz,预分频设置为0,TIM2计数器时钟可表达为:
TIM2 counter clock = TIMxCLK / (Prescaler +1) = 72 MHz,因此可测量的最小频率值为1100Hz。
设置TIM2工作在PWM输入模式(PWM Input Mode),把外部信号作为输入连接到TIM2通道2。
利用TIM2计数器中断来测量信号的频率和占空比。在TIM2_IRQHandler中,计算信号的频率和占空比,方法如下:
变量"Frequency"为由下式得到的外部信号频率:
Frequency = TIM2 counter clock / TIM2_CCR2 单位Hz
变量"Duty_Cycle"为由下式得到的外部信号占空比:
Duty_Cycle = (TIM2_CCR1*100)/(TIM2_CCR2) 单位
(This example shows how to set up the TIM, and use it to measure the frequency and duty cycle of an external input signal. TIM2 clock set to 72MHz and the prescaler is set to 0, TIM2 is counter clock can be expressed as: TIM2 is counter clock = TIMxCLK/(prescaler. Ppls1) = 72 MHz, the minimum measurable frequency value of 1100 Hz. Set TIM2 PWM input mode (PWM Input Mode), the external signal as an input connected to the the TIM2 Channel 2. TIM2 counter interrupt signal to measure frequency and duty cycle. Calculate the frequency and duty cycle of the signal in TIM2_IRQHandler as follows: variable " Frequency" on the grounds of the external signal frequency by the following formula: Frequency = TIM2 is counter clock/TIM2_CCR2 unit Hz variable Duty_Cycle " on the grounds of the following formula to get external duty cycle: Duty_Cycle = (TIM2_CCR1* 100)/(TIM2_CCR2) in )
- 2012-05-18 18:28:47下载
- 积分:1
-
数字温度传感器 ds18b20 7 赛格
传感器 ds18b20
#include < at89x52.h >
sbit DQ = P2 ^1; 与 DS1820 数据引脚连接
//---------------------------------------
延迟 mS 功能
//-------------
- 2023-07-21 21:30:03下载
- 积分:1
-
demo
一个C++的垃圾回收器,用于研究垃圾自动回收机制。(The garbage collector is a C++, used to study.)
- 2014-01-10 16:20:05下载
- 积分:1
-
9738832
Read and write bmp files for beginners()
- 2018-05-20 19:06:48下载
- 积分:1
-
serise
嵌入式Linux下,c语言访问串口,发送数据的源码,使用时,应该用交叉编译器编译.(failed to translate)
- 2011-08-15 12:49:50下载
- 积分:1
-
SG90
程序是基于STM32F103ZET6实现舵机调试,源码可以实现用户给指定角度,然后舵机转到相应角度(Procedure is based servo STM32F103ZET6 achieve debugging, source code may be implemented for the user to specify the angle, and steering angle corresponding to)
- 2020-11-28 00:09:30下载
- 积分:1
-
exp1
实现了滑动窗口协议,滑动窗口协议来解决TCP协议工作时,每传输一个数据分组后,必须等待接收端的确认才能够发送下一个分组的问题(It implements sliding window protocol, when the sliding window protocol TCP protocol works to solve, after every transmission of a data packet must wait for acknowledgment the receiver before sending the next packet can be a problem)
- 2020-10-29 16:39:57下载
- 积分:1
-
xiaofangbianlidian
版本要求:
程序体现面向对象的编程思想;
要求能够灵活添加新物品,并向用户提供多次购买一次性结帐的功能;
提示:可用以下三个类解决该问题:
1.货物类(Goods):一个商品,包含了名称,价格信息
2.购物篮类(Basket):一个购物篮,包含了已经选择的东西
3.Store:小芳便利店 主程序
(version requirements : procedures reflect object-oriented programming ideas; Require flexibility to add new items, multiple users to purchase one-time billing functions; Tip : The following three categories can be used to solve the problem : 1. Goods category (Goods) : a commodity, including the name, price information 2. Shopping basket category (Basket) : a shopping cart, already contains a choice of three things. Store : Xiaofang facilitate procedures owner)
- 2020-08-16 15:48:31下载
- 积分:1
-
ARM开发详解 by 微芯力
嵌入试硬件开发详解 arm7 4510b(embedded test hardware development Elaborates on ARM7 4510b)
- 2005-04-22 00:08:10下载
- 积分:1