Previous Page > Hardware Index > Extending the Ace, Hobby Electronics August 1983.

Extending the ACE, Hobby Electronics page 42
HE's Input/
Output board
supplies the
extra RAM the
ACE needs to
control HEBOT or
similar useful
Mike Lord
If you are the proud owner of a Jupiter ACE then you will know that although it has 3K bytes of RAM fitted most of this is taken up by the screen and character set areas, leaving not a lot for your 'programs'. And you will probably know that FORTH was originally developed for control applications — like steering a telescope or guiding a robot — and , may be interested in experimenting along these lines.
  This project has been developed to help in both of these areas; by giving you an additional 2 or 4 bytes of RAM space, plus 8-bit input and output . ports to control devices such as the HEBOT computer controlled robot.
  Everything is on one printed circuit board which plugs onto the ACE's rear bus connector. If you don't want the I/O ports, then you can just build the RAM extension, or you could even leave out the RAM parts for the time being and just make the I/O ports.

The Credit
Figure 1 gives the complete circuit diagram of the add-on board. Looking at the RAM part first, this is provided by ICs 1, 2 and 3, ICs 1 and 2 are 6116 2K bytes CMOS static RAM chips, chosen because they are very easy to use — having no particular vices — and take very little power. These chips deal with a complete 8-bit byte at a time,

Figure 1. The complete circuit.

Extending the ACE, Hobby Electronics page 43
the data being transferred into or out of the IC on the ACE's data bus lines DO-D7. Since each IC holds 2K (2048) bytes, eleven address inputs are needed to select a particular byte, and these come from the ACE's address bus lines A0-A10. To read data out of the chip, or to write new data in a 'low' pulse must be applied to the 'Output Enable' or 'Write Enable' inputs; these pulses are easily obtained from the ACE's bus RD and WR lines. The other connections to the RAM chips are the 0V and +5V supplies, and the CE (Chip Enable) input on pin 18, which must be low when data is being written to or read from the IC.
  The CE inputs to the two RAM chips are provided by IC3, which ensures that ICs 1 and 2 are only enabled, when the ACE wants to access memory at the appropriate addresses. IC3 is a 'one out of eight decoder' having eight outputs which normally give out a 'high' logic level. When the chip is enabled by low level signals on its G1 and G2 inputs and high level signal on its G3 input, then one of the eight outputs will go to a low level, which output depending on the signal applied to the chip's A, B & C select inputs.
  These A, B, C and G inputs are connected to the five most significant address lines from the ACE and to the MREQ line, which goes low when the ACE wants to read from or write to a memory location (as opposed to an I/O location). The way they are connected results in IC1 being enabled whenever the address is in .. the range 4000-47FF (hex) and IC2 - being enabled when the address is in the range 4800-4FFF. These addresses follow immediately after the addresses used by the RAM in the ACE itself, so that the new memory adds directly onto the existing directory and stack area.
  The I/O ports are provided by ICs 4, 5 and 6. ICS is a simple 8-bit tri-state buffer which, whenever it is enabled by a low level signal on pins 1 and 19, transfers whatever signals are present on PL1 directly to the system data bus lines D0-D7. At other times the outputs of IC5
