Open Meins321 opened 3 years ago
My programm code in the arduino ide is just the basicUsageHwSerial.ino
i changed only every "Serial." for "SerialUSB." as i am on a Zero that is needed to get the Programming Port (MicroUSB) to post text to the "Serial Monitor"
Line 14: Ch376msc flashDrive(Serial1, 9600);
okay Line14 Ch376msc flashDrive(Serial1;Baudrate); seems to fail for anything that is not 9600 baud
If set to 9600 with no cable the red led is lit constantly with or without usb stick
Does the baudrate setting not work on the SAMD21 maybe?
Btw maybe add a link to the arduino serial overview from here to the compatability lists for beginners? https://www.arduino.cc/reference/en/language/functions/communication/serial/ If you test this library with an uno and hardware serial :-) it collides as there is only one availible
SAMD21G Port organisation just as a side note SERCOM0 is for USART on pins 0/1 (Serial1) SERCOM1 is free SERCOM2 is free SERCOM3 is for Wire SERCOM4 is for SPI SERCOM5 is for USART via EDBG (Serial)
Hi, the D1 LED on CH376 module is lit when the initialization is done (USB HOST mode) and if USB Device is attached. After power cycle the LED must to be in off state if initialization is not issued . CH376 chip on Arduino Zero HW serial is not tested, but works over SPI, in your case CH375 doesn't have SPI interface :( . If You have then please try on Mega board, CH375 is compatible with CH376 but still can have a minor differences in a command structures (i don't have it so i cannot test it :( . )
Is this your module in this photo or was it taken from the internet? Since the crystal does not appear to be of adequate value, 12 MHz is required, not 2 MHz
The picture is my module i usally not take other pics :-P
the model are obtained from german amazon...
if you tell me your adress i will ship it with padded envelope to you to get support rolling as a donation for this awesome library!
moritz dot m AT gmx DOT de
Thanks for the offer and for Your support, I am happy to accept it. Mail has been sent ;)
Thanks for your generosity, now i was able to test the library with CH375. Sadly but i have to correct myself, the CH375 don't use the standard ( 1 start bit, 8 data bit , 1 stop bit ) serial configuration, it use 9 data bit instead. I was confused by the messy datasheet : :(
"The USB-DEVICE Mode of CH376 is totally compatible with CH372, the USB-HOST Mode of CH375 is basically compatible with CH375."
Probably they meant CH376 is basically compatible with CH375. Not really, maybe the commands but not the serial communication protocol , maybe the parallel. Grrrrr
The good news is that the ATmega328 and ATmega2560 support's 9 data bit mode, and the bad news is the Arduino HardwareSerial library doesn't. So I need to find a solution to stay with the simplicity of the Arduino and allow this way of communicating with the MCU.
Please add to readme what D1 Led on the module does default wise? Should it be lit after init with library? Does it blink?
Does it light up when initializind the module is done? while reading it does what?
Okay so i did wire it up like suggested in the readme for my Arduino Zero and Hardware Serial
(MCU) --(Module) (PIN0) -- (TXT) //alway cross TXD RXD (PIN1) -- (RXD) (D5) -- (GND)
Should give 115200 baudrate detached later for default baudrate. JUMPER left to Serial not Parallel
Test (1) Ch376msc flashDrive(Serial1, 115200); //Ground Wire from D5 to GND on MCU Board SerialUSB.begin(9600); Outcome: i do get the Serial output and can access the menue nothing more.. USB Stick is not recognized (4GB FAT32) ######## Test (2) Ch376msc flashDrive(Serial1, 9600); // NO WIRE ON D5 Module - GND MCU SerialUSB.begin(115200);
power off, usb stick attached Red LED D1 constant lit after powercycle? Still cant read or do anything :-/