Author Topic: reprogramming the Genius G540 chip programmer  (Read 9508 times)

0 Members and 1 Guest are viewing this topic.

Offline jared6502Topic starter

  • Newbie
  • Posts: 1
reprogramming the Genius G540 chip programmer
« on: September 07, 2012, 11:31:59 pm »
I have one of these programmers, and can tell you that while the software is definitely lacking features, including ones mentioned as part of the sales pitch, I think it has a lot of potential to be one of the most useful programmers available for under $60 if the exact way it works can be determined, and if new software were written to take advantage of it.

From a quick look at the board, the entire programmer is controlled by a c8051f340 microcontroller, which is connected to the USB port. It controls a CPLD and several shift registers, open collector buffers, and discrete transistors to manipulate the pins of the socket. On a hunch, I decided to disassemble one of the *.stg files, specifically TestExe.stg, included with the programming software (which can be downloaded from the company's website : http://www.stg51.com/. It's in Chinese, so it might be hard to navigate) using a disassembler for the 8051, and it appears to contain some code used to test the functionality of the microcontroller. I'm not sure, but I'm assuming that all of the *.stg files are actually code for the microcontroller, and are uploaded to it through the USB interface when the selected device changes. As far as the software on the computer goes, all that is necessary to work with the programmer is to interface to the Silicon Labs USB driver included with the manufacturer's programming software.

If anyone has any more information they can provide on this programmer, or is willing to experiment on one they own, it would be very helpful. I don't have the programming adapter needed to connect to the microcontroller and reprogram it, and it's very likely that the flash is locked, preventing it from being read.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8366
Re: reprogramming the Genius G540 chip programmer
« Reply #1 on: September 08, 2012, 10:47:44 am »
8051s are Harvard architecture (separate code/data) and looking at the datasheet, this particular model doesn't have any special boot-from-USB functionality (unlike e.g. Cypress's PSoC series). However it does support ISP, so the software may contain a bootloader that reads code from USB and writes it to the flash, although this is a terrible way of doing it from flash endurance standpoint. If it does do that, then the flash must be unsecured, as otherwise the device would be unable to program itself afterwards through USB.

If I were you, the first thing I'd do is determine the schematic, so you can see which pins are controlled and how. Then attempt to read what's in the MCU; the datasheet says it's a 2-wire serial interface, so it may be possible to just bit-bang it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf