Home  Products Prices Directory Order Contact New Books Files Links Other
DonTronics Home Page Pigmy Boards Assembly Part 2.
Bottom of Page

PIGMY Boards: Sold out 4-Apr-99

For reference only.
Part 2. Revision B.

Read the Part 1 instructions for a better rundown on general assembly.
This section covers BS-1, BS-2?, FED Basic, conversion to
In-Circuit Programmer, and RS-485 Comms.

1 by PIGMY Printed Circuit Board.          ;Available from Don
1 by Parallax Basic Interpreter Chip.      ;Available from Don
1 by MicroChip 93LC56 Serial EEPROM.       ;Available from Don
1 by 4MHz Crystal in a small case.         ;Available from Don

Yes, it must be a 4Mhz crystal. This is the maximum clock frequency of
this version PIC chip and the Version One Basic Stamp Interpreter is
designed for a maximum baud rate of 2400.

The resonator used and supplied by PARALLAX is a 3 pin device. The
third or inner leg connects to ground. I have added one extra hole to
my board at this position. You can use a 4Mhz crystal or the 4Mhz
resonator, however if the resonator is used, a link needs to be
connected between the extra leg and ground. This is easily added by
strapping out the C6 capacitor position.

The two 15pf Caps are fitted inside the Resonator case so don't
install these external capacitors if you fit the Resonator.

1 by 7805         +5  Volt regulator in TO-220 case.

I chose the larger 7805 regulator over the 78L05 for three reasons:

(1) It's more readily available than the low power version.
(2) It's usually a lot cheaper.
(3) It's a real power supply for real jobs.
The low power version is easily fitted to the PIGMY board if required.

1 by Diode Bridge D1  WO2 or WO4 type.  (DSE Cat Z-3304)

This allows use of AC or DC supplies and batteries without being
concerned about the correct voltage polarity and possible damage to
the unit.

1 by Capacitor    C1  1000uf Electrolytic @16 Volts. (PCB type mount.)
1 by Capacitor    C2  .01uf (or .1uf) Ceramic
1 by Capacitor    C3  .01uf (or .1uf) Ceramic
1 by Capacitor    C4  10uf Electrolytic (PCB mount.) or Tantalum @16 V.
1 by Capacitor    C5  15pf Ceramic
1 by Capacitor    C7  15pf Ceramic
1 by Capacitor    C12 .01uf (or .1uf) Ceramic

(A total of 7 Caps, 2 of these are polarized.)

1 by Resistor     R2  4K7  .25 watt
1 by Resistor     R3  2M2  .25 watt
1 by Resistor     R4  2M2  .25 watt
1 by Resistor     R5  470K .25 watt
1 by Resistor     R7  330  .25 watt
1 by Resistor     R8  4K7  .25 watt
1 by Resistor     R27 100  .25 watt

(A total of 7 Resistors.)

1 by Transistor   Q1  BC558 Any PNP Small Signal Amp will do.
1 by 18 pin DIP socket to suit E2. (for the Basic Interpreter).
1 by  8 pin DIP socket to suit E3.
1 by 2 Post PCB mount screw terminal. 5mm or 5.08mm centres.
1 by strip of 3 male pins for comms to IBM Compatible PC printer port.
1 by 26 pin IDC type Male header. (2 by 13 pins) J1

1 by 34 pin IDC type Male header. (2 by 17 pins) J2   (Optional).
1 by 5mm LED.                                         (pt Power LED).
1 by strip of two male pins.                          (For above LED).
1 by test link or shunt.                              (For LED).
1 by Reset Button. Dick Smith Cat P-7570              (Optional).

Other items are required for various configurations of the PIGMY
board, however only the items mentioned above are needed for the
BasicMicro-1.

Crystal operation: (Standard BasicMicro-1).
Solder a link at J4 between pins 2 and 3. That's the upper 2 pins.
Solder a link at J5 between pins 2 and 3. That's the upper 2 pins.

RTCC Normal operation: (Standard BasicMicro-1).
Solder a link at J3 between pins 1 and 2. That's the 2 pins near the
7805 regulator.

Solder in your E2 18 pin socket, and the E3 8 pin socket.

Solder in Resistors R2, R3, R4, R5, R7, R8, and R27, a total of
seven resistors.

Solder in the Transistor Q1 BC558. Solder in Capacitors C1, C2, C3,
C4, C5, C7, and C12. That's 7 capacitors.

Watch out for the polarity of C1, and C4. These must be soldered into
the board the correct way around. The positive end of the Caps are
shown on the circuit overlay.

