4.  INDELKO FORTH KIT

 

4.1.    Hardware Design

RTX2000 was designed to use very few external parts to make a complete computer.  The Indelko Forth Kit takes advantage of this design and implement a minimal parts, single board computer.  The total chip count on board is 9, including the RTX CPU chip, two EPROM's, two SRAM's and 4 logic glue chips.  Figure 1 show the basic design of this computer around the RTX chip.

An RS232 chip is used to support a true RS232 level serial communication line to a terminal or a host computer.

Figure 1.  Schematics of Indelko RTX Forth Kit.

 

 

4.2.    cmForth in ROM

cmForth is supplied in two 27C64 CMOS EPROM's to boot up the Forth kernel.  The EPROM's are used as 'Shadow ROMs', which has a small boot-up routine to copy the cmForth object image into the static RAM chips.  After the boot-up routine is executed, EPROM's are disabled and the cmForth system runs completely from the SRAMs.

The source code of cmForth is supplied on a 5 1/4" diskette in PC-DOS format.  The source code contains the kernel of cmForth, an optimized compiler, and a meta compiler.  The meta compiler is capable of regenerating the binary object code image in EPROMs.  Users can use the meta compiler to recompile cmForth including other application code.  The modified cmForth can then be burnt into EPROMs which can be used to reconfigure the Forth Kit to execute customized applications.

A terminal and disk server program is also included on the diskette.  The program name is TERM.COM.  It was contributed by Mr. Rick VanNorman to the NC4000 Users Group.  To use it, type TERM after the DOS prompt.  After the program is loaded, type QT to connect to Forth Kit.  If Forth Kit is powered up or reset, type a B or b to initiate the communication.  Forth Kit will echo 'hi' and ready to be used.

To exit the communication, hit the ESC key and return back to TERM program.  TERM is derived from the public domain Forth F83/PC-DOS, Version 2.1.0 by Mike Perry and Henry Laxen.  You can open files, edit them, and compiled them under F83.  To load files into cmForth, you have to open the file under TERM, type QT to connect to cmForth, and then type n LOAD to load screen n from the file just opened.

F83 and its documentation are also available from Offete Enterprises.  To learn how to used it and many of its internal features, refer to 'Inside F83' by C. H. Ting.

 

¡@

4.3.    Putting it Together

At this moment RTX2000 is still a very expensive chip and most system based on RTX2000 are even more expensive.  Building your own RTX computer is the most cost effective routine to test drive the Real Time Express.  Most Forth programmers have strong electronic engineering background.  Assembling such a small kit is no problem at all to them.  However, there are some Forth users and programmers lacking the hardware experience to build complex circuitry.  The beauty of RTX and NC4000 Forth engines is that they require very few external parts to make a complete and functional computer.  It is a good place to start learning electronics and computers.

If you are in the later category, it will not hurt if you get an elementary book on digital electronics and start learning about gates, flip-flops, oscillators, etc.

'TTL Cookbook' and 'CMOS Cookbook' by Don Lancaster from Howard W. Sams Co. are highly recommended.

 

¡@

    4.3.1.  The Part List

Following is a list of parts that are needed to complete a RTX single board Computer:

.   Indelko Kit circuit board

.   RTX2000GI-8, 8 MHz

.   Two 27C64 with cmForth

.   Two SRAM's, 6264, 62256, or 68128

.   Flip-flop 74HC74

.   Quad OR gate 74HC32

.   Hex inverter 74HC04

.   RS232 level shifter MAX232

.   Crystal 12 MHz

.   Resister pack, 8*10K

.   Resisters, 4.7M, 100K, 100K, 200K

.   Tantalum capacitors, 1uF/35V, five 10uF/16V, four 0.1 uF, and 22pF

.   Two 3-pin jumper header

.   DIN C-form plug, right angle solder tail, 64 contacts on a and c rows

Other miscellaneous parts include 5V power supply, RS232 null modem cable, a terminal or a host computer with a RS232 serial port.

 

¡@

    4.3.2.  Where to Get Parts

.   Indelko Forth Kit, Offete Enterprises, 1306 South B Street, San Mateo, CA 94402, (415)  574-8250.

.   RTX2000, Harris Semiconductors, 1301 Woody Burke Road, Melbourne, FL 32902, (407) 724-3739.  US distributors: Almac Electronics, Anthem Electronics, Electronics Marketing Corp., Falcon Electronics, Gerber Electronics, Hall-Mark Electronics, Hamilton/Avnet Corp., Newark Electronics, Schweber Electronics, Wyle Lab.

