Published:2011/8/1 22:54:00 Author:Li xiao na From:SeekIC
By Andreas Oyrer
Programming routines
The data received is decoded by the routine Decode Programmer Data Q in the file Prog.c. The first byte of the 64-byte report contains the code for the selected microcontroller, while the second gives the desired action. These values are used to call one of a number of different programming algorithms for different devices, as given in the microcontroller data sheets.
Each device series has its own power-up routine which applies power to the correct pins and sets the programming signals used to defined levels. Once an action has been successfully completed, the routine to reset the programmer is called, which sets all the signals on the programming socket back to 0 V. Since in general it is desired to program more than the 64 bytes contained in one report, the PC must send a further data packet to the programmer as soon as the previous one has been processed. The programmer sends a defined message to the software running on the PC to notify it that the next packet can be sent.
The PC then prepares the next report packet and sends it to the hardware. The last packet to the USB programmer contains a zero byte. When the device is read, data is also transferred in reports of 64 bytes each, where the first byte gives the number of valid bytes in the packet.
The above description of the programmer software can give only a broad overview of its operation. More detail can be found in the thoroughly-commented and clearly-structured software itself.
Construction and operation
Populating the printed circuit board would be child’s play were it not for the tiny TUSB3210 in an S-PFP-G64 package with many fine leads. Soldering such SMD ICs requires not just a steady hand but also nerves of steel and a good deal of confidence. After fixing the IC in place with a drop of glue, you must take the soldering iron and do what you would normally try to avoid at all costs: rather than soldering the ICs leads to their corresponding pads, solder all the leads together. This should be done as quickly as possible, so the device does not get too hot. When this big short-circuit and the IC have cooled down, lay some unused desoldering wick across the pins and use it (and not a solder pump!) to suck away the excess solder. Again, take care not to get the IC too hot. Finally, check with a magnifying glass under a good light, and using a multimeter, that all the pins are well soldered and no longer shorted to their neighbours. Once the TUSB3210 has been correctly soldered to the printed circuit board, the remaining construction is relatively straightforward. All the ICs (except for the tiny voltage regulator) are provided with sockets. Even the zero insertion force socket should be fitted in a socket rather than being directly soldered to the board.
When construction is complete and you have inspected the board, you can carry out the first test. If a ready-programmed EEPROM is available, no Windows driver will be required. If the programmer is now connected to the USB, it should appear in the Device Manager as an HID-compatible device. You are now ready to program your first microcontroller.
If no serial EEPROM is fitted, the firmware must be downloaded over the USB. The TUSB3210 boot loader registers itself, Windows recognizes the new device and will now need the Texas Instruments device driver. Select the directory with the file TUSB3210.inf and install the driver and then the file Aploader.sys from the same directory. Finally you will be asked for the directory containing the firmware: enter the path to the file TUSB3210.bin. This will automatically be copied into the directory /System32/drivers, along with the file Aploader.sys. If the programmer is now reconnected, the driver will send the firmware from the file /Sys-tem32/drivers/TUSB3210.bin; after a brief delay the code will start executing on the programmer. The programmer will now be re-enumerated as an HID device.
Reprinted Url Of This Article: http://www.seekic.com/blog/project_solutions/2011/08/01/Multi_Programmer__One_Size_Fits_All_(5).html
Print this Page | Comments | Reading(345)
Author:Ecco Reading(30193)
Author:Ecco Reading(3461)
Author:Ecco Reading(3181)
Author:Ecco Reading(3662)
Author:Ecco Reading(5231)
Author:Ecco Reading(3248)
Author:Ecco Reading(3390)
Author:Ecco Reading(3530)
Author:Ecco Reading(3935)
Author:Ecco Reading(3707)
Author:Ecco Reading(3677)
Author:Ecco Reading(3714)
Author:Ecco Reading(6028)
Author:Ecco Reading(3692)
Author:Ecco Reading(4478)