Solder in your 7805 regulator. This can be soldered in allowing for a
bolt and/or heat sink to be fitted at this position. Even if you don't
install a heatsink now, you may need one later on. I bolted a heatsink
to mine, soldered it in position, then removed it.

Solder in the Diode Bridge. The Positive leg is shown on the overlay.

Check the Reset button for pin identification. My artwork has the top
two pins connected together and the bottom two connected together.
Make sure that you solder this button in so that it operates
correctly.

Solder in the 4Mhz crystal.

Install the LED with the cathode as shown on the overlay. (Optional).
Install J6 LED isolation header, and the appropriate shunt. If a low
power application is required, this link can be removed after final
assembly and testing.

Install the J1 (and J2) header(s).

Install the POWER-IN PCB mount screw terminals.

Install the J7 three pin header. You can use some white Liquid Paper
to mark the ground (bottom) end of this header. A similar matching
marking can be done on the female cable connector.

And apart from the two chips, I think that's it.
_______________________________________________________________

The communication cable supplied with the development kit has a DB-25
Male connector one end for connection to a parallel port and a 3 pin
female header socket on the other.

Connections are:        DB-25 pin 25 to Header pin 1. (Ground)
                        DB-25 pin 11 to Header pin 2.
                        DB-25 pin  2 to Header pin 3.

No tricks, no diodes, no resistors, no magic chips, no dongles. Just a
simple 3 wire circuit.
_______________________________________________________________

In fact, if you get the Dick Smith part number P2733 Header pin & plug
3-way SIL .1" @ $1.15, this will be ideal for the BasicMicro-1 end of
your cable. Heat-shrink may help you here. The other end is a simple
DB-25 male connector and suitable cover.
_______________________________________________________________

One user recently rang me and said that he couldn't get the BasicMicro
to load until he shortened his cable from three feet, down to 6
inches. I've only heard of this once, but I suspect it is the drive
capacity of some printer ports. You shouldn't need to do this but keep
it in mind when your BasicMicro doesn't load.


                           POWER UP AND TESTING:


Before you power up, check with your multi-meter (on ohms) that ground
and +5 volts are not shorted together on the printed circuit board.

Don't install the chips yet. Connect up your power-pack, transformer,
or +9 Volt Battery. As the circuit has a diode bridge at the input, it
doesn't matter which way around you connect the positive and negative
terminals.

Power up the unit and check that the +5 Volts is there before
proceeding. This is verified by the Power LED being on. Check the
volts with your multi-meter. This should read from about 4.8 to 5.1
Volts. That's what you get on 7805 regulators now days. Usually around
4.82 Volts with no load.

All OK? POWER DOWN and install chips E2 and E3. These are the Basic
Interpreter and the 93LC56 EEPROM.

DON'T----DON'T----DON'T----PUT ANY CHIPS IN THE WRONG WAY AROUND. YOU
WILL MOST CERTAINLY DESTROY THEM!!!!!!!!!!!!!!! CHECK THE OVERLAY FOR
PIN 1 ORIENTATION. THE "U" SHAPE NOTCH AT ONE END OF THE CHIP AND THE
"U" SHAPE ON THE OVERLAY NEAR R2, SHOULD BE TOGETHER.

Still not sure of pin 1 of the male headers and chips? This is marked
on the overlay. Have a look at the text "J1". Next to it is a square
pin surrounded by a box. This pin is pin 1. All pin 1's on the overlay
are square. This includes the chips. All pin 1's are square on the
solder side of the board, that is, on the artwork.

Power up again and check the +5 volts.

If you have one of my relay boards, you can hook it up as a LED
monitor as shown in the ASCII circuit file.
_______________________________________________________________

PARALLAX Basic Stamp (Trademark) Interpreter test procedure:

As the Basic Stamp Interpreter chip is a PIC16C56-XT, it has only 4
bits in Port A and 8 bits of Port B. All of the Port A bits are used
for E3, the serial EEPROM and J7, the communications header.

This means that only Port B is available for the user. The Port B
pinout can be found on both J1 and J2.
_______________________________________________________________

BasicMicro-1. Let's Fire it up.....

When I built my first BasicMicro, hooked up the cable and dialed up a
demo program then loaded it to my new BasicMicro. Not much happened. I
guess I really need some LEDs to write something to, so watching out
for pin 1 connection, I hooked up one of my RELAY8 boards as a LED
monitor.

I then wrote the following program:

