Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

How to send block of 16 bytes fr PC serially?

Status
Not open for further replies.

ganavel9783

Member level 1
Joined
Sep 6, 2005
Messages
38
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,264
hi guys,

i'm working on a project to encrypt text files from PC using PIC16f877.the encryption algorithm i'm using is AES.the encryption algorithm code for the PIC is implemented to work with block of 16 bytes of data.so i need to send continous block of 16 bytes of data to be encrypted and sent back to PC to display the cipher text.

I do realise that i need to implement buffers to transmit and receive 16 bytes blocks of data to be encrypted by the PIC.

1) So do i need to use buffers as well from the PC side to send continous blocks of 16 bytes serially to the PIC? (I'm using Visual C++ on the PC side.)
2) How do i implement this task?
3) Any code examples?

Regards,
ganavel9783
 

Davood Amerion

Advanced Member level 2
Joined
Mar 1, 2005
Messages
584
Helped
116
Reputation
232
Reaction score
24
Trophy points
1,298
Location
Persia
Activity points
6,351
You must embed that block with some extra bytes.
And make a block which include start byte, size byte(if size is fixed not reuaierd), command ,
16 bytes data block (if any), and CRC (or check sum) bytes (2byte).
Somthing like that HDLC protocol.

Regards,
Davood.
 

ganavel9783

Member level 1
Joined
Sep 6, 2005
Messages
38
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,264
Hi Davood,

Thanks for ur reply.However Davood i still need more explanation regarding how can i implement the method u suggested??Do u mind giving me some more hints?
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top