0
\$\begingroup\$

I have this 8051: TP2808 photo I have acquired an it from an old device and I want to program it. I have experience with AVR, ESP, and STM microcontrollers, but not with 8051's. Googling info about this DIP IC, I've found out that it's an 8-bit 6051 MCU: https://ksp-electronics.com/media/1/1129364/tp2808.pdf?v=1607152781. After some research, I found out that I can program it via Arduino as ISP, but I have been unsuccessful so far. I have much experience with AVR, ESP and STM, but 8051's... Seeking information on how to flash such MCUs yielded that i can actually program it via Arduino as ISP. But no success for me on this one.

I have attempted to flash it with the following code:

#include <8051.h>

void delay() {
  unsigned int i, j;
  for (i = 0; i < 0xFF; i++) {
    for (j = 0; j < 0xFF; j++);
  }
}

void main() {
  while (1) {
      P1_0 = 1;   // turn LED on
      delay();
      P1_0 = 0;   // turn LED off
      delay();
  }
}

I ran this:

sdcc blink.c
packihx blink.ihx > blink.hex
# AVR8051.conf from here: https://www.instructables.com/How-to-Program-8051-Using-Arduino/
avrdude -c stk500v1 -P /dev/ttyUSB0 -p 89s51 -U flash:w:"blink.hex":a -C ~/Downloads/AVR8051.conf -F -v

And the flashing process was unsuccessful, avrdude logs can be found here: https://pastebin.com/y8VkmCMQ. Also the voltage across P1.0 and ground varied. At first it was able to light an LED with 150Ohm resistor, then it dropped down to ~1.5V and my LED was extremely dim.

I understand that AT89S51 is a different chip, but it is still based on 8051 architecture, so I figured it might be worth a try. Any suggestions on how to properly program this MCU. would be greatly appreciated.

\$\endgroup\$
4
  • \$\begingroup\$ I strongly recommend looking at other chips, there are more modern 8051 implementations that include proper programming and debugging support. \$\endgroup\$
    – Turbo J
    Commented Mar 5, 2023 at 10:47
  • \$\begingroup\$ You should read the datasheet section "Security" and "Lock Bit". If the lock bit is enabled all access to the code is disabled. Another security feature is a 4 bit ISP address. There is mention of an "erases-all" operation that will clear the security register bits but there doesn't seem to be any other information about it in the rest of the datasheet. There may be an additional programming guide/application sheet that describes the programming and erasing in more detail. \$\endgroup\$
    – Nedd
    Commented Mar 5, 2023 at 12:09
  • \$\begingroup\$ Even if the chip is unable to have the internal code rewritten you may still be able utilize the chip with an external memory system by changing the status of the EA pin. \$\endgroup\$
    – Nedd
    Commented Mar 5, 2023 at 12:52
  • \$\begingroup\$ there is no reason why the avrdude logs should be in pastebin ... please copy and paste the log into the question directly ... format as code \$\endgroup\$
    – jsotola
    Commented Mar 5, 2023 at 18:59

2 Answers 2

1
\$\begingroup\$

Only Atmel's 8051 clones like the AT89S51 can be programmed with Atmel's ISP protocol.

Other manufacturers use whatever methods they happen to use, but not Atmel's ISP.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you for your answer. I would appreciate either any information on how to program this specific MCU or where to seek. I couldn't find anything at all. \$\endgroup\$
    – Kira
    Commented Mar 5, 2023 at 9:55
  • \$\begingroup\$ Googling for programmers that can program that chip gives results. But no programming protocol. They may only exist in some oriental language or you get the instructions by request, so not freely available. \$\endgroup\$
    – Justme
    Commented Mar 5, 2023 at 10:01
1
\$\begingroup\$

You can find what looks like some information in this 23-page datasheet.

This (fabless) Hsinchu, Taiwan based company appears to be defunct. The last valid snapshot from the internet archive is from 2014, almost a decade ago. There's apparently a 1.2 version of the datasheet if you can find it.

I suggest it might be better to spend your time on something with available datasheets unless you're stuck with a metric boatload of these things.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.