Silicon ChipParallel Port PIC Programmer & Checkerboard - March 2001 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: The electrical wiring debate - reform is needed
  4. Feature: What's On Offer In "Walkie Talkies" by Ross Tester
  5. Feature: Mobile Magic: Driving Your Mobile Phone From A PC by Greg Swain
  6. Feature: Using Infrared Devices With Your PC by Greg Swain
  7. Review: Reiew: Marantz DR 6000 CD Recorder by Leo Simpson
  8. Feature: CB Radio Can Now Transmit Data by Silicon Chip
  9. Project: Big-Digit 12/24-Hour Clock by John Clarke
  10. Product Showcase
  11. Project: A Sun-Seeking Sunflower by Craig Maynard & Ross Tester
  12. Project: Parallel Port PIC Programmer & Checkerboard by David Deer
  13. Feature: Making Photo Resist PC Boards At Home by Ross Tester
  14. Project: Protoboards: More Fun With Comparators by Leo Simpson
  15. Project: More-MIDI: A Simple MIDI Expansion Box by Jim Rowe
  16. Vintage Radio: The 1929 AWA C58 radiogram by Rodney Champness
  17. Back Issues
  18. Notes & Errata
  19. Product Showcase
  20. Market Centre
  21. Advertising Index
  22. Outer Back Cover

This is only a preview of the March 2001 issue of Silicon Chip.

