For those not familiar with Forth we would advise you start with one of the books in the Appendix. For those with some familiarity, the Win32for introduction offers further information
- IBM-PC with Windows95/98 or NT
- 16Mb of RAM
- COM1: Serial Port
- Hard Disk
- Mouse
Target system with a +3.3V to 5.0V power source of at least 40 mA capability to power the ISP serial programmer.
The ISP must be connected to a serial port before running IRTC.
The Target PIC needs a xtal or set to use the internal oscillator with the CONFIG bytes.
Place the IRTC CD in the CD drive and run the Setup program found in the Win32For directory. The setup wizard will install Win32Forth on to your hard drive in the directory of your choice. The default is C:\Win32For.
Next run the file in the IRTC directory on the CD. This will give you the IRTC version of Win32For, RAMF18F.EXE and the demo extensions.
If you wish to have a shortcut to a particular PIC18F device on your desktop select RAMF18F.EXE file and use 'Send to Desktop as Shortcut' to create. You will need to edit the Shortcut command line to include an FLOAD PIC18Fxxx.INI for the device you are using, see below.
To run IRTC either select from a shortcut or run from RAM18F.EXE file in the Win32For\PIC18F directory. e.g.
RAMF18F.EXE FLOAD PIC18F248.INI
IRTC will then load for the PIC18F248.
It is not practicle to run Win32For or IRTC from floppy disks unless the LS120 format is used.
However, it is quite practicle to use the floppy disk to retain the application source code and to compile directly from the floppy.
The ISP is connected to your IBM® compatible computers serial port, COM1. IRTC sets the port configuration to 115200 baud 8 bits two-stop-bits and no-parity. The ISP 25 way D-type connector is then plugged into your computer port or via a cable.
The header on the ISP is plugged into a pin header on your Target hardware. The Target powers the ISP via the power pins from your Target. See ISP description.
This file configures Win32for when it loads up. You may find in necessary to change Win32for .CFG still further to reflect different directories, or any other set-up characteristic you prefer. These are all accomplished with the editor WinView. Refer to the Win32for files for further information.
For PIC18F Target configuration in PIC18F xxxx.INI, see Target Configuration.
IRTC is modified by the .INI file to reflect the properties of the PIC18F device chosen. IRTC is extended by 18FTLM.F and the functions not appropriate to the device are marked as 'NOT Available'.
New PIC18Fxxx.INI files may be edited in WinView to specify new devices as they become available. Existing .INI files may be used as a template and new .INI files will be available on the web site as required See also ISP for information regarding setting the PIC configuration.
IRTC runs the ISP in two modes, Programming and Interactive Communication. The serial programming mode is as described in the Microchip PIC18F Programming application note, DS39028, the interactive communications uses the same pins, RB5, RB6 and RB7 in the low voltage mode. The serial communication of the ISP is, 115200 baud 8 N 2. For the interactive mode to operate a small program, the Target Link Monitor, must first be programmed into the PIC Boot Flash code space. An image of this is created by 18FTLM.F at load time and this must first be programmed into your device before development may begin.
To do this you must first load IRTC with the appropriate .INI file. With the ISP connected to the Target and powered you may REPROGRAM the TLM code and SET-CONFIG the configuration bytes. The PIC18F mode set by the configuration bytes is defined in the .INI file, this is modified by editing the file with WinView. With a used device it will first be necessary to completly erase it with ERASE-MEMORY. So to start, load IRTC with the ISP connected to the Target with both powered, then ;
ERASE-MEMORY
REPROGRAM
SET-CONFIG
When successful the PIC18F will now be ready for development. To start development and put IRTC in the Remote mode use Ctrl-R, ?REM. The response should be the PIC's ID and an indication that the Forth stack is empty.
Once loaded it is NOT possible to change the PIC18F type selection without restarting IRTC with another .INI file.
A set of keyboard macros are pre-set when IRTC is invoked. The following keys are defined as;
?REM is defined as the Ctrl+R
HOST is Ctrl+Shft+H
REPROGRAM is Ctrl+Shft+D
VERIFY is Ctrl+Shft+V
.STATISTICS is Ctrl+S
NOTE: These functions are also available from a pop-up generated by a right mouse click.