摘要
提出了一种基于分时复用单片机/DSP内部PWM模块产生多路电动舵机控制信号的方法。利用内部的PWM模块硬件中断功能,辅以必要的硬件电路,可以从1路分时复用PWM模块中分离出8路舵机信号。单片机/DSP内部的PWM模块越多,可扩展的舵机控制信号就越多。通过ATmega128的软硬件仿真,验证了其可行,并实现了48路PWM信号。该控制信号产生的优势是利用内部的PWM模块功能和硬件中断工作方式,通过少量的I/O口输出多路舵机控制信号,占用系统资源少、精度高、软件简单、实时性好。
A novel method to implement multi-channel control signal of electrical steering gear based on time-divisionmultiplexing PWM module was presented. With some simple external circuits, a MCU/DSP's PWM module output functionwas integrated and timer overflow interrupt function was integrated to separate eight control signals from a time - divisionmultiplexing PWM module. The more an MCU/DSP has PWM modules, the more control signal channels can be extended.The feasibility of this solution was verified by the simulation of hardware and software of the ATmega128 and 48 PWM signalswere realized. The advantage of this solution is integrating PWM's hardware module and software interrupt function torealize multi-channel control signals by using a small number of MCU/DSP I/O outputs, which occupies less system resourceswith high precision, easy programming and good real-time performance.
出处
《微特电机》
北大核心
2016年第8期113-116,共4页
Small & Special Electrical Machines
关键词
分时复用
PWM模块
电动舵机
单片机
DSP
time division multiplexing
PWM module
electrical steering gear
single chip microcomputer
DSP