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.

How to send data stream from microcontroller

Status
Not open for further replies.

cool.man

Full Member level 6
Joined
May 29, 2008
Messages
323
Helped
42
Reputation
84
Reaction score
29
Trophy points
1,308
Location
Earth
Activity points
3,307
Hi,

I want to send a data stream from microcontroller(pic18f452) to gps module using serial port.
data stream is like that
25 25 f1 12 02 00 05 e4 0d 0a
how i do it.
 

PIC18f452 has both built in RS485 and SPI communication functions, if your receiving end has SPI and the transmission distance is not long then you should use SPI, otherwise if you have to communicate with an external device then use RS485.
Using RS485 is fairly simple its specifications available....google it.....a software protocol called Modbus based on rs485 is a good choice too but this will add some extra bytes before and after your datastream, it has built in CRC and an optional parity checking mechanism to assist in error checking
 

CrabMan i dont think so that i required rs485 or SPI function.
I am already getting data (date and time) from gps module in microcontroller using serial port interrupt.
now i want to set some parameters of gps module by sending some data from microcontroller.like (25 25 f1 12 02 00 05 e4 0d 0a) this code is for activate 1 sec signal in gps module
Tell me how i send it.
 

printf("\x25");
printf("\x25");
printf("\xf1");
printf("\x12");
printf("\x02");
printf("\x00");
printf("\x05");
printf("\xe4");
printf("\x0d");
printf("\x0a");

Is this the correct way?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top