You can view 32 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Amateur Radio (November 1987)
  • Amateur Radio (November 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (February 1988)
  • Amateur Radio (February 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (January 1989)
  • Amateur Radio (January 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (February 1990)
  • Amateur Radio (February 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (July 1990)
  • Amateur Radio (July 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (January 1991)
  • Amateur Radio (January 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (January 1992)
  • Amateur Radio (January 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (January 1993)
  • Amateur Radio (January 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (February 1994)
  • Amateur Radio (February 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (January 1995)
  • Amateur Radio (January 1995)
  • CB Radio Can Now Transmit Data (March 2001)
  • CB Radio Can Now Transmit Data (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • Stressless Wireless (October 2004)
  • Stressless Wireless (October 2004)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Dorji 433MHz Wireless Data Modules (January 2012)
  • Dorji 433MHz Wireless Data Modules (January 2012)
Articles in this series:
  • Amateur Radio (November 1987)
  • Amateur Radio (November 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (February 1988)
  • Amateur Radio (February 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (January 1989)
  • Amateur Radio (January 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (February 1990)
  • Amateur Radio (February 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (July 1990)
  • Amateur Radio (July 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (January 1991)
  • Amateur Radio (January 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (January 1992)
  • Amateur Radio (January 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (January 1993)
  • Amateur Radio (January 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (February 1994)
  • Amateur Radio (February 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (January 1995)
  • Amateur Radio (January 1995)
  • CB Radio Can Now Transmit Data (March 2001)
  • CB Radio Can Now Transmit Data (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • Stressless Wireless (October 2004)
  • Stressless Wireless (October 2004)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Dorji 433MHz Wireless Data Modules (January 2012)
  • Dorji 433MHz Wireless Data Modules (January 2012)
Items relevant to "Big-Digit 12/24-Hour Clock":
  • Big-Digit 12/24-Hour Clock display PCB [04103012/04102011] (AUD $15.00)
  • Big-Digit 12/24-Hour Clock processor PCB [04103011] (AUD $15.00)
  • PIC16F84(A)-04/P programmed for the Big-Digit 12/24-Hour Clock [CLOCK1.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F84 firmware and source code for the Big-Digit 12/24-Hour Clock [CLOCK1.HEX] (Software, Free)
  • Big-Digit 12/24-Hour Clock PCB patterns (PDF download) [04103011/2] (Free)
  • Big-Digit 12/24-Hour Clock panel artwork and mask (PDF download) (Free)
Items relevant to "A Sun-Seeking Sunflower":
  • Sun-seeking Sunflower PCB patterns (PDF download) (Free)
Items relevant to "Parallel Port PIC Programmer & Checkerboard":
  • DOS and Windows software for the Parallel Port PIC Programmer (Free)
  • Parallel Port PIC Programmer PCB pattern (PDF download) (Free)
Items relevant to "More-MIDI: A Simple MIDI Expansion Box":
  • More-MIDI PCB pattern (PDF download) (Free)
  • More-MIDI panel artwork (PDF download) (Free)

Purchase a printed copy of this issue for $10.00.

All-in-one Parallel Port P Checkerboard By David Deer W e’ve published several PIC programmers in recent years – the most recent being just two months ago (January 2001). So why another, so soon? Simply that this one does even more than the previous ones – as well as providing the circuitry to download assembled code from your PC parallel port into a 16C84 or 16F84 PIC Microcontroller, it also has comprehensive test facilities inbuilt. Few things are more exasperating than writing what looks like great code, programming it into the PIC, moving the chip to the project board and . . . nothing. Or something that’s not supposed to be. Or almost something. But not the something you intended. With this project, all programming and checking can be undertaken without having to move the PIC chip until you’re happy with its operation. Although the circuit may look complex, this board is relatively simple and, as we discuss later, you don’t need to install all components initially – only those you need for the functions you need. And with the exception of the PC board itself and possibly the PIC ZIF socket, most (if not all) of the components should be available “off the shelf” at your local lolly shop. RCS Radio in Sydney (02 9738 0330) will have PC boards available shortly after publication. Some features explained Starting at the D-25 input socket (CON2), there is IC1, a 7407 hex buffer (yes, 74 series, TTL! They are still available – eg, Jaycar Cat ZS5807). It provides a buffer between the computer and the microcontroller and provides compatibility with the easy-touse MPASM-WIN.PIC Assembler and PICPROG2. PIC Programmer software. See how to obtain this Windows 95/98 compatible software, free, and 62  Silicon Chip suitable code to program a chip (for demonstration purposes) later in this article. Some of this buffer circuitry was derived from the Classic PIC Programmer published on the Internet by David Tait. The 4-pole 3-position rotary switch provides a “code loading” facility when in the anticlockwise position, a centre “off” position to ensure iso- on each input bit, since these bits can also be used as outputs when required. These LEDs can be switched, by means of changeover switches S11 and S12, to show either colour to indicate if the chip bits, configured as output bits, are high or low. Red indicates a bit is high while green indicates a bit is low. The highs and lows can also be displayed simultaneously, with some Reproduced same size, this early prototype of the PIC Programmer is slightly different to the final version shown in the circuit and component layout over- lation between the computer port and the board components, plus a “run” facility when in the clockwise position. To alter or debug the code in a chip, apart from modifying the code in the software, it is only necessary to switch to the load position, download the modified code, and simply switch back to the run position to see the result. A dual colour (red/green) LED is provided on each output bit and also reduction of intensity, by selecting the “Bi-colour” position for switch S12. To obtain the high only output bit display, S11 and S12 are switched towards the D input socket end of the board (ie select “Red” and “Red/ Green” respectively). To obtain the Low only bit display, toggle S12 towards the D input socket end of the board and toggle S11 towards the opposite end (ie select “Red/Green” and “Green” respectively). PIC Programmer and Could this be the ultimate PIC programmer? It’s got to come close. Use it to download code from your PC – and then use it to check if the PIC does what it is supposed to! All inputs and outputs can also be held high or low to provide any required parameter to check code functions. DIP switches are interposed at all necessary positions to provide individual control for all these items and a bank of push buttons provide high and/or low inputs as required. An “interrupt” facility, using two of the inverters in IC3, a 74HC14 hex Schmitt trigger to provide a non- stration code for this project does not require a buffer jumper to be in place. Four sets of headers are installed on the board to provide connections to other circuits being set up to accept the programmed PIC chip. The 10 pin header (CON3) provides facilities to connect the programming circuitry to a microcontroller installed in a circuit on a remote project board, providing of course the project board leaf. All components mount on the one PC board, with the board layout corresponding fairly closely to the circuit diagram’s “flow”. bounce circuit, gives a choice of either a rising or falling edge interrupt, selected by a jumper shunt. Because pin 3 (bit RA4/TOCKI) of the PIC chip provides only an open gate-type function when used as an output, two more of the 74HC14 inverters are used to provide either an inverted or non-inverted buffer to drive the LED connected to this pin. Again, this is selected by a jumper shunt, when required. The demon- also contains a similar header or means of connecting its appropriate chip pins to this programming board. It allows a ribbon cable to remain in place and the Load/Run switch to be used as if the remote chip was on this board; ie, no unplugging or disconnection required to program or debug the remote chip. Pole 4 of DipSw1 will disconnect supply to the 10-pin header and to the Load/Run switch. Pole 4 should be left on at all times that a chip is being used in this board, because the Load Run switch provides isolation during programming, but should be off for remote in-circuit programming via the 10-pin header. Pole 1 of the 4 pole DIP switch will completely disconnect the MCLR bit from this board’s supply when then 34-pin header is used to connect a chip on this board to a remote project board. Being available, poles 2 and 3 are used to control the 13V and 5V supplies, respectively, to the 34 and 20-pin headers. The 34-pin header provides a means, via say a computer IDE cable, to connect all the input and output pins of the microcontroller on this board to another project board (eg, the LCD module shown at the end of this article). The 20-pin header and the 16-pin header provide similar connections but connect only either the outputs or the inputs respectively. All the headers also provide both an earth connection and a +5V supply connection and the 34-pin header also provides a 13V supply. All the supplies provided at these headers are controlled by switches. The supply, by the way, is derived from a 12-14V AC or 15-18V DC input. This can be from a 200mA or so plugpack. The rectified supply is filtered by a 2200µF capacitor and regulated to around 13.5V by the 7812, with two silicon diodes in series, raising the ground pin above 0V by about 1.4V. This nominal 13.5V rail is further regulated to 5V by the 7805 positive voltage regulator (REG2). LEDs 5 and 6 are high intensity, 5mm types and provide some indication that the programming function is in progress. They can be any colour but being high intensity types need only a small current and hence do not interfere with the download procedure. LEDs 1, 2, 3 and 4 are simply MARCH 2001  63 REG1 7812 F1 300mA DB1 W04 IN + 1000F 25V CON1 DC SOCKET .01F REG2 7805 OUT GND IN 10F 16V D1 1N4004 _ 12 - 14VAC/ 15 - 18V DC INPUT .01F LED1  D2 1N4004 LED2  +13.5V +5V 10k 5 14 11 IC1a 7407 B IC1b 7407 10k B E C 2 1 2 1.6k 0.1F +5V S4 RESET 10k LED6  5 10k 100 IC1d 7407 470 5 6 RC RA4/T0CKI JP1 16 15pF IC1e 7407 13 12 RB0/INT RB1 S3d 10k 4 7 S3c 18-25 A 14 S3b 13 S3a LOAD 7805 7812 12 RUN 1 2 3 OSC2 15pF 10k 18 IC2 PIC16F84 (ZIF SOCKET) 15 +5V 17 OSC1 X1 4MHz 470 RA2 VSS RA3 XTAL 3 RA0 0.1F 10 A RA1 VR1 500k FREQ ADJUST +5V 10k 330 +5V 1.8k IC1c 7407 S2 LED4  LED5  Q2 BC558 +5V 10k S1 330 330 100k 4 3 LED3  1.6k Q1 BC558 5.1k 4 TO PC PARALLEL PORT E C +5V +5V 10k .01F +13.5V 100k 10k 10 10F 16V 0.1F +5V CON2 D-25 OUT GND MCLR RB2 VDD RB3 RB7 RB4 RB6 RB5 6 7 8 9 10 11 CON3 BC558 1 IN OUT GND E B C BI-COLOUR (RED/GREEN) LED RED CATHODE LED K 10k +5V 1 +13.5V 2 3 A DIPSW1 4 SC 2001 PIC PROGRAMMER 64  Silicon Chip A +5V 10k DIPSW2 4 10k 5 10k 6 10k 4.7k S10 INTERRUPT .01F 8 7 IC3a 74HC14 DIPSW3 S5 JP2 1k 1 10k S6 10k S7 10k S8 10k S9 1k 330 LO 1k 3 1k 4 +5V 1k 5 10k JP3 .01F FALL 6 CON4 2 7 HI 1k 2 14 1 RISE IC3b 74HC14 4 330 3 7 DIPSW4 CON6  120 LED7 1 120   120     LED8 2 LED9 3 120 LED10 4 11 5 +5V IC3d 74HC14 6 7 1 100k JP4 INVERT 9 IC3c 74HC14 NONINVERT 8 120 8  DIPSW5 CON5  10 JP5 LED11 120   120   120   120   120   120   120   120   1 2 3 4 5 6 7 8 LED12 LED13 LED14 LED15 LED16 LED17 LED18 LED19  RED DIPSW6 1 2 3 5 4 8 7 6 S11 GREEN RED/GREEN S12 BI-COLOUR D5 1 1 10k +5V 10k 10k 10k 10k 10k 10k 10k D3 1N4004 D4 D6 D7 D8 47 D9 1N4004 5 x 1N4148 MARCH 2001  65 Parts List – PIC Programmer 1 1 1 4 5 1 1 5 1 1 1 2 1 2 1 1 1 1 5 2 1 1 1 1 1 4 2 PC board, 241mm x 93mm, code LDDPP1 4-pole 3-position sealed rotary switch, PC mounting knob to suit switch SPDT PC mounting slide switches momentary push-on switches, snap action, PC mounting 4-pin type, red momentary push-on switch, snap action, PC mounting 4-pin type, yellow momentary push-on switch, snap action, PC mounting 4-pin type, green 8-pole DIP switches 4-pole DIP switch DC power socket, 2.5 mm, PC mounting D-25 male socket, 90° PC mounting 14-pin IC sockets 18, 20 or 24-pin ZIF IC socket (or 18-pin dual wipe contacts IC socket – see text) micro “U” TO-220 heatsinks (eg, DSE H3403) 34-pin dual-in-line snap-off pin header set 20-pin dual-in-line snap-off pin header set 16-pin dual-in-line snap-off pin header set 10-pin dual-in-line snap-off pin header set jumper shunts, 2.54mm 3mm x 6mm screws, nuts and washers (or similar) parallel port extension cable (D-25 male to D-25 female) plugpack supply, 12-14V AC or 14-18V DC, about 300 mA. (or similar) metre very light insulated hook-up wire (for board links) pair M205 PC-mounting fuse clips 300mA M205 quick blow fuse PC stakes TO-220 insulating kits (for regulators) Semiconductors 1 7407 hex buffer (IC1) 1 16F84 PIC microcontroller (IC2) 1 74HC14 hex Schmitt inverter (IC3) 1 7812 12V regulator (REG1) 1 7805 5V regulator (REG2) 2 BC558 PNP transistors (Q1, Q2) 2 3mm red LEDs (LED1, LED3) 2 3mm green LEDs (LED2, LED4) 1 5mm high intensity amber LED (LED5) 1 5mm high intensity red LED (LED6) 13 5mm dual colour (red/green) two pin LEDs (LED7-LED19) 1 WO4 bridge rectifier (or similar) (BR1) 4 1N4004 diodes (or similar) (D1-D2, D3, D9) 5 1N4148 diodes (or similar) (D4-D8) 1 4MHz crystal (XTAL1) Resistors (0.25W, 1%) 3 100kΩ 29 10kΩ 1 5.1kΩ 1 1.8kΩ 2 1.6kΩ 6 1kΩ 2 470Ω 4 330Ω 12 120Ω 1 100Ω 1 47Ω 1 500 kΩ Trimpot (Piher Horizontal or Spectrol 25 turns) Capacitors 1 2200µF 25VW PC-mounting electrolytic 2 10µF 25VW PC-mounting electrolytic 3 0.1µF MKT polyester (code 100n or 104) 5 .01µF MKT polyester (code 10n or 103) 2 15 pF ceramic (code 15p or 150) 66  Silicon Chip provided to indicate the state of the power supplies and power switches and can be any colour, 3mm or 5mm, normal types. (3mm LEDs use less space near the ZIF socket operating lever/knob). All the push buttons are readily available snap action, 4-pin, momentary (push on). The PIC 16F84 chip supports several different types of clocking oscillators including crystal, ceramic and R/C (resistor/capacitor). The board provides for installation of any these types of clocking oscillators, connected to pins 15 and/or 16 on the chip. The appropriate type is selected by a jumper shunt. The demonstration program code requires a 4MHz crystal and hence this should be selected at this stage. In the R/C configuration, either a Piher horizontal or a more sensitive Spectrol 25-turn trimpot can be accommodated. If you mount the R/C oscillator capacitor and/or crystal in sockets, you can swap them at will to provide a huge frequency range. These sockets (in sets of three) could be cut/broken from a gold insert machine pin IC socket or strip. The program code can be easily altered to run with the R/C oscillator variant but the time between operations will be considerably different unless the delay sections of the program code are also altered. The board uses a normal printer extension cable to connect with the printer port, or any parallel port, on the computer. The software seems to favour the LPT1 port, so use this port if possible. The printer extension cable should be just that, male at one end, female at the other end, with no crossovers. Construction The placement of components shown on the component overlay fairly closely follows their relative positions on the schematic diagram. Note that the whole of the board need not be completed at one sitting. Various components can be sourced and added as required. To keep the cost of the PC board at a reasonable figure (ie, single sided), there are quite a few links to be installed and it is best to install these first. The links that are close together should be insulated. However, having obtained the PC board, it is only necessary to initially install a socket for the microcontroller and install the components shown on the circuit diagram which connect to pins 4, 5, 12, 13 and 14 of the microcontroller, in order to be able to download a program to the microcontroller. These components include the 25-pin D socket, DC supply socket, bridge rectifier, 7805 and 7812 voltage regulators, the 7407 (IC1) , Q1 and Q2, the 4-pole 3-position rotary switch, the 4-pole DIL switch, and all the associated resistors and capacitors. The easiest socket to use is an 18-pin ZIF (Zero Insertion Force) socket. These may not be too easy to find - ours came from Futurlec (www.futurlec.com). The board will also accommodate 20 or 24-pin sockets, if you happen to have one or can get one more easily than an 18-pin. However, for 20 and 24-pin sockets, the excess pins are not used – they can be soldered to the board if you wish. That means only pins 1 to 9 should be counted, (on one side) and the pins opposite to these should be considered pins 10 to 18. Any reference to pin or bit numbers in this text, or on the circuit diagram, assume that we are counting the pins as if numbered 1-18 in an 18-pin socket. When fitting the PIC to the socket, pin 1 is the pin nearest to the voltage regulators. 20 and 24-pin ZIF sockets are also available at Farnell Electronics, 72 Ferndell St, Chester Hill, 2161. Phone 1300 361 005. If a 24-pin socket is used, ensure it will accept an IC with 0.3in row spacing. Yes, ZIF sockets are relatively expensive but their ease of use is worth the one-off additional cost. An alternative cheaper arrangement is to use a dual wipe contacts socket and mount each microcontroller chip on a machine pin socket which will protect the chip pins while being inserted and withdrawn a number of times. Of course, installation of all the remaining components on the board will dramatically reduce the number of times that a chip would be required to be inserted and removed and will also allow the demonstration code written for this article to be run without having to remove the chip from its socket. But ultimately, removal is necessary. It may be necessary to slightly enlarge the holes in the board for some components such as the rotary switch and the DC power socket. This is easily done with suitable size drills and a pin vice or similar device. The PC board will accept the PCB-mount, SPDT changeover switches available from most supply houses. Again the mounting holes in the board may need to be slightly enlarged. The voltage regulator heatsink fins should be bent slightly inwards to ensure they do not touch. Insulating the heat sinks from the regulators, while not essential, is preferable. The next most obvious components to fit are the display LEDs, along with the oscillator components at pins 15 and 16 of the PIC chip socket. Also the LED DIP selection switches, resistors, diode strings and switching system (S11 and S12), to obtain indication of either High or Low 4.7k 1000F Fig.2: the PIC programmer component overlay, reproduced same size to make construction as easy as possible. Note that there are differences between this and the photograph! MARCH 2001  67 Main input and output to the programmer itself is through a D25 socket which connects to the parallel port of your PC. But there is also a wide range of pin sets to and through which you can connect external devices. bit outputs. The 74HC14 IC is necessary to initiate the interrupt function. The remaining DIP switches, resistors and pushbutton switches which allow holding or pulsing all the inputs and/or outputs high or low can be added as required. Similarly, the various headers can be added as needed. Programming a PIC chip (See also the “.txt” documents incorporated in the software downlo ads). By choosing appropriate software, almost any computer can be used to program a 16F84 or 16C84 PIC chip. Mpasmwin.exe and PICprog2.exe is assembly and download software respectively and run OK in Windows 3.xx and 95/98. For DOS users, Mpasm.exe and PICprog.exe can be used instead. All this software and a demonstration code file, named Miela.asm, can be downloaded from the SILICON CHIP web site in a file named LDDProg.exe. Download this self-extracting zipped file (of about 560KB), double click on it and it will go into a folder named LDDProg, which it will create on your C drive. LDDProg has two subfolders, DOS6xx and AllWins, and a Readme1. txt file. The Readme1.txt will open in Windows NotePad, or DOS Edit, and explains what to do with the two sub-folders. A further Readme.txt file in each subfolder details the relatively simple steps to use the application software to assemble and download the demonstration file, Miela.asm, to a 16F84 PIC microcontroller. Unfortunately the extraction process will only work in Windows 95 or 98. If you have to use DOS to assemble 68  Silicon Chip code and to program chips, it will be necessary to have access to a suitable computer running Windows 95/98 to extract the files and then transfer the appropriate files to the DOS computer. For those readers who have acquired the PC board but are not in a position to download the software, the author is prepared to supply the file LDDProg.exe on a floppy disk. Send a $1.00 stamped, self-addressed, Computer Disk Postpak to Mr. LDDProg at PO Box 114 Emu Plains, NSW 2750. But please allow about a week for the reply. This offer will only last for six months from the date of issue of this month’s magazine. The Assembly code ( Miela.asm) will animate the LEDs on the completed board. This file can be read and/or edited in Windows Notepad or in a DOS edit screen. By the way, Miela is my 2-1/2 year old granddaughter and it took her only a few minutes watching while I was running and debugging the Miela. hex code on the board to realise that pushing the Reset button started the LED chasing sequence and, after two sequences, the chase stopped with the bit 6 LED switched ON. (Actually the PIC switches bit 6 high and goes into the Sleep mode). By pressing the Interrupt button while the PIC was in the sleep mode, she was able to send the LEDs into a frenzy of flashing before settling down to a chase and into the sleep mode again. Although not the intention of the project or code, it kept Miela interested for a considerable time until I hid the project to divert her attention elsewhere. I then decided a suitable name for the code would be Miela. Your .asm codes can have any file name, preferably with the usual DOS requirement of 8+3 characters, but .asm must be used for the extension characters so that Mpasmwin.exe or Mpasm.exe will recognise it. PICProg.exe or PICProg2.exe, as appropriate, can be used to download any hexadecimal file to the PIC chip. The .hex file does not have to be obtained using Mpasm.exe or Mpasmwin.exe. This project was not intended to provide a lesson in writing assembly code programs but the initial parts of the Miela.asm code, including the several lines following the Start label, can be used as a template for other program codes you may wish to write, or this code can be altered to perform other functions. However, ensure that the original of Miela.asm is preserved as a backup, to start again, if your alterations fail to run. Many books are available to provide an understanding of Assembly code writing and PIC microcontroller programming. Jaycar Electronics lists some good starters. There is also a wealth of information on the ’net: for example, do a search on “David Tait” (as mentioned previously) and you’ll find hundreds of matches! Resistor Colour Codes              No 2 29 1 1 1 6 2 4 12 2 Value 100kΩ 10kΩ 5.1kΩ 1.8kΩ 1.6kΩ 1kΩ 470Ω 330Ω 120Ω 100Ω 4-Band Code (1%) brown black yellow brown brown black orange brown green brown red brown brown grey red brown brown blue red brown brown black red brown yellow purple brown brown orange orange brown brown brown red brown brown brown black brown brown 5-Band Code (1%) brown black black orange brown brown black black red brown green brown black brown brown brown grey black brown brown brown blue black brown brown brown black black brown brown yellow purple black brown orange orange black black brown brown red black black brown brown black black black brown LIQUID CRYSTAL DISPLAY ADAPTOR Display Message sends a low signal to bit RA1 on the PIC micro, which enables the Chase portion of the program software. This switch already exists as one of the push buttons on the PIC Programmer board. Place the “Low/Hi” jumper, JP2, in This simple adaptor, to accommodate a 16-Character the Low position, close pole 2 on DipSw3 and use the second push-button x 2-Line LCD Module, can easily be assembled on a in the bank, S6, as “the switch”. piece of Veroboard. The module will run off the PIC On the PIC Programmer board Programmer and will display text programmed into diagrams, all the DIP switches on the PIC Programmer board are in numersoftware available on the SILICON CHIP website unical order which follows the PIC Micro der the title of Testbed.asm and Testbed.hex input and output sequence. This is To mount and connect the LCD Programmer and the Vero-board. You easily seen in the schematic diagram. to the Veroboard, I used a 16-pin only have to watch that you plug the The RA4 input on the micro, pin piece of machined pin header strip, IDE cable onto the headers the same 3, requires a pull-up resistor. This soldered to the LCD terminals, and way around at each end. Alternatively is also already provided on the PIC a corresponding 16-pin piece of maa suitable cable, using 34-way IDC Programmer board. Close pole 8 on chined pin IC socket strip, soldered line sockets and ribbon cable can be DipSw2, situated at the top centre of to the Veroboard. made up – not really a difficult job. the Programmer board. (This action The LCD module will then plug The 1N4004 diode is to reduce connects RA4 to the positive supply into the socket strip but requires some the amount of LCD backlighting curvia a 10KΩ resistor. Again, this is packing (cardboard or similar) as rent to a reasonable figure. Of course, easily seen on the Programmer board additional support to take the weight if you use an LCD without backlighting schematic diagram). of the LCD off the pins. the diode and other connections to Close the 8 poles on DipSw5 on The component layout diagram pins 15 and 16 can be deleted. the Programmer board to enable the (Fig.3) shows the LCD module and The trimpot is to adjust the 8 LEDs connected to port B on the mithe few necessary components, display contrast but I found that I cro, RB0 to RB7 and put a jumper on mostly links, installed on the Verorequired maximum contrast anyway, JP5. Select the Red colour for these board. which occurs when the pot is in the LEDs and the chase sequence will Install a 34-pin piece of dual-infull negative position. So this trimpot display when “the switch” is operated. line (DIL) header strip as shown on could be deleted and pin 3 of the LCD (To select the red colour, toggle the diagram, allowing space for the module bridged directly to negative. both switches, S11 and S12, on the few components between the LCD Add a trimpot later if the display is Programmer board, towards the left module and the DIL header strip. too bright. end of the board; ie to the “Red” and Note that on the diagram, the “The switch” referred to in the the “Red/Green” positions, respectracks on the Veroboard do tively.) pass completely under the LCD On the Programmer board module but have been erased all other DIP switches, not from the diagram to show the mentioned in this text, should LCD message unobstructed. be open. Although only 100mm of Download both files, menVeroboard will suffice, I sugtioned in the first paragraph, gest installing these compoand send the Testbed.hex file to nents at the right hand end of the PIC micro on the PIC Proa larger piece of board. This grammer board by the method allows other mock-ups to be explained in the texts supplied installed on the left of the 34 pin with the PIC Programmer softheader and provides the necware. essary connection to the PIC When the Run/Load switch Programmer. Alternatively, a on the PIC Programmer board reverse image can be conis placed in the run position, the structed. message * Silicon Chip * Press The easiest way to connect the switch will be displayed. between the PIC Programmer When “the switch” is pressed, and the 34-pin header on the the message will change and Veroboard is to use a comthe eight LEDs connected to puter IDE cable which will fit the PIC port B will go into a SC the 34-pin header on the PIC Fig.3: Display Adaptor layout on Veroboard. repeating chase mode. MARCH 2001  69