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.

C code for sending packets through COM1 (RS232)

Status
Not open for further replies.

FuzzySNR

Member level 2
Member level 2
Joined
Oct 3, 2005
Messages
47
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,688
Anyone could give an example in C code prefferably of how to send these packets through COM1 (RS232), setting up a connection channel between server-client at 9600 baud. A liitle catch here...the server is only allowed to send the next packet after the client has echoed the packet back to server. The latter should listen for the return packets and only issue the next sync. packet after it has received the appropriate echo.

For example,

Sync0: 0xFA, 0xFB, 0x03, 0x00, 0x00, 0x00
Sync1: 0xFA, 0xFB, 0x03, 0x01, 0x00, 0x01
Sync2: 0xFA, 0xFB, 0x03, 0x02, 0x00, 0x02

Cheers!
 

Re: RS232 Help

Without writing anything special, you can use this terminal software:
http://www.rfinnovations.com.au/Uploads/Images/RFI-Interm Rev1.1(1).zip
Just right-click on tabs (buttons) to set them up; each button can send a string consisting of HEX or ASCII characters ..
There are 20 levels and each level has 10 buttons .. see picture below ..

Regards,
IanP
 

Re: RS232 Help

I have already ckecked that, thanks, but I actually need some C code to integrate it to my application. Any one who can give me some example?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top