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

Problem with Rx UART port with GPS module
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dyeatman



Joined: 06 Sep 2003
Posts: 1981
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Aug 29, 2014 4:37 pm     Reply with quote

OK, an important piece of info that was omitted...

Did you read what ezflyer said earlier:
Quote:
First, for reliable data reception via the hardware UART, you really should be using a serial interrupt to receive data. Look at the example program 'ex_sisr.c' to see how this is done properly. You also need to add the 'Errors' keyword to your #use rs232 directive to prevent the UART from locking up if an over-run condition occurs.....


You will need to restructure your code for this.
If you are a "newbie" you need to start out right.
_________________
Google and Forum Search are some of your best tools
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Fri Aug 29, 2014 4:58 pm     Reply with quote

Hi,

That modem is a 5V device, but the serial data output level is 3.3V. That won't work reliably with the hardware UART of a 5V PIC. Your options are to add a buffer between the modem and the PIC, or go with a 3.3V PIC. You'll also want to check to be sure the modem serial input is 5V tolerant.

John
samus111



Joined: 28 Aug 2014
Posts: 29
Location: Colombia

View user's profile Send private message AIM Address

PostPosted: Fri Aug 29, 2014 5:08 pm     Reply with quote

Of course, but I wonder why my PIC receives the first and even in some cases with PICs like the 16f88 the second and third command. I may use the MAX232 for shift level and make tests, but really I need to only use the PIC, the project so need it, I think the way to avoid the shift level is configuring the schmitt trigger, and reduce the tolerance level between a zero and a logic one, I am changing my code just like you advice me, I hope I can get the communication complete, what can you say me about the schmitt trigger? Thanks.
temtronic



Joined: 01 Jul 2010
Posts: 9635
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Aug 29, 2014 6:18 pm     Reply with quote

While the GPS runs from 5 volts, it really is a 3volt GPS as far as communications with a micro... so it won't work with a 5V PIC without some 'logic level translations' or use an 'L' version PIC ( low voltage).
Also the GPS needs a 2AMP power supply !!! ANYTHING less and it probably will NOT communicate properly.So with that in mind, add a few LEDS, the PIC, a couple 'support' chips and honestly I'd be using a 5 AMP supply WITH proper layout, bypass caps, wiring, etc.

hth
jay
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Fri Aug 29, 2014 6:38 pm     Reply with quote

Hi,

A MAX232 is not what you need! On the PIC Rx input you need a non-inverting buffer that boosts the 3.3V output of the modem to 5V. A resistive divider on the PIC Tx output will reduce the voltage swing to 3.3V.

John
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Tue Sep 02, 2014 1:28 pm     Reply with quote

Hi,

Ditto for this thread!

John
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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