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

RS232 msg on powerup

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



Joined: 21 Jun 2010
Posts: 11

View user's profile Send private message

RS232 msg on powerup
PostPosted: Thu Jun 24, 2010 10:17 am     Reply with quote

Hello,

I have recently purchased a PIC18F67J10 dev kit, with CCS compiler (V4.109). I have been testing the serial channel (G1, G2).

In my application, I want to send out some text to hyperterminal on powerup. I was not able to get any serial output at first. I finally figured out how to get it working, and to make a long story short, the solution ended up being to add a 1 second delay before the message is transmitted.

I want to try to understand why this delay is necessary. Is there any reason that anyone knows of? When I remove the delay (or even cut it back to 500mS), I do not get a single character on powerup.

Oh, yeah, and one more thing. With no delay I get no message on powerup. However, when I press the reset button, the serial message is transmitted each time correctly.

Any feedback would be greatly appreciated.
johnbravado



Joined: 07 Apr 2010
Posts: 11

View user's profile Send private message

PostPosted: Thu Jun 24, 2010 10:41 am     Reply with quote

not sure what converter you are using to convert the ttl tors232, either a max232 chip or if that is all included in the demo board so you just have to connect the computer to it. However i can probably guess why this is occuring. The computer rs232 requires 9-13V for high to low. If the ttl to rs232 translator is getting booted up at the same time as the processor, then the translator may not have the capabilities of transmitting the required voltages at bootup yet as caps and whatnot are charging and the processor may just work faster. If it works on reset, then that means the code is good, somethig hardware is preventing the conversion. try writing a really long sentence instead of just hello world and see if the translator can pick it up mid sentence after it has gotten the required energy
KentR



Joined: 21 Jun 2010
Posts: 11

View user's profile Send private message

PostPosted: Thu Jun 24, 2010 10:59 am     Reply with quote

Good point. I'll try to throw a scope on the lines and see what's happening. The RS232 translating chips are on the dev board. They are DS276S ICs.
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