yupe. i got it d. no problem d. thanks ya.
yupe. i got it d. no problem d. thanks ya.
hi
i saw ur coding.i m also doing the same thing.i program is to transmit a string from one pic and receiving the same string in the another pic(USART comm) and displaying the received string in the lcd. my transmit program is working well(got the string in hyper terminal).i have the problem in receiving the string,it s not working.i m using 16f877a and micro c complier.seperately my lcd prgm is also working well
my code is
void receive()
{
int i=0;
char s[10];
STATUS.f5=0;
STATUS.f6=0;
for(i=0;i<5;i++)
{
while(PIR1.f5==0)
{}
s[i]=RCREG;
PIR1.f5=0;
}
init_lcd();
display();
}
void main()
{
STATUS.f6=0;
STATUS.f5=1;
TRISC=0;
PORTC=0;
STATUS.f5=0;
RCSTA=0x90;
SPBRG=0x20;
receive();
while(1)
{}
}
if u find any wrong in my code plz help me to correct it
-Sakthi
OK you're using C language but here we use Melabs PICBasic but anyways, let's try to help you on that.
your problem is with this line
Sure if the RX pin is set as an output, it won't work. Just change it and i suspect it will work. but i didn't look the whole thing so i could have miss something.Code:TRISC=0;
Good luck!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks