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.
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());
}
}
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.