are in a high impedance state, so as to not affect the data bus.
  IC6 is an 8-bit latch which, when clocked by a pulse on pin 11, grabs whatever information is on the data bus lines at that time and holds it until the next time it is clocked. The eight outputs are fed though the - protective resistors R1-R8 to the board output plug PL2. These resistors have been put in to prevent damage to IC6, in case any of the board outputs are accidentally connected together or to +5V, but they do limit the available output signals and so their values should really be chosen to give as much protection as possible depending on exactly what the board is driving. If it is driving TTL loads, then R1-R8 should be between 100 to 330 ohms each, but higher values (around 1 kR) can be used when the board is driving light loads such as those presented by the HEBOT control circuitry.
  R9 and C3 reset IC6 so that all of its outputs are at low level when power is switched on.
  IC4 is a triple 'positive NOR' gate which is used here to provide the enable and clock pulses to ICs 5 and 6. It gives a low level 'enable' pulse to IC5 whenever the ACE reads from an I/O location with address line A1 to '0', and gives a clock pulse to IC6 whenever the ACE writes to an I/O location with address line Al at '0'.
  The I/O connectors PL1 and 2 carry +5V as well as the input/output signals; this comes from the regulator inside the ACE and not more than about 100mA should be drawn. PL2 carries the +9V un-stabilised line from the ACE's mains adaptor; again, not more than about 100mA should be drawn. If you look at Figure 2, you will see that the two holes on the board are labelled '0V' and '+9V'. These let you connect an external higher-powered unregulated '9V' supply if the devices you are con-trolling need more power than can be provided by the ACE's mains adaptor, but note that if you do connect such an external supply then it will also be powering the ACE, and so the ACE's own mains adaptor should not then be
Parts List

(All 1/4 watt 5% carbon)
R1-8 ............ 1kR
(See text)
R9 .............. 4k7

CAPACITOR C1, 2, 3 ........ 4u7 25V radial electro C4 ............. 100n ceramic

SEMICONDUCTORS IC1, 2 .......... 6116 2K static RAM
IC3 ............. 74LS138 1-of-8 decoder
IC4 ............. 74LS27 triple 3-input NOR
IC5 ............. 75LS244 octal tri-state buffer
IC6 ............. 74LS273 octal latch
MISCELLANEOUS SK1 ..... edge connector PL1, 2 .. 12-way PCB plugs 1 x 14-way, 1 x 16 way, 2 x 20 way, 2 x 24 way IC sockets; PCB; wire, sleeving, solder etc.


The component layout is shown in Figure 2. A single sided printed circuit board has been used to keep the cost of the project down, but this has meant that 14 wire links have to be added, as shown, to complete all of the connections. These should be sleeved where there is a danger of accidental short circuits.
  After fitting the links, the resistors R1 -R9 should be soldered in place, followed by the IC sockets and then the capacitors. Note that the sockets used for ICs 3 and 4 must be low profile types.
  The input and output connectors, PL1 and PL2, should be fitted so that their plastic moulding's are on the component side of the board with the short ends of the pins going though the board to be soldered on the track side. Two pins will have to be removed from PL1 and one from PL2, as only 10 and 11 holes respectively have been drilled in the board. The missing pins provide a polarising facility to reduce the chance of putting the mating sockets on wrongly.
  The sockets to be used with the input/output plugs are purchased as empty 'shells',
with loose contacts which are soldered onto the connecting

Extending the ACE, Hobby Electronics page 44
wires then pushed into the shell so that they latch home.
  SK1 is a 25+25 way, 0.1 in pitch . able sided edge connector with wire-wrap pins. If you can't get exactly the right type then buy a longer one and cut it down to the correct length. The pins should be removed from the third position from one end and a polarising key fitted in their place (if you can't find a suitable key in the shops, then one can easily be cut from a piece of thick plastic). This polarising key is most important, as it is the only thing that will prevent you from plugging the board in wrongly, with possibly disastrous consequences. SK1 should be fitted 'so that it is square onto the PCB, and spaced so that the body of the connector is about ┬╝in from the PCB.
  If you want to build up the RAM - part of the board then ICs 4, 5, 6 and R1-9 and also C1 & C3 and PL1, 2 need not be fitted. If you are starting small, then IC2 can be left out, resulting in only 2K extra bytes of RAM. On the other hand, if you are only interested in the I/O circuits then leave out ICs 1, 2 & 3.

Testing It
Before plugging the board into the ACE, check it very carefully to make -sure that the right components have been fitted the right way round and —most important — that solder splashes or excess solder on joints have not caused any short circuits -between adjacent tracks. The areas that this type of fault is most likely to have occurred are where tracks pass between the pins of ICs 1, 2, 5 & 6.
  Once you are certain that it won't damage anything, you can then try the ACE with the new board plugged in. Remember to switch off the power before plugging anything in or out! It should behave exactly as before except that if you had added RAM then entering:

