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.

sending an array of data via serial port

Status
Not open for further replies.

RAJPUT VIDISHA

Member level 1
Joined
Jul 14, 2015
Messages
37
Helped
0
Reputation
0
Reaction score
1
Trophy points
6
Activity points
344
Hello everyone...
i want to send hex data from my pic over serial port as an array......im new to pic programming so plz can anyone help me...

data format is ea9; 161; 166; e8d; e8c; e5e; e73; e95; e7b; 159; e9c; e93; 145; e81; e98; 14c; e7e; ea6; 16a; 15b; e89;
 

You want to send 12 bit data at a time. But is your serial capable to send 12 bit data at a time? If it is not.. you can break your hex codes and send.

After this your data format will : - 0x0e, 0xa9; 0x01, 0x61;

make 12 bit format when recive it : - (first_byte * 256) + second_byte
 

Hi,

Hex formed as a string? "EA9; 161; E8D..."
Where the "E" is one byte ASCII encoded, "A" is one byte ASCII encoded, "9" is one byte ASCII encoded, ";" is one byte ASCII encoded, " " is one byte ASCII encoded,...

Klaus
 

No.No.No

E is only 1/2 byte. I aded 0000 for left 1/2 byte. So it's 00001110 = 0x0E. It is one byte.

And second is 0xA9. It's one byte also.

first byte = 0x0E
second byte = 0xA9

- - - Updated - - -

Finaly Result = (first byte*256) + second byte

- - - Updated - - -

It will be equal EA9
 

Hi,

@Ranbeer Singh:
Please let the OP answer the question.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top