'THIS SIMPLE TEST PROGRAM WILL TEST THE BasicMicro-1 VERSION OF MY
'PIGMY BOARD. IT SHIFTS A LED TO THE RIGHT WITH A 1 SECOND DELAY
'YOU SIMPLY CONNECT MY RELAY8 BOARD UP AS A LED MONITOR.
START:                  'HOOK UP MY RELAY8 BOARD.
GOSUB CLEAR             'SET ALL OUTPUTS LOW ON ENTRY
FOR B2 = 0 TO 7         'COUNT UP TO 8
'FOR B2 = 7 TO 0 STEP-1  'COUNT DOWN TO 8
GOSUB CLEAR             'CLEAR ALL LEDS
HIGH B2                 'LIGHT UP ONE ONLY
PAUSE 1000              'DELAY 1 SECOND
NEXT B2                 'SHIFT THE "ON"  LED TO THE RIGHT
GOTO START              'DO IT ALL AGAIN
CLEAR:                  'SET TO ALL OUTPUTS AND LOW
LOW 0       '
LOW 1       '    PIGMY BasicMicro-1 TEST PROGRAM by Don McKENZIE
LOW 2       '          P.O. Box 595 Tullamarine 3043
LOW 3       '                     AUSTRALIA
LOW 4       '
LOW 5       '  19-Jul-94
LOW 6       '
LOW 7       '
RETURN      '

And it worked fine. A single LED on, and shifting to the right at a
one cycle per second rate.

Disconnect the communications cable and it still works.
Power down and back up. It still works.
I then removed the EEPROM and replaced it again. Yes, it still worked.
Hey!, I have a Stamp... Well, it works like a Basic Stamp. It's really
Don's BasicMicro-1.

It must have taken all of 20 minutes to get a running Demo program
from when I had assembled the hardware.

If you "REM" out line 3 with a "'" and UN-REM line 4, the LED will
move in the opposite direction
_______________________________________________________________

You can substitute the relay board for 8 by LED's and 8 by 330 ohm
resistors if you wish. This simple circuit is shown in the application
notes. Just connect the anode end of each LED to a port pin, then
connect the cathode end of each LED to a 330 ohm resistor, and the
other end of the resistors to ground. When the appropriate pin is set
"HIGH" the LED will switch on. "LOW" will turn it off.
_______________________________________________________________

FED Basic........

Read the PICEX instructions for a better rundown on general assembly.

I feel most of the gutsy stuff is already covered in other portions of
this article, and as I supply both the PIGMY schematic plus Robin
Abbott's schematic, I'll keep this part to a bare minimum:

1) DB-25 Configuration.
   Apart from selecting your choice of MAX/CC with J17, nothing else
   needs setting up on the DB-25 input port. Robin's original circuit
   uses the Cheap comms path, and I have placed the EEPROM select
   Resistor on the Cheap Comms port, so unless you really need the MAX
   chip, use the Cheap comms. (If you do need the MAX chip, you will
   need to install an extra signal to J22 for 2K EEPROM operation. See
   table below.

   Make sure you use a DB-25 **FEMALE** solder tail connector for the
   RS-232 comms. FED Basic only uses pins 2, 3, and 7, so apart
   from J17 configuration, no other work needs to be done in the J18,
   J19 area. Forget the two cross-links near pins 6, 8, and 20.

2) Comms Configuration. (A full diagram is given below).

   You need to link up J17, the MAX/CC header selector to your choice
   of RS-232 circuits as described elsewhere in this file.

   The incoming signal must connect to RA2
   The outgoing signal must connect to RA3.

   To do this with MAX comms:
   Connect J14 pin 1 to J15 pin 3. (RA2)
   Connect J14 pin 2 to J15 pin 4. (RA3)

   To do this with Cheap comms:
   Connect J22 pin 1 to J15 pin 3. (RA2)
   Connect J22 pin 2 to J15 pin 4. (RA3)

3) EEPROM Configuration.
   Resistors R13, R14, and R20 must be installed.
   Jumper J16 pin 1 to J15 pin 2 (SDA to RA1)
   Jumper J16 pin 2 to J15 pin 1 (SCL to RA0)
   For 2K EEPROM, connect J21 pin 2 to pin 3.
   For 8K EEPROM, connect J21 pin 2 to pin 1.
   I suggested this method of EEPROM selection to Robin as a means of
   reducing firmware versions.

4) BOOT.
   Install the BOOT button and run a jumper from the via at the boot
   switch to the via near the EEPROM. Robin uses a BOOT link. I
   changed this into a switch that matches up with RESET button.

