Transfer Rate ( error in may calculations or am I missing something ?)

Ictried this several times ... transfering data

Ascii 7bits+1start+1parity+1stop = 10 bits per character Baud = 9600 Characters per second = baud / bits per character => 960 characters per second

File size to transfer = 8.88 kilobytes = 9093 bytes = 72745 bits

(72745 bits/file ) / (10 bits/character) = 7274 characters per file

Hyperterminal transfers file @ 9600 baud via nullmodem cable to another computer in 12 seconds. My calculated transfer of file is 7274 characters / 960 characters / second = 7.58 seconds.

At 2400 baud , 240 characters per second I get a transfer time of 41 seconds calculated = 7274 characters / 240 characters per second => 30.3

Why should I be getting such large differences? Some overhead ?

Reply to
new77
Loading thread data ...

First of all the problem could be at either end. You didn't write the code so you don't know how efficient it is. I suspect you're running WinXP and WinXP seems quite clunky when it comes to serial port throughput. Try booting from a dos diskette on both ends and use telemate.

Reply to
Jim Stewart

First, your maximum possible throughput at 9600-P-8-1 is going to be

7*960 bits per second, or 840 (actual 8-bit) bytes per second. After all, you've only got seven available data bits in each 10 bit frame, of which you'll get 960 per second. At best for a 9093 byte file, you'll need about 10.8 seconds.

Second, in non-8-bit-transparent mode, most file transfer programs will base-64 encode the file, so you'll get an effective 6 data bits per 10 bit frame, or 6*960 bit/sec or 720 bytes per second. That would work out to about 12.6 seconds at best.

Third, all file transfers will have some additional overhead for block management, checksums, escape characters, etc., further reducing throughput.

You may want to try this on a 9600-N-8-1 connection.

Reply to
robertwessel2

Even before you go to Google to find out how serial works, please go to Wikipedia to find out the difference between multiple posting and cross posting. The latter is good when done in moderation. The former is bad form, even if you're posting from Google Groups.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

The RS232 baud rate specifies the transfer rates of bits sent and not the transfer rates of bytes.With 9600 bps you get 104 microseconds for one bit or 1.04msec per byte ( 10 bits).The transfer rate of the file depends on the application used and may be close to the bit rate but never the same.That's because it is allowable any time delay between bytes sent.The baud rate 9600bps specifies transfer rate of bits coming from START bit until STOP bit only.

I also didn't understand your calculations. If you have to transfer

9093 bytes ( file size), the minimum possible time at 9600 bps could be 9093 * 1.04 msec = 9.46 sec and not 7.58 sec as you say. Of course 9.46 sec is ideal and theoretical only because practically it will take more time depending on the application used and the implementation (added checksums,acknowledgements used etc...).

You can also connect an oscilloscope on the RS232 lines to see the timing delays between bytes sent and to better understand why you are getting such large differences.

Reply to
yossi_sr

About correct.

This one is quite off, though. You don't have 10 data bits per character, you have 7. You've mixed up signal bits with data bits. So this should be 72745 bits/file / 7 bits/character = ~10000 characters/file (and that's if we assume that the encoding of 8-bit bytes into 7-bit characters is quite efficient).

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.