CHECKING AND SETTING TOOLKIT TK3

FILE DATE 22FEB03

This text can also be read via the EDIT TXT
button on the main screen. It is held in
the same folder as other TK3 files and is
named TK3SetupNotes.txt

BOARD CHECKING

Switch on Toolkit power supply, preferably
with the PIC omitted if the board has never
been used before, but provided the board is
known to be OK, the PIC may be inserted.

Variously click boxes DA0 to DA4, note the
Expected Output response (0V or 5V) shown
and check with a meter that the stated
Toolkit PCB socket pin (DA0-DA4) shows the
same result.

If port pins do not respond, click another
Port Register value to change the PC's Port
Register address used by Toolkit - there
are three addresses available.

Once a response has been obtained (usually
with register 0378h) don't click-change it
again. The value will be stored to disk when
the QUIT button is clicked and will be
recalled when the program is run, even after
switching off.

All port outputs are automatically set low
when clicking the QUIT button.

READ BACK CHECK

Having found the correct Port Register,
the verifying facility may be checked by
setting DA4 high, DA3 low and clicking
repeatedly on DA0. The Expected CPU
Response value for the "ACK" pin 10 and
the Actual CPU Response should follow the
action of DA0 when DA4 is at 5V.

If they do so five times, the message
Verifying Active is shown. If they do not
follow DA0, your computer cannot read data
from a PIC (can neither verify nor
disassemble).

A few computers are like this, but can still
program a PIC if the other actions are OK.

Additionally (with DA0, DA1 and DA4 at any
setting), click repeatedly on DA3 and
observe the response for "BUSY" pin 11. The
Expected and Actual response values should
be the same, following the setting of DA3 
(but only if your computer is capable of
 reading back).

If you are using the Mk2 PCB rather than
TK3's own PCB and the response does not 
change, make sure you have correctly made
the extra link needed as discussed
further down this text screen.

VERIFY TICK BOX

There is a Verify tick box on this screen
which tells the PC whether or not it should
attempt to perform program verification and
disassembly, and power/cable checks (see
below). If the tick box is ON and your PC is
incapable of reading PIC data, error messages
will appear as appropriate. On first running
TK3, the Verify tick box is automatically set
to OFF.

You may also choose to inhibit these
facilities even if your PC can read back
data. Doing so fractionally speeds the
programming process. It is worth noting
that the author has never experienced true
errors in programming. Any reported errors
have usually been due to the PCB's power
not being on or the printer cable not
plugged in!

CLEAR DEFAULTS

The Clear Defaults Record clears the Input
and Output File names stored and resets their
click options (see later). This action is
performed automatically when Toolkit TK3
is first run on your machine. You may reset
the defaults any time you wish through the
designated button in this window.

You are prevented from using some option
buttons until such time as a named file is
shown as selected for those functions. Use
the DIR (directory) button to select a file.
Available buttons are coloured when their
named file has been selected.

SET TIMING FACTOR BUTTON

The Set PC/PIC Timing Factor optimises the
rate at which your computer sends data to
the PIC, allowing a 10ms pause between
many commands, as stipulated in the PIC
Data Sheet for the PIC16F84. Some later
PICs are content with a shorter pause, see
their data sheets. The value shown is a
timing calculation value and not an actual
timing period.

The action is also performed automatically
when the Toolkit 3 program is first run on
your machine. You may check the value any
time you wish through the designated button
in this window. It is normal for the value
to be slightly different each time you click
the box, choose the shortest (although this
is not very significant to the process).

Note that if you upgrade to a later version
of TK3 should one be introduced, you may
need to reset the timing value through this
screen. The value is only calculated
automatically when the whole program is run
for the first time. TK3 makes this assessment
by seeing whether or not the file named
"defaults_clear_record.txt" already exists. If
it does not, TK3 assumes the program is new
to the computer on which it is being run.

FINE TUNING TIMING FACTOR

If you have access to an oscilloscope, you
can check the automatically-set timing
factor by clicking on the Check Output Pulse
Timing tick-box. This starts a looped
sequence, which lasts for about two minutes,
in which a pulse is output on printer port
connector lines DA3 and DA4, set high for
the timing factor period, then low for one
period in which the PC's timer is read.
The high duration should be about 10ms (but
see above). The low period on the author's
PCs is typically about 0.2ms, but it is
allowed to be as low as one microsecond.

It is probably preferable that the PIC
should be omitted during this test.

Be aware that the output pulse may "jitter"
when observed on a scope. This is perfectly
normal and is due to the computer's own
operating system interruping the processing
of the program while it goes off and "does
its own thing". Only Microsoft know what it
gets up to - don't ask the author!

While the sequence is running, the PCB's 
Programming mode LED is turned on.

At the end of looped sequence, the tick-box
clears the tick mark. The sequence cannot
be interrupted once started.

Whilst you cannot change the timing factor
via the Check PCB screen, you can change
the value as recorded in the TK3Settings.TXT
file held in the same directory as TK3. A
lower value produces a shorter timing period.
The value you set via this text file only
comes into effect the next time you run TK3.

DO NOT change any other statements in this
file and do not add comments or insert line
spaces. The program depends heavily on
finding statements where it expects them!

Be aware that if you change the timing value
in the file, it will be reset to TK3's own
calculated factor if you later click the
Set PC/PIC Timing Factor button.

The low period cannot be changed as this
is subject to the time taken by your PC
to read its timer, plus a slight overhead
while the program moves between commands.

PRINTER

The Printer button allows you to print
these notes to your printer. Ensure that
the cable is connected to the printer
and not to the Toolkit board!

Some other screens also have a Printer
button for certain functions.

HARD DRIVE SELECTION

Most users have to work with Drive C
as the hard drive. It is known, though,
that some readers have their hard drives 
partitioned and may prefer to work through
a partition that has a Drive letter other
than C (Drive E, for example). The intention
of the Hard Drive box is allow readers to
choose Drive E (or other letter) should
they wish to use a partition as the
Default Hard Drive.

Note that in PCs Drive A and Drive B are
typically used for the floppy disk drive,
and Drive D for the CD ROM. Do not select
any of these drives as the Default Hard Drive.

TASM & MPASM

Whilst the options to use TASM or MPASM
grammar and inter-conversions are included
with Toolkit, the MPASM translation to TASM
only recognises MPASM's main commands.
Toolkit does not attempt to be FULLY 
compatible with ALL aspects of MPASM. For
the commands and grammar recognised click
the Commands button on the main screen.

USING TK3 SOFTWARE WITH MK2 PCB

If you are using this TK3 software with
the Toolkit Mk2 (yes, Mk2) PCB, you need
to make and additional connection link
(the TK3 PCB has this connection included).

The correction required is that IC5 pin 2
should be linked to the printer cable 
socket pin 11, the Busy line (DA0 is pin 2,
DA1 is pin 3). This allows TK3 software to
check if the printer cable is connected and
the PCB power switched on.

The same correction link is required for 
the Magenta version of the Toolkit Mk2 PCB
as well.

Note that the power/cable check is not made
when Verify is turned off.

QUIT CHECK PCB SCREEN

When you've checked all you wish to, click
the QUIT button to close this screen. Using
this button automatically ensures that all
Port pins are returned to Logic 0. It is
preferable not to use the this window's X
button (top right) as it does not reset the
Port.
