Solved

send and recieve info over a com port

Posted on 1998-08-31
3
185 Views
Last Modified: 2010-04-04
I am looking for C++ (or dos)source code to send and receive info over a com port. How do I acces and turn on the com port and set the baud rate? Specifically on an HP200lx palmtop computer. I am trying to download information to the palmtop, the program is very low level and the dos interupt is not working. It is intended for a CMT datalogger but I am trying to adapt it to the HP, and it needs the COM port address.

Thanks,
Antonio Llanos  
0
Comment
Question by:llanos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1338262
I'm not sure if this is what you are looking for but still....i hope it's a bit helpful
To read a port...
//This is assembler for Delphi
function ReadPortB( wPort : Word ) : Byte;
begin
  asm
    mov dx, wPort
    in al, dx
    mov result, al
   end;
end;
//To write to a Port
//This one is assembler for Delphi too..I mean the function is implemented with Delphi code
procedure WritePortB( wPort : Word; bValue : Byte );
begin
  asm
    mov dx, wPort
    mov al, bValue
    out dx, al
  end;
end;

Hope this helps ;-)

Regards,
Viktor Ivanov
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
ID: 1338263
If you want C++, or dos source then you're in the wrong place, this is Delphi place!!

But if you want source : here is a very good component, freeware, with source :

http://www.torry.ru/vcl/comms/cd320108.zip

and another :

http://www.torry.ru/vcl/comms/async32.zip

regards, Zif.
0
 

Author Comment

by:llanos
ID: 1338264
Thanks, I will check the URLs, I am really looking for something in C++ but that was my
mistake for posting on the Delphi area, I am new at this.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question