top of page
convtadelsigou

Delphi 2010 serial port component free: RS232 protocol communication with any device using ComPort L



In which case, look to see if CiaComPort has any other sending methods available that allow you to send raw bytes instead of strings. If it does not, then you are pretty much SOL and will need to switch to a better COM component, or just use OS APIs to access the COM port directly instead.




delphi 2010 serial port component free




ZylSerialPort is a Delphi & C++Builder thread based serial port component. Use ZylSerialPort component to easily communicate with external devices on serial port connection, such as modems, bar code readers, GSM modules and others. It works in synchronous and asynchronous mode.


You can use it also with USB, IrDA and Bluetooth devices, because these devices have a driver that redirects the input from the USB, IrDA or Bluetooth port to a virtual serial port (you can check it in System/Device Manager/Ports). If your USB device is not provided with such a driver, then use a USB controller whose vendor provides a virtual serial port driver, such as FTDI or use a USB/RS-232 adapter. If the connection is interrupted, you can set to auto-reconnect when the device is available again.


Dependencies on external components such as zlib compression and encryption are optional.These can be pulled in by the developer statically or dynamically according to preference and decisions on third-party licensing models.The source can be used on all supported platforms; it has been tested with Visual Studio 2010 and GCC 4.6.2.


As far as possible, in each language the classes, interfaces and methods are named identically.The SDK has been built in discrete layers and you can pick and choose as you prefer.Generally, all functionality has been made public, including the internal workings so that very fine control can be made if necessary.Logically, the SDK can be split into simpler User APIs and the low-level Core APIs.Note that this SDK is a low-level hardware programming interface, not a user interface and there are no user interface components within the API.This is one of the key factors which made the API readily ported across languages and platforms.The diagram below illustrates the key components within the SDK.


Use the getUsbDevices() method to return an array of attached devices, and pass that to the appropriate connect() method of class Tablet (you can also connect via a serial port).