.   IC's and Electronic parts: Radio Shack (consult your local yellow pages); Jameco, 1355 Shoreway Road, Belmont, CA 94002, (415) 592-8097; Fry's Electronics, 541 Lakeside Drive, Sunnyvale, CA (408) 733-1770; JDR, 2233 Branham Lane, San Jose, CA 95124,    (800) 538-5000.

 

¡@

    4.3.3.  Assembling

Although IC's and RTX2000 can be soldered directly to the circuit board, it is recommended that socket be used instead of direct soldering.  RTX2000 needs an 85 pin PGA (Pin grid array) socket, memory chips need 28 and/or 32 pin DIP (Dual inline plastic) sockets, other IC's need three 14 pin and one 16 pin DIP sockets.

Resistors, capacitors and the crystal are soldered directly to the circuit board.  The polarity of the tantalum capacitors must be observed carefully.

Considerable pressure is necessary to push RTX2000 into its socket.  Apply the pressure firmly and evenly.  RTX 2000 has seating rings on the four corner pins.  The seating rings must be flush with the surface of the socket.  In case it is necessary to remove RTX from its socket, use special PGA extraction tool.  If extraction tool is not available, use a small screw driver with blade less than 0.1" wide.  Insert the blade between pins and left gently.  Work slowly around the RTX chip until the pins are freed evenly.

 

¡@

4.3.    Debugging Forth Kit

The Indelko Forth Kit was carefully laid out and manufactured with high quality materials and precision.  Many of them had been assembled successfully by relatively unsophisticated users.  It does require careful soldering and parts from reliable sources.  The following sections discuss testing and debugging procedures in case you do have problem in bring a kit to live.

We have to assume that there is no cold solder joint, all connection are soldered properly, and that no chip is pushed backward in its socket.  Finally, 5V power supply and ground must be applied correctly.  These seem to be old hats.  However, you cannot afford to make mistakes which may destroy RTX2000 or other chips.

 

¡@

    4.3.1.  Preliminary Tests

Before plugging in all the chips, test the 5 volt power connections and the ground connections.  All the memory chips and the TTL chips use the pins at the upper right corner for power and the pin at the lower left corner for ground.  Use an multimeter to verify that the power pins are connected and that the ground pins are connected.  Also make sure that the power pins and the ground pins are not connected; otherwise, you have made a soldering mistake.  Correct it before proceed.

RTX has the following pins for power supply: A4, C10, H1, AND L9; and the following for ground: B6, D11, E1, J7, J11, AND L1.  MAX232 uses pins 1 and 4 for power and 3 and 5 for ground.

 

¡@

    4.3.2.  Power Connection

After installing RTX and all the other chips, it is ready to power up.  Make sure that the 5 volt power supply and ground are of the correct polarity.  The power connector must be keyed so that it is impossible to reverse the power and ground lines.

Reversing the power and ground generally causes chips to destruct themselves.  You cannot be too careful.

¡@

    4.3.3.  RS232 Connection

Connect the RS232 lines to a terminal or to a host computer through a DB25 cable or connector.  The terminal or computer must be set up to use a null modem.  The best way to make a null modem is to tie pins 4, 5, 6, 8, and 20 in the DB25 connector to be plugged into the terminal or computer.  This configuration activates the terminal or computer unconditionally

To make the null modem connection, first determine the polarity of Tx and Rx from the terminal/host computer by measuring voltages on pins 2 and 3, referencing to pin 7, the signal ground.  A negative voltage -9 to -12 volts indicates that pin to be Tx, the transmitter from the host.  A voltage new 0 indicates that pin to be Rx, the receiver.  On the RTX side, a4 pin on the DIN connector must be negative and c4 pin should be near ground.  Connect a4 to host Rx and c4 to host Tx.

Reversing the Tx and Rx connections should do no harm to either host nor RTX, except that they will not communicate correctly.  There is a 50% chance that the Tx and Rx signals are on the wrong pins.  Do prepare to swap these signals on your end of the RS232 cable.

 

¡@

    4.3.4.  Initial Test

A terminal is handy for initial tests, because setting up a terminal is much easier than setting up a computer to emulate a terminal.  The terminal or the computer is best set to 9600 baud, 1 start bit, 8 data bits, no parity, and 1 or 2 stop bits.  A TERM program is included with the kit for an IBM-PC/XT/AT host.  Load TERM and type QT to activate the terminal and disk server.

Power up RTX.  If the kit is built correctly and the terminal or host computer is set up correctly, type a 'B' or a 'b' on the keyboard will cause RTX to echo a 'hi' on the screen.  It you get the 'hi' prompt, the RTX cmForth is alive and ready for you to use.  Type a few 'Enter' or 'CR' on the keyboard, and you will see a sequence of 'ok' echoed back.

