Pages: [1]   Go Down
Author Topic: RGB LED MATRIX, speed-up and i2c  (Read 1152 times)
0 Members and 1 Guest are viewing this topic.
Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!

I`m working on a prototype RGB matrix board.
It houses two rgb matrixes (final version will have 4 matrixes + a touchscreen).

Each matrix is controlled by:
  • One atmega168 tqfp
  • 3x 74hc595 for sinking the collumns
  • 8x P-fet for sourcing the rows

I don`t have a schematic, but here is the board design:
http://www.newwave-is.nl/files/matrixboard.png
Here is a video of what it does now:
http://www.newwave-is.nl/files/matrixvid.mp4


The first question i have is about speed.
It can do 5 levels of brightness now (without very noticeable flicker), but it would be nice if that can be cranked up a bit.

Am i using the SPI in the optimal way?
Or does someone see anything in the pixel reading/writing that`s clearly slow.



The second question:
Originally i wanted to control the 2-4 matrixes with another atmega (which also reads the touchscreen) via I2C.
But i noticed i cant include the TWI Library if i am using TimerOne (for writing to the matrix).

Can i make I2C run on a diffrent timer? Or should i run my rgb interrupt via another timer? (I believe the atmega168 can`t use TimerThree (wich has a library) )


Here is my code:
http://www.newwave-is.nl/files/verse_tst.pde


Thanks!
Logged

Pages: [1]   Go Up
Jump to: