本例展示了如何设置TIM工作在输出比较-非主动模式(Output Compare Inactive mode),并产生相应的中断。 TIM2时钟设置为36MHz,预分频设置为35999,TIM2计数器时钟可表达为: TIM2 counter clock = TIMxCLK / (Prescaler +1) = 1 KHz 设置TIM2_CCR1寄存器值为1000, CCR1寄存器值1000除以TIM2计数器时钟频率1KHz,为1000毫秒。因此,经过1000毫秒的时延,置PC.06输出为低电平。 同理,根据寄存器TIM2_CCR2 、TIM2_CCR3和 TIM2_CCR4的值,经过500毫秒的时延,置PC.07输出为低电平;经过250毫秒的时延,置PC.08输出为低电平;经过125毫秒的时延,置PC.09输出为低电平。 输出比较寄存器的值决定时延的大小,当计数器的值小于这个值的时候,点亮与PC.06-PC.09相连的LED;当计数器的值达到这个值得时候,产生中断,在TIM2的4个通道相应的中断里,把它们一一关闭。
标签: Inactive Compare Output mode
上传时间: 2013-12-20
上传用户:ghostparker
AES encryption and decryption tool, which can encrypt any string to a HEX number and decrypt in AES.
标签: encryption decryption AES and
上传时间: 2017-02-16
上传用户:Zxcvbnm
OC0 output mode 设定了pwm输出控制选择
上传时间: 2013-12-26
上传用户:ynsnjs
Input : A set S of planar points Output : A convex hull for S Step 1: If S contains no more than five points, use exhaustive searching to find the convex hull and return. Step 2: Find a median line perpendicular to the X-axis which divides S into SL and SR SL lies to the left of SR . Step 3: Recursively construct convex hulls for SL and SR. Denote these convex hulls by Hull(SL) and Hull(SR) respectively. Step 4: Apply the merging procedure to merge Hull(SL) and Hull(SR) together to form a convex hull. Time complexity: T(n) = 2T(n/2) + O(n) = O(n log n)
标签: contains Output convex planar
上传时间: 2017-02-19
上传用户:wyc199288
All of Java s Input/Output (I/O) facilities are based on streams, which provide simple ways to read and write data of different types. Java provides many different kinds of streams, each with its own application. The universe of streams is divided into four large categories: input streams and output streams, for reading and writing binary data and readers and writers, for reading and writing textual (character) data. You re almost certainly familiar with the basic kinds of streams--but did you know that there s a CipherInputStream for reading encrypted data? And a ZipOutputStream for automatically compressing data? Do you know how to use buffered streams effectively to make your I/O operations more efficient? Java I/O, 2nd Edition has been updated for Java 5.0 APIs and tells you all you ever need to know about streams--and probably more.
标签: facilities streams provide Output
上传时间: 2013-12-17
上传用户:6546544
convert bmp to hex files
上传时间: 2017-03-03
上传用户:拔丝土豆
set of classes for coding hex to bin and bin to hex
上传时间: 2017-03-05
上传用户:wang5829
program converter BIN format file To Qualcomm HEX
标签: converter Qualcomm program format
上传时间: 2013-12-15
上传用户:妄想演绎师
Convert BMP files into hex data
上传时间: 2013-12-24
上传用户:yoleeson
单片机C源程序+HEX文件。配合实验板。需要的话加Q:394011495.并注明。
上传时间: 2014-01-15
上传用户:a6697238