Author Topic: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"  (Read 3448 times)

0 Members and 1 Guest are viewing this topic.

Offline Dass347Topic starter

  • Newbie
  • Posts: 3
  • Country: us
In my spare time trawling for weird Chinese microcontrollers on Aliexpress, I came across this thing claiming to be a "32-Bit 8051":
" alt="" class="bbc_img" />

So I thought "why not?" and ordered a few of them. Looking through the Internet, there's barely any information on them anywhere, and the datasheet is only in Chinese. However, it seems that they're a clone of Intel's MCS-251 microcontrollers from the 1990's, but with lower cycle counts for instructions, and better peripherals.

After I got them in the mail, I wrangled with them for about a week, going through translation shenanigans and wacky software. After working with them for a little bit, I'd have to say that they're very quirky, but also very capable as well once all the many, many, many kinks are worked through. Currently, I have it talking to a MAX7456, and everything is going smoothly. Obviously, these things aren't suitable for anything commercial, but as a hobbyist they might be an AVR killer for me.

I was wondering if anyone here has worked with these weird little things before, or had any thoughts on them.
« Last Edit: May 02, 2024, 11:35:42 pm by Dass347 »
 
The following users thanked this post: iMo, Dazed_N_Confused

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8331
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #1 on: May 03, 2024, 01:48:14 am »
STC have been making 8051s for a long time, so that's not surprising, but they also have an ARM-based series that starts with STC32F. There's also stuff like this from other companies: https://www.eevblog.com/forum/microcontrollers/whats-this-8051-clone/ Chinese MCU market is really weird.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1677
  • Country: au
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #2 on: May 03, 2024, 01:57:08 am »
AFAIK, the STC32 parts currently have only single tool chain support - needing Keil C251 to code.

I've been more tracking their sibling parts, the STC8H family, which use standard 8051 tools.

https://www.stcai.com/cp_stc8hxl

eg the STC8H8K64U part is their first with hard-coded USB, and comes down to SO16 in size.

It's a challenge keeping up with the details, as they seem to upgrade things with every sub-family spin.

Thus the newer STC8H2K8U (STC8H2K12U, STC8H2K17U) has better PWM than the parent STC8H8K64U, and the very new STC8H2K32U (STC8H2K24U,STC8H2K16U), has an improved 32b ALU block,

https://www.stcaimcu.com/forum.php?mod=viewthread&tid=5721

mentions  STC8H32K64U
« Last Edit: May 03, 2024, 02:12:00 am by PCB.Wiz »
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1677
  • Country: au
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #3 on: May 03, 2024, 03:21:13 am »
However, it seems that they're a clone of Intel's MCS-251 microcontrollers from the 1990's, but with lower cycle counts for instructions, and better peripherals.
Yes, the STC8H parts have moved the '1T' 8051 space.
Previously, most 8051 1T parts were 1 cycle per byte, makes sense as they historically fetch a byte at a time.   

The latest STC parts improved that with wider fetch, to have even 2 & 3-byte opcodes execute in 1T, it is only branch opcodes that need more than 1T, if taken.
 
Addit : this was Posted yesterday at 10:09 : STC8H2K32U -45I-LQFP32, has been put on the WeChat store for sale , just found it
https://www.stcaimcu.com/forum.php?mod=viewthread&tid=7762
STC8H2K32U -45MHz- LQFP32 , QFN32, TSSOP28/20   HW USB , true 12-bit ADC , RTC , 144MHz - PWM supports hardware phase shift
MDU32C , CRC16 , serial port reception timeout , hardware parity check

The MDU32C looks interesting, but for some strange reason, they have R4-7 = R4-7+R0-3, (3cy)  whereas the slight change to R0-3 = R0-3+R4-7 would have allowed a simple DDS loop ??


« Last Edit: May 03, 2024, 09:04:12 am by PCB.Wiz »
 

Offline Dass347Topic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #4 on: May 03, 2024, 11:28:28 am »
Quote
AFAIK, the STC32 parts currently have only single tool chain support - needing Keil C251 to code.

Yup, and Keil is terrible, too. The assembler and linker needed a bunch of weird prodding to actually produce .hex files mapped onto the expanded MCS-251 address space, otherwise anything outside of the traditional 64K of 8051 address space is thrown out without any warning or error. I imagine that Keil C251 was just developed out of Keil C51, hence the weird behavior.

Also, Keil C251 requires a roughly ~$3,000 license to make programs larger than 2 kilobytes. After some Baidu searches, it looked like what happened was that an illegal key generator was released in 2020, essentially unlocking the software, and then the development of the MCS-251 clones started.

Quote
Yes, the STC8H parts have moved the '1T' 8051 space.

The interesting thing about this is that although the STC32G parts are faster overall due to being 32-bits, some traditional 8051 instructions take longer on the STC32G than the 8-bit STC8H parts.