5) Comms Testing:

   For the J17 header, I used pins and headers so that I can
   re-configure may comms at any time. This also allows me to place a
   pin 2 to 3 short on this header for cable and connector testing.
   Any comms program can then be used to test for a loopback.

   A similar shorting jumper on the TTL side of the MAX-232 (J14) will
   also test comms through the MAX chip.

   The Cheap Comms doesn't produce the required signals to produce the
   same result at header J22.

6) Wire Wrap it!!!

   I used the old wire wrap technique to connect the other jumpers via
   male header pins. This makes this job very easy to complete. A
   simple wire wrap tool is cheap. Has a wrapper one end, an
   un-wrapper the other, and a stripper in the middle.


Check the ASCII Circuits for the OVerlay of these jumpers.


Make sure you install LED 3 (RA3) and its matching link and resistor.
This monitors the TX signal from the PIC, and is very handy for
checking comms status.

You can install the Windows software and try loading then running the
walking LED test program 'eti_wled.bas' then 'termtest.bas'.

Full instructions on the operation of the module and FED Basic are
given in the on-line help text of this package.

ADDED NOTES:
I had a little trouble getting the Cheap Comms TX to work. When I
removed the four components (CC/RA), it worked fine. Perhaps it's my
serial port. The MAX-232 of course works well under all conditions.

Non-Auto-Run.
If you run a program from the keyboard without setting the Auto-run
feature, all you have to do is press RESET to get control over the
module again. LED 3 will light up when the module is ready to
communicate.

This is the normal mode for program development.

Auto-Run.
If you set the module to Auto-Run, it will run on any power up or
RESET. To restore module comms, you must press BOOT and hold it, then
press RESET and hold for a second or so, then release RESET, then
release BOOT. LED 3 should light up, indicating module comms restored.
This two finger technique is very easy to get the hang of. I found
Robin's original 'boot link' a little awkward.

This is the normal mode for your final program.

LED 3...
I also found that the addition of LED 3 to the circuit improved the
ability to restore comms quickly.
_______________________________________________________________

Basic Stamp 2 Work-alike (BS2)........

Read the PICEX instructions for a better rundown on general assembly.

I feel most of the gutsy stuff is already covered in other portions of

this article, so I'll just detail the BS2 circuit.

I'll keep this part to a bare minimum, and that means 4 items:

1) DB-25 Configuration.
   Apart from selecting your choice of MAX/CC with J17, the only thing
   that the BS2 requires is a short from pin 4 (RTS) to pin 6 (DSR) on
   the DB-25 input port.

2) Comms Configuration.

   You need to link up J17, the MAX/CC header selector to your choice
   of RS-232 circuits as described elsewhere in this file.

   The incoming signal must connect to RA2
   The outgoing signal must connect to RA3.

   To do this with MAX comms:
   Connect J14 pin 1 to J15 pin 3. (RA2)
   Connect J14 pin 2 to J15 pin 4. (RA3)

   To do this with Cheap comms:
   Connect J22 pin 1 to J15 pin 3. (RA2)
   Connect J22 pin 2 to J15 pin 4. (RA3)

3) EEPROM Configuration.
   Resistors R13, and R14 must be installed.
   Jumper J16 pin 1 to J15 pin 1 (SDA to RA0)
   Jumper J16 pin 2 to J15 pin 2 (SCL to RA1)
   BS2 supports only the 2K EEPROM.

4) ATN circuit.
   Install R18, R19, R26 and Q4. J20 is already linked on the board
   artwork. I included it as a header just in case you wished to
   easilty isolate this signal. Jumper J19 pins 1 and 2 together. This
   connects DTR through to BS2 ATN.
_______________________________________________________________

Programming the PIC16C84.....

Read the PICEX instructions for a better rundown on general assembly.

The EEPROM used in the '84' makes it a very interesting device indeed.
An instant development system.

Headers J11, and resistor R27 (100 Ohms) have been added to the PIGMY
board for my DT001 Programmer.

The MCLR series resistor R27 had to be added to the original circuit
and can be ignored at this stage. (No change).

This is what you will need to do to allow a programmer to be connected
to your PIGMY board.

A track cut must be done on the solder side of the board near R2.
There are 2 holes not used under R2. You will see a small "V" next to
the track that needs to be cut. Aren't I kind?

An insulated  jumper must be connected between pin 1 of J11 and the
hole that is nearest pin 1 of the PIC larger socket. It actually
connects to pin 2 (PICVDD). This jumper can be done on either side of
the board, but if you choose to jumper it on the component side of the
board, you may have to remove, and replace R2 if it is already
installed.

