The Plus Width Module (PWM) in microprocessors is commonly used in motor control field. If the ordinary PWM peripherals output PWM waveform, the software must calculate the period and duty cycle number based on the mi...The Plus Width Module (PWM) in microprocessors is commonly used in motor control field. If the ordinary PWM peripherals output PWM waveform, the software must calculate the period and duty cycle number based on the microprocessor’s system clock cycle first, and then write them into the registers. As all known, the microprocessor without hardware calculator consume very long time in multiplication and division. In order to reduce the CPU’s running time, a calculation hardware unit was designed to calculate the waveform parameters. The software only need to write the period (Hz units) to the period register and the duty cycle (% units)to its register. This hardware unit was designed with Verilog HDL and running in the Nios Ⅱ system successfully.展开更多
基金supported by Chongqing(2008 AA6002)ChongQing University Of Post & Telecommunication(A2006-45)
文摘The Plus Width Module (PWM) in microprocessors is commonly used in motor control field. If the ordinary PWM peripherals output PWM waveform, the software must calculate the period and duty cycle number based on the microprocessor’s system clock cycle first, and then write them into the registers. As all known, the microprocessor without hardware calculator consume very long time in multiplication and division. In order to reduce the CPU’s running time, a calculation hardware unit was designed to calculate the waveform parameters. The software only need to write the period (Hz units) to the period register and the duty cycle (% units)to its register. This hardware unit was designed with Verilog HDL and running in the Nios Ⅱ system successfully.