" alt="" class="bbc_img" />
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6083
  • Country: es
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #5 on: May 03, 2024, 01:11:44 pm »
No thanks, such a prehistoric architecture!
Poor docs, barely any compilers or toolchains...
Give me a much better documented and efficient arm or riscv mcu!
« Last Edit: May 03, 2024, 01:17:03 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: janoc

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 199
  • Country: ru
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #6 on: May 03, 2024, 05:19:20 pm »
an illegal key generator was released in 2020
I'm using it. It's working.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4896
  • Country: vc
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #7 on: May 04, 2024, 09:34:35 am »
Do the dev chains support double precision floating point (incl. printf)??
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3578
  • Country: ua
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #8 on: May 04, 2024, 04:48:18 pm »
I don't like 51 cores, this an ancient era architecture. I understand that they using it because it is more cheap for production than branded chips like STM32, but in my opinion this is a crap and should be avoided to use.
 
The following users thanked this post: janoc

Online coppice

  • Super Contributor
  • ***
  • Posts: 8938
  • Country: gb
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #9 on: May 04, 2024, 05:02:23 pm »
STC have been making 8051s for a long time, so that's not surprising, but they also have an ARM-based series that starts with STC32F. There's also stuff like this from other companies: https://www.eevblog.com/forum/microcontrollers/whats-this-8051-clone/ Chinese MCU market is really weird.
There's nothing weird about making 8051s in China. Its changing a little now, with the rise of ARM, RISC/V, and more complex applications, but China produced hundreds of thousands of people trained in programming 8051s in assembly language. If you wanted fresh grads be up and running quickly with your silicon then for a long time you put an 8051 core in it. If you tried to sell them a small MCU, having anything but an 8051 core used to count against you.

You get interesting dynamics in their market, based on design ins generally being for big volume production. For example some MCU needed only a $50 JTAG gadget for development, while a chip from NEC required a big $10k tool to talk to the chip. Which was the economic solution for the customer in China? Why, the NEC option, of course. They save $50, because the NEC tool is so darned expensive nobody is going to buy it, and NEC had to hand them out for free on long term (i.e. permanent) loan.
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1677
  • Country: au
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #10 on: May 05, 2024, 01:06:15 am »
I don't like 51 cores, this an ancient era architecture. I understand that they using it because it is more cheap for production than branded chips like STM32, but in my opinion this is a crap and should be avoided to use.
It's a silicon chip, 'crap' claims are subjective. If it does the job, and is easy to apply, why not use it ?

The 8051 is like the logic chip end of MCUs, and many are cheaper than logic chips.
You will also find it is rare to see a new 8051 that is not wide supply, as they have a very broad interface level deployment.

You could also claim 74xx logic is 'ancient era architecture', but they are still sold in shiploads.  8)
 

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3578
  • Country: ua
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #11 on: May 05, 2024, 05:32:16 am »
The 8051 is like the logic chip end of MCUs, and many are cheaper than logic chips.

Cheaper - yes.
Easier - no.

Modern 32-bit ARM with JTAG/SWD is much more easy and sweet in debugging and more easy to code.
 

Online coppice

  • Super Contributor
  • ***
  • Posts: 8938
  • Country: gb
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #12 on: May 05, 2024, 06:07:47 pm »
Modern 32-bit ARM with JTAG/SWD is much more easy and sweet in debugging and more easy to code.
That's true of an actual 8051, but most devices with an 8051 core in 2024 are just as easy to work with as an ARM. For the kinds of application most 8051 based devices go into the bit twiddling focussed instruction set of the 8051 suits the problem quite well, and people get productive writing assembly code for it quite quickly.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14893
  • Country: fr
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #13 on: May 05, 2024, 10:41:15 pm »
Out of curiosity, I took a look at the datasheet - only chinese though. Couldn't really find anything about the architecture, but I'm guessing they have just cloned the MCS-251.
In terms of peripherals, it seems to have pretty much what you'd expect in a modern MCU. More or less. It just has very little RAM.

Is cost really the factor here (how cheap can it be, when small RlSC-V 32-bit MCUs can be found for about 10 cents?) Maybe it's even cheaper though? But their existence is just due to the fact there is a market for MCS-251 replacements, which is... interesting.
 

Offline IOsetting

  • Regular Contributor
  • *
  • Posts: 60
  • Country: cn
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #14 on: May 06, 2024, 12:13:07 am »
Is cost really the factor here (how cheap can it be, when small RlSC-V 32-bit MCUs can be found for about 10 cents?) Maybe it's even cheaper though? But their existence is just due to the fact there is a market for MCS-251 replacements, which is... interesting.
Good question, no, they are not cheaper. 8-bit MCUs are losing their shares fast as more affordable RISC-V and Cortex-M0 chips are flooding the market after the pandemic.
IMHO, putting the bets on MCS-251 is a joke.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 199
  • Country: ru
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #15 on: May 06, 2024, 12:57:53 am »
Most popular chip for Hi-Speed USB is FX2LP. 8051 is inside of it. Any programmer was forced to use it, prefer or not. As a result, 8051 is well-known and easy to program. Example:
https://www.eevblog.com/forum/programming/atmel-maxtouch-bridge/
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14893
  • Country: fr
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #16 on: May 06, 2024, 06:59:12 am »
Most popular chip for Hi-Speed USB is FX2LP. 8051 is inside of it. Any programmer was forced to use it, prefer or not. As a result, 8051 is well-known and easy to program. Example:
https://www.eevblog.com/forum/programming/atmel-maxtouch-bridge/