Another jumper can be run from the other unused hole under R2 to the
hole nearest pin 2 of header J11.

A Test link or shunt can then be connected between pins 1 and 2 of J11
to restore the circuit back to normal.

Three more Test links can now be used to connect J11 pins 3 to 4, 5 to
6, and 7 to 8. You can then cut the tracks under these headers. Pins 9
and 10 are ground pins and only used to get the ground signal to the
programmer, so they don't need isolation and linking like the others.

After doing all of this track cutting, jumpering and linking, you
should have the same circuit that you started with, but with 4 extra
links installed.

The programmer board has a 10 pin header cables that connects to J11.

Of course, you only need to do all of this extra work to one board, as
you would only ever need one programmer or development board.

To program an 84 in a PIGMY board, remove the 4 links on J11 and plug
in the 10 pin header flat ribbon cable from your DT001 programmer.
Both power legs of the PIGMY board, and any I/O boards must be
isolated during programming. This is done with a double pole switch in
the power line to both the PIGMY board, and any I/O board.

To return the circuit to normal, remove the power isolation switch and
the 10 pin crimp header, and replace the 4 links on J11.

Use your DT001 programmer board to program an 84 "In-Circuit" with
the supplied walking LED test program. Both the MicroChip and Parallax
versions of source code are on this disk.

Don't confuse the above PICEX power up diagnostic test procedures with
84 programming. PICEX is a PIC16C57/XT programmed by me to certain
specifications for a single application.

An 84 is considered blank when you get it and must be programmed
before it can do anything.
_______________________________________________________________

RS-485...

E6 and E7 are 75176B IC's that can be configured as input or ouput or
both. There is no signal connection between these chips and the rest
of the PIGMY board apart from +5V and ground.

Each of the IC's and header circuits are identical. This allows you to
configure one chip as an input, or as an output, or as a
uni-directional port. This is known as single port 2 wire circuit.

When both chips are used, the features not only double, it can also be
used as a single port 4 wire circuit.

Pin 3 of each header is used for direction control. If a link is
placed beween pin 3 and 4 of each header, a ground is connected to the
control line. This makes the buffer a receiver. With the link removed,
the chip becomes a transmitter. This control line can be connected to
a PIC pin if you wish for flow control.

You can also cut the track between pins 2 and 3 of each IC for further
individual control of each half of the buffer. For example, you may
permanently enable the receive section of a buffer, and control only
the transmit gate. By doing this, all receivers will be listening at
all times, however your software would have to ignore any transmit
from the same chip as a loopback system is in place.

By setting E6 to transmit only, and E7 to receive only, you have a
full four wire RS-485 port.

I have used a DB-25 female connector to attach these signals to. This
complies with current pinouts that I use for other equipment. Yes it
suits me, if you don't like it, I'm sure you will come up with an
alternative such as RJ-11's etc.

I have added +5 volts to pin 1 of the DB-25 connector so that
terminating resistors can be built into DB-25 backshells.

I seem to get a different answer each time I speak to someone on this
subject, and I have plenty of circuit examples, but this seems to be
the trend for end-of-line terminators.

Terminating RS-485 lines:

At the extreme end of each line connect a 100 to 120 ohm resistor from
A+ to A-, and B+ to B-.

Connect a 1K resistor between +5V and A+, and another to B+.
Connect a 1K resistor between Ground and A-, and another to B-.

And if it works fine without terminators, leave it alone.

Headers J23 and J24 can be jumpered to PIC signals directly for RS-485
connection and control.
_______________________________________________________________

RS-232 to RS-485 converter.

(And I have seen these for $50 US in Circuit Cellar Magazine.)
At the price of this board, you could forget about the PIC stuff and
make a very neat RS-232/485 converter complete with power supply. By
connecting up the spare gates of the MAX-232, you can also have flow
control with very little effort.

This document has been put together very rapidly without any great
proof reading, so I hope I have covered all areas. If unsure about any
one constructional topic, I suggest you have a read through all the
projects listed as this should clear up any finer points.

Constructive Criticism...

If you have any thoughts or ideas that may enhance any future PIGMY
boards, or correct mistakes in the assembly text, I would be very
happy to look at them.

Thanks Don...

End of Part 2.
What's Really HOT at DonTronics? 
Don's Download Dungeon
 
Home  Products Prices Directory Order Contact New Books Files Links Other
 

DonTronics Home Page

mailto: don@dontronics.com_
Copyright © 1996-99 DonTronics
 
 
 
Top of Page