unsigned char maxBrightness = 15;unsigned char pwmFrequency = 50;int numColumnRegisters = 4;int numRows=32;Results:Load of interrupt: 0.5095695972Clock cycles per interrupt: 318.48Interrupt frequency: 25600.00 HzPWM frequency: 1600.00 HzDivided over 32 rows, to have a total refresh rate of 50.00 HzTimer1 in use for highest precision.Include servo.h to use timer2.OCR1A: 624Prescaler: 1
unsigned char maxBrightness = 31;unsigned char pwmFrequency = 50;int numColumnRegisters = 8;int numRows=16;Results;Load of interrupt: 0.7825686931Clock cycles per interrupt: 489.11Interrupt frequency: 25600.00 HzPWM frequency: 800.00 HzDivided over 16 rows, to have a total refresh rate of 50.00 HzTimer1 in use for highest precision.Include servo.h to use timer2.OCR1A: 624Prescaler: 1
Due to the interrupt overhead, it is better to have more columns. All columns are driven in one interrupt, each interrupt one row is driven. This allows you to have 32 brightness levels. It also has the benefit that the maximum on time of your LED's is 1/16 instead of 1/32.
I'm in the process of constructing a large RGB matrix and will probably try to implement this code once im done.I see the code for the matrix control isn't posted on the google code page. Will it be soon or does somebody have an updated version I can work with?Also, is the limitation of the code 1024 LEDs/3 =340 RGB leds? I'm shooting for upwards of 500.
Hello ,I've tried all possible things that i'm aware of to make this thing work but its not happening ,the LED's Flicker too fast and the whole thing freezes ,Kindly help !!!
Which hardware is used with ShiftPWM?Basically just an Arduino and a chain of Shift registers. The circuit is exactly the same as in the ShiftOut tutorial on arduino.cc, but leave out the latch pin capacitor. You can choose the latch pin yourself, but the data and clock pins should be connected to the SPI pins MOSI and SCK.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16