Yes, I've used the FX1 and FX2 in the past, which were handy and low-cost when nothing of the sort was really available anyway. FTDI started to gain traction, but the FX1 was more flexible than their FT245 and FTDI didn't come up with a USB HS (that the FX2 supports) until pretty late (around 2007-2008 IIRC) with the FT2232H. So, we didn't have tons of choice.

I used SDCC for the C compiler, which gave us better results than Keil at the time.

The reason the 8051 core was relatively popular in early 2000's is that it went into public domain if I'm not mistaken, so vendors didn't have to spend a dime on licenses.
This is probably one reason there are still such chinese MCUs. Obviously now with RISC-V, most chinese vendors seem to turn to RISC-V rather than obsolete ISAs.
 

Online coppice

  • Super Contributor
  • ***
  • Posts: 8938
  • Country: gb
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #17 on: May 06, 2024, 03:57:31 pm »
Most popular chip for Hi-Speed USB is FX2LP. 8051 is inside of it. Any programmer was forced to use it, prefer or not. As a result, 8051 is well-known and easy to program. Example:
https://www.eevblog.com/forum/programming/atmel-maxtouch-bridge/
The 8051 core was a huge hit with most USB chip makers in the days before USB3. Most of the USB chips sold as essentially fixed function have an 8051 core in them.
« Last Edit: May 06, 2024, 05:37:08 pm by coppice »
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 199
  • Country: ru
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #18 on: May 06, 2024, 05:36:02 pm »
FX1 was more flexible than their FT245 ........ FT2232H.
FX2LP is more flexible than FT2232H. Good driver on PC-side. I will try to use his driver for CH32V307.
 

Offline Dass347Topic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #19 on: May 10, 2024, 01:56:33 am »
this is a crap and should be avoided to use.

It sure is, but it's interesting crap.

Here's a copy of the STC32G datasheet I ran through Google Translate.
There's some graphical issues with it, so it helps to look at it alongside the original Chinese datasheet.
While STC has published newer versions since, I've been too lazy to dice up a copy of the Chinese datasheet and run it through Google Translate a second time. I don't think the revisions have been major, but I'm not 100% sure.

The STC32G April 1st datasheet in Chinese:
https://drive.proton.me/urls/2Q7AR1TEN8#NRsdsx7shtIq

The Google Translate English version of it:
https://drive.proton.me/urls/FJP87GB9ZR#8WTHykn75WHk

I also want to note that I tried DeepL as well, but it had a nasty habit of randomly inserting extra blank pages, breaking the page number equivalency with the Chinese datasheet.
 

Offline Plan9

  • Newbie
  • Posts: 1
  • Country: us
Re: It Came from Mainland China: Bootleg MCS-251 "32-Bit 8051"
« Reply #20 on: June 03, 2024, 05:23:21 am »
Hey folks,

I've been digging into the so-called "32-bit 8051" and wanted to share my findings with y'all. Turns out, this ain't some brand new, wacky product like many people think. Way back in 2010, Evatronix was already selling "32-bit 8051" IP (depending on whether you consider a 32-bit ALU = 32-bit processor, which many don't, AFAIK). Some Chinese posts from around 2014 suggest that STC might've used 8051 IP from either Evatronix or CAST (Evatronix sold enhanced 8051 and "32-bit 80251" IP, while CAST actually sold Evatronix's IP - you can see this in CAST's press releases): R8051XC / R80251XC.

Now, IP vendors gotta keep customer info strictly confidential, or else they'd go belly up. Well, Evatronix actually did go under in 2013, selling themselves to Cadence (due to low profits, not data leaks, of course). Unfortunately, this caused some issues, with all the IP core datasheets getting deleted (they should really be called Product Briefs, since they don't have a ton of details). But, lucky for us, we've got Archive.org to the rescue! Some of the info has been recovered. If anyone's curious about the enhanced 32-bit 80251, you can check it out, including the Evatronix's 80251 IP datasheet and Design Specification.

Interestingly, this IP core does have similar DhryStone performance to the STC32 (Evatronix's manual claims up to 0.39 DMIPS/Mhz, while Chinese engineers measured the STC32 at 0.38DMIPS/Mhz). Other similar publicly sold 80251 IP cores, like the CAST S80251XC3 at 0.655 and DQ80251 at 0.70759, have a pretty big gap compared to this data. It's definitely intriguing that STC shows such close DhryStone performance.


Let me know what you guys think!


Evatronix R80251XC Datasheet, From archive.org :
https://web.archive.org/web/20111029064753/http://evatronix-ip.com/32-bit-8051/category/1-pierwsza-kategoria

Evatronix R80251XC Design Specification, From archive.org :
https://archive.org/details/r80251xc-design-specification/

Dhrystone performance test of STC32G12K128, From Whycan Forum:
https://whycan-com.translate.goog/t_7945.html?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf