Aha!! You are very observant!!... Look at the shift register outputs.... Each one accesses the rows in turn.
The first output ( Q0 ) is connected to matrix row 1
The second ( Q1 ) is connected to matrix 2 row 1
The third ( Q2 ) .... third matrix row 1
Then ( Q3 ) ... forth matrix row 1
BUT THEN!!
(Q4 ) is connected to the first matrix row 2
...
.. so on....
I think you are not getting me in right way....!!
as you said this what is the advantage of scanning in this way???
The first output ( Q0 ) is connected to matrix row 1
The second ( Q1 ) is connected to matrix 2 row 1
The third ( Q2 ) .... third matrix row 1
Then ( Q3 ) ... forth matrix row 1
BUT THEN!!
(Q4 ) is connected to the first matrix row 2
...
.. so on....
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???
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....
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 ??
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..
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??
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??
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?