Author Topic: How to find info on a (Chinese?) micro controller?  (Read 4240 times)

0 Members and 1 Guest are viewing this topic.

Offline rwgast_lowlevellogicdesinTopic starter

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: us
    • LowLevel-LogicDesign
How to find info on a (Chinese?) micro controller?
« on: March 09, 2017, 01:52:43 am »
I recently bought a piece of test gear from e-bay and there is no software or documentation for it. It is made in china most likely using the cheapest parts the manufacturer could source. It has an HDM340G USB serial/uart bridge, these are pretty common on clone arduinos and dev boards.The serial chip is connected to an STC 15L2k60S2  QFP44 micro controller which is suppose to set the registers and control an analog devices chip.

Searching the web left me empty handed all i got was AliExpress pages selling these chips which listed them as a "Logic Chip" for automotive media? At the moment I just want to know the pinout and the core type, it would be helpful to get a full on datasheet and directions on programming it but im not crossing my fingers. I never know what to do when I need to research and maybe re program these chips that arent even listed at All Datasheet.

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: How to find info on a (Chinese?) micro controller?
« Reply #1 on: March 09, 2017, 04:05:05 am »
http://www.stcmicro.com/datasheet/STC15F2K60S2-en.pdf
http://www.stcmicro.com/rjxz.html

the thing with Chinese domestic companies is they toe the party line of limiting availability to foreigners in order to maintain advantage.

basically its like STM32, but with 8051 core on steroids

Quote
STC15F2K60S2 is a single-chip microcontroller based on a high performance 1T architecture 80C51 CPU,which is produced by STC MCU Limited. With the enhanced kernel, STC15F2K60S2 series MCU is faster than a traditional 8051 in executing instructions ( about 8-12 times the rate of a traditional 8051 MCU), and has a fulling compatible instruction set with traditional 8051 series microcontroller. External expensive crystal can be removed by being integrated Internal high precision R/C clock which has +/- 1% temperature drift in temperature -40?~+85? while +/- 0.6% in normal temperature (-20?~+65?) and integrated internal highly reliable one with 8 levels optional threshold voltage of reset in system program.


Specifications

Enhanced 8051 Central Processing Unit, 1T, single clock per machine cycle, faster 8~ 12 times than the rate of a traditional 8051
Operating voltage range: STC 15F2K60S2 series: 5.5v~ 3.8v (5v MCU). STC 15L2K60S2 series: 3.6v~ 2.4v (3.3v MCU)
Operating frequency range: 0- 35MHz, is equivalent to standard 8051:0~420MHz
On-chip 8K/16K/24K/32K/40K/48K/56K/60K/61K FLASH program memory with flexible ISP/IAP capability, can be repeatedly erased more than 100 thousand times
Large capacity of on –chip 2048 bytes SRAM: 256 byte scratch –pad RAM and 1792 bytes of auxiliary RAM
Be capable of addressing up to 64k byte of external RAM
On –chip EEPROM with large capacity can be repeatedly erased more than 100 thousand times
Dual Date Pointer ( DPTR) to speed up data movement.
ISP/IAP, In System-Programming and In-Application-Programming, no need for programmer and emulator.
8 channels and 10 bit Analog- to Digital Conventer( ADC), the speed up to 300 thousand times per second, 3 channels PWM also can be used as 3 channels D/A Converter ( DAC).
Internal hghly reliable Reset with 8 levels optional threshold voltage of reset in system program, so that external reset circuit can be completely removed
Internal high-precise R/C clock with +/- 1% temperature drift (-40? ~+ 85?) while +/- 0.6% in normal temperature (-20? ~+ 65?) and wide frequency adjustable between 5MHz/11.0592MHz/22.1184MHz/33.1776MHz).
Operating frequency ranges: 5MHz~35MHz, is equivalent to traditional 8051: 60MHz~420MHz
wo high-speed asynchronous serial ports----UARTs (UART1/UART2 can be used simultaneously regarded as 5 serial ports by shifting among 5 groups of pins): UART1(RxD/P3.0, TxD/P3.1) can be switched to ( RxD_2/P3.6, TxD_2/P3.7), Also can be switched to (RxD_3/P1.6, TxD_3/P1.7) UART2(RxD2/P1.0, TxD2/P1.1) can be switched to ( RxD2_2/P4.6, TxD2_2/P4.7)
A high-speed synchronous serial peripheral interface----SPI.If/O ports is not enough, it can be extended by connecting a 74HC595( reference price: RMB0.21 yuan). Besides, cascading several chips also can extended to dozens of I/O ports
Code protection for flash memory access, excellent noise immunity, very low power consumption
Power management mode: Slow-Down mode, Idle mode( all interrupt can wake up Idle mode), Stop/Power-Down mode
Internal low-power special wake –up Timer which can wake up stop/power-down mode.
Resource which can be wake up stop/power-down mode are: INP0/P3.2, INT1/P3.3 (INT0/INT1, may be generated on both rising and falling edges), INT2/P3.6, INT3/P3.7, INT4/P3.0(INT2/ INT3/ INT4, only be generated on falling edge); pins CCP0/CCP1/CCP2; pins T0/T1/T2 ( their falling edge can wake up power-down mode if T0/T1/T2 interrupts have been enabled before power-down mode, but no interrupts can be generated); internal low-power special wake-up Timer.
Six Timers/Counters, three 16 bit reloadable Timer/ Counter (T0/T1/T2, T0 and T1 are compatible with Timer0/ Timer1 of traditional 8051), T0/T1/T2 all can independently achieve external programmable clock output (3 channels), 3 channels CCP/PWM/PCA also can be used as three timers.

Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline rwgast_lowlevellogicdesinTopic starter

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: us
    • LowLevel-LogicDesign
