HCS02 Software Contents

  1. Accessing HCS02 for Loading and Operation
  2. Building HCS02 Firmware/Software
  3. Operating HCS02 Firmware/Software
  4. Functions and API inside HCS02 Software/Firmware
    1. How Timeouts work in HCS02
    2. Using Timeouts in sequence steps
    3. Controlling PULSER in sequence steps

Accessing HCS02 for Loading and Operation

Installing the necessary software

For Loading and Operation of HCS02 you need a IBM-PC compatible Computer running at least Windows 95 OSR2.

Further supported configuration is Windows 2000 SP1

From the HCS02-Compact-Disc Media, the KEA!-420 terminal emulation software has to be installed. The usual location for installing KEA! will be C:\PROGRAMM\KEA\

The contents of the Directory KEA-MBSCOM2 must be copied to the USER subdirectory of the directory where KEA! is installed

Installing HCS02 software components and documentation

Copy the contents of the directory HCS02 on the HCS02-Compact-Disc-Media to the directory C:\projects\HCS02\ on the PC.

Connecting to HCS02

  1. Start up PC
  2. Connect PC's COM2 via Null-Modem-Cable to HCS02
    HCS02 has a IBM-PC-AT compatible 9-pin D-SUB serial connector
  3. Start KEA! terminal emulation with Configuration MBSCOM2

How to build HCS02 Software

  1. Change Dir to c:\projects\HCS02\
  2. Enter make <SW-Type> <Release>
    Where:
    SW-Type
    is the type of software to be built: "R" for RAM-Load, "G" for EPROM-Load
    Release
    ist the 2-digit release number, "04" being the current one

C:\>cd c:\projects\hcs02

C:\Projects\HCS02>make r 04

C:\Projects\HCS02>asm51 hcs02r04.src

DOS 5.0 (038-N) MCS-51 MACRO ASSEMBLER, V2.2
Copyright 1979, 1983, 1986 Intel Corporation

ASSEMBLY COMPLETE, NO ERRORS FOUND

C:\Projects\HCS02>oh hcs02r04.obj TO hcs02r04.hex

DOS 5.0 (038-N)  OH  V1.0
Copyright 1986 Intel Corporation

C:\Projects\HCS02>

any "File not found" - Messages can be safely ignored, as long as the assembler invocation runs complete with "ASSEMBLY COMPLETE, NO ERRORS FOUND".

How to load and operate HCS02 Software

If a validly built HCS02-Firware-EPROM is installed, the Software in this EPROM starts automatically.

Powering up HCS02 without Software in EPROM

However, as long there is no EPROM, HCS02 boots up as any default MCS-BASIC-52 computer in direct command mode.

To interact with the BASIC-Interpreter, a terminal needs to be connected to HCS02's serial port. The Terminal should be set to 19200 bit/sec, 8 bit, no parity.

After connecting power or in uncertainty, press the RESET button and hit the SPACE-bar on the terminal. This should allow HCS02 to auto-baudrate-detect the speed of the terminal.

Upon successful detection of the terminal speed, HCS02 should print a message similar to this one:


*MCS-51(tm) BASIC V1.1*
READY
>

Repeat pressing SPACE until the message appears.

If the message does not appear when pressing SPACE, try resetting HCS02 by pushing the RESET-Button again.

Loading and running HCS02 BASIC Monitor

About HCS02 BASIC Monitor

HCS02 BASIC Monitor is a MCS-52-BASIC program enabling to The actual version of HCS02 BASIC-MONITOR is contained in the File
C:\projects\HCS02\hcs02b04.bas

Loading and running HCS02 TASKER

The actual Version of HCS02 TASKER is contained in the file
C:\projects\HCS02\hcs02r03.hex

Functions and API inside HCS02 Software

How Timeouts work in HCS02

There are 64 possible timeouts in HCS02. They are numbered from 0 thru 63.

Timeouts are divided amongst 4 classes. Classes are distinguished by the granularity in which timeouts are running. This granularity is measured by the time a "tick" lasts. Timeouts can be started by specifying the number of "ticks" until expiry of the timeout.
Timeout Class number Timeout number range time for one tick
0 0..15 100 milliseconds
1 16..31 1 second
2 32..47 10 seconds
3 48..63 100 seconds

Controlling PULSER in sequence steps

%SEQ_PULS(<pulser_command>,<pulser_parameter>)
Symbolic command numeric value Description Meaning of Parameter
pev_bron 1 turn BI-relay on number of BI-relay
pev_broff 2 turn BI-relay off number of BI-relay
pev_brtog 3 toggle state of BI-relay number of BI-relay
pev_mron 4 turn MO-relay on number of MO-relay
pev_mroff 5 turn MO-relay off number of MO-relay
pev_mrtog 6 toggle state of MO-relay number of MO-relay
pev_mbon 7 memorize BI-relay as ON number of BI-relay
pev_mboff 8 memorize BI-relay as OFF number of BI-relay
pev_mmon 9 memorize MO-relay as ON number of MO-relay
pev_mmoff 10 memorize MO-relay as OFF number of MO-relay

Using Timeouts in sequence steps

The HCS02 sequencer provides steps for starting and stopping timeouts.

Starting timeouts in sequences

A sequence step starting a timeout looks like:

%SEQ_TOSTART(<slot_number>,<tick_count>)

Starting timeouts in sequences

A sequence step stopping a timeout looks like:

%SEQ_TOSTOP(<slot_number>)