| View previous topic :: View next topic |
| Author |
Message |
dyeatman
Joined: 06 Sep 2003 Posts: 1981 Location: Norman, OK
|
|
Posted: Fri Aug 29, 2014 4:37 pm |
|
|
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
|
|
Posted: Fri Aug 29, 2014 4:58 pm |
|
|
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
|
|
Posted: Fri Aug 29, 2014 5:08 pm |
|
|
| 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
|
|
Posted: Fri Aug 29, 2014 6:18 pm |
|
|
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
|
|
Posted: Fri Aug 29, 2014 6:38 pm |
|
|
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
|
|
Posted: Tue Sep 02, 2014 1:28 pm |
|
|
Hi,
Ditto for this thread!
John |
|
 |
|