🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #38693

Re: microprocessor development environment

#38693
From: Herb Poppe
Date: Fri, 03 Mar 1989 16:54
102 lines
6263 bytes
In article <7051@zodiac.UUCP> pkahn@ads.com (Philip Kahn) writes:
>From: pkahn@meridian.ads.com (Philip Kahn)
>Path: meridian!pkahn
>
>Similar to a previous posting by someone else, I am looking for a
>microprocessor development system for my MacII.  For example, I want
>to control a motor, so I want to use a simple 8-bit microprocessor,
>with a small ROM, RAM, and perhaps and RS-232 chip.  To develop this
>system, I need a compiler (or, less attractively, an assembler) for
>the microprocessor, preferably a MacII-based simulator to debug the
>code with, and an interface between the microcontroller and the Mac.
>This stuff is all standard fare in the PC/XT/AT world, but I hate IBM,
>I own a Mac, and I want to keep it that way.  
>
>Can anyone suggest a product(s), companies, or anything to support
>this type of venture.  I am leaning towards the 8080A, Z80, or 6502,
>but anything that is well-supported and uses a low-cost microprocessor
>(i.e., 8-bit) is fine with me.  
>
You don't say whether this is for your personal use or for a product
the company you work for is developing. Since I don't have big bucks to
spend on my own projects, I've not made it a point to become familiar
with systems (if any) that are used for "professional" microcontroller
development.

Like you, I am interested in controlling a motor fom my Mac. For this
purpose I use a single-chip microcomputer (=microcontroller), not a
microprocessor with support chips. These devices are more suitable
for this kind of an application because they include such things
as timers onboard the chip. I control the speed of my motor using
pulse width modulation (PWM) techniques. Varying the duty cycle of
the square wave output gives one a varying average voltage across the motor
(this is a DC permanent magnet motor). I use the timer to generate
the square wave. This allows me to simultaneous communicate with the
Mac via the chip's onboard serial port.  I use a version of the Z8
microcontroller from Zilog. The version includes a (very) simple
integer BASIC interpreter in the chips ROM. The Z8 is mounted on a PC
board with 4K of pseudo-static RAM (to hold the program), an address latch
to demultiplex the address for the RAM, RS232 drivers/receivers and some
glue chips. I purchased the board from MicroMint about 5 years ago.
To program this system in BASIC, I just use a terminal emulator on the Mac.

For my current project, I can't used interpreted BASIC, it is too slow.
I do use it however as a "monitor" to download a machine language program
to the chip. I use a spreadsheet to write the assembly language
and then hand assemble the code into machine language. I use the spreadsheet
to convert the  hand assembled code into a form I can download to the Z8.
This form is similar to doing an "immediate" POKE in other forms of BASIC.

As you can well imagine, hand assembling code is a royal pain. I am looking
to use a cross-assembler to do that job. A company called:

Micro Dialects
Dept U
PO Box 30014
Cincinnati, OH 45230
(513) 271-9100

makes Mac based cross-assemblers that support COP400, RCA 1802, 6502,
6801/6800, 6804, 6805, 6809, 68HC11, 8048, 8051, 8085, 8096, Z8, and
Z80 microcontrollers and microprocesors. Each cross-assembler costs
$129.95. Which is more than I care to spend since I'm interested
in using other microcontrollers as well as the Z8. (By the way, there
are freeware Mac cross-assemblers for Motorola's line of chips
available on their bulletin board. Unfortunately, these are old and
don't seem to work with HFS. I was able to successfully assemble a
few line of code on an MFS disk.) My current plans are to obtain the
source code for a "universal" cross-assembler and port it to the Mac.

I don't know of anyone making simulators (like Avocet's that run on the PC)
that run on the Mac. I don't know of any cross-compilers, either. Even on the
PC, there are none for the simpler chips.

In addition to the Z8 chip that runs BASIC (the 8671, now about $8 through
JAMECO) there is the INTEL 8052AH BASIC that runs a version of BASIC
more suitable for process control. MicroMint has (had?) a version of
FORTH on ROM that plugged into a piggyback version of the Z8. There is
also a company that sells a version of the 68HC11 with FORTH in ROM.
Rockwell also has a FORTH microcontroller with an instruction set
similar to the 6502, if I remember correctly. All of these chips are
more suitable than the 8671 for process control. Several companies
make pre-assembled systems based on these chips.

Each family of microcontroller may have many members. There is usually
one or two members in each that are designed for development or small
production runs. Normally these devices are used to prototype a design
that will be used to mask the ROM of another family member that will
be produced in the 100,000's. The development versions may have
no ROM (you use these like a microprocessor with off-chip ROM and/or RAM but
still have the benefits of on-chip timers, parallel ports, UART, etc.), EPROM,
or EEPROM. The EPROM versions are a pain to develop for because of
the erase/program cycle. The EEPROM versions are relatively new, and are
the most expensive. I'd like to get my hands on an MC68HC805C4. This
version's EEPROM can be programmed (via an on-chip bootstrap loader in ROM)
via its serial port. ROMless chips can be very inexpensive: chips like
the 8031 and 6803 are priced in the $4 range.

Best of luck!

Herb Poppe      NCAR                         INTERNET: hpoppe@ncar.ucar.edu
(303) 497-1296  P.O. Box 3000                   CSNET: hpoppe@ncar.CSNET
		Boulder, CO  80307               UUCP: hpoppe@scdpyr.UUCP
Technical Details
Message-ID: <1512@ncar.ucar.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!bierstadt!hpoppe
References: <7051@zodiac.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!bierstadt!hpoppe
From: hpoppe@bierstadt.ucar.edu (Herb Poppe)
Newsgroups: comp.sys.mac
Subject: Re: microprocessor development environment
Keywords: microprocessor controller development, cross-compilers,
Message-ID: <1512@ncar.ucar.edu>
Date: 3 Mar 89 16:54:28 GMT
References: <7051@zodiac.UUCP>
Sender: news@ncar.ucar.edu
Reply-To: hpoppe@bierstadt.UCAR.EDU (Herb Poppe)
Organization: Scientific Computing Division/NCAR, Boulder CO
Lines: 102