USB2.0 driver & CH340G driver not working

HI All,

I have Arduino Nano ATmega328P with a windows 10 laptop. Tried solving the missing driver error (USB2.0 driver) by installing CH340G driver fromhttp://www.wch.cn/download/CH341SER_EXE.html
however now I am able to upload my code on arduino but not able to communicate with it.

Any solution is highly appreciated

Please explain exactly what you mean by "not able to communicate with it".

I need to send commands from Arduino to MTD415T over the serial port. and receive the resulting string from it.

I should be able to send the commands from serial monitor. and display the results there itself.
but the serial monitor screen stays blank (neither show what i send nor the received text)

Using software serial example

/*
  Software serial multple serial test

 Receives from the hardware serial, sends to software serial.
 Receives from software serial, sends to hardware serial.

 The circuit:
 * RX is digital pin 10 (connect to TX of other device)
 * TX is digital pin 11 (connect to RX of other device)

 Note:
 Not all pins on the Mega and Mega 2560 support change interrupts,
 so only the following can be used for RX:
 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69

 Not all pins on the Leonardo and Micro support change interrupts,
 so only the following can be used for RX:
 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

 created back in the mists of time
 modified 25 May 2012
 by Tom Igoe
 based on Mikal Hart's example

 This example code is in the public domain.

 */
#include <SoftwareSerial.h>

SoftwareSerial mySerial(7, 8); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  // set the data rate for the SoftwareSerial port
  mySerial.begin(115200);
  mySerial.println("m?");
  
}

void loop() { // run over and over
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

Make sure you have the baud rate menu in the bottom right corner of Serial Monitor set to 115200.

Add a line to your setup so you know that you can print to Serial successfully:

Serial.println("Hello World");

Note that the SoftwareSerial library is known to not work reliably at 115200. Use a lower software serial baud rate if possible.

It works on different PC. this same code with the same baud
And I have checked that serial monitor is working with "hello world"

only after that it stays blank. as posted above.

Are there other drivers which can solve the "USB 2.0 Serial" problem?

Add another debug Serial print inside the if statement that handles communication from Serial Monitor.

I really don't think this has anything to do with the driver.

pert:
Add another debug Serial print inside the if statement that handles communication from Serial Monitor.

Hi pert,
I am adding this screen shot of my program and the problem that I am facing. I hope the image is self explanatory. Please refer attachment.

Regards,

It is not a driver issue!

Have you actually tried connecting up the MTD415T directly to the PC without the intervention of the Arduino?

Use Putty and communicate with the MTD415T. There is something about the MTD415T communication link that is important and that you are missing.

For those wondering MTD415T is actually an IC. https://www.thorlabs.com/thorproduct.cfm?partnumber=MTD415T

Thorlabs provide their own evaluation board, but the OP is apparently going rogue and doing his own thing.

Yes I know the MTD415T comes with an eval board but that is costly as compared to using just the IC. this is the work under an academic project to make a cheaper controller.

And I tried the same code "The exact same code" in another Desktop PC which had Arduino IDE since long time which is not updated. the program ran absolutely fine in that... but can't use that PC as it is desktop (not easily portable)

rohan0993:
Yes I know the MTD415T comes with an eval board but that is costly as compared to using just the IC. this is the work under an academic project to make a cheaper controller.

And I tried the same code "The exact same code" in another Desktop PC which had Arduino IDE since long time which is not updated. the program ran absolutely fine in that... but can't use that PC as it is desktop (not easily portable)

Some thing is different, and YOU need to find out what it is.

Does the desktop PC have an actual serial port? Is that what you are using?

And as I wrote before, take the Arduino out of the picture and directly connect to the IC.
Do some investigation.
Sheesh.