| 4x4x4 or 5x5x5 RGB LED problem. | |
|
|
Author | Message |
---|
highside
Posts : 7 Join date : 2008-05-09
| Subject: 4x4x4 or 5x5x5 RGB LED problem. Fri May 09, 2008 6:51 am | |
| hello, i was planning to make a LED cube like yours for my design project. i even ordered stuff Like LED driver IC just to make this one. i was planning to use Max6953 as a LED driver. this is an I2C Led driver. to minimize the number of I/O pins being used in the micro controller. since its I2C communication i only have to Use 2 GP I/O pins of the MCU. the MCU i'm about to use is PIC16F877A 40 pin MCU. i this a good idea to use max6953 or just use D-Flip Flops? what do you think? in coding the MCU i was using Oshon soft. do you have any good LED drivers which are good ones for this project? thanks | |
|
| |
Admin Admin
Posts : 115 Join date : 2008-03-26 Location : USA, California
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Fri May 09, 2008 6:32 pm | |
| Using D flip flops is usually better then I2C. Only because it is faster. I have never used a LED driver so I could not help you with that. If you are set on using the 16f877a then you may be able to pull it off using flip flops, I went for the faster dsPIC33. You may have poor refesh rates. It all depends. Try it out in a smaller version first. Justin | |
|
| |
highside
Posts : 7 Join date : 2008-05-09
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Sat May 10, 2008 5:51 am | |
| can you please give me a schematic no how to connect the D-flip flop on a MCU. your right while i'm using the I2C its a bit slow. i'm monitoring the time in an I2C debugger. i have no idea on how to connect the Flip flop on the MCU. and how to make it work. i'm not familiar on using flip flops. also some trick using it. | |
|
| |
Admin Admin
Posts : 115 Join date : 2008-03-26 Location : USA, California
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Sat May 10, 2008 2:29 pm | |
| Flip flops are easy to use. Here is the data sheet for the ones I used. The pins labeled 1D-8D connect to the I/O pins on the PIC. The pins labeled 1Q-8Q connect to the LED. The OE pin I tied to ground to enable the flip flop and the CLK pin is connected to an I/O pin on the PIC. When the CLK pin goes from low to high the pins 1Q-8Q change to mimic the pins 1D-8D respectively. If you change the 1D-8D pins the 1Q-8Q pins will not change until CLK goes from low to high. Justin | |
|
| |
highside
Posts : 7 Join date : 2008-05-09
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Sun May 11, 2008 5:32 am | |
| i have understand very well now the flip flop works A++ to. what a big help. i never thought that the OE pin must be connected to the ground. when i tried it i connect to one of the pins in the PIC active low. thats why it wont work im receiving data input but no ouput. my bad. i never thought that Flip flops are way easy than LED driver via I2C. but using flip flops is very time critical the timing between the HOld state and the shift state. | |
|
| |
highside
Posts : 7 Join date : 2008-05-09
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Sun May 11, 2008 1:13 pm | |
| can you give a schematic on how to connect the RGB led to a Flip flop? how to wire up a 4x4x4 RGB led to a flip flop thanks | |
|
| |
Admin Admin
Posts : 115 Join date : 2008-03-26 Location : USA, California
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Sun May 11, 2008 3:54 pm | |
| I don't have any schematics for 4x4x4 cubes. It is the same thing as the 3x3x3 but the flip flops go between the PIC and LED. They are actually not time critical at all. Just connect the CLK pin for each to one I/O pin on the PIC and when you want the output to change do something like. - Code:
-
PORTA&=~1;//CLK pin pulled low //a few lines of code here just for a delay //in my 4x4x4 code I rest the pin in the beginning of the interrupt //and set it at the end // this may not even be needed PORTA|=1;//CLK pin pulled high (rising edge) Justin | |
|
| |
highside
Posts : 7 Join date : 2008-05-09
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Mon May 12, 2008 6:00 am | |
| i'm planning to make a 5x5x5 LED cube, do you have any idea how to wire them up. and how many flip flops will i use. | |
|
| |
Admin Admin
Posts : 115 Join date : 2008-03-26 Location : USA, California
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Mon May 12, 2008 10:41 pm | |
| A 5x5x5 cube is wired the same way as the 3x3x3 or the 4x4x4 just scaled up. The connections between planes is different though. I would wire it like the 3x3x3.
The number of flip flops you need is the number of I/O pins taken/8 (most have 8 flip flops in one package). A 5x5x5 cube will use 5 layers * 3 (RGB) + 25 columns (common) for a total of 40 I/O pins or 5 flip flops. Please note that this way you will need a very fast processor to keep the cube from flickering.
Justin | |
|
| |
highside
Posts : 7 Join date : 2008-05-09
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Tue May 13, 2008 2:57 pm | |
| oh... i do have a problem about having a fast MCU to drive a 5x5x5. i better stick to 4x4x4. how about a 16f877A with a 20mhz crystal that can eliminate the processing problems? hmmm... about the I/O pins. what about connecting them to a 3 input to 8 output multiplexer then connect the multiplexer to the D-flip flop to futherly reduce the # of pins from the MCU. have you tried it? you can reduce the delay in programing the MCU to compensate with the multiplexers processing speed. | |
|
| |
Admin Admin
Posts : 115 Join date : 2008-03-26 Location : USA, California
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Tue May 13, 2008 10:31 pm | |
| Sorry but 20MHz will not even be close is you want more then on or off (shades of color). I used a 18f2525 for the 3x3x3 kit and it runs at 40MHz. My 4x4x4 ran at 80MHz, a little more then needed but allowed for nice visuals and some microphone input. Originally the 3x3x3 was with a 20mhz crystal but I had to write the code in assembly to get any decent colors. - Quote :
- what about connecting them to a 3 input to 8 output multiplexer then connect the multiplexer to the D-flip flop to futherly reduce the # of pins from the MCU
You don't want to do that. That will make you need an even faster processor. For a 4x4x4 I would get a dsPIC, they have plenty of I/O pins and they have the speed. You could even try an ARV (better in my opinion) if you can find a fast enough one. Justin | |
|
| |
highside
Posts : 7 Join date : 2008-05-09
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Wed May 14, 2008 3:15 pm | |
| i have problems in ordering stuff in our country. maybe i would make a prototype and observe how things work. thanks for the big help. | |
|
| |
Admin Admin
Posts : 115 Join date : 2008-03-26 Location : USA, California
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. Wed May 14, 2008 10:12 pm | |
| No problem. | |
|
| |
Sponsored content
| Subject: Re: 4x4x4 or 5x5x5 RGB LED problem. | |
| |
|
| |
| 4x4x4 or 5x5x5 RGB LED problem. | |
|