DMX512 灯光控制协议

      MX512协议最先是由USITT(美国剧院技术协会)发展成为从控制台用标准数字接口控制调光器的方式。这个接口基于RS485 硬件接口,传输速率为250Kbps。在舞台灯光,景观灯控制领域得到广泛应用。

DMX512 的帧结构

DMX512帧以break 信号开始。大于22bit,或者88 us。跟随其后的是512 个字节的通道,可以控制512 个通道,或者170个RGB 灯具。

Continue reading

A detailed tutorial on STM32 ADC – multiple channel、DMA、average

This tutorial shows how to use various modes of the STM32 ADCs, including:

  • Basic single-channel measurement
  • Use of interrupts
  • DMA
  • Multi-channel sequences

Before you begin, install VisualGDB 5.0 or later and ensure you are using the latest version of the STM32 BSP.

An ADC (Analog-to-Digital Converter) is a peripheral that allows measuring the voltage (between 0 and Vref) on a certain input of the microcontroller and converting it into a number between 0 and 2N-1 where N is the ADC resolution. The easiest way to experiment with an ADC is to connect it to a potentiometer – a mechanically adjustable resistor:potentiometerIf you connect one of the side terminals of the potentiometer to the GND pin on your board and the other one to the VCC pin, rotating the potentiometer knob will gradually change the voltage level (relative to ground) on the third pin between 0 and VDD, that should produce values from 0 to 4095 for a 12-bit ADC.

Continue reading

STM32内部参照电压VREFINT的使用

一、STM32的内部参照电压VREFINT和ADCx_IN17相连接,它的作用是相当于一个标准电压测量点(和MSP430不一样。。),内部参照电压VREFINT只能出现在主ADC1中使用。

内部参照电压VREFINT与参考电压不是一回事。ADC的参考电压都是通过Vref+提供的并作为ADC转换器的基准电压。

当我们使用的Vref+是直接取自用VCC电压时,当VCC电压波动比较大时或稳压性能比较差时,可以借用STM32的内部参照电压VREFINT校正测量精度。

以测量1通道的电压值为例,先读出参照电压的ADC测量结果,记为ADre;再读出要测量通道1的ADC转换结果,记为ADch1;则要测量的电压为:

Vch1 = VREFINT* (((ADch1*(VREF/4096))/(ADre*(VREF/4096)))  

Continue reading

应用日志出现Application Error 1000 错误应用程序名称: w3wp.exe 程序池停止

日志名称: Application
来源: Application Error
日期: 2019/3/21 20:19:11
事件 ID: 1000
任务类别: (100)
级别: 错误
关键字: 经典
用户: 暂缺
计算机: xxxx
描述:
错误应用程序名称: w3wp.exe,版本: 7.5.7601.17514,时间戳: 0x4ce7a5f8
错误模块名称: ntdll.dll,版本: 6.1.7601.24308,时间戳: 0x5be85cc7
异常代码: 0xc0000374
错误偏移量: 0x000ce9a3
错误进程 ID: 0x6910
错误应用程序启动时间: 0x01d4a2a27f3b7d16
错误应用程序路径: C:\Windows\SysWOW64\inetsrv\w3wp.exe
错误模块路径: C:\Windows\SysWOW64\ntdll.dll

Continue reading

APACHE服务器伪静态rewrite出现No input file specified.的解决方案

启用REWRITE的伪静态功能的时候,首页可以访问,而访问内页的时候,就提示:“No input file specified.”

原因在于使用的PHP是fast_cgi模式,而在某些情况下,不能正确识别path_info所造成的错误,Wordpress的伪静态也有一样的问题。

WordPress程序默认的.htaccess里面的规则:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

“No input file specified.”,是没有得到有效的文件路径造成的。

修改伪静态规则最后一句,加个问号,如下:

RewriteRule ^(.*)$ /index.php?/$1 [L]

Ubuntu installation on USB stick with pure EFI boot (Mac compatible)

All I wanted was just:

  • an USB key with Ubuntu 16.04 LTS installed on it,
  • with /home and swap encrypted,

 

  • that I could boot from any of my 2 Macs, by simply pressing and holding the “option” (or “alt”) key immediately after boot,

 

  • without messing around with their respective boot loaders.

After trying dozens of solutions on all available blogs on the Internet I finally found THE solution that worked for me!

Continue reading
  • fafsdsadsadsadas