http://www.cs.indiana.edu/~geobrown/book.pdf An example of a basic timer is illustrated in Figure 10.1. This timer has four components – a controller, a prescaler (PSC), an “auto-reload” register (ARR) and a counter (CNT). The function of the prescal…
Output Compare is a powerful feature of embedded world. The PIC32 Output Compare module compares the values stored in the OCxR and/or the OCxRS registers to the value in the selected timer. When a match occurs, the Output Compare module generates an…
STM32 System and Timer Clock Configurations I've started writing some software to drive a series of TLC5940 16 Channel LED Driver chips on an ST STM32F407 Microcontroller. I previously had code working on an Atmel microcontroller, but obviously with…
TIMER门控模式控制PWM输出长度 参照一些网友代码做了些修改,由TIM4来控制TIM2的PWM输出长度, 采用主从的门控模式,即TIM4输出高时候TIM2使能输出 //TIM2 PWM输出,由TIM4来控制其输出与停止 //frequency_tim2:TIM2 PWM输出周期:KHz //duty_tim2:TIM2 PWM占空比 0-100 //period_tim4: TIM4控制TIM2总周期,单位0.1ms //duty_tim4: TIM4控制TIM2输出时间,单位0.1ms v…
Today I accomplish a simple application for PIC32MZ EC Starter Kit. This application uses Input Capture feature of PIC32MZ. The Input Capture module captures the 32-bit value of the selected Time Base registers when an event occurs at the ICx pin.  T…
An Isolated DAC Using PWM Output Arduino‘s (ATmega328P) PWM outputs via analogWrite can be conveniently turned into analog voltage levels through the use of simple RC filters. Since the PWM outputs are not isolated, using them to drive other devices…
本节内容非常重要,如果你不能很好的掌握本节内容,你无法真正理解比特币的运行原理,请务必要学习清楚. 比特币的交易模型为UTXO(unspend transaction output),即只记录未花费的比特币输出,每次交易花费的是之前的某一个或多个输出. 什么是UTXO? 以下借用一下网上的图 我们在现实世界中的支付系统是基于账户模型的,也就是说每一个人都有一个账户,支付就是在不同的账户中加加减减,类似如下: UTXO的实现,图示如下: 从上面的图中可以看出,比特币存储的实际是一笔又一笔的交易,最…
一.部署 Django 到远程 Linux 服务器 利用 xshell 通过 ssh 连接到 Linux服务器,常规的启动命令是 python3 manage.py runserver 但是,关闭 xshell 后,就访问不了 Django 了. 这时候需要使用 nohup 命令启动(概念:如果你正在运行一个进程,而且你觉得在退出帐户时该进程还不会结束,那么可以使用nohup命令.该命令可以在你退出帐户/关闭终端之后继续运行相应的进程) 这时输入 nohup python3 manage.py…
搞了两天单脉冲没搞定,无意中发现,这个利用主从模式的门控方式来控制一路PWM的输出长度很有效. //TIM2 PWM输出,由TIM4来控制其输出与停止 //frequency_tim2:TIM2 PWM输出周期:KHz //duty_tim2:TIM2 PWM占空比 0-100 //period_tim4: TIM4控制TIM2总周期,单位0.1ms //duty_tim4: TIM4控制TIM2输出时间,单位0.1ms void TIM2_CH3_PA2_PWM_TIM4_CH4_GATE(u…