Professional Documents
Culture Documents
Controller or System?
Tim Ahrens ware generation is the main purpose al)d is erals. Peripherals thus come out of reset
7405 Ladybug St. done with editors, assemblers and com- before the processor, and a simple RIC cir·
Austin, TX 78744 pilers. There are many more diverse con- cuit resets the entire system. During power·
troller applications than small systems, due on, reset should be held low until the clock
to the nature of their environment oscillator is fully operational (about 100
0 The reset input on the MC6809 is a BA indicates that the MOS buses have
Schmitt trigger input, which has a higher been made high impedance, but does not
Fig. 1. E-0 relationships. threshold voltage than standard periph- mean that the bus will be available for more
ones added. character. This type of code is difficult to Now, any time data is to be loaded from
Direct addressing had previously been make position independent, but with the
only in the lower 256 bytes of the memory MC6809, PIC becomes very easy:
MS Byte LS Byte Function
map. This mode has been expanded to put LEAX MSG,PCR
LBSR PRINT FFFE FFFF RESET
that page anywhere in memory through the FFFC FFFD NMI
use of the direct page register (DPR). This MSG FCC/PRINT THIS/ FFFA FFFB SWI
FFFB FFF9 IRQ
register may be loaded with any value that The load effective address (LEAX) in· FFF6 FFF7 FIRQ
will be the page in memory used for direct struction takes the current offset from the FFF4 FFF5 SW12
FFF2 FFF3 SW13
addressing. program counter to the message, adds it to
FFFO FFFI RESERVED
For example, if the DPR contains $02, the PC and places it into the X register.
then any instruction that uses direct ad· Then, by doing a long branch to subroutine, Fig. 3. Memory map for vector locations.
jrjrjHI•I•Izjvjcj CC-CONDITION CODE AEGISTEA As mentioned earlier, the baud rates for
the MC6850 are derived from the E clock
Fig. 4. Programming model of the MC6809. through a CMOS counter. All common baud
rates are available from 300 baud to 19.2
kilobaud, and if using the lower 2.45 MHz
the ACIA, only the following instruction is The decoding of this system is straight-
crystal, slide the taps down one for the cor-
needed: forward. If you anticipate no expansion over
rect baud rate.
the original design, the 74LS42 may provide
LOA (O,U] Get data from ACIA RS-232 for the ACIA is provided by simple
all necessary chip selects for the periph-
transistors, thus reducing cost over the
Note that many "addresses" may be placed erals. The outputs of this 7442 are eight
traditional MC1488/89 receiver/transmitter
on the stack and called in this indirect man- blocks of 8K. For a minimum parts count, tie
devices.
ner. each chip select of the RAM, ROM and
A power-on reset circuit is provided in the
peripherals to one of these outputs. The
Miscellaneous 4.7k and 10 uF capacitor.
ROM must be the highest-order decode line
All unused inputs on the MC6809 are
In the MC6809, any or all registers may be ($EOOO- FFFF).
pulled up with 3.3k resistors for a wire-or
pushed onto the stack with a single instruc- Due to the incomplete decoding, each
capability. If you don't anticipate using
tion. peripheral will occupy many locations
these inputs, you can use a direct Vee con-
A multiply instruction multiplies the un- within its respective block of memory. Here
nection, further reducing cost and parts
signed binary numbers in the A and B ac- is an example of a decode scheme:
count.
cumulator and places the unsigned result PIA 1 4000-5FFF
PIA 2 6000-7FFF You may further reduce the number of
into the 16-bit D accumulator. This un-
ACIA 8000-9FFF parts by using a device such as the MC6846,
signed multiply also allows multiple· RAM 1 AOOO-BFFF
which includes 2K of mask programmed
precision multiplications and takes only 11 RAM 2 COOO-DFFF
ROM EOOO-FFFF ROM, an eight-bit parallel 110 port and a
machine cycles (5.5 us in a 2 MHz system).
Although incomplete decoding is used, it 16-bit timer. Although this controller uses
The Basic Controller Design can be to your advantage. By addressing only a minimum of parts, its capabilities are
the lower bank of RAM in software as BCOO great because of the flexible instruction set
What is required for a controller?
to BFFF and the upper bank of RAM as of the MC6809. See Fig. 6 for the complete
As mentioned earlier, the minimum is a
COOO to C3FF, you have 2K of contiguous schematic.
microprocessor, program storage and 110.
The basic controller in this article contains
an MC6809, two MC6821 parallel interface ANY TWO BK BLOCKS MAY BE SUB·DIVIDED INTO 4 2K BLOCKS -SEE BELOW
adapters (PIA), one MC6850 serial port EXAMPLE· 7442., AOOO- BFFF
(ACIA) and one EPROM of any desired den- 7442 AIZ 7442 All
I• T THEN YO • AOOO·ATFF}
sity (MCM2708, 2716, 2532 or MCM68764).
Also included is the necessary decoding
j I• Yl "ABOO-AFFF
Y2 • 8000 -B7FF 2K BLOCKS
A A Y3 • 8800 - BFFF
and baud rate generation for the serial inter- f---VO f--vo
face. f---v• f--YI
'-----<
The bus frequency is 1.2288 MHz, corre- f--YZ -vz
sponding to a cycle time of 813 ns. This fre- i---Y> f--Y3
JT
7442
"'.....0,1
""
lD
UZl·
..,
-~~~~~f;!j!!!!!!!!!!~~~~~'jlf:;u, '"""
(681 64K RAMS
----------~r-;2----.,---J
NOTE. SEE TIMING I
OIAGRAM FOR LETTERS
I
I
I
RZ-R7
'"
I
I
TAP BAUORAT[ I
00 76 81( (6C) OPTIONAl
161'( RAM
I
o• 38 411(
RETROFIT I
.,
Ol
....~~+--fi'AS"2 1I
9ECC
Rli
orvtcr 1 1s 1 19 I 20 I 21 1 Q4 1 4eoc m
,_ MCM6B7oe l vss, •12! cs -5 a5 1 2: oc RAs
3
m 1
~l--MSl71E> 1 cs I +tl I AIO! -5~ f-0"'6'+-'--'-'-"=--1
0 00
r---------------------------------------------------------1
'"
" VU42E Gl OR!VE 0
" "
I, I
VU42F
Dii"i"V'Ei
"' . I" I
VU .. Z!I
~
II
0"20
1'1~
::~ I
.J. '" 2 " MOTOR ON
8
U4<
74LS42
VU4ZA
LJ
"
PI SHUG.IIRT $4-.-00
MOTOR Tl M£ OUT OR EQUIVALEI'4T
lo:IIOS
,."' •
'
• 1.
.
fL-
~· l''•'
\J40
""
74LSOO
~~I;<F " 8T97
hz lfol ~••~,,r.,,,~,o~•"f:C"'t
... I
u~A
~,· 1.1.~
I
J·.,.
CS /E.Oif
1 .L
47K
~ J 1
I
U32E
14049
....
• • )>"'-t-.....--tr--1-+--t-t---t-'
I ..,..,. ~~ """ - , "''"
I" I
II
:
i==t========~=t::::::::::====~======t:==::~_!~~~~======================~~:::::j·r·~· ~ WE Tii'Oor''-"'----"
.. 7406 Zl
I E
--t-+---+---------·~O!!!OR!!!E~SS'-"BU'l!S'---+------++------------_,-,-",'---il., .. ~
E
2
:'.:· :::~
OU'IC ...!.§..__ 7
I24 I
~l~cggo>:O ~OOpf
~ l--!'.!j'l>o'"'0 ---:~
I. I
) STEP l L _ _
I.. I STEP
I 16 +!i
U31 I'• -tI'
'¢ 12 .AI3 I~I
...
W01171 FOC. AEADDATA.
LJ
l_ .,, " NOTE PI 000
NUMBERED PINS
" _"-OUN~O I
r------------------ __ '
~
··~~···...I
oorl-rL-eo
03
I LB .,. t
.. ...
I
I
I
I i I
I
I
I
., I
I .. ,2' I
" I
" I
I
I
L ___________________________________ L ______________________ I ~
l
A(TIYf CYCLE REfRfSH~OPIIL'f C¥CLfS
of CAS (for a read). See Fig. 6b for the entire
(I 228 Mt11 BUS FA£0 I 0 40""'
64K RAM schematic.
e~~~d
5
----<(_____v_•_u_o_ _ __,>- pseudo addresses (early in the cycle), the
row addresses are multiplexed with the up-
circuitry have been kept, and others have
been 16K RAM retrofit.
an external counter. L
When the RAM is selected for a memory
operation, the normal rows pass. At all
other times, these pseudo addresses are
supplied and are continually counting
through the 128 rows. During the time that
real addresses are being multiplexed, the
clock signal going to the binary counter is
DATA TO 17 71 -------1'-;:L;AT;:;C~HE;;D;-;O:;:;;A;;TA;-;:;:T0;-;-;r7ro~r-
1
held high until the pseudo addresses are re-
quired. Operation in this fashion ensures DATA LATCHED ON E t
ST26 WRITE ENABLE
that all rows are accessed in an increasing
manner, and no rows will be passed over Fig. 9. Floppy disk controller timing.
'("f~ _
ry~
·
~
~
&
on the data bus for at least 150 ns after the otherwise stated. Specify HOOS or CP/M when ordering. For value '-1',.~
WE pulse goes high. This data is valid for and performance ... SOFTSTUFF is good stuff. \,;"' '};.
only 30 ns on the MC6809, or about 10-20 ns General Ledger II: 0~ l'-t,
on the MC6800/6802. Because of this, a Includes powerful programs for entry, maintenance, reporting and analysis of \.J/f\
latch is needed to hold the data on the bus. accounting data. Features include: Custom Chart of Accounts for determining account Q
names and numbers. Any numbering system may be used. with or without decimal notation.
In the read mode, no circuitry is required Comprehensive Printouts upon request.96-column. Double Entry/Automatic Entry Checking
because the 1771 holds the data for more automatically checks equality of debits and credits with each entry. Simple Data Entry, with one quick
keystroke. Account Verification helps guard against mistakes by preventing entries to non-existent
than the minimum that is specified by the accounts and rejecting account numbers already in use. New Account Facility lets you open new accounts
MC6809. any time during data entry with no disruptiOn to the transaction being entered. Balance Reporting lets
you call the balance of any account to the terminal during data entry. All balances are instantaneously
This data-hold specification of the updated with entry of new transactions. Audit Trail tor a source number and free-form description. One
MC6809 denotes how long the bus drivers of the easiest-to-use. most flexible systems you'll find anywhere. Sample printouts and program
listings included. Requires Microsoft BASIC. HODS #Sf-9004: $124.95. CP/M #SF-9104: $124.95
of the MPU are actually turned on, and not (8" disk). Manual only, #595-2500: $15.00 (refunded when complete package is purchased).
how long the data will be held on the bus.
Full Screen Editor:
This time on the bus can vary, mainly with Uses H89 or H19 screen. Cursor motion keys position the cursor so changes can be typed anywhere on
the amount of loading that is present. If TTL the screen. Function keys perform character and line insert and delete. string search. move and copy
single and multiple lines, and scrolling of text in the window. For H89 and H8 + H19. HDOS #SF-9000:
or other heavy-load devices are present on $49.95. CP/M #Sf-9100: $49.95.
the bus, the decay time will be shortened.
Text Formatter:
But, if all that are present are MOS parts Performs fill and justification (straight right margins) of text previously prepared by your editor. Page
and other high-impedance devices, this numbering. headers and footers. indents, hanging indents, centering and underlining. INCLUSION
hold time will traditionally be until the MPU feature allows automatic insertion of up to 26 user defined strings and merging of documents.
HOOS/H19/H89. HDOS #SF-9001: $54.95. CP/M #SF-9101: $54.95.
bus drivers are driven to their opposite
states (as early as the next cycle). In the Microsoft Macro 80:
8080/ZSO MACRO Assembler. Intel and Zilog Mnemonics supported. Relocatable linkable output.
given example, U44, U43, U45A, U20D and Includes LINK 80 and Cross Reference List utilities. HOGS common deck MACRO included. For H8 and
U7D may be taken out (see Fig. 6d). To be H89. HDOS #Sf-8002: $69.95.
within the guaranteed specifications of CPS:
both the 1771 and MC6809, these parts Permits file transfer between the H89 and H8/H19/H17 and Information Services (MicroNET). Features
include user defined keys for auto-login, mail check, etc. Full error checking and elapsed time clock on
must be installed, but, in this application, screen. Very easy to use on time sharing systems. HDOS #SF-9003: $39.95. CP/M #Sf-9103:
the characteristics of a MOS bus may be $39.95.
used to your advantage to save PC board SORT:
space and parts count (see Fig. 9). An extremely fast assembly language routine that sorts records up to 255 characters in length with user
defined sort fields. Could be called by MBASIC or stand-alone. Source code provided. HDOS #SF-
Fig. 6d shows the schematic used as the 8004: $29.95.
floppy disk interface. You can use standard
Small Business Inventory
Shugart SA-400 or equivalent disk drives. For complete inventory analysis. Up to 12-character part numbers (alpha-numeric). 18-character
Minifloppies generally use a de motor for descriptions of parts. 12 items of information on each part include reorder level, usage history by
month and year-to-date. much more. Complete printouts. Requires Microsoft BASIC and H19 terminal.
the diskette drive motor, thus shortening HDOS #Sf-9005: $69.95.
their useful operating life. To make more ef-
BDS C Compiler
ficient use of this time and to save the oxide Supports most features of language, including Structures. Arrays, Pointers. recursive function evalua-
on the diskette, you can turn off the drive tion, overlays. Includes linking loader. library manager, and library containing general purpose, tile 1/0,
and floating point functions. Lacks initializers. statics. floats and longs. Includes "The C PROGRAM-
motor when not accessed. MING LANGUAGE" by Kernighan and Ritchie.CP/M#Sf-8106: $119.95.
U40 (MC1455) turns on the drive motor
when location $E018 is accessed. This is CBASIC
Disk extended BASIC- Non-interactive BASIC with pseudo-code compiler and run-time interpreter.
the base location of the 1771, so any access Supports full file control, chaining, integer and extended precision variables. etc. CP/M#SF·B107:
on the FDC will restart the drive motor. Dur- $139.95.
ing any nonactive 1771 time, the 555 will Fun for hams ••. RTTY Communications Processor
hold the drive motors on for about ten sec- Split screen lets you copy incoming while checking and editing outgoing messages. On-screen graphics
presents complete system status: time. CW identification. etc. ASCII or Baudot operation. Disk-based
onds before shutting down. This time is autostart. HODS #SF-9006: $100.
determined by the value of C6.
To order:
Another 1455 provides the head load tim- 1. Send check or money order to Heath Company, Dept. 351·7t8, Benton Harbor. Ml49022. Michigan
Ing delay. This time is about 80 ms, which residents add 4% sales tax. Write model numbers clearly.
gives the head enough time to settle before 2. Call toll-tree 800-253-0570 and use VISA or Master Card. In Michigan. Alaska. & Hawaii, call
(616) 982-3411. ...-s
signaling the 1771 that data transactions 3. Visit your Heathkit Ele,tronic Center• where
may take place. SOFTSTUFF is on display. See your telephone HEATH-
Drive selection is determined by U36 and
U41. U36 provides a way to latch informa·
white pages tor the location nearest you. •units
of Veritechnology Electronics Corporation.
SOFTSTUFF is a trademark of Heath Company.
I _7tNITN
SF-104
tion from the data bus. This information is
the drive number and is sent to U41, which
FBOO
FB03
FBOS
86
B6
87
E01B
00
E014
START LOA
LOA
STA
COM REG
tO
DRVREG
TURN MOTOR ON
EOOC
[008
E004
PIA 2
ACIA
PIA I
.
EOOO
FBOB BE 0000 LOX 10000
FBOB 30 OVR MUL DELAY FOR SPEED UP
FBOC 30 1F LEAX -1,X
FBOE 26 FB BNE OVR
FB10 C6 OF LOB t$0F RESTORE
F812 F7 E018 STB COMREG
FBlS BD 2B BSR RETURN
F817 F6 E018 LOOP! LOB COMREG RAM
FB1A cs 01 BITB u
FBlC 26 F9 BNE LOOP1
FB1E B6 01 LOA tl
FB:!O 87 EOlA STA SECREG
FB23 BD 10 BSR RETURN
FB25 C6 8C LOB t$8C READ WITH LOAD
FB27 F7 EOlB STB COMREG
FB2A BD 16 BSR RETURN
FB2C BE cooo LOX t$COOO 0000
FB2F cs 02 LOOP2 BITB 12 DRQ? *COMPATIBLE WITH TECH. SYST. CONSULT. &809 FLEX DOS.
F831 27 OS BEO LOOP3
F833 B6 EOlB LOA DATREG * * 1771 REGISTERS:
F836 A7 80 STA O,X+ READ WRITE
F838 F6 E018 LOOP3 LDB COMREG E018 STATUS COMMAND
F83B cs 01 BITB u BUSY? E019 TRACK TRACK
FB3D 26 FO BNE LOOP2 EO IA SECTOR SECTOR
F83F 7E cooo JMP scooo EOIB DATA DATA
-----------------------------------------------~--~-----~-~-~-----