Embedding a NIOS Ⅱ soft core and PWM module implements a multi-channel servo-motor controller for robot arm. The hardware consists of NIOS Ⅱ soft core and PWM module. The PWM module contains frequency divider unit,address decoder unit, output enable register and PWM generator unit. The software is mainly with interact with the upper computer. Compared with the single chip computer plus FPGA, it reduces the cost. Meanwhile, the hardware is easy to extend, has much more channels and high precision of control. Its programming is also simple. The maximum precision of pulse width is able to reach 20 ns, under the clock of 50 MHz. The results of both simulation and experiment indicate that the controller is able to generate correct PWM wave. It can also control the servo-motor without shaking.%在FPGA中内嵌NIOS Ⅱ软核和PWM模块,实现机械手的多路舵机控制.硬件主要包括NIOS Ⅱ软核和PWM模块,PWM模块包括分频单元、地址译码单元、输出使能单元和PWM产生单元.软件部分主要完成与上位机的交互.与单片机+FPGA的方案相比,成本降低.同时,硬件扩展方便,通道数目多,软件编程简单,控制精度高,在50 MHz的时钟下,最大脉宽精度可以达到20ns.
展开▼