STC 12C5A16AD programming with arduino

Hi got a flasher, I removed the case to see what's inside. It has an black&white lcd display, it is driven by tm1621 and there's a mcu chip named STC 12C5A16AD, which is controlling things. also the PCB has 6 points, named ISP. Is it possible to use arduino to program this chip? without buying any other programmer. Datasheet

I just want to reprogram the mcu to use the LCD for my own purposes, If I can't use arduino to program, what should I use?

in page 383 it being programmed by using an another chip, I guess I can use arduino TX/RX for programming this chip also?

All STC chips are 8051 core derivatives, they cannot be programmed using Arduino IDE. You can compile C based programs for the device with SDCC (public domain) and download with a serial device, these days that means a USB to serial converter plus a switch and some diodes which is well documented in the STC literature. Yes, you could use an Arduino for its USB to serial converter but that's more expensive and harder to use than say a FT232 or CH340 breakout board.

All STC chips have a pre-installed, non-erasable bootloader and STC publishes their own downloader software STC-ISP, it's free but it's a Windows only program. There is also a public domain program called STCGAL which allows you to download programs using Linux or OSX.

If you don't know the 8051, start here:

You will not be able to use the IDE for STC parts but you can learn the 8051 basics with it and develop and test subroutines with the simulator.

I've worked extensively with the STC chips and while they are decent, reliable and cheap, there is zero library support compared to Arduino. STC provides demo code for using the timers, serial, PWM and ADC subsections, it's up to you to make what you need which means you will be writing almost everything you need, from scratch.

If you're fluent in Mandarin Chinese, there is considerably more support and code sharing since the product is sponsored by the Chinese government. Outside of the domestic Chinese market there is zero, zip, nada support.

There are tons of STC "development boards" on Aliexpress. Find one with the same series part you have (12C) and start there. You'll need a logic analyzer to figure out what display driver you have. Realistically, you need at least one more original "flasher" board for testing and experimentation. I guarantee you the journey will be long. If you're someone who gives up easily, don't start.

avr_fred:
All STC chips are 8051 core derivatives, they cannot be programmed using Arduino IDE. You can compile C based programs for the device with SDCC (public domain) and download with a serial device, these days that means a USB to serial converter plus a switch and some diodes which is well documented in the STC literature. Yes, you could use an Arduino for its USB to serial converter but that's more expensive and harder to use than say a FT232 or CH340 breakout board.

All STC chips have a pre-installed, non-erasable bootloader and STC publishes their own downloader software STC-ISP, it's free but it's a Windows only program. There is also a public domain program called STCGAL which allows you to download programs using Linux or OSX.

If you don't know the 8051, start here:

MCU 8051 IDE - Wikipedia

You will not be able to use the IDE for STC parts but you can learn the 8051 basics with it and develop and test subroutines with the simulator.

I've worked extensively with the STC chips and while they are decent, reliable and cheap, there is zero library support compared to Arduino. STC provides demo code for using the timers, serial, PWM and ADC subsections, it's up to you to make what you need which means you will be writing almost everything you need, from scratch.

If you're fluent in Mandarin Chinese, there is considerably more support and code sharing since the product is sponsored by the Chinese government. Outside of the domestic Chinese market there is zero, zip, nada support.

There are tons of STC "development boards" on Aliexpress. Find one with the same series part you have (12C) and start there. You'll need a logic analyzer to figure out what display driver you have. Realistically, you need at least one more original "flasher" board for testing and experimentation. I guarantee you the journey will be long. If you're someone who gives up easily, don't start.

thanks for all the trouble you went typing this. unfortunately I don't know chinese. As my first step I will buy a programmer, ofc I knew that I will be alone in this case and have to code it from the scratch.

can I use this one to program the chip? programmmer

Here's an "english" datasheet for a similar chip: www.stcmcu.com/datasheet/stc/stc-ad-pdf/stc12c5a60s2-english.pdf

can I use this one to program the chip? programmmer

that's a USB/Serial adapter, rather than a device programmer. OTOH, the way I read the datasheet I linked, that PROBABLY is sufficient. (That also means that any other USB/Serial adapter should work, including the one on an Arduino.)

There are English datasheets for all of the STC processors of which there are 10,11,12 and 15 series parts, IIRC. They have had two websites in the past, sometimes it can be a challenge to find what you're looking for.

Another starting resource is Github. There are many DIY digital led clocks sold with STC 15 series chipsets and there is replacement code for them on Github. Search there for STC DIY CLOCK and you'll find instructions for how to compile and download.

Downloading a program is similar to the Arduino process with several exceptions. Rather than issuing a reset to enter the bootloader code, you toggle VCC. Upon wake up, the processor waits for a certain time for a serial character to appear on a predefined com port. If it does, the bootloader process is invoked, otherwise it jumps to the user program. The other difference is that isolation diodes are required in the rx and tx lines of the serial adapter to prevent parasitic powering of the processor which would prevent the power cycle required to enter the bootloader. This requirement is well documented in the datasheets as previously mentioned.

The cp2102 serial adapter shown is suitable for download use but you'll want to keep the rx/tx/gnd wires short since they are 5v levels with cmos current. I have found adapter boards with cable jacks to be easier to deal with so I can use standard cables rather than the extension cable that would be required for the plug on the front of the cp2102 board.