Altera_Forum
Honored Contributor
14 years agoMultiple PWM on MAX II EPM240T100C5N for LED driving
Dear all,
I am considering using the EPM240 in my design to control 15 RGB LEDs with independent PWM for R,G,B and also read a few switches states (so, read some CPLD input pins). The 15 RGB LEDs will require 45 different comparators for PWM, and I guess a single common counter could be used. Ideally I wished everything was 16 bits, but 10bits is still acceptable. I know the best to estimate if the code will fit in the CPLD would be to actually do it, but since it is probably quite easy for some of you to evaluate, I thought I would ask :) I was thinking of having a giant shift register of 10*45 bits, but already just that, I am not sure the EPM240 can do ? Also, it would need to be latchable. So very close to a 74HC595. Using SPI, the host processor would simultaneously shift the PWM comparator values out, and shift a few CPLD GPIO values in (for the buttons). Could that fit in the EMP240 ? How many LEs does a 8bits register take ? What about if it needs to be latchable ? Is it basically 1 LE per bit ? How about the comparators ? the unique PWM counter will have to be compared with 45 comparators ...