Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

GPS + GSM interfacing with RS 232 then to PIC16F877A

Status
Not open for further replies.

Papizo

Junior Member level 1
Joined
Feb 3, 2012
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,443
Hi all,I just need help here, I have attached diagram it explain everything, I am working on my Final year project and my project based on vehicle tracking system, so am going to use GPS and GSM connected to RS 232 both, but I cant use two RS 232 I have to use one but am not sure how am going to do it, or any idea I will be appreciate..... also somebody told me about BIT BANG but am not really sure how it works, or do I really need to use RS 232 for those who did this type of project??or I can just connect straight to the PIC....
 

Attachments

  • RS 232 with Microcontroller.png
    RS 232 with Microcontroller.png
    21.2 KB · Views: 106

What microcontroller are you using? Many come with two hardware UARTs.

What compiler? Many have a built-in library/function for software (a.k.a. bit-bang) UART as well as hardware.

Bit-bang is quite easy - serial communication is just a case of toggling a pin high and low at a specified rate and with a specified protocol (start bit, data bits, stop bit, etc).

Edit: I've just spotted 'PIC' at the end - the above comments apply to PICs.
 
  • Like
Reactions: Papizo

    Papizo

    Points: 2
    Helpful Answer Positive Rating
What microcontroller are you using? Many come with two hardware UARTs.

What compiler? Many have a built-in library/function for software (a.k.a. bit-bang) UART as well as hardware.

Bit-bang is quite easy - serial communication is just a case of toggling a pin high and low at a specified rate and with a specified protocol (start bit, data bits, stop bit, etc).

Edit: I've just spotted 'PIC' at the end - the above comments apply to PICs.

Thank you FoxyRick,

Actual am using PIC16F877A, and will be using mplab compiler CCS C, I never use this, before I was using PIC18F452 with compiler Microchip C18 so this CCS C compiler is new to me......

Any suggestions and Idea will appreciate on how am going to do if I get code and diagram showing how am going to connect the pins.....The rest of the project I will be alright just this part that's all...
 

I use the stand-alone version of CCS C. It can do software UART - just put in two "#USE RS232" statements, and give them different stream names. One can be set to the hardware UART and the other given different pins in the options and forced to software UART.

The compiler will load/generate the code for running the software UART itself. As far as your programming is concerned, you then have two serial ports and can refer to them by the stream name in getc(), putc(), etc. just as you would the hardware UART.

See here for CCS's page on it: https://www.ccsinfo.com/faq.php?page=multiple_rs232
Also refer to the CCS C manual for the #USE RS232 directive and its options.

If you need interrupt support for receiving data from one of the devices, use the hardware UART for that one.
 
  • Like
Reactions: Papizo

    Papizo

    Points: 2
    Helpful Answer Positive Rating
I use the stand-alone version of CCS C. It can do software UART - just put in two "#USE RS232" statements, and give them different stream names. One can be set to the hardware UART and the other given different pins in the options and forced to software UART.

The compiler will load/generate the code for running the software UART itself. As far as your programming is concerned, you then have two serial ports and can refer to them by the stream name in getc(), putc(), etc. just as you would the hardware UART.

See here for CCS's page on it: https://www.ccsinfo.com/faq.php?page=multiple_rs232
Also refer to the CCS C manual for the #USE RS232 directive and its options.

If you need interrupt support for receiving data from one of the devices, use the hardware UART for that one.


Thank you again FoxyRock...

Is that possible if you could provide diagram showing how am going to connect, use even paint just draw quickly so I can see, because when you say just put in two #USE RS232 statements I didn't get this one....

Also I have checked that website and pdf as well for CCS S page 319......

I think I will learn something new from you....
 

Hi all,I just need help here, I have attached diagram it explain everything, I am working on my Final year project and my project based on vehicle tracking system, so am going to use GPS and GSM connected to RS 232 both, but I cant use two RS 232 I have to use one but am not sure how am going to do it, or any idea I will be appreciate..... also somebody told me about BIT BANG but am not really sure how it works, or do I really need to use RS 232 for those who did this type of project??or I can just connect straight to the PIC....


im also working on the similar project "Vehicle Tracking & monitoring through Hand-held devices"
you don't need to use rs232 to interface it with PIC because microcontroller and gps/gsm modules have same TTL/CMOS logic.and rs232 is voltage level converter TTL/CMOS to RS232 or vice versa..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top