|
|
View previous topic :: View next topic |
Author |
Message |
htp Guest
|
teraterm |
Posted: Thu May 11, 2006 12:48 pm |
|
|
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
|
|
Posted: Thu May 11, 2006 4:38 pm |
|
|
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
|
|
Posted: Fri May 12, 2006 2:19 am |
|
|
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
|
|
Posted: Fri May 12, 2006 6:30 am |
|
|
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)
|
Re: teraterm |
Posted: Fri May 12, 2006 12:28 pm |
|
|
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) |
|
|
|
|
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
|