| | |
How to use a serial port to transmit a given file From one computer to another.......
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2006
Posts: 15
Reputation:
Solved Threads: 0
How to use a serial port to transmit a given file From one computer to another.......
0
#1 Dec 27th, 2006
Hi Everybody,
Im a new programmer.........
i had used the following code to output data to com port.....
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<bios.h>
#define SETTINGS (_COM110|_COM_CHR7|_COM_STOP1|_COM_NOPARITY)
void main()
{
clrscr();
_bios_serialcom(_COM_INIT,0,SETTINGS);
outportb(0x03f8,0);
getch();
}
when i run the programme,when i connect pin 3(tx pinn) to a LED it blinks one tym..........
so how can i tx a file..............
how can transmit relevent characters in binary....(how to convert it to binary........)
how i can use inportb() methord?
Please help me.............................
if u know more details please tell me........
if u got more teaching meterials please mail to <email address snipped> okk
Im a new programmer.........
i had used the following code to output data to com port.....
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<bios.h>
#define SETTINGS (_COM110|_COM_CHR7|_COM_STOP1|_COM_NOPARITY)
void main()
{
clrscr();
_bios_serialcom(_COM_INIT,0,SETTINGS);
outportb(0x03f8,0);
getch();
}
when i run the programme,when i connect pin 3(tx pinn) to a LED it blinks one tym..........
so how can i tx a file..............
how can transmit relevent characters in binary....(how to convert it to binary........)
how i can use inportb() methord?
Please help me.............................
if u know more details please tell me........
if u got more teaching meterials please mail to <email address snipped> okk
Last edited by ~s.o.s~; Dec 27th, 2006 at 1:12 pm. Reason: Posting email address in your posts is against the forum policy.
Re: How to use a serial port to transmit a given file From one computer to another.......
0
#2 Dec 27th, 2006
There are many libraries that will do all the hard work for you, requiring just a stream of bytes as input and producing a stream of bytes as output on the other end.
But you can indeed do it all yourself, by taking each byte, pulling it apart into bits, and pumping it over the connection like you did that single blip.
But you can indeed do it all yourself, by taking each byte, pulling it apart into bits, and pumping it over the connection like you did that single blip.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Re: How to use a serial port to transmit a given file From one computer to another.......
0
#3 Dec 13th, 2007
•
•
•
•
how i can use inportb() methord?
But, it would definitely be easier to use the libraries as jwenting suggested.
If your purpose is just to transmit or receive a file, use hyperterminal instead. It will do all the low-level stuff on its own.
•
•
•
•
this program cannot use in Microsoft visual c++
Don't use old style header files. And yes, void main() must be replaced by int main()
. "You know you're a computer geek when you try to shoo a fly away from the monitor screen with your cursor. That just happened to me. It was scary." - Juuso Heimonen.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
"The only truly secure computer is one buried in concrete, with the power turned off and the network cable cut." - Anonymous.
![]() |
Similar Threads
- Send data on a serial port (C++)
- Serial port communication using C++ (C++)
- vb2005 serial port opening (VB.NET)
- need help convert c++ to vb6 serial port (Visual Basic 4 / 5 / 6)
- Problem with real-time app reading from serial port (ASP.NET)
- Windows and Overlapped Serial Port Communications (C)
Other Threads in the C++ Forum
- Previous Thread: How to delete all files in a directory
- Next Thread: Difference between back() & end()
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game generator getline graph homeworkhelper iamthwee ifstream input int integer java lib linux list loop looping loops map math matrix memory multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree url vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






