Hi,
I have been playing with Arduino One, R3, has a U16 as comm's to PC. I have a few questions the reference manual on the API does not cover.
-
When I open the COM port on the PC, does the U8/U16 UART mega device reboot my 328P micro, so it always ends up in Init(...) on PC port open? I have been using the Serial monitor and noticed it certain does somehow cause a reboot but my own code does not always since some global's are still setup from previous use, suggesting it does not when I open/close the port from C#.
-
If you send data to PC (serial.write(...)) during Init(...), it seems to be echoed back, or there is some data available initially to read by Arduino code on the 328P. I didn't know this and it kind of screwed up my application, resulting in lots of head scratching. Can someone confirm that when in Init(...) and no PC is setup to communication via VCOM, the driver in the U8/U16 either echo's back the data you send or sends some other data? I have not checked what the data is, but noticed it was the same length (time dependant) as the message I sent in Init(...) to PC. There are certain situations where this could be the cause, like if you close the VCOM port on the PC but the device is still powered via USB cable, ofcouse then it's probably in Loop(...) but you get the idea.
Regards,
dc