How to use Interrupt in PIC16F877A in C..??

Status
Not open for further replies.


OK, but what the reason of doing such changes???
 
ARRGGHHH... because you wanted row scanning... not column scanning.....
 
ARRGGHHH... because you wanted row scanning... not column scanning.....

yes but why are you doing like this. One matrix scanning then another ...
why not the whole display row, are you scanning
 
I am scanning a whole row.. The same as the Graphical LCD T6963C... Ive basically used the same code..

___ ___ ___ ___
| 1 || 2 || 3 || 4 |
| 5 || 6 || 7 || 8 |
| 9 || .. || .. || . |
 
I think you are not getting me in right way....!!
as you said this what is the advantage of scanning in this way???
 
Because it replicates the bytes stored in an image... When you create animation files for the Toshiba LCD's the pictures are stored the same way..
 
Because it replicates the bytes stored in an image.
I am not getting pure reason of doing scanning by this method, are you doing this for good scanning???



Code:
0x00,0x00,0x00,0x03, //                              **
0x7F,0x00,0x00,0x0A, // *******                    * *
0x43,0x00,0x00,0x0B, // *    **                    * **
0x45,0x00,0x00,0x0A, // *   * *                    * *
0x59,0x00,0x00,0x0B, // * **  *                    * **
0x61,0x00,0x00,0x0F, // **    *                    ****
0x7F,0x00,0x00,0x0F, // *******                    ****
0x3E,0x00,0x00,0xFD, //  *****                 ***** **


like this is the image.....
 
Yes! It's so you can use the picture above striaght from LCD assistant or fastLCD.... This is the format of their output...

It makes sense to scan and place pixels in the same order, don't you think....
 
It makes sense to scan and place pixels in the same order, don't you think....

OK, now i am getting your scanning tech. what are you trying to do is feeding directly port b to 4 sections of rows(now its clear) but making hardware for this will be complicated Little bit.
Anyway let us move forward to other part of code logic.....
Code:
void displaystring(void)				// this routine prints through the screen buffer
	{									// moving one pixel at a time
	signed char x=32,y=0;				// I made these signed so I could print 
	for(y = 0;y  < 96 ;y++)				// to nowhere so I could produce the scrolling effect
		{
		clr();							// Clear the display buffer
		strput("HELLO WORLD!!",x--,0);	// adjust the scrolling string
		Blit();							// pass to screen buffer
		__delay_ms(80);					// time to view
		}
	}

signed char x=32,y=0; // I made these signed so I could print
What do you mean by print here by signed???
strput("HELLO WORLD!!",x--,0);

this is also not clar what the of x-- here with 0 and again strput???
 
My strput() take three parameters.... char* string... signed char x ... signed char y

X is the column and y is the row Y is always 0 because I want to print at the top LED row... X is moved as explained.... They are signed so I can go minus....
 
Code:
void strput(const char* ch, signed char x,signed char y)
	{
	int addr;
	
	while (*ch )
		{
		charput(*ch++,x,y);			// write a string to the display buffer
		x+=7;
		}	

void charput(char ch, signed char x,signed char y)
	{
	signed char x1, y1;				
	const char* addr2;				// pointer to character
	char disp;
	ch -= 0x20;						// characters starts a 0 not 0x20
	addr2 = &fnt[0];				// start of font array
	addr2 = addr2 + ((int)ch * 8);	// start place in font array
	for( y1=0;y1<8;y1++)			// eight rows
		{
		disp = *addr2;
		for (x1 = 0; x1<8; x1++)	// eight pixels
			{			
			if(disp & pow[x1])
				pixel(x+x1,y+y1,0); // OR the pixel to the display buffer
			}
		addr2++;
		}	
	}


This part also not clear can you me brief intro of your plan of doing adding these things??
most of word you are using cond msk not getting there use ??
 
most of word you are using cond msk not getting there use ??

What???

Msk is used in the pixel routine... It is so you can write to a location WITH new data without destroying the old data...

I can place pixel (LED) by pixel resolution so you don't need to shift the data the LED's are lit one by one rather than a complete line ( row )... This is a common way to draw to a screen..
 
Hi,

Then there is no use of shift register so, decade counter can be used here...
and if we make a big display like 32x60 or even more than what changes should be done in it??
 
Hi,

Then there is no use of shift register so, decade counter can be used here...
and if we make a big display like 32x60 or even more than what changes should be done in it??

More shift registers.... But as I said before, you'll end up with LED's so dim you'll struggle to see them...
 
More shift registers.... But as I said before, you'll end up with LED's so dim you'll struggle to see them...

This is not the exact answer i think...
in this code there is no use of shift register and i will connect 74164 with uln2003a Darling ton pair, and can't we do any calculation for making length??
can't we do // processing for large size of display?
 
A decade counter is also a shift register.... It really doesn't matter which one you use as long as the output suits your needs..
 
For more than 8 rows should we do // processing for large size of display?
and PORT B is connected directly to 4 row section???
 
PORTB is connected to ALL the rows........ The rows are selected 1 though 32 in turn...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…