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 hanging?

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







rs232 hanging?
PostPosted: Mon Apr 04, 2005 1:28 pm     Reply with quote

Hi,

I use the MAX232 with the hardware uart pins on a PIC18F458. I am lately experiencing intermittent hanging. I suspect it is either my RS232 or i2c getting overrun.

If it's the i2c, i will look at Mark's sample i2c code which handles such errors.

However, has anyone ever had a problem with a MAX232 hanging while using CCS's printf libraries? If so, is there something i can specify in the #use_rs232 statement to prevent this?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 04, 2005 1:33 pm     Reply with quote

There's nothing to hang. It's just four level-translators in a package.
valemike
Guest







PostPosted: Mon Apr 04, 2005 1:51 pm     Reply with quote

okay, i guess it's something else in the code or i2c.
theMagni



Joined: 21 May 2004
Posts: 48
Location: Victoria, BC

View user's profile Send private message Visit poster's website

PostPosted: Mon Apr 04, 2005 4:42 pm     Reply with quote

I found that if I didn't put "errors" as one of the options, RS-232 would hang. When they upgraded the compiler, I found that I also had to put in "force_sw".

I hope that helps.
_________________
In the 90's, I promised myself I'd never use a so-called "smiley icon". I hate what I've become. ;)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 04, 2005 5:07 pm     Reply with quote

Quote:
I found that if I didn't put "errors" as one of the options, RS-232 would
hang. When they upgraded the compiler, I found that I also had to put
in "force_sw".

If you use FORCE_SW, then you're forcing the compiler to generate
code for a software UART on the hardware UART pins. In that case,
the ERRORS directive will have no effect. It only works with the
hardware UART.
valemike
Guest







PostPosted: Tue Apr 05, 2005 6:32 am     Reply with quote

Code:
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)


I tried appending "ERRORS" into my #use rs232 statement, but just get the following warning: Line 157(5,8): Variable never used rs232_errors

Why's that? Is there something i have to do in the code somewhere?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 05, 2005 8:00 am     Reply with quote

Quote:

I tried appending "ERRORS" into my #use rs232 statement, but just get
the following warning: Line 157(5,8): Variable never used rs232_errors

This topic was recently discussed in the forum:
http://www.ccsinfo.com/forum/viewtopic.php?t=22342
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