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

PGC and PGD as UART PROBLEM

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



Joined: 04 May 2013
Posts: 4

View user's profile Send private message

PGC and PGD as UART PROBLEM
PostPosted: Fri May 17, 2013 8:59 pm     Reply with quote

hi,
i misused the pins of PGC and PGD instead of usual tx rx pins for uart of my circuit to transmit the sms through gsm. It is found that the msg not constantly can be sent.. meaning that the msg can be send bt sometime not, it's very unstable. can actually other pins act exactly same as the hardware uart pins? because i just discovered this mistaken and i am lack of time of changing it.. thx..
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Fri May 17, 2013 11:59 pm     Reply with quote

A transmitting software UART, will give erratic timings, if any interrupts occur during the transmission. If you use the option 'DISABLE_INTS' in #use rs232, interrupts will be turned off for each byte, to prevent problems from this, but with it comes the 'cost' that servicing of other interrupts will be delayed by up to one character time.

Best Wishes
pingice



Joined: 04 May 2013
Posts: 4

View user's profile Send private message

PostPosted: Sat May 18, 2013 8:14 am     Reply with quote

ok.. i will try to work on it.. thx so much.. Smile another question is, why when i use 18f44k22 with 20MHz oscillator, the speed of the pic is extremely slow.. I eliminate this problem by changing the coding part to
Code:
 #Use delay (clock = 1000000)

but i am not sure whether this will cause any problem to the PIC
Ttelmah



Joined: 11 Mar 2010
Posts: 19552

View user's profile Send private message

PostPosted: Sat May 18, 2013 9:43 am     Reply with quote

The UART won't work, unless the clock rate declared in the clock statement matches what your chip is actually clocking at. I'd have a strong suspicion that your 20MHz oscillator is not setup right, and is not working. The chip 'falls back' to running the internal oscillator at 1MHz (unless you turn off the FSCM fuse). You have an oscillator problem. Either wrong fuse or wrong connection.....

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