Serial port :bytesAvailable



Hello,

I am reading binary data from a serial port (it is actually
a virtual serial port created for FDTI usb connection). I
have no problem reading data, I am reading data from an eye
movement measurement device, however I am trying to
synchronize my measurement with a CRT monitor controlled
through matlab using a purpose built graphics card. Which
requires very specific timing control (my graphics card has
timing control independent of windows so it is very
accurate) and accurate readings of how much bytes are in the
input buffer, for this I am using the bytesAvailable function.

Ok first question once the port is opened can windows
interrupt the flow of data into the input buffer when
reading asychronously, is this flow usually continuous or
does it go in in chunks (maybe this is specific to the
instrument). As I am getting a problem that when a call the
bytesAvailable function after opening the port, the number
of bytes returned are always in multiples of 3968 or 4092 (I
realise these are significant numbers in binary terms) but
is this a general property of bytes available or is it maybe
related to my instrument. Even with the most simplest code
where i might open the port pause for 0.1 second and read
the data the bytesAvailable function always seems to read in
in chunks (being 0 3968 or 4092 in this case).

Does anyone know why this would occur?

Thanks very much,

Gary


.



Relevant Pages

  • Re: Serial port :bytesAvailable
    ... I am reading binary data from a serial port (it is actually ... have no problem reading data, I am reading data from an eye ... input buffer, for this I am using the bytesAvailable function. ...
    (comp.soft-sys.matlab)
  • Re: PPC 2003 Thread
    ... // Create a read thread for reading data from the communication port. ... DWORD dwError; ... >> not get signaled and the Kernel Tracker tool shows that my main thread is ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: EAGAIN mystery on accept()
    ... Thanks a real lot Michael for reading my mail. ... lsof showed this to be the only process with a socket on this port ... > In an earlier post you said that tcpdump showed no incoming packets. ... > interface that you're not sniffing, ...
    (comp.unix.solaris)
  • Re: Write to file handle
    ... > port is reading) to a log file continuously .Can anybody help me how to do ... That's used for opening a file for reading ... use lexical filehandles, ... > #The line below declares it and ties it to the file handle INFILE ...
    (perl.beginners)
  • Re: Possibly OT: sending email from shell scripts on cygwin
    ... written by email experts I expect if I went to a mail NG with this I'd ... you by reading your Thunderbird config files" or something :-). ... wrt the info on port 25 being for outgoing and 110 being for incoming ... before I copied my cygwin environment off it. ...
    (comp.unix.shell)