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

Wed Aug 05 2020, 11:56 AM
John Mathews
Hey - I was checking out your site and I’m impressed with how clean and professional it looks.
Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
scena
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 12:55 PM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 05:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 04:58 PM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 10:12 AM
Pearl Olin
Hello,

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: 109, Members: 0 ...

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

Members: 38215
Newest member: Mirza123
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 01 2020, 11:07 PM
PS: I am a new learner thats why my question may s...
Mirza123 Avatar
Posted By Mirza123
Wed Jul 01 2020, 02:05 PM
Thanks for the assistance. I have read the data sh...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jul 01 2020, 10:12 AM
See section 15 (Ports) of the data sheet. ...
wimac Avatar
Posted By wimac
Tue Jun 30 2020, 10:05 AM
How did you know that it is not 8051. Mirza123It i...
Mirza123 Avatar
Posted By Mirza123
Tue Jun 30 2020, 08:39 AM
It seems ports on the AT89LP2052 is not like on th...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Jun 30 2020, 08:34 AM
It seems ports on the AT89LP2052 are not like on t...
Mirza123 Avatar
Posted By Mirza123
Thu Jun 25 2020, 04:07 PM
Hello!i am trying to use AT89LP2052 ( AT89LP2052 h...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jun 17 2020, 09:42 PM
It is about capacitor? i should put it between Vcc...
cerouno Avatar
Posted By cerouno
Wed Jun 17 2020, 10:37 AM
Take another look at the power supply to the LCD.A...
ExperimenterUK Avatar
Posted By ExperimenterUK
Wed Jun 17 2020, 02:01 AM
Take another look at the power supply to the LCD.A...