Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

10 x 5 led matrix using pic18f2550

Status
Not open for further replies.

anoopmb24

Junior Member level 1
Joined
Oct 24, 2010
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,410
i made a 10 x 5 led matrix display using pic18f2550 and 10 bc548 transistor for 10 columns (negative supply) and 5 bc548 and 5 bc557 coupling for 5 rows(positive supply). positive supply is from a lm317 ic its the basic hardware

pic is configured as 8 bit internal oscillator without prescaler for better row scanning

i made into each led is x y addressable and working fine i can liight any led using x and y positions of the matrix

i can show characters or any thing but the problem is with scrolling messages

am using mplapbs c18 compiler so please give me the correct code using x and y positions from left to right or right to left
 

Hi anoopmb24,

Yes, If you can write a character(say A or B...) on matrix (you have found the optimum scan-speed for X & Y) next step is completely turn off all LEDs of character; then turn them on by shifting one-column or one-raw.
Delay between that turn-off and on must be noticeable to naked eye.
You may experiment with variable time-delays to find smooth-scrolling.
 
the above link not working

---------- Post added at 05:03 ---------- Previous post was at 04:16 ----------

i had the function "display( x , y)" and "x" represent each column(0 to 9) and "y" represents each row(0 to 4)

for displaying characters am using the below function

Code:
void showtext(void )
{
// i want to show the word "STOP" only so no input for function

	
	unsigned char x = 0;
	unsigned char y = 0;	
	unsigned char currentCol;
       int tmpCol = 0;
	int tmpRow = 0;

Clear();        // a function which putting all leds off


	
	for (currentCol = 0; currentCol< 10; currentCol++)
	{
		if (tmpCol < 4)
			
{
				// Display a single column 

 if ((MyFontLib[tmpCol][tmpRow] & 0b00000001) != 0) display(x, y);
 
 y++;

 if ((MyFontLib[tmpCol][tmpRow] & 0b00000010) != 0) display(x, y);
 
 y++;

 if ((MyFontLib[tmpCol][tmpRow] & 0b00000100) != 0) display(x, y);
 
 y++;

 if ((MyFontLib[tmpCol][tmpRow] & 0b00001000) != 0) display(x, y);
 
 y++;

 if ((MyFontLib[tmpCol][tmpRow] & 0b00010000) != 0) display(x, y);
 
	y =y- 4;
	x++;
}
		
		tmpRow++;

		if (tmpRow == 4)
		{
			tmpRow = 0;
			tmpCol++;
		}
   }
}


my font lib is here

Code:
// total 4 columns for each character 
//character taking first 3 columns and one column blank to create space between characters

const unsigned char MyFontLib[][4] = {
0x17,0x15,0x1d,0x00,   //s
0x01,0x1f,0x01,0x00,   //t
0x1f,0x11,0x1f,0x00,   //o
0x1f,0x05,0x07,0x00,  //p

};


please help me to update this code

i just want to scroll the characters from left to right and from right to left

this is my matrix column and row lay out

0 1 2 3 4 5 6 7 8 9
1
2
3
4
 
Last edited:

Hi,

First change your code to write only one letter on LED-matrix. (Forget the other letters and select only "S"). Define your Letter as a binary array.(0 for off-LED 1 for On-LED)

Here you may not scan whole 10X5 matrix in your For-loop; only for width of your character. Other columns will not be scanned by for loop.

Then scroll this single letter by shifting scan boundaries to one column right.

Later you may expand you single letter to several letters ("STOP"); expand the binary table properly and treat it as a single letter.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top