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 support@ccsinfo.com

RS232 for two peripherals

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







RS232 for two peripherals
PostPosted: Tue Nov 20, 2001 11:27 pm     Reply with quote

A friend and I are trying to use a 16F877 to manage a vehicle locator, and as such it needs to talk to both a GPS unit (Trimble Lassen SKII) and a radio modem.

We've got the modem working fine using #use rs232... it happens to be on the hardware UART pins, but we're using the software UART, obviously.

The problem occurs when we try to poll the GPS on two other pins. We get bytes on the serial line, but they're invalid. When attached to its test board and a PC, the GPS sends out valid information, but something appears to be corrupting the serial link with the PIC.

Any tips?
___________________________
This message was ported from CCS's old forum
Original Post ID: 1269
Delene Mulley
Guest







Re: RS232 for two peripherals
PostPosted: Wed Nov 21, 2001 4:16 am     Reply with quote

Don't know if it will help but I have managed to have 2 serial ports no problem. Both can send and receive. On the f877 I used pins c6 and c7 as my main port and pins e0 and e1 as my second port. I connected both ports onto a max232 and then outputed them

The thing to remember is that befor you use port 1, specify its #use and when you use port 2, specify its #use and you have do this everywhere through out your code.
An example of switching between 2 rs232 ports is given in the compiler hand book, under problems.

Delene

:=
:=A friend and I are trying to use a 16F877 to manage a vehicle locator, and as such it needs to talk to both a GPS unit (Trimble Lassen SKII) and a radio modem.
:=
:=We've got the modem working fine using #use rs232... it happens to be on the hardware UART pins, but we're using the software UART, obviously.
:=
:=The problem occurs when we try to poll the GPS on two other pins. We get bytes on the serial line, but they're invalid. When attached to its test board and a PC, the GPS sends out valid information, but something appears to be corrupting the serial link with the PIC.
:=
:=Any tips?
___________________________
This message was ported from CCS's old forum
Original Post ID: 1273
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