CHUSBIE552

Tuesday 28 April 2020

The CH552 MCU

There is a collection of super low cost very capable MCU's on the market but I find myself fascinated with a manufacturer based In china called Jiangsu Heng Qin Ltd. (WCH)

WCH offers a range of hardware including the CH340 USB to UART converter IC the CH438 which is a parallel interface to 8 UART ports and an extensive range of 8 and 32 bit MCU's.



The one I want to look at currently is the CH552 MCU this chip is an 8 bit MCU based on the 8051 instruction set with an E8051 core but the most interesting point is that it has an extensive peripheral set including a USB controller.



These are the onboard peripherals
  • Built-in 16KB Code Flash, 1KB XRAM, 256B iRAM, 128B DataFlash, support byte read and write;
  • Built-in BootLoader, support USB and UART ISP, provide ISP download library;
  • Built-in USB controller and USB transceiver, support USB-Device mode, support USB type-C master and slave detection, support USB 2.0 full speed 12Mbps or low speed 1.5Mbps. Support up to 64 bytes of data packets, built-in FIFO, support DMA;
  • 3 timer / counter, support 2-channel capture and 2 PWM;
  • Provide two full-duplex UART, all support high baud rate communication, UART0 is a standard MCS51 serial port;
  • Provides SPI communication interface, built-in FIFO, support Master / Slave mode;
  • Provides 4-channel 8-bit A / D converters;
  • Supports 6-channel capacitance detection;
  • Supports four reset signal sources, built-in power-on reset, support software and watchdog time-out reset, selectable pin external reset;
  • Built-in 24MHz clock source and PLL;
  • Built-in unique ID number;
  • Package: TSSOP-20, SOP-16, MSOP-10.
There is one downside to how the CH552 operates the 'Code Flash' as they call it is only writable about 200 times. This section of the flash is read only once your program is uploaded. To account for this there is a section of the flash memory called 'Data Flash' this is able to be written over 1 million times which makes it great for storing variables that you wish to keep after the power goes off.



There are many other little surprises as you dig into this component once you start looking into the clock selection register you find out that this little MCU is quite capable of running up to 32Mhz from the internal oscillator.
The device also has a built-in USB and UART bootloader which can be accessed by pulling P3.6 of P1.5 High when the device resets (depending on your configuration).

This chip comes in a variety of packages with different numbers of pins exposed. These include a SOIC16 package the CH552G, a  tiny MSOP10 package the CH552E, and a TSSOP20 package which has all the available IO and functions exposed the CH552T.

  

Software


There is a header file and examples available from WCH which help to get started including examples of how the USB device works. I would like to in time make this far more user friendly and much more generic.
There are a couple of software stacks fro the device:
https://github.com/HonghongLu/CH554 (for C51 in keil)
https://github.com/Blinkinlabs/ch554_sdcc (for SDCC )

As well as the Official ISP tool there is also an open source programming tool:
https://github.com/rgwan/librech551

The Store

I personally have a lot of love for this little USB hero and want to give it the exposure and credit it deserves. So to that fact, I have decided to stock it on my Tindie Store Rabid's Electronics Emporium.

I also have a Development board range on the horizon called CHUSBIE the I hope that you all grow to like this chip range as much as I do and I will do my best to make it available in many forms and a reasonable cost.
The overlaid packages look a little odd this is so the same PCB can be used for either the CH552T or G. I will keep you up to date on how that goes.

Monday 20 April 2020

Restarting the YouTube channel

It's been a while and I have decided that it was time to restart the YouTube channel.

I decided a few months ago it was time to start again to try and make some content more in reflection of how my life is now, this is because a lot of the content was well over 5 years old and in some cases much older.

I want to try and make this channel great and informative from the beginning and with help from my beautiful supportive wife 💗 I believe this is possible.

Onto the first video (don't get too excited it is just a channel update) 😊 but I have spent some time on the title sequence and eventually should have an ending sequence.The music by the way is free for non commercial use from fesliyanstudios so a big special thanks to them for providing that free for use as I believe it really works for my content.




I have several open projects that I started this year and I'm hoping to keep you in the loop and up to date on.

SimpleJTAG (low cost JTAG programmer)
Basic-MC6800 (Retro computer board)
Rabid's Electronics Emporium (My Tindie Store)
GOWIN GN1SE board
CH552 Dev board ( Yet to come up with a good name )

My filming schedule:
I am hoping that I can release two videos a month or a video every two weeks.

Let me know what you think either down below, twitter or Hackaday.io 

Ta Ta For Now