15384 @

should print 18432, if you have added 2K, or 20480 if you have added 4K bytes, and you will now be able to enter much longer dictionaries.
  If you have equipped the board with the I/O circuits then you can test these with a voltmeter and a wire link. First, check that the outputs on pins 3, 4, 6-11 of PL2 are all at less than 0V4. Then set them all to the high level by:

255 253 OUT

and they should then be bet-ween 3 and 5 volts. To check the input circuits, use:

253 IN

Figure 2. The PCB and components. Wire links are used to keep the board one-sided.
which will print 255 if all of the inputs on pins 3-10 of PL1 are open, and lesser values if any or all of these pins are connected to 0V.

Using The I/O
Both the input and the output ports are at I/O address 253 (actually they will appear at many addresses - because only address line Al is looked at, but 253 is a convenient value to remember) and are accessed by using the ACE FORTH words IN and OUT. For example,

253 IN

will put on the stack a value corresponding to the logic levels on the eight input pins, while

253 OUT

will set the eight output pins according to the value on the top of the stack.
  Both the input and the output are 8-bit binary values which you can translate to and from decimal with the aid of Table 1, so that — for example — to set bits 1 and 3 of the output port to the 'high' level (1) and the rest to low. (0) you could use:

10 253 OUT

  It is worth noting that FORTH's OR word works on a bit by bit basis, so

that we could have set output bits 1 and 3 to '1' by:

2 8 OR 253 OUT

And so does the AND word, which is very convenient when we want to examine the state of a particular input line;

253 IN 8 AND

leaves a value onto the stack which is zero only when input bit 3 is zero (bit 3 corresponding to decimal value 8).


I/O Bit	Decimal Value

0	  1
1	  2
2	  4
3	  8
4	 16
5	 32
6	 64
7	128

Extending the ACE, Hobby Electronics page 45

   Table 2		   Table 3		        Table 4

 2  ***  2 +9V		RM1	   PL2-11		  0     HEBOT stopped
 3  IP7	 3 OP7		RM2	   PL2-10			lights & beeper off
 4  IP6	 4 OP6		RT	   PL1-9		  5	Move forward
 5  IP5	 5 +5V		FT	   PL1-8		  6	Turn clockwise
 6  IP4	 6 OP5		LT	   PL1-10		  9	Turn anti-clockwise
 7  IP3	 7 OP4		BT	   PL1-7		 10	Move backwards
 8  IP2	 8 OP3		P	   PL2-6		 16	Lamps on
 9  IP1	 9 OP2		OV	   PL2-1		 32	Pen solenoid on.
10  IP0	10 ***		OV	   PL1-11		 64	Low frequency beep.
11  OV	11 OP1		+10V	   PL2-2		192	High frequency beep.
12  ***	12 OP0		T	   PL2-3
			LM2	   PL2-8
***= pin removed for	LM1	   PL2-9
polarising		L	   PL2-7
  Table 3 shows the decimal values to be output to get HEBOT to perform; as discussed earlier these can be combined by adding the values or by making use of the OR word. Program 1 gives a simple program to make HEBOT move, beep and flash using keys W, E, S and 3 to control direction L to light the lamps and B OR H to beep. Pressing key Q will turn off HEBOT and end the program.

Program 1

  SWAP 253 OUT
  ASCII 0 =
Driving HEBOT

HEBOT (HE's computer controlled robot project published in the November 1982 issue) is an ideal vehicle for experimenting with the use of FORTH as a control language, using the input/output capabilities of this board.
   Eight output lines are needed to control the motors, speakers, lights and pen of HEBOT, and four input lines are used to monitor the touch
sensors. These can be connected to PL1 and 2 as shown in Table 2. The ACE's mains adaptor will give just about enough power to drive HEBOT, as well as the ACE, as long as you don't want to operate the pen solenoid and avoid switching instantaneously from full forward to full reverse. If you want to operate the pen or thrash about at high speed then a more powerful supply should , be connected as described earlier.