Re: [fpc-pascal] One experience with the unit serial

2009-11-20 Thread Henry Vermaak
2009/11/20 Holger Bruns : > Jonas Maebe schrieb: >> >> On 19 Nov 2009, at 14:30, Holger Bruns wrote: >> >>> Since iopl is still not available to fpc in its 64-bit-version, I should >>> move to c for future port programming. >> >> $ man iopl >> ... >>      This call is mostly for the i386 architectu

Re: [fpc-pascal] One experience with the unit serial

2009-11-20 Thread Holger Bruns
Jonas Maebe schrieb: On 19 Nov 2009, at 14:30, Holger Bruns wrote: Since iopl is still not available to fpc in its 64-bit-version, I should move to c for future port programming. $ man iopl ... This call is mostly for the i386 architecture. On many other architec- tures it doe

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Brad Campbell
Holger Bruns wrote: At first, there must be a queue for incoming data despite I ruled out a queue with an inbuffer with the length 1. No, you did not rule out a queue at all, you are simply reading from it 1 byte at a time. I'm absolutely positive you can do what you want to do by simply us

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Vinzent Höfler
mar...@stack.nl: [Synapse/Synaser] > How do you use it? I'm used to TComport, and it seems that synaser, like > unit serial, only supports blocking use. call Connect, call Config, call the appropriate reading and writing subroutines (like SendString and RecvPacket)... > Do you put it in a threa

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Vinzent Höfler
Holger Bruns : > > Despite queues an baud rates, you must expect data loss. You will > > loss data in the physical layer. You have to implement some handshake > > to prevent it. (using google translator, excuse my english). > > Which can be done through a direct port access and some lines of cod

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Paul Breneman
Marco van de Voort wrote: In our previous episode, Gustavo Enrique Jimenez said: Did you try Synaser? http://www.ararat.cz/synapse/doku.php/download . I use it on all my projects since 2006 without problems (linux, windows, etc...). How do you use it? I'm used to TComport, and it seems that sy

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Henry Vermaak
2009/11/19 Holger Bruns : > Gustavo Enrique Jimenez schrieb: >> >> Despite queues an baud rates, you must expect data loss.  You will >> loss data in the physical layer. You have to implement some handshake >> to prevent it. (using google translator, excuse my english). >> >> >> Gustavo >> >> > > W

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Gustavo Enrique Jimenez
2009/11/19 Marco van de Voort : > In our previous episode, Gustavo Enrique Jimenez said: >> Did you try Synaser? http://www.ararat.cz/synapse/doku.php/download . >> I use it on all my projects since 2006 without problems (linux, >> windows, etc...). > > How do you use it? I'm used to TComport, and

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Marco van de Voort
In our previous episode, Gustavo Enrique Jimenez said: > Did you try Synaser? http://www.ararat.cz/synapse/doku.php/download . > I use it on all my projects since 2006 without problems (linux, > windows, etc...). How do you use it? I'm used to TComport, and it seems that synaser, like unit serial,

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Gustavo Enrique Jimenez
2009/11/19 Holger Bruns : > Gustavo Enrique Jimenez schrieb: >>> >>> Thank you for your answer. I played with different baud rates. The sender >>> delivers a stream of bytes. The faster a transmission rate is, the less >>> amount of data can be received. This leds me to two conclusions: At >>> firs

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Marco van de Voort
In our previous episode, Holger Bruns said: > > > > Which can be done through a direct port access and some lines of code in > assembler language. The second idea I have is the use of the device > files /dev/ttySx, but how can these files be used to get access to all > of the registers of an

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Holger Bruns
Gustavo Enrique Jimenez schrieb: Thank you for your answer. I played with different baud rates. The sender delivers a stream of bytes. The faster a transmission rate is, the less amount of data can be received. This leds me to two conclusions: At first, there must be a queue for incoming data des

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Gustavo Enrique Jimenez
> > Thank you for your answer. I played with different baud rates. The sender > delivers a stream of bytes. The faster a transmission rate is, the less > amount of data can be received. This leds me to two conclusions: At first, > there must be a queue for incoming data despite I ruled out a queue

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Jonas Maebe
On 19 Nov 2009, at 14:30, Holger Bruns wrote: Since iopl is still not available to fpc in its 64-bit-version, I should move to c for future port programming. $ man iopl ... This call is mostly for the i386 architecture. On many other architec- tures it does not exist or will

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Holger Bruns
Brad Campbell schrieb: Holger Bruns wrote: Hi, one more question regarding the unit serial. I use the following function to get one single byte form a serial port, which has been open before with seropen: function getdata(inhandle: tserialhandle; var recdata: char): longint; begin fillchar(

Re: [fpc-pascal] One experience with the unit serial

2009-11-19 Thread Brad Campbell
Holger Bruns wrote: Hi, one more question regarding the unit serial. I use the following function to get one single byte form a serial port, which has been open before with seropen: function getdata(inhandle: tserialhandle; var recdata: char): longint; begin fillchar(inbuffer, sizeof(inbuffe

[fpc-pascal] One experience with the unit serial

2009-11-18 Thread Holger Bruns
Hi, one more question regarding the unit serial. I use the following function to get one single byte form a serial port, which has been open before with seropen: function getdata(inhandle: tserialhandle; var recdata: char): longint; begin fillchar(inbuffer, sizeof(inbuffer), #0); getdata := s