# What is a good way to in-circuit update the program on a SyncMOS 5964?

I want something that can re-program a PQFP SyncMOS SM5964 chip already soldered to the target circuit board. I picture a ribbon cable that I plug between some sort of 2x8 or so header connector soldered on the target circuit board, and a 2x8 or so header connector on a chip programmer, with the chip programmer plugging into a standard PC serial port or USB port.

• Is there a standard connector and pinout I should design onto the target board for in-circuit programming a completely blank SM5964 chip soldered to the board? (For older boards, I can temporarily connect such a connector with a bunch of wires from that connector to pins on the chip).
• Is there such a standard in-circuit programming connector for other 8051 and 8052 chips?
• Is there a reasonably-priced programmer that can program such a blank SM5964 chip already soldered to the target board?
• Is there a standard bootloader firmware for this chip?

So far, my web searches have turned up a few chip programmers such as the $295 XPRO-5000 that can program the SyncMOS SM5964 using a big ZIF socket and a PQFP adapter. I suppose I could solder some wires between a DIP socket and a female header, insert the DIP socket into the ZIF socket on such a programmer, and plug the female header into a in-circuit programming header on the target board. But it seems unnecessarily complicated. I expected to find answers to some of these questions at http://8052.com/ ; perhaps I am looking in the wrong place. ## 1 Answer I can't answer the 8051 specific questions, but I can help with your first problem. The standard method for doing this in industry (at least as far as I can tell) is to use pogo pins: (source: sparkfun.com) The gold part sticks through some protoboard or another PCB. You connect your programmer to this circuit. This piece of PCB (or something thicker and sturdier like masonite or acrylic if you're doing hundreds of boards) also has larger pins which go through holes in your target board, to precisely locate your target board above the pogo pins. Light down pressure on the board makes contact between the spring-loaded pogo pins and the test points on the target PCB. The company I work at uses this kind of pins to program every one of the millions of circuit boards they make every year, and every trace has a tiny test point which is probed by a tester through these pins. If you want a debug header, there are other standard methods. I'm totally unfamiliar with this chip, so I can't answer that for you. 8, 14, and 20 pin headers are common for other devices. EDIT: I took a quick look at the datasheet, and found on page 10: 3. In-System Programming (ISP) Function The SM5964 can generate flash control signal by internal hardware circuit. User utilize flash control register, flash address register and flash data register to perform the ISP function without removing the SM5964 from the system. The SM5964 provides internal flash control signals which can do flash program/chip erase/page erase/protect functions. User need to design and use any kind of interface which SM5964 can input data. User then utilize ISP service program to perform the flash program/chip erase/page erase/protect functions. 3.1 ISP Service Program The ISP service program is a user developed firmware program which resides in the ISP service program space. After user developed the ISP service program, user then determine the size of the ISP service program. User need to program the ISP service program in the SM5964 for the ISP purpose. The ISP service program were developed by user so that it should includes any features which relates to the flash memory programming function as well as communication protocol between SM5964 and host device which output data to the SM5964. For example, if user utilize UART interface to receive/transmit data between SM5964 and host device, the ISP service program should include baud rate, checksum or parity check or any error-checking mechanism to avoid data transmission error. The ISP service program can be initiated under SM5964 active or idle mode. It can not be initiated under power down mode. So, it looks like you can provide a bootloader program to read in the data from any interface you like. This can be some GPIO or the UART that you access with pogo pins, or go to an existing connector on the board. How do you get this program to run? 3.4 Initiate ISP Service Program To initiate the ISP service program is to load the program counter (PC) with start address of ISP service program and execute it. There are two ways to do so: (1) Blank reset. Hardware reset with first flash address blank ($0000=#FFH) will load the PC with start address of ISP service program.
(2) Execute jump instruction can load the start address of the ISP service program to PC.

However, I have no idea how you're supposed to get the ISP program on the blank chip. This page has a few programs and programmers, the MSM9042 looks closer to what you want for in-circuit (not socketed) programming.