8051 MCU help needed

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Sorry if this is a little long winded...

I bought a small laser engraver to give to my daughter for Christmas. When it arrived from HK I had it up and running in a matter of minutes without any trouble... and then I broke it. :/

It came with a microSD card that had a firmware update on it. Unfortunately the program is in Chinese (just gibberish displayed on my screen) and no instructions were provided. The only part of the program in English was a button labeled "ReLoad". I figured OK, let's reload. Bad choice.

After learning a little more about the MCU used and downloading the full programming software from the manufacturer, I learned that "ReLoad" puts the MCU in a programming loop (what purpose does this serve?). Since it just kept looping over and over I eventually stopped it. Well I guess it stopped in the middle of programming and now the MCU is unresponsive.

So two questions for anyone around here with microcontroller experience...

1) Is there anything I can do to revive this MCU?
2) If I swap in a new one will I be able to reprogram it on the board?

The MCU in question is a IAP15F2K61S2 made by STC. Doesn't seem to be a popular MCU on this side of the globe. I can't find a single source for them in the US so I had to order a few from Aliexpress.

The controller board has a CH340 USB to serial IC for communication.

Here is a link to the datasheet...

http://www.stcmcu.com/datasheet/stc/STC-AD-PDF/STC15-English.pdf

And the manufacturers website...

STC: 8051µ¥Æ¬»úÈ«ÇòµÚһƷÅÆ, È«Çò×î´óµÄ8051µ¥Æ¬»úÉè¼Æ¹«Ë¾

Any help here is greatly appreciated.
 
I had never heard of STCmicro.

1) Is there anything I can do to revive this MCU?
Am I correct in thinking that MCU program has been corrupted?

2) If I swap in a new one will I be able to reprogram it on the board?
Is the first MCU broken or is it just a corrupt program? Section 16.3 of the data sheet implies that the part has a Boot ROM and appears to show that it can be programmed via the UART.

Did the MicroSD Card plug into the laser engraver board or the PC?
 
Am I correct in thinking that MCU program has been corrupted?

Not sure if you mean the flashing program or the memory of the MCU itself. The program used for flashing is fine, the MCU itself was corrupted from stopping the program during flashing.

The main STC program can output a stand alone .exe flasher that includes the hex/bin file built in. That's what was sent on the SD card.

The pic in the link below shows the STC program in the background and the stand alone flasher in the foreground...

http://i63.tinypic.com/kf5a2x.png

Is the first MCU broken or is it just a corrupt program? Section 16.3 of the data sheet implies that the part has a Boot ROM and appears to show that it can be programmed via the UART.

I assume it's just corrupted, unless they can be destroyed by an interrupted flash. Unfortunately the board has a USB to serial IC (CH340) and not UART. I don't have a USB to UART adapter.

Pic of the board...

http://i66.tinypic.com/1zxl6z6.jpg
 
Not sure if you mean the flashing program or the memory of the MCU itself. The program used for flashing is fine, the MCU itself was corrupted from stopping the program during flashing.

The main STC program can output a stand alone .exe flasher that includes the hex/bin file built in. That's what was sent on the SD card.

The pic in the link below shows the STC program in the background and the stand alone flasher in the foreground...

http://i63.tinypic.com/kf5a2x.png

I assume it's just corrupted, unless they can be destroyed by an interrupted flash. Unfortunately the board has a USB to serial IC (CH340) and not UART. I don't have a USB to UART adapter.

Pic of the board...

http://i66.tinypic.com/1zxl6z6.jpg

I meant the Program Memory (Flash) in the MCU shown in the data sheet block diagram. OK so the Program Memory (Flash) is corrupted.

Isn't the serial communication interface the UART?
Can you get the serial IC (CH430) to be recognised by the PC?
 
Isn't the serial communication interface the UART?
Can you get the serial IC (CH430) to be recognised by the PC?

Yes, it's recognized fine.

I don't have any experience with this stuff, so I guess I was assuming serial meant RS232. Learning as I go along here.

CH340G datasheet...

http://cdn2.boxtec.ch/pub/diverse/ch340g-datasheet.pdf

Only the TXD/RXD pins are connected between the CH340G and MCU.
 
Last edited:
The UART that used to be available on PCs is a serial interface.
I think that the CH340G serial interface is the UART.

If the virtual COM port (Serial/UART/RS232 over USB) is working and the STC program or stand alone flasher are working then I don't have many ideas left?

How is the MCU put into In-System-Programming mode on the PCB? I can't see a link or similar on the PCB. The MCU data sheet implies in section 16.3.1 that P3.2 and P3.3 pin must be connected to GND. Which is sensed by the MCU at power up and then runs ISP mode. But I presume that you have already done what was required to put it into programming mode when the MCU Flash Memory was corrupted.
 
How is the MCU put into In-System-Programming mode on the PCB? I can't see a link or similar on the PCB. The MCU data sheet implies in section 16.3.1 that P3.2 and P3.3 pin must be connected to GND. Which is sensed by the MCU at power up and then runs ISP mode. But I presume that you have already done what was required to put it into programming mode when the MCU Flash Memory was corrupted.

Like I said, only TXD/RXD are connected, so I don't know how it works. The flashing process was going fine though, it just kept looping. It was at something like 44 writes when I finally stopped it. I guess it's some kind of batch mode.

Maybe I can try grounding those pins?

I don't know why it's so difficult for these Chinese sellers to provide some basic instructions. :rolleyes:

Thanks for trying to help though.

EDIT: If you look at the picture of the board I posted, Pins 3.2 and 3.3 go to those two empty header/switch locations marked + and -.
 
Last edited:
Ok, got the new MCU today and installed it. Curiously it acts the exact same way. Both the status LEDs light and it's completely unresponsive.

I think the MCU needs to be pre-configured for all the correct I/O functions in a proper programmer first. Oh well; the damage is done at this point. Guess I'll just have to order another complete unit. Maybe I'll get an arduino based grbl controller so I can reuse the rest of the parts.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.