Discussion in "Project Help" started by    Billz    Jan 11, 2020.
Sat Jan 11 2020, 12: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, 05: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

Wed Mar 25 2020, 09:39 AM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 06:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 08:55 AM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 12:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 11:58 AM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 05:12 AM
Pearl Olin
Hello,
Wed Jan 22 2020, 01:16 PM
MINU CHAUDHARY
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.
Tue Jan 14 2020, 02:08 AM
shubham kharade
when i am trying to simulate the program in Proteus 8 professional, I am getting some errors as cannot find module file dhtxx.md can u help me
Tue Dec 17 2019, 08:44 AM
Devangi
hello..i am programming industrial timer using 8051 with 24lc64 eeprom. i have query in storing the 3 diff value in eeprom with enter button. can anyone share c code ?
Tue Dec 17 2019, 05:30 AM
Andrius
Hello. Can anyone share the code in Bascon and scheme in Proteus?

Downloads

Comments

OliverKiz
Mon Apr 06 2020, 07:54 PM
Nikolaynom
Mon Apr 06 2020, 09:13 AM
Paulinewop
Sun Apr 05 2020, 10:33 PM
NormanJeops
Sun Apr 05 2020, 03:26 AM
NoraHar
Sat Apr 04 2020, 09:03 PM
codr
Sat Apr 04 2020, 04:45 AM
ElizabethJuich
Wed Apr 01 2020, 09:24 AM
MichaelVaf
Tue Mar 31 2020, 07:49 AM

Online

Guests: 78, Members: 0 ...

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

Members: 38145
Newest member: OliverKiz
Forum Activity
PHANTOM28 Avatar
Posted By PHANTOM28
Fri Feb 28 2020, 10:25 AM
Hi.I hope you all can help me. I am relatively ne...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Feb 21 2020, 05:05 PM
ajay_bhargav Avatar
Posted By ajay_bhargav
Fri Feb 21 2020, 04:45 AM
Yes you can do that.1. Create a channel @Thingspea...
ananyagupta Avatar
Posted By ananyagupta
Thu Feb 20 2020, 03:58 AM
With regards to the particular characters sent to ...
sarrahjuzar Avatar
Posted By sarrahjuzar
Wed Feb 19 2020, 04:24 AM
I have a gsm module sim900a and dht22 connected to...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Feb 18 2020, 04:52 PM
figureyang Avatar
Posted By figureyang
Tue Feb 18 2020, 04:59 AM
figureyang Avatar
Posted By figureyang
Tue Feb 18 2020, 04:50 AM
wounder Avatar
Posted By wounder
Mon Feb 10 2020, 03:32 AM
From below sample code for nuvoton 8051 timer0 mod...
Just4Fun Avatar
Posted By Just4Fun
Sat Feb 01 2020, 09:20 AM
If you want to use a CH55x MCU there isn't any adv...