the single board 6502 - amaus.net 198101 compute.pdf126 compute! januorv. 1981. issue 8 the single...

17
126 COMPUTE! Januorv. 1981. Issue 8 The Single- Board 6502 than done", however.) The first problem turned out to be figuring out the proper "handshaking" sequence. I first looked at the popular "Centronics" style handshaking se- quence but decided to simplify it down to two lines (instead of three). Handshaking Sequence XMTR starts first 1. XMTR initializes 'Data Ready' low and waits for the RCVR line' Acknowledge/Busy' to go low. 1. RCVR initializes 'ACKJBusy' low and waits for the 'Data Ready' line to go high indicating that there is a BYTE available on the lines. 3. XMTR puts a data BYTE on the lines, sets the 'Data Ready' line high and waits for the RCVR 'ACK/Busy' line to go high signifying that the data has been received. 4. RCVR accepts a data BYTE and sets the' ACKJBusy' high 5. XMTR sets 'Data Ready' low after 'AcklBusy' goes high If I had to do it all over, I would have added a third line to indicate that the byte on the lines was the last byte to be transferred. This would be better for transferring binary dumps since, in that mode, with only two handshake lines, the receiver has no way of knowing when the data transfer in completed and must be RESET to get it out of an infinite loop. The neat handshaking modes available in the 6522 on the AIM weren't used because I wanted to be able to use the same software for both the KIM and the AIM and those special 110 operating modes aren't available on KIM since it uses a 6530 for its user I/O. (Although the example software is only used to send data one way-- from AIM to KIM, it has been used to send data the other way also). As far as the hardware connection goes--simply hook PAO-PA7 on the KIM to PAO-PA7 on the AIM (PAO to PAO, PAl to PAl etc), PBO-PBl on the KIM to PBO- PB 1 on the AIM, and then tie the system grounds together. That's not too difficult, is it? IMPORTANT NOTE: Both systems must be reset to put the I/O lines in a known state (all lines go "high" after a system reset). The order in which the PD1 (ACK/Dusy) PDO (Data Ready) Eric Rehnke High-Speed Data Transfer Necessity is INDEED the mother of invention. For quite some time I've thought about how neat it would be to have some way of transferring data at high speed between two computers. But, as usual, there was always something "more important" to do. Recently, the need arose to have such a high- speed data transfer system. As newsletter editor for INTERACTIVE (a newsletter published by Rockwell for the AIM 65), I frequently need to print AIM 65 program listings. Now the AIM is a great little machine, and the on-board thermal printer is very convenient but a 20 column wide assembly language or BASIC listing just doesn't cut it for publication. Hooking my Decwriter up to the AIM wouldn't solve the problem because AIM's ROM assembler still formats the outut for a 20 column wide printout. Clearly, the only practical solution was to somehow move the source code over to my KIM system and assemble it with the HDE assembler. Fortunately, except for the fact that AIM 65 text editor doesn't use line numbers, the source code is completely compatible between the two machines. (That's because both assemblers have the same origin. ) The software I'm presenting is a version which dumps object code from either the AIM, SYM or 6522 equipped APPLE to my KIM. I'm not providing the source file transfer pro- gram because I've still got some bugs in it. (Maybe I'll print that routine some other time.) One of the fastest and, perhaps, even the simplest method of transferring data from one computer to another is to do it in parallel. Each computer needs an 8-bit 110 port and several "handshaking" lines for signaling "data sent" and "data received". All of my systems have a user accessible 110 port (I recently installed a 6522 VIA in my Apple II) so all that I needed to do was hook up the lines and write the software. (It always turns out to be "easier said

Upload: nguyendang

Post on 27-Aug-2019

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

126 COMPUTE! Januorv. 1981. Issue 8

The Single­Board 6502

than done", however.)The first problem turned out to be figuring out

the proper "handshaking" sequence. I first looked atthe popular "Centronics" style handshaking se­quence but decided to simplify it down to two lines(instead of three).

Handshaking Sequence

XMTR starts first1. XMTR initializes 'Data Ready' low and waits for the RCVR

line'Acknowledge/Busy' to go low.

1. RCVR initializes 'ACKJBusy' low and waits for the 'DataReady' line to go high indicating that there is a BYTEavailable on the lines.

3. XMTR puts a data BYTE on the lines, sets the 'DataReady' line high and waits for the RCVR 'ACK/Busy'line to go high signifying that the data has beenreceived.

4. RCVR accepts a data BYTE and sets the' ACKJBusy'high

5. XMTR sets 'Data Ready' low after 'AcklBusy' goes high

If I had to do it all over, I would have added a thirdline to indicate that the byte on the lines was the lastbyte to be transferred. This would be better fortransferring binary dumps since, in that mode, withonly two handshake lines, the receiver has no way ofknowing when the data transfer in completed andmust be RESET to get it out of an infinite loop.

The neat handshaking modes available in the6522 on the AIM weren't used because I wanted tobe able to use the same software for both the KIMand the AIM and those special 110 operating modesaren't available on KIM since it uses a 6530 for itsuser I/O. (Although the example software is onlyused to send data one way-- from AIM to KIM, ithas been used to send data the other way also).

As far as the hardware connection goes--simplyhook PAO-PA7 on the KIM to PAO-PA7 on the AIM(PAO to PAO, PAl to PAl etc), PBO-PBl on theKIM to PBO-PB 1 on the AIM, and then tie thesystem grounds together. That's not too difficult, isit?

IMPORTANT NOTE: Both systems must be resetto put the I/O lines in a known state (all lines go"high" after a system reset). The order in which the

PD1 (ACK/Dusy)

PDO (Data Ready)Eric RehnkeHigh-Speed Data TransferNecessity is INDEED the mother of invention.

For quite some time I've thought about how neat itwould be to have some way of transferring data athigh speed between two computers. But, as usual,there was always something "more important" todo.

Recently, the need arose to have such a high­speed data transfer system.

As newsletter editor for INTERACTIVE (anewsletter published by Rockwell for the AIM 65), Ifrequently need to print AIM 65 program listings.

Now the AIM is a great little machine, and theon-board thermal printer is very convenient but a 20column wide assembly language or BASIC listingjust doesn't cut it for publication.

Hooking my Decwriter up to the AIM wouldn'tsolve the problem because AIM's ROM assemblerstill formats the outut for a 20 column wide printout.

Clearly, the only practical solution was tosomehow move the source code over to my KIMsystem and assemble it with the HDE assembler.

Fortunately, except for the fact that AIM 65 texteditor doesn't use line numbers, the source code iscompletely compatible between the two machines.(That's because both assemblers have the sameorigin. )

The software I'm presenting is a version whichdumps object code from either the AIM, SYM or6522 equipped APPLE to my KIM.