Re: How to find info on a (Chinese?) micro controller?
« Reply #2 on: March 09, 2017, 06:56:45 pm »
Wow thanks a bunch, I searched around and found STC datasheets for a lot of there chips but not the 15 series. Something told me it was probably an 8051 core.

How hard would it be to port firmware for a very similar device that uses an AtMega328(no Arduino layer). Im pretty familiar with AVR but I have never done anything with an 8051 core. Is it possible to dump the firmware off the STC chip? As a matter of fact I use a lot of cypress/arm stuff and need to use there USB FX line but have been putting it off due to its 8051 core. Im not sure what compilers, tools etc are needed.

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8642
  • Country: gb
Re: How to find info on a (Chinese?) micro controller?
« Reply #3 on: March 09, 2017, 07:12:30 pm »
the thing with Chinese domestic companies is they toe the party line of limiting availability to foreigners in order to maintain advantage.
Most Chinese silicon vendors would love to be more successful in export markets, but they struggle to create a global support network. When they can find a big opportunity in a particular location, and can justify setting up their own support arrangements, they go for it.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: How to find info on a (Chinese?) micro controller?
« Reply #4 on: March 11, 2017, 03:52:31 am »
The CH340G (you called it HDM340G, it is really WCH CH340G) is a USB to Serial adapter chip. Works just like FT232 or PL2303 but a lot cheaper.

STC15L2K60S2 is a 8051-compatible micro from STC. Depending on how the chip is wired, you may be able to get your own code into the MCU though. The ISP tool is free (as in beer.)

You can buy a pin compatible IAP15L2K61S2 or IAP15W4K61S4 and swap out that STC15L2K61S2. Those two, also produced by STC, supports in-circuit programming and on-chip debugging.
 

Offline rwgast_lowlevellogicdesinTopic starter

  • Frequent Contributor
  • **
  • Posts: 591
  • Country: us
    • LowLevel-LogicDesign
Re: How to find info on a (Chinese?) micro controller?
« Reply #5 on: March 11, 2017, 06:26:58 am »
I feel like an idiot asking this, especially since ive been an open source user and supporter since the late 90s, but I have never understood free as in beer? That means the tool is free but closed source?

Why would it depend on how the chip is wired? Its pin pitch is relatively big, big enough to solder jumpers on and lift others off the pads. I dont know much about these chips it sounds like you do, is there a bigger issue rewriting it?

I still have a major problem If I were to rewrite the chip or even replace it with a more friendly one, let me show a picture of the board


I am pretty sure those two chips in the back are digital RF attenuators wired in parallel. I can use the front panel controls to set the ADF chips frequency and set an attenuation level from -50db to 10db so a set of attenuators makes sense. I know the ADF chip has some internal way to set the power output(but I dont think it has 60db of dynamic range, it could....) so if thats how attenuation is controled then I have NO idea what those chips are!

So the problem is if I dump the existing firmware and start from scratch I better know what those mystery chips are and how to set there registers! The best way to figure that out is to be able to dump the firmware... even if I could do that I have no idea how to decipher all that hex to figure out what the hell those two chips do.

If your not going to supply fn software with your product at least leave chip labels in tact so other people can!



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf