CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

problem of RS232 (CCSC)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
progccsc
Guest







problem of RS232 (CCSC)
PostPosted: Thu Apr 05, 2007 8:44 am     Reply with quote

I use this programme to receive 10 data from RS232 and then transmit all the data to PC(RS232). in the same time, affiche to LCD.
But there are always some problem.

if I transmit these data from PC:

30 31 32 33 34 35 36 37 38 39 0123456789

I will receive these data from PIC
39 38 3F 3E 3D 3C 3B 3A 39 38 60 FF 02 FF 00 01 98?>=<;:98`ÿ.ÿ..
FF 00 3C FF 00 38 FF 00 18 FF 40 FF 01 FF 03 FF ÿ.<ÿ.8ÿ..ÿ@ÿ.ÿ.ÿ
18 40 FF 20 FF A1 FF 18

Thanks first for all the helps coming....


#include <18F452>
#fuses HS, NOPROTECT, NOWDT, NODEBUG, NOLVP, PUT
#use delay(clock=20000000)
#use rs232(baud=115200,xmit=PIN_C6,rcv=PIN_C7,bits=8,stream=d)

#include <LCD_.c>

void main()
{
int8 data[10],i;
lcd_init();

printf(lcd_putc,"CCSC LCD");

for(i=0;i<10>=0;i--)
{
fputc(data[i],d);
lcd_gotoxy(1,2);
printf(lcd_putc,"%u",data[i]);
delay_ms(500);}
}
Ttelmah
Guest







PostPosted: Thu Apr 05, 2007 9:37 am     Reply with quote

Repost your program in a form we can see it (use the 'code' button, and disabl HTML in the post. At present there is nothing even remotely useable being shown...

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group