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 support@ccsinfo.com

teraterm

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







teraterm
PostPosted: Thu May 11, 2006 12:48 pm     Reply with quote

Hi,
I am using Teraterm. I want to send a file to PIC on RS232. My definition is as follow:
#include <16F877A.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)

I use send file from file menu, but it is not done successfully. Does anyone have any idea? Shall I set any configuration?

Regards
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu May 11, 2006 4:38 pm     Reply with quote

You didn't show us the rest of your program, which hopefully is short.
What do you do with the bytes after you receive them ? The 16F877A
has only a few hundred bytes of RAM available. The file must be
small enough to fit in the limited amount of RAM.

My guess is that your PIC program is probably not getting the characters
from the UART quickly enough and it's getting an overrun error and is
locking up. To clear the "lock up" condition automatically, add the
ERRORS directive as shown below. You'll still lose characters, but at
least it won't lock up.
Quote:
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

Then work on fixing your code so that it reads all characters from the
UART quickly. See the CCS example file, EX_SISR.C for an example
of a interrupt-driven receive buffer.
Gege



Joined: 12 Apr 2006
Posts: 1

View user's profile Send private message

PostPosted: Fri May 12, 2006 2:19 am     Reply with quote

Did you try by checking the "Binary Option" into Teraterm (into the file dialogue box)
jma_1



Joined: 08 Feb 2005
Posts: 147
Location: Wisconsin

View user's profile Send private message

PostPosted: Fri May 12, 2006 6:30 am     Reply with quote

Are you processing each group or packet of data sent? If yes, you might want to consider including a transmit delay before sending the next packet. Try starting small, sending only a few bytes and check if they are received correctly. Perhaps the PIC code is not interpretting the bytes as intended.

Cheers,
JMA
carmarmu



Joined: 09 May 2006
Posts: 15
Location: Valencia (Spain)

View user's profile Send private message Send e-mail MSN Messenger

Re: teraterm
PostPosted: Fri May 12, 2006 12:28 pm     Reply with quote

Please, shows the rest of program, where beams the shipment.
I you want i correct you.
Regards!!!

htp wrote:
Hi,
I am using Teraterm. I want to send a file to PIC on RS232. My definition is as follow:
#include <16F877A.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)

I use send file from file menu, but it is not done successfully. Does anyone have any idea? Shall I set any configuration?

Regards

_________________
**CaRmArMu** Valencia (Spain)
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