I'm not providing the source file transfer pro­gram because I've still got some bugs in it. (MaybeI'll print that routine some other time.)

One of the fastest and, perhaps, even the simplestmethod of transferring data from one computer toanother is to do it in parallel. Each computer needsan 8-bit 110 port and several "handshaking" linesfor signaling "data sent" and "data received". Allof my systems have a user accessible 110 port (Irecently installed a 6522 VIA in my Apple II) so allthat I needed to do was hook up the lines and writethe software. (It always turns out to be "easier said

Page 2: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

January. 1981 Issue 8 COMPUTE! 127

programs are started is also important. The transmitprogram must be started first, then the receive pro­gram.

HDE ASSEMBLER REV 2.2

; 6~j22 l.OCATION

;WRITTEN BY ERIC C. REHNKE 9/80

PDINT1 *="*+2POINT2 *==*+2

*==~I;OOO()

;WORKING POINTERS

;SAVE THE CHARACTER

'RETURN TO MON WHEN DONE

;SEE IF WERE FINISHED;BY COMPARING POINTERS

, ••• AND SEND IT ACROSS.

;NOW GET A CHARACTER

;WAIT HERE FOR THE RCVR;TO BRING THE ACK/BUSY LOW AND;SIGNIFY THATS Irs READY.

; ••• AND MAKE IT LOW

;MAKE THE 'A' SIDE; AL.l.. OUTF'UTS;CLEAR THE OFFSET;SET PBO=OUTPUT (DATA READY)

;DON'T EVER FORGET THIS! I I I ! ! I

F'HA

BHK

=:~;AOOO

==IOBABE==IDBA!3E+2==IOBASE+~1

==I()F.lA!:;E1'l~.'i

XMTR

;TRANSMITTER SUBROUTINE

*::=~;2()0

.OFF COOO

eLI)

INITTX LDA UFFsrA PADDLDY tol.DA uSTA PBDDSTY PHD

CKl..O()F' LDA PBDAND =11:2BNE CKLDOP

F~EENT l. LDY t()LDA (F'OINTU,Y

,JSR XMTI~

JSR INCPTRLDA PDINr:l.CMP PDINT2BNE F(EENT 1LDA POINTH:1.eMP POINT2+1BNE F:EENT:I.

IOBM;EPHDPBDDF'ADDPAD

LABEL SOURCE PAGE 000:1.;THIS PROGRAM TRANSFERS OBJECT CODE;OVER THE PARALLEL INTERFACE. THE ADDRESS;LIMITS OF THE DUMP MUST BE SETUP BY;THE USER IN POINT1 (START) AND;AND POINT2 CEND+1).

O[~,..IECT

48

D8

A9 FF8D 03 AOAO 00A9 018D 02 AOBe 00 AO

AD 00 AO29 02DO F9

AO 0081 00

20 :~E 0')

20 4E 0')A5 00C5 02DO FOA5 01,C5 03DO EA

00

~IDDI:(

2000200()200020002000200020002000:WOO00000000·000000020004000400040004000400040004000400040004000400040200020002000:~01

0201020302060208020A020D02100210021.3021502170217021.9021B021B021E021.E02210223022502270229022B022(1022D022E022E022E022E

L I NE:n:01.····001001,,-002001 002~5

01. OO:;~6

01,,-002701. .... 002e01 -·003001 004001 00~jO

01.--005501-00560:1. -·005/01-006001-,008001 ·-OO'/~5

01-.. 010001-010~:i

01--0:1.1001 .... 0120o:1.-0DO01.,-01.4001.-,015001.-016001--01'1001,-020001 .... 021001--022001 --023001.,-029001 --030001--031001-·032001-()33001-034001.-035001·-035::'i01-036001-036101.-036:501--0394O:l.-.. 03n'i01-,,040001.,-041,001 --042001-050001-0::HO01-052001-053001-0540()1.-05~50

01-·0::i6001-,,056501.-061001 .... 062001.--06:300:1.-064001-0b500:1.-0660

Page 3: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

128 COMPUTE! January, 1981. Issue 8

01-0670 022F 48 PHA ;TWICE01-0680 0230 AD 00 AO ACKLPl LIM PHD ;WAIT TIL 'ACK/BUSY' IS L.OW01-0690 0233 29 02 AND t201-0700 0235 DO F9 BNE ACKLPl01-0710 023701-0720 0237 68 F'LA ;RECOVER DATA01-0730 0238 8D OF AO STA PAD01-0740 023B A9 01 LDA tl ;RAISE 'DATA READY' HIGH01-0750 023D 8D 00 AO STA PBD01-0760 024001-0770 0240 AD 00 AO ACKLP2 LDA PBD ;WAIT TIL 'ACK/BUSY' IS HIGH01-0780 0243 29 02 AND t201-0790 0245 FO F9 BEG ACKLF'201-0800 024701-0810 0247 A9 00 LDA to ;NOW DROP THE 'DATA READY' LINE01-0820 0249 8D 00 AO STA PBD01-0830 024C 68 PLA ;RECOVER CHAR FOR CR TEST01-0840 024D 60 RTS01-0850 024E01-0860 024E ; HEF"~E WE INCREMENT POINT101-0870 024E01-0880 024E E6 00 INCF'TR INC POINT:L01-0890 0250 DO 02 BNE EXIT01-0900 0252 E6 01 INC POINT1+101-0910 0254 60 EXIT RTS01-0920 025501-0940 025501-0950 025501-0975 0255 .END

;WRITTEN BY ERIC C. REHNKE 9/80

; 6530 LOCATION

*::~;OOOO

PO I NT:1. *::*+2

;CLEAR THE OFFSET

;DON'T EVER FORGET THIS!!!!!;HAKE THE 'A' SIDE ALL INPUTS

;5ET PB1==OUTPUT (ACK/BUSY)

PAGE 0001

::11700==IOBASE+2::IOBASE+3::IOBASE+:1.:: I OBf.5E

LABEL SOURCE

;THI5 PROGRAM RECEIVES OBJECT CODE FILES;OVER THE PARALLEL INTERFACE AND STORES;THE DATA STARTING AT THE LOCATION;INDICATED BY THE POINTER AT 10000.;THIS POINTER MUST BE INITIALIZED BY THE USER.

CLDINITRX LDA to

STA PADDLDY toLDA #2STA PBDD

IOBASEPHDPBDDPADDPAD

HDE: ASSEMBLER REV 2. ~~

LINEf. ADDR OB..JECT

01-0010 200001-0020 200001-0030 200001-,0040 200001-0050 200001-0055 20000:1-"0060 200001-0070 20000:1. -OOBO 200001····00liO 000001-0100 000201-0110 000201.-01:1.5 000 ;~

01-0120 000201-0130 000201.--0140 000201-0150 000201-0160 000201-,0170 000201-0190 000201-0200 000201-0210 200001-0220 ~~OOO

01-0230 200001-0240 200001-0250 200001-0251 2000 D801-0260 2001 A9 0001-0270 2003 8D 01 1701-0280 2006 AO 0001-0290 2008 A9 or)

.:..

01-0300 200A 8D 03 17

Page 4: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

January. 1981. Issue 8 COMPUTE! 129

-----------------------------------------------

BOX 120ALLAMUCHY, N.J. 07820201-362-6574

HUDSON DIGITAL ELECTRONICS INC.

THE TASK* MASTERSHDE supports the *TIM, AIM, SYM and KIM (TASK) with a growing line of computer programs andperipheral com.ponents. All HDE component boards are state-of-the-art 41/2" x 61/2", with on boardregulation of all required voltages, fully compatible with the KIM·4 bus.

OMNIDISK 65/8 and 65/5Single and dual drive 8" and 5%" disk systems.Complete, ready to plug in, bootstrap and run.Include HDE's proprietary operating system,FODS (File Oriented Disk System). From $795.00.

DM816·M8AAn 8K static RAM board tested for a minimum of100 hours and warranted for a full 6 months.$195.00

DM816·UB1A prototyping card with on-board 5V regulatorand address selection. You add the application.$49.50

DM816-P8A 4/8K EPROM card for 2708 or 2716 circuits.On board regulation of all required voltages.Supplied without EPROMS. $165.00

DM816-CC15A 15 position motherboard mounted in a 19"RETMA standard card cage, with power supply.KIM, AIM and SYM versions. $545.00

DISK PROGRAM LIBRARYOffers exchange of user contributed routinesand programs for HDE Disk Systems. ContactProgressive Computer Software, Inc. for details.

ORDER FROM THESE FINE DEALERS:

HOE DISK BASICA full range disk BASIC for KIM based systems.Includes PRINT USING, IF ... THEN ... ELSE.Sequential and random file access and muchmore. $175.00

HOE ADVANCED INTERACTIVEDISASSEMBLER (AID)Two pass disassembler assigns labels and con­structs source files for any object program.Saves multiple files to disk. TIM, AIM, SYM, KIMversions. $95.00

HOE ASSEMBLERAdvanced, two pass assembler with standardmnemonics. KI M, TI M, SYM and KI M cassetteversions. $75.00 ($80.00 cassette)

HOE TEXT OUTPUT PROCESSING SYSTEM(TOPS)A comprehensive text processor with over 30commands to format and output letters, docu­ments, manuscripts. KIM, TIM and KIM cassetteversions. $135.00 ($142.50 cassette)

HOE DYNAMIC DEBUGGING TOOL (DOnBuilt in assembler/disassembler with programcontrolled single step and dynamic breakpointentry/deletion. TIM, AIM, SYM, KIM AND KIMcassette versions. $65.00 ($68.50 cassette)

HUE COMPREHENSIVE MEMORY TEST(CMnEight separate diagnostic routines for bothstatic and dynamic memory. TIM, AIM, SYM,KI M and KI M cassette versions. $65.00 ($68.50cassette)

Progressive Computer Software405 Corbin RoadYork, PA 17403(717) 845-4954

Lux Associates20 Sunland DriveChico, CA 95926(916) 343·5033

Johnson computersBox 523

Medina, Ohio 44256(216) 725·4560

A·B Computers115·B E. Stump Road

Montgomeryville, PA 18936(215) 699-5826

Falk-Baker Associates Perry Peripherals382 Franklin Avenue P.O. Box 924

Nutley, NJ 07110 Miller Place, NY 11764(201) 661-2430 (516) 744-6462

Laboratory Microcomputer ConsultantsP.O. Box 84

East Amherst, NY 14051(716) 689-7344

Page 5: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

130 COMPUTE! January. 1981. Issue 8

DELAY RTB

;THIS IS A DUMMY DELAY ROUTINE;THAT WAS USED FOR TESTING PURPOSES.

.END

INCF'TR INC POINT1BNE EXITINC POINT:L+1.

EXIT f"ns

;NOW WAIT FOR 'DATA READY';TO GO LOW

;SET 'ACK/BUSY' HIGH TO,SIGNAL 'DATA RECEIVED'

,DROP THE 'ACK/BUSY' LINE

,WAIT FOR 'DATA READY';TO GO HIGH

; ••• AND THEN HIGH.;THIS SAYS "DATA READY I'

;AND MAKE IT HIGH

;GET DATA; SAVE IT

;RECOVER DATA;AND RETURN

,BUMP THE POINTER,GET A DATA BYTE,STOf~E IT,KEEP LOOKING FOR DATA

STA PBD

LDA toSTA F'BD

JSR INCPTF~

JSf"~ RCVRsrA (POINTU,YJMP CaNT

DRL.F'1 LDA F'BDAND UB~O DF~LP:1.

JSR DELAYL.DA F'BDAND :1:1BEO DRLF'1

LDA F'ADF'HA

LDA t2STA F'BD

DRLP2 LDA F'BDAND :1:1BNE [If~LP2

JSR DELAYLDA F'BDAND :1:1BNE DRLF'2F'LARTS

RCVR

CONT

8D 02 17

20 4D 2020 1B 2091 004C 10 20

A9 008D 02 17

AD 02 1729 01FO F920 54 20AD 02 1729 01.FO EF

AD 00 1748

A9 028D 02 17

AD 02 1729 01DO F920 54 20AD 02 1.729 01DO EF6860

E6 00DO 0':>E6 0160

60

200D20102010201320162018201B201B201D20202020202320252027202A202D202F203120312034203520352037203A203A203D203F2041204420472049204B204C204D204D204D204F2051.20532054205420542054205420552055

01-,031001-036001-0370~01'-0380

.. 01.--039001-040001-043001-044001-045001-046001-047001-048001-049001-050001-051001-052001-053001-054001-055001-056001-057001-058001-059001-060001-061001-062001-063001-063101-063201-063301-063401-064001-065001-066001-067001-0613001.-069001.,-070001--071 001.-072001-075001-076001,-077001-077101-077501-07130

Multi-Computer/Multl-User GamesNo, I'm not a computer game freak. But, I am ex­cited about the fantasy role playing games that arebecoming available for computers. The intriquingDungeons and Dragons game really grabbed my in­terest. Almost from the time I first become aware ofit, I was toying with ways to computerize certainaspects of it. Certainly, the dice throwing part couldbe computerized, as well as the bookkeeping aspectsof the game--like keeping track of the character at­tributes and whether or not certain moves are legalas well as the relatively complicated procedure ofdeciding how much damage has been done by certainmoves. Freeing the player from having to handle allthe complex paperwork should make the game allthat much more enjoyable. Any game freaks out

there care to comment?As I look around the field, I don't see too much

being done in the area of multi-user/multi-computergames. Computer games have been in the man­against-computer mode for quite some time and havemade computer hobbyists appear almost anti-social.It's time for a change.

A fellow at work and I are working out the detailsfor a two-player/two-computer game which uses acouple of AIM 65 computers. The first game will berather simplistic but it will serve to get things started.Anyone out there working along the same lines? Getin touch? Let's join fantasies.

I can picture a time when many computers arelinked together playing a rather complex fantasy typegame, or, perhaps a realistic simulation type game.

Page 6: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

January, 1981. Issue 8 COMPUTE! 131----------------------------------------------------

Software ReviewHow would you like to develop 1802 programs onyour AIM 65? Or, how would you like to set up alibrary of MACROS which can be called from yourassembly language programs?

If either, or both of these things interests you,then you'll be interested in a new software packagefor the AIM 65 called MACRO.

MACRO is actually a pre-processor that worksin conjunction with the AIM 65 assembler. Its func­tion is to accept a source file that contains macrocalls, expand those macros by looking them up in alibrary file, and outputting a new source file with allthe macros expanded so that the AIM 65 ROMassembler can assemble it.

The macro library. file must be set up whichdefines all the macros which are to be used and mustbe memory resident at the time the input file is sub­mitted for expantion: (makes AIM 65 sound like alarge machine, doesn't it?)

Here's an example of what it looks like:

SAMPLE MACROINCD POINTERSAMPLE MACRO DEFINITION&INCDINC!1BNE*+4INC !l + 1&

SAMPLE MACRO OUTPUTINC POINTRBNE*+4INC POINTR + I

(The '&' character is used both to start and ter­minate a macro definition)

Now that last little programming sequence (in­crementing a double byte pointer) is something 6502programmers do alot of.

The same technique can be used to set up across assembler for most any other CPU (6800, 1802,8080 etc). Pretty excitin' stuff!!!

According to the documentation that accom­panies MACRO, the minimum usable system is anAIM 65 with 2K of RAM, the assembler ROM, andremote control of least one cassette deck.. The price is$15 which includes documentation and a cassette ofthe object code. The source code for MACRO isavailable either on cassette or as a listing (you mustspecify) for an additional $30. (This would enableyou to adapt MACRO to your 6502 floppy system).

So far, I haven't found any bugs in the system(I'm good at finding bugs) and it worked right thefirst time I tried it.

It's available from: POLAR SOLUTIONSBox 268Kodiak, AI. 99615

!lAID" From HDEAID (Advanced Interactive Disassembler) is adisassembler in the truest sense of the word. AID

takes a machine language program as input andcreates an assembly language source file as output.aust the opposite of an assembler).

The source file includes labels and even equatesfor externally referenced locations. The file can thenbe assembled like any other source file.

Think about it. Remember all the time youspent manually building an assembler source filefrom a machine language program?

I can sure remember wasting lots of time gettinga conventional disassembly listing, writing in labelsand then typing the whole thing into a text editor filejust to be able to modify a piece of software.

Since AID lets the computer do this"dirty' 'work, the programmer is free to spend moretime doing the work that needs a bit more in­telligence.

The source files can be assembled with theassembler from HDE which is compatible with theMOS Technology Cross Assembler.

More information on this exciting new softwareproduct can be obtained from Hudson Digital Elec­tronics, POB 120, Allamuchy, N.J. 07820. (201)362-6574. AID costs $95 and works just great.

No, I haven't made a source file from MicrosoftBASIC as of yet. But, I'm sure some of you have itin mind. ©

********************************.if K A S T ..: I I Y I .... M M M M .... .... .... ..: FROM CASSETTE FAILURES :: PERRY PERIPHERALS HAS :.. THE HOE SOLUTION ..: OMNIDISK SYSTEMS (5" and 8") :..: ACCLAIMED HOE SOFTWARE ..... Assembler, Dynamic Debugging Tool, :: Text Output Processor, Comprehensive :.. Memory Test .... ..... Coming Soon-HOE BASIC ..: PERRY PERIPHERALS S-1 00 PACKAGE :

: Adds Omnidisk (5") to :.. Your KIM/S-100 System ..:. Construction Manual-No Parts ::. FODS & TED Diskette ..... $20. +$2. postage & handling. (NY residents :: add 7% tax) (specify for 1 or 2 drive system) ..

: Place your order with: :.. PERRY PERIPHERALS ~: P.O. Box 924 :: Miller Place, N.Y. 11764 :: (516) 744-6462 .... ..; Your Full·Line HOE Distributor/Exporter :

*********************************

Page 7: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

132 COMPUTE! January. 1981. Issue 8

Figure 1 • Enabling the Timer Interrupt

Although a single wire between A-15 and £-6 is sufficient for theexperiment explained above, a SPDT switch permitting the selec­tion of either NMI or IRQ provides for more varied use of thetimer interrupt. ~

E-6 E-4

IRQ

NMI

KIM

PB7

A-1S

from the keypad, and not a single one of the keysdoes me any good!0: True. Not a single key will help - but three will.I: Eh?0: Hold down 'ST', momentarily press 'RS' andthen ' + " and then release 'ST'.I: Say that again.0: No! You just go back and read it again, from twolines above this and then do it.I: How about that. It worked! And without losing allthat imaginary RAM. You know, this could have ac­cidentally happened to me, and with you not aroundI would have had to turn it off to fix it. Say, whathappened, anyway?0: Well, when you pressed the 'wrong key', you in­advertantly addressed the interval timer, at 170C·,and it responded by generating an interrupt, i.e. asignal to follow the NMI vector 'somewhere'.Naturally, unless this 'somewhere' included a routineto sample and respond to the keypad, no keys otherthan 'ST' or 'RS' could possibly have had any ef­fect. However, pressing 'ST' generates anotherNMI. Instead of helping get KIM back, it just sendsit off to wherever it went before, again. 'RS' doesbring it back, but only long enough to summonanother interrupt. You see, when it returns control tothe monitor, the monitor immediately accesses 170Cagain, unless the address stored in the pointerOOFA,B has been altered meanwhile.However, holding 'ST' down will prevent recogni­tion of this interrupt (the one invoked by the monitorafter 'RS'), while pressing' + ' will alter the pointer··so that the monitor no longer interrogates 170C.Then, since no further interrupt is being generated,releasing 'ST' restores normal operation at thispoint. Now, aren't you glad you asked?I: Well, I ....0: Say, give that' +' key another quick press,will ya;?

Author's Notes:"several other addresses produce the same effect as 170C

""the hex keys, '0' - 'F', and also 'PC', alter the pointeras well and may be used in place of the ' + ' key

Philip K. HooperSummary: The dialog below pments a bizarre experiment thai is easy toperform with a KIM-I, creating a runaway computer which no longerresponds to 'reset '. Fortunately, the use of an unusuallceypad sequence willrestore normal monitor control. Moreover, KIM's peculiar behaviour isshown to be a perfectly proper response to an abnormal situation.

0: If you have your interval timer set up to generatea non-maskable interrupt, i.e. a connection betweenPB7 and NMI (Figure 1), then you can try a strangelittle experiment. Game?I: Sure, I'll give it a try. What do I do?0: Turn on the power and set your NMI vector(17FA,B) so it points to some very long program­like cassette read (1872) without input or the4C4C4C loop at 4C4C. You can even try just leav­ing it as it 'comes up', and still the experiment willprobably work.I: That's nothing new. Sometimes I DO point NMIto 1873, so I can load in consecutive flles by justpressing 'ST' between loads. And sometimes I don'teven bother setting it. What next?0: Take a look into location 0170.I: So? Looks pretty unremarkable - just anothermeaningless byte of hex garbage.0: That's right. Whatever your KIM happens todrop into that location at 'power up'. Now, pretendyou are reaching for the 'AD' key but miss it andpress 'C' instead.I: Come on. I thought you said we were doing somesort of wierd experiement, but this is just stu ...Hey! What's happening? The display is gone, and Ican't seem to bring it back using the keypad. Even'ST' doesn't help. But reset will always ... Whatthe devil IS this, anyway? How come all I get whenI press the 'RS' key is a brief flash and thennothing? Have you tricked me into ruining my com­puter or something? What can I do? Isn't resetalways supposed to bring KIM back in a known star­ting state?0: It is - and it does. Of course, you could switchthe power off and back on. That would probably putthings right. But suppose you had just keyed in twofull pages of code and were about to save them ontape when this pathological behaviour started. Surelyyou don't want to lose all that code and have to keyit in again! Can you regain control without losingyour RAM?I: Well I don't see how. The only control I have is

caveat InterruptororPlacating a RebelliousKIM WIthoutSacrificing RAM

Page 8: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

January. 1981. Issue 8 COMPUTE! 133

32 K BYTE MEMORYRELIABLE AND COST EFFECTIVE RAM FOR6502 & 6800 BASED MICROCOMPUTERS

AIM 65-*KIM*SYMPET*S44-BUS

* PLUG COMPATIBLE WITH THE AIM-65/SYM EXPANSIONCONNECTOR -BY USING A RIGHT ANGLE CONNECTOR(SUPPLIED) MOUNTED ON THE BACK OF THE MEMORYBOARD

* MEMORY BOARD EDGE CONNECTOR PLUGS INTO THE6800 S 44 BUS

* CONNECTS TO PET OR KIM USING AN ADAPTOR CABLE* REliABLE-OYNAMIC RAM WITH ON BOARD INVISIBLE

REFRESH-LOOKS LIKE STATIC MEMORY BUT ATLOWER COST AND A FRACTION OF THE POWERREOUIRED FOR STAHC BOARDS

* USES +5V ONLY. SUPPLIED FROM HOST COMPUTER.* FULL DOCUMENTATION. ASSEMBLED AND TESTEO

BOARDS ARE GUARANTEED FOR ONE YEAR ANOPURCHASE PRICE IS FULLY REFUNDABLE IF BOARD ISRETURNED UNDAMAGED WITHIN 14 DAYS.

ASSEMBLED WITH 32K RAM $395.00& WITH 16K RAM $339.00

TESTED WITHOUT RAM CHIPS....$279.00HARD TO GET PARTS (NO RAM CHIPS)WITH BOARO AND MANUAL $1 09.00BARE BOARO & MANUAL...... $49.00

16K MEMORYEXPANSION KIT

ONLY $58FOR APPLE, TRS-80 KEYBOARD,EXIDY, AND ALL OTHER 16KDYNAMIC SYSTEMS USINGMK4116-3 OR EQUIVALENTDEVICES.

* 200 NSEC ACCESS, 375 NSECCYCLE

* BURNED-IN AND FULLYTESTED

* 1 YR_ PARTS REPLACEMENTGUARANTEE

* QTY. DISCOUNTS AV AILABLE

ALL ASSEMBLED BOARDS ANDMEMORY CHIPS CARRY A FULL ONEYEAR REPLACEMENT WARRANTY

PET INTERfACE KIT-CONNECT~, -HE 32K RAM BOARD TOA 4K OR 8K PET CONTAINS I~ FRfACE CA3LE BOARDSTANDOffS POWER SUPPLY MODIFICAT,ON KIT ANDCOMPLETE INSTRUCTIONS $4900

U.S. PRICES ONLY

6502 FORTH PRICE LISTKIM CASSETIE, USER MANUAL, AND

COMPLETE ANNOTATED SOURCELISTING $90.00($2000 VERSION) PLUS S&H 4.00

USER MANUAL (CREDITABLETOWARDS SOFTWAREPURCHASE) $15.00

PLUS S&H 1.50SEND A S.A.S.E. FOR A FORTHBIBLIOGRAPHY AND A COM­PLETE LIST OF 6502 SOFTWARE,EPROM FIRMWARE (FOR KIM,SUPERKIM, AIM, SYM, andAPPLE) AND 6502 DESIGNCONSULTING SERVICESAVAILABLE .

Eric Rehnke1067 Jadestone LaneCorona, CA 97120

Now Available For KIM, AIM, And SYM

6502 FORTH• 6502 FORTH is a complete programming system which

contains an interpreter/compiler as well as anassembler and editor.

• 6502 FORTH runs on a KIM-} with a serial terminal.(Terminal should be at least 64 chr. wide)

• All terminal I/O is funnelled through a jump table nearthe beginning of the software and can easily bechanged to jump to user written I/O drivers.

• 6502 FORTH uses cassette for the system mass storagedevice

• Cassette read/write routines are built in (includesHypertape).

• 92 op-words are built into the standard vocabulary.• Excellent machine language interface.• 6502 FORTH as user extensible.• 6502 FORTH is a true implementation of forth according

to the criteria set down by the forth interestgroup.

• Specialized vocabularies can be developed for specificapplications.

• 6502 FORTH resides in 8K of RAM starting at $2000 andcan operate with as little as 4K of additionalcontiguous RAM.

Page 9: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

134 COMPUTE! January, 1981 Issue 8

COMMUNICATIONIDann McCrearyWhile both the 1802 and the 6502 can handle quite abit on their own, each has features which suit it tocertain functions. Though the 1802 is not particularlyfast, it has the advantages of low power consumptionand low parts count needed to make a compact, por­table system. On the other hand, the 6502 has thespeed and software support for use as a powerfulgeneral purpose computer. Let's take a look at someways to start a dialogue between an 1802 and a6502.

Consider with me a few possible uses andlayouts of COSMAC systems in communication witha central 6502 processor. One situation is the use ofan 1802 to gather data from a remote location. Thedata would typically be transmitted to the main com­puter over a serial data link. This could take theform of a twisted wire pair, a radio transmission, amodulated light beam, telephone lines or even an in­termediary like magnetic tape.

Another possibility is parallel communication.This would be used at closer range to achieve higherdata rates. A parallel interface transfers an entirebyte of data at a time. Some form of handshake isemployed to coordinate the transfer timing. A por­table 1802 unit might be brought and plugged into acentral computer for a rapid transfer of data.

Perhaps the fastest and most direct communica­tion between 6502 and 1802 could be obtained bycombining the two processors as co-processors withcommon access to at least some memory regions.This would make possible the sharing of some tasksbetween the two processors. By setting or clearingspecified bytes of shared memory, data might bepassed from processor to processor and the activitiesof both coordinated.

Let's look at some serial data formats and thesoftware considerations for producing them. Thebasic principal behind serial communication is totake a signal capable of presenting two states, 1 or 0,high or low, and to vary that signal in a specific timedependent pattern. This can be done readily by in­corporating a U ART such as the 1854 in your 1802circuit. The 1854 is a CMOS UART (UniversalAsynchronous Receiver / Transmitter). It has all thenecessary circuitry on one chip for generating and in­terpreting serial data streams on a character bycharacter basis. When connected to an 1802, the1854 makes sending serial data as easy as outputtinga byte of data to a selected port.

In the interests of keeping our 1802 system smalland simple. However, let's do the following: we'lllook at a way to use the Q line of our 1802 as aserial data output, and one of the External Flag lines

as a serial data input. This eliminates the need for aUART, but it shifts the burden over to software.

What are the elements of serial data transmis­sion that we must create by programming? Look atthe illustration of an 8 bit data word in serial format.At the beginning of the word, the serial line is in ahigh (1) state. This high state is of an indefiniteperiod of time. Transmission of the word is begun bybringing the line low for one bit-time. This is calledthe start bit. It is in effect saying, "Get ready guys­here comes the data!". The bit time is based on thedesired data transfer rate, or "baudrate".

PS AT RAB I STOPR I LSB DATA MSB T BITSTT r \Y~

l-lSTART/ U U PARITYo . BIT . BIT

SERIAL REPRESENTATION OF 3716

Following the start bit are 8 data bits, each using onebit-time. The first bit transmitted is the least signifi­cant bit of the data word. After the data bits comes afinal parity bit. Finishing the transmission of theword are the stop bits. Stop bits are always 1 (high).For best reliability, 2 stop bits are recommended.This gives a receiver a fighting chance to synchronizeitself with a continuous stream of data words. If adata word is not sent immediately, the line just re­mains high until the start bit of the next data word issent.

For a variation on the theme, what if we wish tostore the data on audio magnetic tape? We can use avery similar serial data format by superimposingaudio tones onto our high and low segments of thesignal. That is, let a high frequency tone represent a"1", and a low frequency tone a "0". The "KansasCity Standard" cassette format does in fact use thismethod. It differs from the above format only in thatit does not use a parity bit. Each "0" consists of 4cycles of 1200 HZ and each "1" consists of 8 cyclesof 2400 HZ (see illustration).

Let's write a routine for generating either a straightserial data format or an audio-modulated cassette for­mat. We'll set it up as a subroutine which, whencalled, will transmit the data in the "D" register in aserial format via the "Q" output flip-flop. We'lldesign our subroutine to allow for variation in thenumber of data bits. Parity will be settable as odd,even or completely off. The subroutine will also

Page 10: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

January, 1981. Issue 8 COMPUTE! 135

2400 HZ

1 0 1 0---------1---------'-------+--------=.-----1----....::.----+---- - - - -2400 HZ 1200 HZ 2400 HZ 1200 HZ

PORTION OF A SERIAL BYTE IN AUDIO FORMAT

allow for either straightforward serial format or elseaudio-modulated serial format for use with amagnetic tape or telep.hone line transmission. In our

next 1802 column, we'll examine some COSMACcode which will accomplish all this for us. ©

such a course.I have not meant to leave the impression that

the book is only for the KIM-1. Any of theenhanced-KIM clones (SYS or AIM) could benefitfrom the ideas in "Son of Cheap Video". Lancasteralso includes chapters on 8080/Z80 systems, HeathkitH8, and Apple II (lower case display project).However, the book it not for every microcomputerowner as the initial quote suggested. Nevertheless itis well written, even entertaining in spots, can teachmost of us a few things and save us money to boot. Irecommend it highly. ©

Heath H-8TRS-80SWTP

I ~:5;,

o are avai able for F·8, 6800, 8085, 8080, Z-80, 6502, 1802.2650. 6809 based systems.EPROM type is selected by a personality module which plugs intothe front of the programmer. Power requirements are 115 VAC50/60 Hz. at 15 watts. It is supplied with a 36-inch ribbon cable forconnecting to microcomputer. Requires 1\-'1 I/O Dorts. Priced at$16900 with one set of software. (Additional software on disk andcassette for various systems.) Personality modules are shown below.Pan No. Programs PricePMO ThIS 2708 $17 (l(1PM 1 2704, 2708 17 00PM2 2732 330(1PM3 ThIS 2716 l70(lPM4 ThIS 2532 330(1PM5 ThIS 2516.2716.2758 17(]()PM-8 MCM68764 JS (1(1

Ootimal Technology, Inc.-alue Wood 127, Earlv-vllle, VIrginia 22936

Phone (804) 973-5482

Book Revlew:"Son of Cheap Vldeon

Author:Don LancasterPublisher:Howard W. Sams. 1980

Prlce:$8.95Reviewed by: HaNey B. HermanTo quote the author, "This is a you-build-it hard­ware book for hardware freaks ...1f you are not one ofus, go away". I will assume that if you are stillreading this review after seeing that quote that youwill enjoy this book. It is intended for "poor folks"who like to tinker and construct useful things from afew chips and not much more. Specifically, it allowsyou to add a complete video display to a KIM-lorthe like for only $7 using five (count them) integratedcircuits. Amazement is too mild a word for my reac­tion to that statement; flabbergasted is more like it.

The book is intended as a sequel to the author'searlier volume, "The Cheap Video Cookbook".Many references in the text to the earlier book sug­gest that it would be a good idea to have it close byto fully appreciate this effort. A legitimate criticismof the first circuitry concerned the amount ofmemory space used (28K bytes). What he now calls"scungy" video (I like the man's style) takes up 1Kbytes for -a 12x80 display - an impressive reduction inmemory overhead.

A succession of projects is described in the bookbeyond scungy video. Lancaster shows how to com­bine cheap video with a "snuffier" coil on the out­side of your TV set to free up processor time for nor­mal comupting. 'This method locks the program andthe display so picture jitter can be reduced with con­siderably less display program overhead. He includesa circuit for an EPROM programmer and describeshow to use it in an extended music display example.Because the book leaves several projects as exercises(e.g. EPROM burning software) the book could beused as part of a course on microcomputers. Some ofthe construction hardware can be purchased fromPAIA electronics (Oklahoma City, OK 73116) andcould be conveniently provided to the students taking

Page 11: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

136

Review:

Disk OperatingSystem for KIMWilserv Industries $100P.O. Box 115Haddonflled, NJ 08033

Reviewed by Harvey B, HermanThis is a short review of a disk operat­ing system which has enhanced a KIMbeyond my wildest dreams. I startedwith only a KIM - 1 but my systembegan to grow bigger and bigger almostimmediately. Memory was added peri­odically, finally enough to use BASIC,using a KIMSI mother board. How­ever, the weak link was the cassetteoperating system and the time it tookto load programs. Switching to theButterfield hypertape program helped

COMPUTE!

but the delay (and occasionallybad loads) were irritating. I felt Ireally needed a better way to load andsave programs. Wilserv had theanswer.

Several years ago I purchased anInnovex 8" disk and parts for a diskpower supply. These sat around un­used because an interface/controllerto a minicomputer was never finished.To get the disk working on KIM, Ineeded a controller board (SDS Versa­floppy I), a cable (made locally) andthe software provided a Wilserv(Willi Kusche). To make a long storyshort, it works and I am very happy.

The KIM disk operating system isvery convenient to use. It providesa link with BASIC and the same com­mands as the PET version. It providesa cheaper alternative for people likeme who have most of the componentsalready in hand. The only real dis­advantages are the lack of randomaccess flies in the current version,and the element of do-it-yourself whichdoes not appeal to everyone. Other­wise I recommend this software highly.

January. 1981. Issue 8

Compare Our Prices With Any Others

Rockwell's AIM-65Synertek's SYM-1Commodore's KIM-1

1K System:1K System:1K System:

$405.235.175.

4K System4K System

$459.259.

FOR YOUR SYSTEM'S EXPANSIONThe Computerist, Inc's:16K DRAM32K DRAMVideo Plus IIMother Plus II & Card Ca~le

$279.375.279.115.

Proto Plus IIASK 1/0 BoardDRAM & Video CablePower Supply for SYM-1

$42.55.15.39.

Power Supply and Enclosure for AIM-65Power Supply and Enclosure for KIM-1

$119.65.

All products are lfactory warrantied. Prices include full documentation.Send Check or Money Order to:

Hepburn MeA*12 Grosvenor StreetLowell, MA 01851

Please add $5.00 shipping and handling. MA residents add 5% sales tax.* Mini Computers and Accessories

Page 12: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

Jonuol y, 1981 Issue 8 COMPUTE! 137

AIM 65 BY ROCKWELL INTERNATIONAL

$79.0099.0050.00

PROVEN R6500 MICROCOMPUTER SYSTEM DEVICESReliable, high performance NMOS technology ...• R6502 Central Processing Unit (CPU), operating at 1

MHz. Has 65K address capability, 13 addressing modesand true index capability. Simple but powerful 56instructions.

• ReadlWrite Memory, using R2114 Static RAM devices.Available in 1K byte and 4K byte versions.

• 8K Monitor Program Memory, using R2332 Static ROMdevices. Has sockets to accept additional 2332 ROM or2532 PROM devices, to expand on-board Programmemory up to 20K bytes.

• R6532 RAM-Input/Output-Timer (RIOT) combinationdevice. Multipurpose circuit for AIM 65 Monitor functions.

• Two R6522 Versatile Interface Adapter (VIA) devices,which support AIM 65 and user functions. Each VIA hastwo parallel and one serial 8-bit, bidirectional I/O ports,two 2-bit peripheral handshake control lines and twofully-programmable 16-bit interval timer/event counters.

BUILT·IN EXPANSION CAPABILITY• 44-Pin Application Connector for peripheral add-ons• 44·Pin Expansion Connector has full system bus• Both connectors are KIM-1 compatible

TTY AND AUDIO CASSETTE INTERFACESStandard interface to low-cost peripherals ...• 20 mao current loop TIY interface• Interface for two audio cassette recorders• Two audio cassette formats: ASCII KIM-1 compatible

and binary, blocked file assembler compatible

ROM RESIDENT ADVANCED INTERACTIVE MONITORAdvanced features found only on larger systems ...• Monitor-generated prompts• Single keystroke commands• Address independent data entry• Debug aids• Error messages• Option and user interface linkage

ADVANCED INTERACTIVE MONITOR COMMANDS• Major Function Entry• Instruction Entry and Disassembly• Display/Alter Registers and Memory• Manipulate Breakpoints• Control InstructionlTrace• Control Peripheral Devices• Call User-Defined Functiorrs• Comprehensive Text Editor

LOW COST PLUG·IN OPTIONS• A65-Q10-4K Assembler-symbolic, two-pass• A65-020-8K BASIC Interpreter• 3K RAM Expansion Kit

POWER SUPPLY SPECIFICATIONS• + 5 VDC ± 5% regulated @ 2.0 amps (max)• + 24 VDC ± 15% unregulated @ 2.5 amps (peak)

0.5 amps aver_a!;le

~lC'E:' $389.00(1 K RAM) ....,-~

Ptus $4.00 UPS (shipped in U.S. must give st,••t address),lrl'arcel post to APO's, FPO's, Alaska, Hawaii. All inter­

national customers write for ordering information.

We manufacture a complete line of high quality expansionboards. Use reader service card to be added to our mailinglist, or U.S. residents send $1.00 (International send $3.00U.S.) for airmail delivery of our complete catalog.

TRUE ALPHANUMERIC DISPLAYProvides legible and lengthy display ...• 20 characters wide• 16-segment characters• High contrast monolithic characters• Complete 64·character ASCII alphanumeric format

FULL·SIZE ALPHANUMERIC KEYBOARDProvides compatibility with system terminals ...• Standard 54 key, terminal-style layout• 26 alphabetic characters• 10 numeric characters• 22 special characters• 9 control functions• 3 user-defined functions

THERMAL PRINTERMost desired feature on low-cost microcomputer systems ...• Wide 20-column printout• Versatile 5 x 7 dot matrix format• Complete 64-character ASCII alphanumeric format• Fast 120 lines per minute• Quite thermal operation• Proven reliability

AIM 65 is fUlly assembled, tested and warranted. With theaddition of a low cost, readily available power supply, it'sready to start working for you.

AIM 65 features on-board thermal printer andalphanumeric display, and a terminal-style keyboard. Ithas an addressing capability up to 65K bytes, and comeswith a user-dedicated 1K or 4K RAM. Two installed 4KROMS hold a powerful Advanced Interface Monitorprogram, and three spare sockets are included to expandon-board ROM or PROM up to 20K bytes.

An Application Connector provides for attaching a TIYand one or two audio cassette recorders, and gives exter­nal access to the user-dedicated general purpose I/O lines.

Also included as standard are a comprehensive AIM 65User's Manual, a handy pocket reference card, an R6500Hardware Manual, an R6500 Programming Manual and anAIM 65 schematic.

AIM 65 is packaged on two compact modules. Thecircuit module is 12 inches wide and 10 inches long, thekeyboard module is 12 inches wide and 4 inches long.They are connected by a detachable cable.

2951 W. Fairmount AvenuePhoeniX AZ. 85017

(602)265-7564

Page 13: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

138 COMPUTE! January. 1981. Issue 8

ExpandingKIM-Style6502 SingleBoardComputersPort 1of 3:Hal ChorllberlinUndoubtedly the most successful single board com­puter ever has been the KIM-l made by MaSTechnology (now Commodore). When introduced itapparently had just the right combination of featuresand price to attract tens of thousands of users. Morerecently of course the SYM-l from Synertek andAIM-65 from Rockwell have incorporated numerousadditional features into the same self-contained singleboard computer concept. Fortunately for users, allthree of these machines are quite similar in theirelectrical characteristics.

Sooner or later however all computers need tobe expanded and these single board machines are noexception. Although the SYM-l and AIM-65 can beexpanded somewhat merely by plugging in additionalmemory chips, the maximum limit is only 4K bytesof programmable memory. Thus additional boardsare required for substantially increased RAM,ROM, or I/O capability. Recognizing this fact, thecomputer manufacturers as well as a number of in­dependent accessory manufacturers have designedand brought to market a wide variety of expansionboards for the KIM, SYM, and AIM computers.

In most cases just having expansion boardsavailable is not enough; there must also be a mother­board offered to plug them into since these computershave no on-board bus and slot sockets of their own.To date the computer manufacturers and in­dependents have selected no fewer than four distinct­ly different ways to do this. First on the scene ofcourse was MaS Technology who offered the KIM-4expansion motherboard which mated with theirKIM-2 and KIM-3 expansion memory boards. Thebus presented by the KIM-4, which is called the"KIM-4 Bus", is in many ways similar to the buspresented by the computer itself as its own expansionedge connector. The primary difference is an alteredpin assignment which is basically a one pin shift fromthe expansion connector assignments. This apparent­ly was done to provide additional ground connec-

tions. Since then, independent manufacturers havealso offered KIM-4 style expansion motherboardsalthough there are important differences from theoriginal KIM-4 (see Compute issue #3).

Shortly thereafter, as soon as the KIM'spopularity became known, other independentmanufacturers offered expansion motherboards whichpresented an S-100 style bus to the expansionboards. The primary advantage of this approach isthat the user is not restricted to using expansionboards designed specifically for KIM-style machinesbut instead can choose from hundreds of S-100 com­patible boards designed for 8080 based systems. U n­fortunately many of the more sophisticated S-100b?ards ~uch as large dynamic memories, graphicd1splay mterfaces, and disk controllers could not beused because of substantial timing differences bet­ween 6502 and 8080 style microprocessors.

Late in 1977 Micro Technology Unlimited in­troduced a motherboard and card cage for the 6502based single-board computers. The motherboard is lit­tle more than 5 edge connectors wired in parallel~ith one for the computer and the other 4 for expan­SlOn boards. The bus presented is the same pinout asthat of the processor's expansion connector. Themain advantage of this technique is the low cost andcompact packaging afforded by the elimination of busb~ffers: In addition, expansion boards compatiblew1th th1S bus may be easily connected directly inparallel with the expansion connector if for somereason the motherboard is not desired. The main~is~d:antage is that the number of expansion boards1S hm1ted to four by the small drive capability of thecomputer's own bus.

Recently Rockwell has introduced its expansionmotherboard which essentially presents an Exorcisorb~s to the expansion boards. Motorola originatedth1S bus for use in their Exorcisor microprocessordevelopment systems. Rockwell also uses the Exor­cisor bus in their system 65 development system. Theadvantage of this method, at least to Rockwell, isavoiding the need to develop new expansion boardsjust for the AIM-65. To users the biggest drawbackof the Exorcisor bus probably is the lack ofreasonably priced boards to plug into it.

All four of these techniques are quite viablen:ethods for expanding KIM-I, SYM-l, and AIM-65smgle board computers and each has a broad base ofdedicated users.

MechanicsAll three of the single board computers are intendedto simply rest flat on a tabletop using the severalquarter-inch high rubber feet provided. Although notthe most beautiful thing in the world, it works well inmany cases and is certainly inexpensive. In situationswhere better appearance is desired or small childrenare present, there are vacuum-forced dress coversavailable that simply slip over the computer boardhiding everything except the display and keyboard.

Page 14: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out
Page 15: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

140 COMPUTE! January. 1981 Issue 8

The KIM-4, S-100, and Exorcisor type expan­sion motherboards simply extend this board-on-the­table concept. Typically the expansion motherboardis roughly the same size as the computer board andplugs straight onto its expansion connector. On themotherboard are perhaps a dozen integrated circuitsfor address decoding, bus buffering, and voltageregulation. The majority of the space however istaken up by 4 to 8 edge connectors which form the"slots" of the expansion bus. When plugged intothese slots, the expansion boards assume a verticalorientation.

A system expanded this way uses a largeamount of additional table space, and in the case ofth KIM, it is useful space to the left of the computer.The assembly of interconnected boards is also ratherfragile and certainly not portable unless dismantled(most people would probably bolt the computer andmotherboard to a sheet of plywood or plastic to avoidthis). In particular a stray elbow can do considerabledamage if a board is knocked out of its slot duringoperation. Unfortunately the available plastic dresscovers do nothing to protect the added motherboardor expansion boards.

Another approach that has been slowly gainingacceptance is to place the expansion boardsunderneath and parallel to the computer board. Thusthe expansion motherboard, which ties all of theboards together, is vertical. In order to hold thisassembly of boards together, an aluminum framewith card guides is typically supplied and the mother­board is attached to an opening in the frame. Figures1 and 2 show the KIM and AIM versions respective­ly of Micro Technology's implementation of this con­cept.

FIG. 1 KIM-1 INSTALLED IN A MICRO TECHNOLOGYUNLIMITED MOTHERBOARD/CARD FILE

The advantages of this configuration of courseare reduced table space requirements and greatly in­creased protection for the expansion boards. The en­tire assembly of computer and boards is now oneportable unit with only the power supply left over toworry about. The computer board is still exposedhowever. Probably the only potential disadvantage isthat the computer's keyboard has been raised about 4­inches above the tabletop.

ElectronicsThere are electronic factors to consider as well whenexpanding a KIM, SYM, or AIM computer. Inorder to minimize cost, complexity, and power con­sumption, all three of these single board computersare designed without buffers between themicroprocessor chip and the expansion edge connec­tor. The KIM-1 went one step further and omittedpart of the address decoding circuitry as well. Thelack of buffers means that the expansion buspresented by these computers has a DC drivecapability of only one standard TTL load, orequivalently, 5 low power Shottky loads. The ACdrive capability depends on the desired signal rise­time. For bus operation at 1mHz, a total of approx­imately 25 "connections" at 6pF each can be driven.A connection here is defined as a gate input, disabledtri-state output, or MOS input (which does not con­tribute to DC loading).

Compared to other bus-oriented computers, suchas S-100 machines, this does not sound like much ofa bus at all since these machines typically have adrive capability of 30 standard TTL loads (74 series)or nearly 150 low power Shottky (74LS series) orover 200 low power TTL (74L series) loads. In fact,the original advertising for the MITS Altair com­puter boasted an expansion capacity of "over 200boards". While this may have seemed necessarywhen using MITS's 1K memory and single port 110boards, 10 slots is ample for even the largest S-lOOsetup when using today's dense memory andperipheral interface boards.

Over the years, experience has shown thatseveral factors other than sheer driver power limit thenumber of boards that may be connected to a bus.

FIG. 2. AIM-65 INSTALLED IN A MICRO TECHNOLOGYUNLIMITED MOTHERBOARD/CARD FILE

The most serious of these is crosstalk noise betweenthe bus address/data lines and the various bus con-

Page 16: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

1<11COMPUTE!january. 1981. Issue 8---------------------------------------------------------

trol lines. This noise arises when large numbers ofaddress and data lines change state simultaneously,which is a common occurrence. The fast voltagerisetimes (around 5NS with the popular 8T97drivers) and 50MA or greater surges of current alongeach changing line couple electrostatically andmagnetically to other lines in the bus and on the ex­pansion boards themselves. Longer busses and moreboards plugged in gradually increase the crosstalkuntil noise on the control lines causes false triggeringof memory and I/O boards and thus system failure.So severe is this problem that early S-100 systemswould fail to operate even before the 16 boardcapacity of a single cabinet was reached.

A related, but much less severe problem, issignal reflection from the ends of the bus lines, whichafter all, act like transmission lines. This effectbecomes significant when the signal transmissiontime exceeds about 1/2 of the signal risetime. At1.5NS per foot with a 5NS risetime, the bus wouldhave to be two feet long before termination was re­quired. The apparent success of bus terminators soldfor S-100 systems is probably due to their reduction

of signal swings (the logic 1 level is limited to 3 voltsand floating bus lines are pulled to 3 volts) which inturn reduces crosstalk noise.

From the author's experience in designing alarge, fast bus oriented system (specifically the A. B.Dick Magna SL four terminal full-page word pro­cessing computer), there are three ways to solve busnoise problems. One is to thoroughly shield the buswith a full-width ground plane, or ideally, a three­layer motherboard with data/address on one side,ground in the middle, and control signals on theother side. This solves noise coupling on the bus butnot on the expansion boards which in turn must becarefully designed to minimize their own crosstalk.This technique was used in the Magna SL machinebecause of speed requirements.

Another technique is to use filters and delays onthe control signals obtained from the bus in order toreject narrow noise pulses. This technique can be ex­tended to deal with any kind of noise problem at theexpense of system speed and is the one typically usedwith minicomputers such as DEC PDP-ll's andData General NOVA's.

The Seawelllitt1e buffered motherThe UTILE BUFFERED MOTHERprovides the most general possibleexpansion: filling in the first 8K ofthe memory map with RAM andbuffering all of the E-connector linesallows straightforward expansion in8K blocks up to 65K. The provisionfor a bank select line allows for ex­pansion beyond 65K and/or the abilityto switch devices in and out of thememory map. The four board slotson the UTILE BUFFERED MOTHERare sufficient to expand with 16K RAMboards (SEA-16 or equivalent) orEPROM (SEA-PROMMER II) to 65K.The connector on the back of theLITTlE BUFFERED MOTHER allowsfurther expansion of the motherboard(SEA-MAXi-MOTHER). The back con­nector can also be used as a board

slot. The whole system can be runfrom a regulated supply by shortingout the onboard regulators. TheUTILE BUFFERED MOTHER alsohas three LEOs indicating power, IRQ.and NMI. A KIM keyboardfTTY switchis also provided.

Little Buffered Mother

w/4K RAM $199w/o RAM $159RAM Kit $ 50

• Connects directly to the KIM. SYM or AIM• 4 expansion slots .• Buffers for all signals• 4K RAM on board• Application and expansion connectors available• + 5V. + 12V, and - 12V regUlators• Bank Select signal• Full decoding for the KIM-'• Power, NMI and IRO status LEOs• Provis~n for additional motherboards

SEA-CVT..

SEA-ISDC..SEA-LBM

SEA-DEBUGSEA·FDC/B..

Seawel products are 'also available from

Excert Incorporated, and

AB Computers•

( I~I )~SEAWELL~BOX 30505,SEAnLE, WA 98103206/782-9480

SEA·' ..SEA-16 ....SEA-CMOS

. SINGLE BOARO OEVELOPMENT SYSTEM. . $595. 16K RAM BOARD $2BODAYIDATE CLOCK. B 2K EPROM SOCKETS & BK CMOS RAM $595

. . 7K NMOS RAM, lK CMOS RAM. $395.. WITHOUT RAM $2B9

. CYTPOWER SUPPLY Ki+ $110. . . .. . TRANSFORMER ONLY $ 55HARDWARE BREAKPOINTS AND TRIGGERS ,. , .. " ., $310DOUBLE DENSITY. DOUBLE SIDED DISK CONTROLLER(wIDOS for SEA·1) $425

. .. BSERIAL PORTS WITH LOCAL PROCESSOR & DUAL PORT RAM . $595.. LITTLE BUFFERED MOTHER FOR KIM. SYM. AIM. wl4K RAM $199

........................................... WITHOUT RAM. $159RAM KIT· ADDITIONAL 4K of RAM & BUFFER FOR LBM/B $ 50

SEA·MAXI MOTHER .. 10·SLOT MOTHERBOARD. . $135SEA·MICRO MOTHER 4-SLOT MOTHERBOARD. . $ 70SEA·PIOB. . . . . . . . 4 FULLY·BUFFERED 6522s . . $260SEA-PROMMER II . EPROM PROGRAMMER. . . . . . . . . . . .. .. . . .. .. . .. . $299SEA-PROTO. . COMPLETELY DECODED PROTOTYPING BOARD POPULATED. $ 99

...... . .. BLANK. $ 49ALL BOARDS ASSEMBLED.WE PAY UPS GROUND FREIGHT ON ALL PREPAID ORDERS. PRICES AND SPECIFICATIONSARE SUBJECT TO CHANGE WITHOUT NOTICE. WASHINGTON RESIDENTS ADD 5.3%SALES TAX. MASTERCHARGENISA ACCEPTED

Page 17: The Single Board 6502 - amaus.net 198101 compute.pdf126 COMPUTE! Januorv. 1981. Issue 8 The Single Board 6502 than done", however.) The first problem turned out to be figuring out

142 COMPUTE! January. 1981. Issue 8

IS0-1

R. J. BRACHMAN ASSOCIATES, INC.P.O. Box 1077

Havertown, PA 19083(215) 622-5495

DISK DRIVE WOES? PRINTER INTERACTION?MEMORY LOSS? ERRATIC OPERATION?

DON'T BLAME THE SOFTWARE!

e·~l

,""l/",

~-2

For more info call or write

TM .Let the MICROsport Microcomputer (MMC) take over anydedicated task.

It is the affordable alternative - kits from $89.00, applicationunits from only $119.00 (assembled and tested).

It is user-{)riented - complete in·drcuit emulation allows pro­gram development on ANY 6502 based system. It is compact(4'h" x 6'h" pc board) but powerful (32 I/O lines; 20 rnA fullduplex, IK RAM + EPROM socket 4/16 bit counters; 6503CPU) and works off any AC or DC power supply.

Tum your present 6502 based system into a complete develop­ment system with:

1 MMC/03D Microcomputer with ZIF sockets1 MMC/031CE In-circuit emulator for the 6503 CPU

1 MMC/03EPA EPROM Programmer complete with softwaredriver.

----WANT YOUR COMPUTER BACK?---'"The third technique attacks the source of thenoise, namely fast risetimes and large current surges,by using a low power bus. With liesurely risetimes of50 to lOONS and drive capabilities of less than10MA, such a bus is virtually noise-free and quitefast enough for normal microprocessor operation.This technique, coupled with some attention togroundplane shielding, is most applicable tounbuffered KIM/SYM/AIM expansion busses.

The foregoing is not meant to imply that all ofthe buffered expansion motherboards available forthe KIM, SYM, and AIM computers are rackedwith noise. In fact, their bus length and number ofslots is generally small enough to keep noise attolerable levels. The major point is that high powerdrivers and indefinitely expandable busses do havedrawbacks of their own.

The real question at this point then is: Howmany expansion boards can the unbufferedmicroprocessor bus drive before becoming over­loaded? The 6502 microprocessor is rated to driveslightly more than 1 standard TTL load (equivalentto five low power shottky loads) on its address anddata busses while most of the RAM's and ROM'stied to the data bus can drive two standard TTLloads. The 6520, 6522, and 6530 I/O chips have thesame drive capability as the microprocessor. Thus ingeneral the answer is at least four boards providedthat the expansion boards themselves buffer the bussuch that only one low power shottky load (.36MA inthe zero state) is presented to the bus by the board.Many boards on the market and particularly thosedesigned for an unbuffered bus do this. Actually, anywell designed board would be expected to buffer thebus in order to provide clean signals for the re­mainder of the board logic. The reason that onlyfour boards can be driven instead of five is that someof the address lines are loaded by a low power Shot-tky decoder Ie on the computer board itself. C

Next tz'me: The Great Experz'ment

COMPUTEIIs Looking ForGood Artfcles ForYour GazeffeSend Program Listings, Articles, Hints, Odds andEnds, etc. toThe EditorCOMPUTE!P.a. Box 5406Greensboro, NC 27403 USA

Power Line Spikes, Surges & Hash could be the culprit!Floppies, printers, memory & processor often interact!Our unique ISOLATORS el iminate equipmen t interactionAND curb damaging Power Line Spikes, Surges and Hash.-ISOLATOR IIS0-1 AI 3 filter isolated 3-prong sockets;integral Surge/Spike Suppression; 1875 W Maximum load,1 KW load any socket $56.95-ISOLATOR IIS0-21 2 filter isolated 3-pronfl socket banks;16 sockets total); inllegral Spike/Surge Suppression;1875 W Max load, 1 KW either bank ..... _ - $56.95

-SUPER ISOlATOR 1150-31. similar to ISO-1Aexcept double filtering & Suppression .. .. $85.95

-ISOLATOR IlSO-41. similar to ISO-1A exceptunit h. 6 individually filtered sockets. . .. $96.95

-ISOLATOR IIS0-51. similar to 150-2 exceptunit h. 3 sock.et banks, 9 sockets total ... $79.95

-CIRCUIT BREAKER. any model ladd-CBI Add $ 7.00-CKT BRKR/SWITCH/PILOT any model

(..cBSI ... . • . . . . . . . . . . . .. Add $14.00• PHONE ORDERS 1-617-655-1532 ::E~Electronic Specialists, Inc.

171 South Main Street. Natic:1l.. Mass. 01760Dept-Ie