ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

MAKE THE SMARTPIC SERIAL PROGRAMMER


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

MAKE THE SMARTPIC SERIAL PROGRAMMER

Lessons from the Trenches by Duane Perkins

Start ý Commands and Response Codes ý The Electronics ý Construction ý Housing the Programmer ý Sources and PDF

CONSTRUCTION

Additional board layout figures can be downloaded. After etching and drilling the main board (a #60 drill bit is a good choice), solder in all the jumpers shown as solid lines on the parts placement diagram. Use bare tinned copper wire, being sure to stretch each one tight and straight to assure that adjacent jumpers cannot touch. Solder in all remaining components, starting with the smallest (D10-D20) and proceed with resistors and the remaining diodes. Continue with the remaining components by size, leaving the largest for last. Use sockets for U1, U2, and U3.

If you plan to use an enclosure, use a 10-pin header (J3) in place of the 40-pin target socket and solder in jumpers where shown by the dashed lines. For testing purposes, the 18-pin target socket should be soldered in. C19 and C20 are mounted on the solder side and directly to the pins of the target sockets. Solder over unused holes that might otherwise result in a break in the trace.

Be sure all solder joints are good and that there are no solder bridges (solder joints are not always as good as they look). Cleaning off the rosin after soldering is a nice touch and aids visual inspection. Acetone works well, but donýt immerse the board.

TESTING

When making the following tests, remove power before changing the test setup. With no ICs in the sockets, apply 12.6 VAC or 18 VDC to J1. Test for 17 V across C1, 13.8 V at pin 8 of U3, 5.8 V at pin 3 of U3, and 5 V at pins 4 and 14 of U1, pin 16 of U2, and pin 5 of U3. You should find about 0.5 V at pin 14 of the 18-pin target socket and pins 11 and 32 of the 40-pin target socket. Pin 4 of the 18-pin target socket and pins 12 and 31 of the 40-pin target socket should be at ground potential (not floating).

Place jumper wires between pins 5 and 17, and between pins 14 and 18 of the U1 socket. Put a TL082 in the U3 socket and test for 5.2 V at pin 14 of the 18-pin target socket and pins 11 and 32 of the 40-pin target socket. Pin 4 of the 18-pin target socket and pins 12 and 31 of the 40-pin target socket should remain at ground potential. Remove the jumper wire from pins 14 and 18. Pin 4 of the 18-pin target socket and pins 12 and 31 of the 40-pin target socket should now measure 13.2 V. Place a jumper wire between pins 14 and 13 of U1. VDD, measured anywhere convenient, should be 5.5 V. Change the jumper to pins 14 and 10. VDD should now measure 4.5 V. Note: slight variances from the VDD levels stated above are acceptable, but VDD should not exceed 5.25 V when programming.

Put a MAX232 in the U2 socket. Pin 6 of J2 (DSR) should measure about +10 V. Pins 3 (RX) and 5 (CTS) should measure about ý10 V. Pin 8 (DCD) and pin 20 (DTR) should measure about 4.4 V. Pin 7 should be at ground potential (not floating).

Put a programmed PIC16C71 in the U1 socket. Pin 4 should measure 5 V, and pin 15 should measure about 2.5 V (indicating oscillation). Connect the programmer to a PC with an RS-232 cable (the cable must have TX, RX, RTS, CTS, DSR, GND, DCD, and DTR lines). Run a terminal emulator program on the PC. Set up for 9600 bps, 8-bit word, one stop bit, and no parity for the port in use. The terminal emulation program must set the IRQ in accordaance with the actual hardware configuration. DTR and RTS must be asserted.

Press the 0 key. The programmer should respond with "A." Press 2 then 3. The programmer should respond with "0" after each keypress. Press 1 three times in quick succession. The programmer should respond with "5" after the last keypress. Press 4, 5, 6, and 7. The programmer should not respond. Press any other keys. The programmer should respond with "3" after each keypress. If all these results are obtained, the programmer is basically working.

RUNNING 16CxxPRG

Now is the time for the final testing. Type FINDPORT A at the command line. If the programmer is connected and powered, the port it is connected to should be found and displayed. 16CxxPRG.PRT will be created with one line containing X:YYY COMZ, where X is the IRQ, YYY is the port hex address, and Z is the COM port number (1ý4). Note that if you are using a port not recognized by DOS (other than 3F8, 2F8, 3E8, or 2E8), or an IRQ other than 2, 3, 4, or 5, you must create 16CxxPRG.PRT with the parameters for the port. Now run 16CxxPRG. The display should be as described in the 16CxxPRG userýs manual, and you are ready to start programming PIC16Cxxs.

PREVIOUSNEXT


Circuit Cellar provides up-to-date information for engineers. Visit www.circuitcellar.com for more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com or subscribe online. ýCircuit Cellar, the Magazine for Computer Applications. Posted with permission.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