Recent Questions

مطالب مرتبط با «having trouble communicating» در Recent Questions | نویسنده: استخدام کار

Having trouble communicating to a FT232R device

I have a FT232R device controlled by a VXM Stepping Motor Controller. I was able to communicate with the device on Mac(using Matlab). But I'm having trouble doing it on Windows. I installed the VCP driver for Windows 64-bit from here: http://www.ftdichip.com/Drivers/VCP.htm I already checked that the driver is properly installed. Here is my code: #include #include #include int main() { char command[34] = "I2M10,R"; HANDLE hSerial = CreateFile( "\\.\COM8", FILE_SHARE_READ | FILE_SHARE_WRITE, 0, NULL,//pass path as a parameter instead of \\.\COM6 OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hSerial == INVALID_HANDLE_VALUE) { fprintf(stderr, "Erro"); } else fprintf(stderr, "OKn"); DWORD byt...

ادامه مطلب