DeqingSun / ch55xduino

An Arduino-like programming API for the CH55X
GNU Lesser General Public License v2.1
433 stars 85 forks source link

Any USB Host Example #57

Closed DevDavisNunez closed 2 years ago

DevDavisNunez commented 2 years ago

Hello, I had heard that this IC is compatible with USB Host, I am interested in carrying a custom USB protocol that basically only reads and writes some values to a device, can it be done with this IC?

DeqingSun commented 2 years ago

Yes it is possible. Here is my code to read data from a WS1361 sound meter and forward the data to serial on CH549. CH549Host.zip This code is not well organized to be an example but it does the job. Please refer to the WCH official examples to figure out details about how it works.

From my experience, using an external crystal is necessary for USB host applications.

DevDavisNunez commented 2 years ago

Should it work with the CH559 ?, I found a very nice evaluation card, I hope it works, as soon as I get to test.

DeqingSun commented 2 years ago

It should work. But you may need to check if there is any register difference.