Forum Discussion
Altera_Forum
Honored Contributor
11 years agoWhen I use those functions for a creation a PWM signal, it works fine. Here is a real example:
I've created a PWM signal with a frequency of 10KHz, duty cyle is 1%. Period of 10KHz is 100us, DC of 1% means that output '1' should be for a 1us. With CPU clock of 50MHz, that means that the timer has to count 50 cycles, for a time out, and than process the ISR. It works, maybe I get the real DC of 1.5%, but this accuracy is fine for me. Those hardware control functions, that I've written, they're just 1-10 lines of IORD/IOWR commands. How many CPU cycles those commands require?