Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 2nd December 2007, 07:03 PM   (permalink)
New Member
mekohler is on a distinguished road
Default LED Matrix Project Debug, Please Help :[

Been working on an LED matrix table for a few months, with the help of some guy I found online. Here is the circuit schem:

http://www.injektilo.com/Circuit%20P...%20Circuit.jpg

The matrix itself is composed of a 25 cubicles (5 x 5)...each cubicle has 6 LED's in parallel (although the schem shows 8)

http://www.injektilo.com/Circuit%20P...x%20Exampl.jpg

Everything works, but the LED's are not as bright as when I initially tested each cubicle with a 9V battery. You can barely tell when a cubicle is lit through the table's diffusive glass!

Here is the PIC code...in this example I first have the lower leftmost cubicle light up, then all of them...this can be changed to as many patterns and stuff as I want, obviously:

Code:
#include <pic.h>


__CONFIG(INTIO & WDTDIS & PWRTEN & MCLRDIS &
UNPROTECT \
	& UNPROTECT & BORDIS & IESODIS & FCMDIS);

int i, j, k, n, Dlay, CurLetter;

const char Letters[] = {
	
0b10000,
0b00000,
0b00000,
0b00000,
0b00000,

0b11111,
0b11111,
0b11111,
0b11111,
0b11111};

main()
{
	PORTA = 0;			// All Bits are Low
	PORTC = 0b000001;	// Start With Top Left
	CMCON0 = 7;			// Turn Off Comparitors
	ANSEL = 0;			// Turn Off ADC
	TRISA = 0b101000;	// RA5/RA3 Inputs
	TRISC = 0;
	
	CurLetter = 0;		// Start With "A"
	
	while (1 == 1)		// Loop Forever
	{
		for (Dlay = 0; Dlay < 25; Dlay++)
		 for (i = 0; i < 5; i++)
		 {
			 j = Letters[(CurLetter * 5) + i];
			 k = (j >> 2) & 0b010000;
			 PORTC = j & 0b111111;
			 PORTA = k + i;
			 for  (n = 0; n < 259; n++);	// 4ms Delay
		}

	CurLetter = (CurLetter +1) % 2; //Increment Letter
Now I used resistors in the 6 parallel LED's assuming they would get 12V, here are some measurements I made having row 1 and column 1 lit all the time:

Voltage:

1) From PSU Ground to 1 cubicle COLUMN input: 5.25 V

2) From PSU Ground to 1 cubicle ROW input: 3.85 V

3) From ROW input to COLUMN input of a cubicle: .86V (I dont think this means anything, since this is an incorrect way to measure V)

Current:

4) Removing one LED cubicle in the all lit column and connecting column output of LED below and column input of LED above to the meter: 2.53 using 20mA setting/resolution

5) Removing one LED cluster in the all lit row and connecting row ouput of LED to the left and row input of LED to the right to the meter: 12.17 using 20mA setting/resolution

6) Removing the top left LED cubicle and connecting row output from my UNL chip and column output from LED cluster below it: 116 using 200 mA resolution


The guy I am working with says he think the problem lies in the coding...that I am using pulses instead of just on or off states.

I know this is alot of information, but I am all finished, It's just too damn dim!

A video of it not in my table with partitions...it looks brighter in the camera but it's not bright enough to really shine through diffusive glass irl.

http://www.youtube.com/watch?v=kuMaE_b4Wg4
mekohler is offline   Reply With Quote
Old 7th December 2007, 05:40 AM   (permalink)
New Member
mekohler is on a distinguished road
Default

bump :[ :[
mekohler is offline   Reply With Quote
Old 7th December 2007, 06:56 AM   (permalink)
Experienced Member
Pommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to beholdPommie is a splendid one to behold
Default

From what I can see of your code (you only posted part of it). I would try the following and see if it gets any brighter,
Code:
	while (1 == 1)		// Loop Forever
	{
		//for (Dlay = 0; Dlay < 25; Dlay++)   removed
		 for (i = 0; i < 5; i++)
		 {
			 j = Letters[(CurLetter * 5) + i];
			 k = (j >> 2) & 0b010000;
			PORTA = 7;                      // turn all off
			 PORTC = j & 0b111111;
			 PORTA = k + i;
			 for  (n = 0; n < 259; n++);	// 4ms Delay
			 for  (n = 0; n < 259; n++);	// Do it again
		}

	CurLetter = (CurLetter +1) % 2; //Increment Letter
It would be helpful if you posted all your code.

Mike.
Pommie is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Junebug Assembly Tips Krumlink Micro Controllers 187 18th May 2008 03:19 AM
Pressure differential LED project. tsneidin Electronic Projects Design/Ideas/Reviews 23 3rd December 2007 11:32 PM
Uni Project Advice 2-tone Electronic Projects Design/Ideas/Reviews 7 18th October 2007 12:10 AM
Electronics 101 Help, LED project ReallyConfuzed Electronic Projects Design/Ideas/Reviews 8 11th September 2007 06:38 PM
P channel FETs vs N channel FETs for LED Matrix applications ?? tdg8934 General Electronics Chat 3 9th September 2007 05:16 PM



All times are GMT. The time now is 10:33 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.