First, let’s put up the official CH559L description for a brief understanding.
The CH559L chip is an enhanced E8051 core microcontroller compatible with the MCS51 instruction set. 79% of its instructions are single-byte single-cycle instructions, and the average instruction speed is 8 to 15 times faster than the standard MCS51.
CH559L supports the highest system frequency of 56MHz, built-in 64K program memory Flash-ROM and 256 bytes of internal iRAM and 6K bytes of on-chip xRAM. Some xRAM supports DMA direct memory access.
CH559L has built-in ADC analog-to-digital conversion, 4 sets of timers and PWM, dual asynchronous serial ports, dual SPI and other functional modules, as well as a built-in dual-port Root-HUB, supporting USB-Host host mode and USB-Device device mode.
The above is the introduction of CH559L in the official document. You can download and view the details by yourself.
Latest document download link: http://www.wch.cn/downloads/file/212.html?time=2020-10-02%2009:32:26&code=9cfmsSUjcREzeMl5wtmFxnGCdxmbJDoCgz7XCiHf
Note: CH559 has 2 packages, only CH559L can support 2 USB-HUBs at the same time, and CH559T only supports one.
CH559L can be downloaded directly via USB. I did not draw the TTL to serial port in the schematic diagram, but USB downloading requires powering on again every time. I have not found a solution. If you know anything, you can leave a message in the comment area. The serial port can be downloaded without re-powering on, and debugging is more convenient.
I use this video to upload controller data. You can plug in mouse, keyboard, USB flash drive and other HID devices here. You need to change the program a little. I left the ESP8266 and Bluetooth serial ports for uploading data. It depends on what you think. What is used, and the board can directly remove the unimportant LEDs, so that a very small board can be prototyped and used.
If you want to retain the level conversion circuit of WS2812, you can use a 1N4148 plus a 4.7K pull-up resistor for level conversion. I have also tried it. You can directly replace the TXB0102 in the schematic diagram. For the specific connection method, click the link: https:/ /www.jianshu.com/p/4fc9bcfd9c4c
GitHub link: https://github.com/w-strive/CH559--USB-HUB-
There is also code available for download in the attachment.
Regarding ESP8266 compiling firmware or nodemcu compiling firmware by itself, you can watch the video of my B station (https://space.bilibili.com/124402993)
B station link: https://www.bilibili.com/video/BV1Ap4y1Y7MC/
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet