From: Joerg Hansmann (info_at_jhansmann.de)
Date: 2002-03-14 14:05:02
Hi,
----- Original Message -----
From: Jim Peters <jim_at_uazu.net>
To: <buildcheapeeg_at_yahoogroups.com>
Sent: Thursday, March 14, 2002 2:30 PM
Subject: [buildcheapeeg] Serial transfer data loss
...
> I took your challenge, setup a test with a Perl script dumping data at
> 115200 baud down a cable with flow control disabled. There was no
> problem on my text-mode P133 laptop keeping up with this data stream
> with the machine unloaded (I was using "cat </dev/ttyS0 | tee log").
The modularEEG / RS232EEG protocol uses an effective baudrate of
17 bytes_per_frame * 10 bits_per_byte_inclusive_start_and_stop * 256 samples_per_second
=
43520 baud.
This worked quite well (without noticeable data loss) with Rob Sack's Electric Guru
Software on an Athlon 600 Mhz PC with WIN98SE.
> However, doing a 'find' or any other large disk operation
> (e.g. starting a program up) did cause it to lose bytes, even when I
> gave the process a higher priority.
Is your HD driver set to DMA-mode ? Or PIO mode ?
> (I didn't try changing the
> priority of interrupts because I don't know how to do that).
>
> Loading up the processor (e.g. calculating lots of sines) only had an
> effect when the process was at normal priority. At higher priority
> there was no problem.
>
> This is because we're not using flow-control, isn't it ? I'd
...
> > If that doesn't work, we will have to use USB with a large hardware
> > fifo (4kb) for PC's running Windows. Linux/embedded systems can be
> > fixed by installing a real-time kernel.
>
> Does there not exist anything like an RS232 line buffer module --
> something that passes RS232 data through, but has a small memory
> buffer in it, and does flow control ? I mean something very cheap.
> Probably it's called a microcontroller, and we don't want to have to
> have one at both ends of the cable. Oh dear.
The At90S4433 has 128 bytes SRAM. A part of it is used in the current firmware, but the
rest could be used for buffering perhaps 4..5 data frames.
Together with XON,XOFF handshake this could resolve data loss.
Regards,
Joerg
This archive was generated by hypermail 2.1.4 : 2002-07-27 12:28:40 BST