Discussion in "Project Help" started by    Billz    Jan 11, 2020.
Sat Jan 11 2020, 05:43 PM
#1
hi everyone please attached files are my c code for scrolling message but it is not working as expecting,,,so kindly please help me
i shall be very grateful to all of you
#include"ConfigBits.h"
#include<pic16f877a.h>
#define _XTAL_FREQ 12000000

#define clk PORTCbits.RC4
#define latch PORTCbits.RC5
#define ds PORTCbits.RC6

#define clkr PORTDbits.RD0 // (-)
#define latchr PORTDbits.RD1
#define dsr PORTDbits.RD2

unsigned char alph[2][5]={{0xFF,0xFF,0xFF,0xFF,0xFF},
{0x83,0xf5,0xf6,0xf5,0x83}};

//unsigned char alph[5]={0x83,0xf5,0xf6,0xf5,0x83};

unsigned char scrollspeed=10;
void off_the_col()
{
unsigned char m;
for(m=0;m<=7;m++)
{

clk=0; latch=0;
ds=0;
clk=1; latch=1;
}
}
void col_scan(unsigned char colpos)
{
unsigned char m,n;
for(m=0;m<=7;m++)
{
clk=0; latch=0;
if(m==colpos)
ds=1;
else
ds=0;
clk=1; latch=1;
}
__delay_ms(1);
off_the_col();
}


void main()
{
TRISCbits.TRISC4=0;
TRISCbits.TRISC5=0;
TRISCbits.TRISC6=0;
TRISDbits.TRISD0=0;
TRISDbits.TRISD1=0;
TRISDbits.TRISD2=0;
unsigned char row,j,dataRow,col,z,i,r,c;
while(1)
{
for(row=0;row<2;row++)
{
for(i=0;i<8;i++)
{
for(z=0;z<=scrollspeed;z++)
{
for(col=0;col<=15;col++)
{
for (j=0;j<=7;j++)
{
c=i+col;
dataRow=(alph[row][c]<<j)&0x80;
clkr=0; latchr=0;
if(dataRow==0)
dsr=dataRow;
else
dsr=1;
clkr=1; latchr=1;
__delay_ms(1);
}
col_scan(col);
}//col
}//z
}//i
}//row


}//while
}
Fri Jan 17 2020, 10:24 PM
#2
We will need the circuit diagram.
A Proteus simulation would be much better.

Get Social

Information

Powered by e107 Forum System

Conversation

Tue May 04 2021, 08:34 PM
Chastity
Hi there! I could have sworn I've been to this site before but after browsing through some of the post I realized it's new to me. Anyways, I'm definitely glad I found it and I'll be book-marking and checking back frequently! check my score https://creditscorecheckn.com
Tue May 04 2021, 06:39 PM
Clarence
What's up everyone, it's my first go to see at this web page, and post is really fruitful in support of me, keep up posting these types of articles. Best Credit Score https://creditscoresids.com
Tue May 04 2021, 01:13 PM
Jerold
What's up to all, the contents present at this site are really remarkable for people knowledge, well, keep up the good work fellows. karma credit score https://getcreditscoreww.com
Tue May 04 2021, 09:49 AM
Shonda
I like the helpful info you provide in your articles. I will bookmark your blog and check again here frequently. I am quite certain I'll learn many new stuff right here! Good luck for the next! check credit report https://creditreportuss.com
Tue May 04 2021, 06:28 AM
Lucia
I am not sure where you are getting your info, but great topic. I needs to spend some time learning more or understanding more. Thanks for wonderful information I was looking for this info for my mission. monthly credit report https://checkcreditscore24.com

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 56, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123