Mex_C_Serial_Interf​ace

C_Serial Interface for fast serial communication from matlab.
475 download
Aggiornato 28 giu 2017

An interface for faster serial within MATLAB by implementing c_serial code base:
https://github.com/rm5248/CSerial
This uses mex functions, so you will need to get the mex compiler within matlab working. I implemented this library to reduce latency and enable high bandwidth communication with an embedded micro-controller connected through a serial port. I have achieved 500 Hz round trip communication with a pic through an ft232r FTDI chip using this interface.
The example.m file contains brief instructions on how to use this interface. Make sure to compile with mex before trying to run the example (I compiled with visual studio 2013, let me know if people run into compiler errors). I designed the interface to closely resemble using MATLAB's built in serial IO functions. readPort is analogous to fread and writePort is analogous to fwrite in this context.
Remember if you are using an FTDI FT232r (some Arduinos and many other MCUs use this chip) to turn down latency to achieve these speeds as in the following link: https://projectgus.com/2011/10/notes-on-ftdi-latency-with-arduino/

Tested in Linux, Fixed some bugs, it is now working!

Cita come

Jeffrey Friesen (2025). Mex_C_Serial_Interface (https://github.com/Jfriesen222/Mex_C_Serial_Interface), GitHub. Recuperato .

Compatibilità della release di MATLAB
Creato con R2015a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su MATLAB Compiler in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Le versioni che utilizzano il ramo predefinito di GitHub non possono essere scaricate

Versione Pubblicato Note della release
1.1.0.0

Added 64 bit linux support. Compiled with gcc in Ubuntu 16.04.

1.0.0.0

Fixed some errors in description!

Per visualizzare o segnalare problemi su questo componente aggiuntivo di GitHub, visita GitHub Repository.
Per visualizzare o segnalare problemi su questo componente aggiuntivo di GitHub, visita GitHub Repository.