Using arduino as a i2c programmer.

So i have this board for converting CGA signals to VGA, but the problem is it doesn't work because of bad firmware.

I have 1 working board, and about 100 non working ones. (I'm not joking here.) I contact the people who sold them to me, and ask for assistance, they basically tell me no, or "Oh, We sell you bad board? Send back, we give you new one!"

I'm getting at my whits end. I have the data sheets, the firmware, ext. But I cant read or rip the data from the chips.

I can wire it up write the sketches, EXT, but there I2C protocol does not follow the arduino standards.

I asked on the SA reverse enganerring forum, and they say i have everythign i need. But the arduino wont seem to coperate. Nor can i find the addresses its asking for.

Iv tried using my minipro tl866 to program it, no dice.

It seems like someone has tried to do this before, but that was about 2 years ago and the thread has since died.

So I'm hoping my arduino can help me. But if I do a i2c scan for addresses, nothing shows up.

Ask me for anything you need. I'm good at programming, but this is going a bit beyond my scope. And from what I can tell, there is ALOT of people who want a sketch that can do this.

TLDR; Help ;-;

What chip are you trying to read/write?


Unfortunately the datasheet doesn't cover reading or writing the FLASH memory on that chip. I assume the programming interface is covered in a separate document. You will have to track down that document.

Is the chip in a socket so it can be removed for programming?

If you can't find the documentation you could buy a commercial programmer that works with the Myson devices:

If the results you get are glitchy, not consistently bad, you may be having problems with some of the peripheral circuits like bypass and coupling capacitors. While looking for a solution for you I came across several mentions of replacing cheap capacitors with better ones to eliminate some glitches.

Yes, it can be removed.

I have a minipro tl866 for programing,but i can look into obtaining that one.

Dosent the documentation on page 16 talk about programming the device?

Ah, I missed that. It looks like the I2C ISP programming interface is enabled by the existing firmware:

After power on/Reset, The MTV230M is running the original Program Code. Once the S/W detects an ISP request (by key or IIC), S/W can accept the request following the steps below:
1. Clear watchdog to prevent reset during ISP period.
 2. Disable all interrupt to prevent CPU wake-up.
 3. Write IIC address of ISP slave to ISPSLV for communication. 4. Write 93h to ISP enable register (ISPEN) to enable ISP.
 5. Enter 8051 idle mode.

It sounds like you have to figure out how the existing firmware can be told to enable I2C ISP mode. If you have a copy of the firmware you may need to reverse-engineer it to figure out how that triggering works. I'd look for 0x93 in the binary and see if that value is being loaded into the ISPEN register. Then go back though the code to see how that bit of the code gets executed. The 8051 is a very old chip (1980's vintage) so there should be plenty of 8051 disassemblers available.