At this point, you can start using RTX as a regular Forth computer.  If you cannot get the 'hi' prompt, reset RTX and try again with the 'B' key.  Failing to get any response, you will have to refer to the next sections.

 

¡@

    4.4.4.  Debugging RTX Kit

If you cannot get the RTX to respond to the terminal or host, you can follow the following procedures to identify the cause of your problem.

.   Check the 5 volt power supply.  Verify that all chips are powered properly.

.   Remove RS232 cable.  Verify the Tx voltages on RTX and on the host.  Verify that the voltages on the Rx lines are close to ground.  Make sure that host Tx is connected to RTX Rx and that host Rx is connected to RTX Tx.

.   Double check your terminal or the host computer.  Make sure it transmits and receives at 9600 baud, 8 data bits, 1 start bit, and 1 or more stop bits.  The best way to verify that the terminal/computer is properly set up is to connect pin 2 and 3 together on the null modem connector.  Any key stroke will then be echoed back to the display.

If you have the correct power and RS232 connection, but RTX is still not working, you need an oscilloscope to do the following hardware debugging:

.   Check that the oscillator oscillates at 12 MHz.  Probe pins 2 and 4 of U8 for 12 MHz signal.  If the oscillator does not oscillate, problem may be in the crystal X, or in the chip U8 (74HC04).

.   Test B1 pin ICLK on RTX for 12 MHz signal.  If no oscillation, chips U7 (74HC32) or U6 (74HC74) may be defective.

.   Test G11 pin PCLK on RTX for 6 MHz signal.  If no oscillation, RTX may be defective.

.   Test the MAX232 chip.  Pin 2 on U9 should be 10 Volts and pin 6 should be -10 volts.  If these voltages are not correct, check that the big capacitors are installed correctly.  Replace MAX232 if capacitors are ok.

.   Test the Reset circuitry.  Probe pin 3 of U7 or pin B2 of RTX and then push the reset switch.  When the reset switch is pushed, pin 3 U7 should be high.  A second after the reset switch is released, pin 3 U7 will jump to ground.  If the reset is not reliable, cut resistor R4 out.  If reset is still not repeatable, problem may be in the reset capacitor C6, resistors R2 and R3, or the OR gate U7.

.   Check the system clock PCLK at G11.  PCLK should be 6 MHz.  If we have 12 MHz at ICLK but no clock at PCLK, RTX2000 is in trouble.  Double check the soldering and connections of RTX.

.   If PCLK is alive, check MA01 at L3.  If RTX2000 is executing anything, this pin should show a square wave at about 3 MHz.  If this pin shows a square wave, but the system does not work, suspect ROM and RAM chips.

.   Probe the BOOT pin at G10 while pushing the reset switch.  It should be high when holding the reset.  It makes a short pulse to ground after reset expires.  When BOOT is high, RTX2000 executes from ROM, after the short pulse, it executes from RAM.  If the short pulse is hard to catch on the scope, probe pin 5 on U6.  This pin is high during boot-up and drop to ground when SRAMs are enabled.  If this pin does not drop to ground, the boot-up routine is not executed correctly.  Check the EPROMs.

.   If BOOT pin behaves correctly but the system does not run, check RAMs.

 

¡@

4.4.    Host Interface

After power-up or manual reset, cmForth waits for the user to type a 'B' or 'b' on the terminal to determine the actual baud rate used by the terminal or host computer.  Once the baud rate is determined, all subsequent communication will proceed using this baud rate.  RTX can run comfortably up to 38.4 baud.  Most terminal and host computer will have problems operating above 9600 baud.

The most often occurred problem is that the disk service does not terminate successfully.  When cmForth needs a block of data, it sends three bytes: a NUL or zero byte followed by two bytes containing a block number.  Then it waits for 1024 bytes from the host.  It will wait forever if the host does not send 1024 bytes.  When cmForth wants to write a block of data to the disk, it sends a three byte header and followed by 1024 bytes of data.  The first byte is again a NUL, and the next two bytes contains a block number, with its most significant bit set, indicating a write-disk request.  The host must be able to capture all the data which follows, because cmForth does not wait.

A common error is that for some reason, the user makes cmForth to send a NUL byte to the host.  The host found that the requested disk block is not available and makes an error exit.  cmForth is waiting for a block which it will never get, and the host cannot resume the communication.  In this situation, the easiest way out is to force the host to send 1024 bytes of dummy data, which will wake up cmForth.  After communication is re-established, do an EMPTY-BUFFERS to clear the disk buffer in cmForth.

 

¡@