EMAC PRIMER Instruction Manual page 89

Table of Contents

Advertisement

SERVICE 9
ADCIN
INPUT
OUTPUT
SERVICE A
DIPSWIN
INPUT
OUTPUT
SERVICE B
KEYIN
INPUT
OUTPUT
SERVICE C
PTAOUT
INPUT
OUTPUT
SERVICE D
HEXPRINT
INPUT
OUTPUT
SERVICE E
DACOUT
INPUT
OUTPUT
SERVICE 10
PITCH
INPUT
OUTPUT
SERVICE 11
LEDOUT
If a bit is 1 in any of the 8 bits in the E register it will cause the corresponding segment to shine. Below
are the segments labeled with their corresponding bit numbers.
INPUT
OUTPUT
Analog to Digital input; this service returns a 6 bit value from the analog to digital
convertor.
REGISTER C: 9
REGISTER L: 6 bit analog conversion.
DIP switch input; this service reads the current switch positions of the 8 position DIP
switch.
REGISTER C: 0A
REGISTER L: DIP switch value.
Read the keypad; this service waits for a key to be pressed and returns the value in the L
register.
REGISTER C: 0B
REGISTER L: Key value. Keys "0-F" return 00-0F respectively and the "Step", "Func.",
"Dec.", and "Enter" keys return 14-17 respectively.
Port A output; this service writes to the digital output port A.
REGISTER C: C
REGISTER E: 8 bit value to write to port A.
NONE
Hex print; This service prints to the terminal display, the hex value of the DE register pair.
Four hex digits are printed. This service is used in conjunction with a PC/Terminal device
connected to the serial port. This service requires the optional serial port.
REGISTER C: 0D
REGISTER PAIR DE: 16 bit number to print.
NONE
Digital to Analog Converter output; This service routine outputs a 6 bit number in the E
register to the Digital to Analog converter.
REGISTER C: 0E
REGISTER E: 6 bit value to output to DAC.
NONE
Pitch output; This service sends the 14 bit count (the upper two bits are ignored) in the
DE register to the speaker timer. The larger the number the lower the pitch. If the DE
register pair = 0, then the speaker tone is turned off.
REGISTER C: 10
REGISTER PAIR DE: 14 bit pitch value.
NONE
LED Display output; This service routine displays the pattern of LED segments according
to the binary value of the E register to the LED digit specified by the D register. The
digits are numbered 5 to 0 from right to left.
4
═════
║5
1║
2
═════
║6
0║
═════
* 3
7
REGISTER C: 11
REGISTER E: Pattern of segments to display.
REGISTER D: Display number (numbered 5 to 0 from left to right).
NONE
89

Advertisement

Table of Contents
loading

Table of Contents