(1/2010 update: Sadly, TurboPower closed... but first they kindly released their software into the open source world! There is a sourceforge page for Async Pro! To quote from that: "Async Professional is a comprehensive communications toolkit for Embarcadero Delphi, C++Builder, & ActiveX environments. It provides direct access to serial ports, TAPI, and the Microsoft Speech API. It supports faxing, terminal emulation, VOIP, & more."


From the same source: TurboPower Async Pro CLX: "Async Professional CLX is a comprehensive communications toolkit for Borland Kylix. It provides direct access to serial ports, and supports terminal emulation, file transfer protocols, & more.".


TCommPortDriver. Freeware serial-communicationscomponent for Delphi. Includes source code that showshow to use Windows API calls to access serial ports.16- and 32-bit versions available. From Marco Cocco.It used to be available from the Delphi Download Page., _table.phtml?ipath=ACE, and looked pretty good! Seems to have been used by numerous people. But, of course, I hadn't downloaded it myself, and the link above is dead 1/2010. Anyone know of a source?? TCommPortDriver is a component for Borland Delphi 2that lets you handle COM ports (com1-com16) and allstandard communication settings (baud rate, data bits,stop bits, parity, hardware and software flow control).Supports sending data in binary blocks or textstrings. Supports asynchronous and synchronous data RX.


Ben, I am currently in the process of porting a VB6 serial port app to .NET and have found the performance to be inadequate. The app sends a series of messages with responses, before posting the next message. The intermessage gap is several milliseconds larger for the .NET version.


At a high level it is a similar concept to the DataReceived event because it allows the application to respond to incoming data in an event-driven fashion. Important differences are that the event actually carries the received data with it, so the application is all set for processing serial data, and the implementation does this with a single API call, which is far lower overhead.


Jason, yes those are still planned, but my dissertation committee asked for some edits before publication so those are a higher priority for my writing bandwidth this month. More serial port blog posts in March. Probably.


I just spent forever trying to get a serial communication to work. The function here did not help either.Turned out that I have to set port.DTREnable=true. I have no idea why I have to do this manually.


One thing I forgot to mention is that Framework 2 and 3.5 serial port code runs without modification on Windows XP through 10. Win 8.x and above do not install the C Redistribution Library. So, if you ship a C++ program to customers you need to deal with that, but not if it is .net.


Glenn, I think the leak is in the code you added. Perhaps you are calling kickoffRead() multiple times, each of which creates a buffer? Because it has iteration built-in, you should only call it once per serial port. Or perhaps your _receiveBuffer.AddRange(), which was not part of my code, is growing endlessly.


At 9600BAUD, each 11-bit character takes 1.146ms to transmit and from the timestamps in my logPrint function, I see it took 1025 ms to send the 1000 bytes to the serial port driver before the .WRITE returned.


public class SerialPortReader{// -use-net-system-io-ports-serialport// -stream-beginreadSerialPort _port;byte[] _buffer;Action _dataReceivedAction;Action _serialErrorAction;Action _kickoffRead = null;IAsyncResult _ar;public SerialPortReader( SerialPort port, int bufferSize, Action dataReceivedAction, Action serialErrorAction )this._port = port;this._buffer = new byte[ bufferSize ];this._dataReceivedAction = dataReceivedAction;this._serialErrorAction = serialErrorAction;


int actualLength = this._port.BaseStream.EndRead( ar );if ( actualLength > 0 )byte[] received = new byte[ actualLength ];Buffer.BlockCopy( this._buffer, 0, received, 0, actualLength );this._dataReceivedAction( received );catch ( Exception e )this._serialErrorAction( e );


This is where you need to get a programmer to connect the chip to your PC. You can either buy a USB programmer from eBay or make your own to communicate to the serial port. In my case, I made my own, using this EEPROM circuit.


The components required are fairly basic, three 4.7K ohm resistors, three 5V zener diodes, and a computer with a serial port. To connect the 8-pin EEPROM chip to the computer you'll either have to solder hook-up wires to the pins or get a Test Clip for onboard programming.


FWIW, I was unsuccessful in on-board reading or programming (1999 Toyota 4Runner), ended up desoldering the chip to get this to work. This was true for 2 different ECM units, and 3 total times (bought a test unit, then virginized it for resale after making sure my original was working well). This may very well be due to the fact that I didn't have anything with native RS-232 and was trying to make it work through an adapter.For others in this same boat, desoldering the chip and using the EZP2010 programmer ($20) on Common 93c56 (16bit) works just fine. If you're unwilling to do the soldering, then buy some 93c56 blank chips, program them and then walk the board and new chip into a cell/tablet/laptop repair business and ask them to swap the chip. Shouldn't be much more than $20 for a simple component swap.


USB serial ports appear at some port number. Look under "my computer->properties->hardware->ports" to find where they are. Unfortunately the same device will often appear at different comport numbers when it is on different USB hub ports.


Realterm now uses the registry to find ports rather than trying to open them all. Note if you get a registry key error when starting, this is because you do not have any serial ports installed. Install one.


The most basic PC uart has a maximum baud rate of 115,200. Any frequency of 115,200 / N, can usually be requested. More modern PC's and laptops, usually have a higher maximum baud rate of 230,400, or 460,800, or 921,600. Actual serial ports usually have a maxium that is a multiple of 115,200. Once you have found the maximum, any baud rate of /N should work.


The16C95X family of advanced uarts are able to support very high baud rates. They have 64byte FIFO's, which is a give away that they are in your serial card. When trying to get very high baud rates, there is an option in the hardware configuration of the uart to enable the "baud rate multiplier". This will result in higher than requested baud rates. ie the actual baud rate = requested rate * multiplier


RealTerm can also write LOG and TRACE files to help debugging difficult serial problems. These are completely separate from the Capture function and provided by the Turbo Async comport component. These are a reports from a dignostic queue. You can CLEAR the queue or DUMP it to a file. The Log buffer is 10000 long and Trace buffer 1000 long (V2.0.0.69). Select hexif you need to see non-printing chars. For more information see the Turbo Async Reference Guide, Chapter 2, "Debugging Facilities" (pg 33)


The main port can be passed through or echoed to the Echo Port. This is partcularly useful when the echoport is a TCP port. This allows a real serial port to be aliased across the network. (the echo port can be a real comm port too) 2ff7e9595c


1 view0 comments

Recent Posts

See All

Baixar Menyoo GTA 5

Baixar Menyoo GTA 5: Um Guia para o Menu Mod Definitivo para Grand Theft Auto V Se você está procurando uma maneira de aprimorar sua...

Baixar Jogos de Vídeo Grátis

Download de videogames da Gameloft: como aproveitar a melhor experiência de jogo móvel Se você está procurando alguns jogos divertidos e...

Commentaires


bottom of page