Octagon 6000 User Manual

NOTICE
The drivers and utilities for Octagon products, previously provided
on a CD, are now in a self-extracting zip file located at the Octagon
Systems web site on the product-specific page. Download this file to a separate directory on your hard drive, then double click on it to extract the files. All references in this manual to files and directories on the CD
now refer to files in the Utilities zip file.
O C T A G O N S Y S T E M S
Embedded PCs For Extreme Environments
6000 Series User’s Manual
4738 (0906)
Micro PC™, PC SmartLink™, CAMBASIC®, Octagon Systems Corporation®, the Octagon logo and the Micro PC logo are trademarks of Octagon Systems Corporation. QuickBASIC® is a registered trademark of Microsoft Corporation. QNX® is a regis­tered trademark of QNX Software Systems Ltd. ROM-DOS™ is a trademark of Datalight. Windows™ and Windows NT™ are trademarks of Microsoft Corporation. PICO FA™ is a trademark of Phoenix Technologies Ltd.
Copyright 1997, 1998, 2006—Octagon Systems Corporation. All rights reserved. However, any part of this document may be reproduced, provided that Octagon Systems Corporation is cited as the source. The contents of this manual and the specifications herein may change without notice.
The information contained in this manual is believed to be correct. However, Octagon assumes no responsibility for any of the circuits described herein, conveys no license under any patent or other right, and makes no representations that the circuits are free from patent infringement. Octagon makes no representation or warranty that such applications will be suitable for the use specified without further testing or modification.
Octagon Systems Corporation general policy does not recommend the use of its products in life support applications where the failure or malfunction of a component may directly threaten life or injury. It is a Condition of Sale that the user of Octagon products in life support applications assumes all the risk of such use and indemnifies Octagon against all damage.
Technical Support: 303-426-4521
Telephone: 303-430-1500
FAX: 303-426-8126
Web site:
www.octagonsystems.com
6000 Series user’s manual Notice to user
IMPORTANT!
Please read the following section before installing your product:
Octagon’s products are designed to be high in performance while consuming very little power. In order to maintain this advantage, CMOS circuitry is used.
CMOS chips have specific needs and some special requirements that the user must be aware of. Read the following to help avoid damage to your card from the use of CMOS chips.
Using CMOS circuitry in industrial control
Industrial computers originally used LSTTL circuits. Because many PC components are used in laptop computers, IC manufacturers are exclu­sively using CMOS technology. Both TTL and CMOS have failure mechanisms, but they are different. Described below are some of the failures which are common to all manufacturers of CMOS equipment. However, much of the information has been put in the context of the Micro PC.
Octagon has developed a reliable database of customer-induced, field failures. The average MTBF of Micro PC cards exceeds 11 years, yet there are failures. Most failures have been identified as customer­induced, but there is a small percentage that cannot be identified. As expected, virtually all the failures occur when bringing up the first system. On subsequent systems, the failure rate drops dramatically.
n Approximately 20% of the returned cards are problem-free. These
cards, typically, have the wrong jumper settings or the customer has problems with the software. This causes frustration for the cus­tomer and incurs a testing charge from Octagon.
n Of the remaining 80% of the cards, 90% of these cards fail due to
customer misuse and accident. Customers often cannot pinpoint the cause of the misuse.
n Therefore, 72% of the returned cards are damaged through some
type of misuse. Of the remaining 8%, Octagon is unable to deter­mine the cause of the failure and repairs these cards at no charge if they are under warranty.
Notice to user PC-500 user’s manual
The most common failures on CPU cards are over voltage of the power supply, static discharge, and damage to the serial and parallel ports. On expansion cards, the most common failures are static discharge, over voltage of inputs, over current of outputs, and misuse of the CMOS circuitry with regards to power supply sequencing. In the case of the video cards, the most common failure is to miswire the card to the flat panel display. Miswiring can damage both the card and an expensive display.
n Multiple component failures - The chance of a random compo-
nent failure is very rare since the average MTBF of an Octagon card is greater than 11 years. In a 7 year study, Octagon has found a single case where multiple IC failures were
never
not caused by misuse or accident. It is very probable that multiple component failures indicate that they were user-induced.
n Testing “dead” cards - For a card that is “completely nonfunc-
tional”, there is a simple test to determine accidental over voltage, reverse voltage or other “forced” current situations. Unplug the card from the bus and remove all cables. Using an ordinary digital ohmmeter on the 2,000 ohm scale, measure the resistance between power and ground. Record this number. Reverse the ohmmeter leads and measure the resistance again. If the ratio of the resis­tances is 2:1 or greater, fault conditions most likely have occurred. A common cause is miswiring the power supply.
n Improper power causes catastrophic failure - If a card has had
reverse polarity or high voltage applied, replacing a failed compo­nent is not an adequate fix. Other components probably have been partially damaged or a failure mechanism has been induced. There­fore, a failure will probably occur in the future. For such cards, Octagon highly recommends that these cards be replaced.
n Other over-voltage symptoms - In over-voltage situations, the
programmable logic devices, EPROMs and CPU chips, usually fail in this order. The failed device may be hot to the touch. It is usually the case that only one IC will be overheated at a time.
n Power sequencing - The major failure of I/O chips is caused by the
external application of input voltage while the Micro PC power is off. If you apply 5V to the input of a TTL chip with the power off, noth­ing will happen. Applying a 5V input to a CMOS card will cause the current to flow through the input and out the 5V power pin. This current attempts to power up the card. Most inputs are rated at 25 mA maximum. When this is exceeded, the chip may be damaged.
n Failure on powerup - Even when there is not enough current to
destroy an input described above, the chip may be destroyed when the power to the card is applied. This is due to the fact that the input current biases the IC so that it acts as a forward biased diode on powerup. This type of failure is typical on serial interface chips.
6000 Series user’s manual Notice to user
n Hot insertion - Plugging cards into the card cage with the power on
will usually not cause a problem. (Octagon urges that you do not do this!) However, the card may be damaged if the right sequence of pins contacts as the card is pushed into the socket. This usually damages bus driver chips and they may become hot when the power is applied. This is one of the most common failures of expansion cards.
n Terminated backplanes - Some customers try to use Micro PC
cards in backplanes that have resistor/capacitor termination net­works. CMOS cards cannot be used with termination networks. Generally, the cards will function erratically or the bus drivers may fail due to excessive output currents.
n Excessive signal lead lengths - Another source of failure that was
identified years ago at Octagon was excessive lead lengths on digital inputs. Long leads act as an antenna to pick up noise. They can also act as unterminated transmission lines. When 5V is switch onto a line, it creates a transient waveform. Octagon has seen submicrosecond pulses of 8V or more. The solution is to place a capacitor, for example 0.1 µF, across the switch contact. This will also eliminate radio frequency and other high frequency pickup.
Avoiding damage to the heatsink/CPU
WARNING! When handling any Octagon CPU card, extreme care must be taken not to strike the heatsink against another object, such as a table edge. Also, be careful not to drop the CPU card, since this may cause damage to the heatsink/CPU as well.
Epoxy adhesive bonds the heatsink to the CPU chip. When the heatsink is struck, the epoxy adhesive does not allow the heatsink to separate from the chip. The force of the blow to the heatsink then causes the legs of the CPU chip to separate from the PCB. This force damages both the CPU chip and the PCB.
Note Any physical damage to the CPU control card is not covered under
warranty.
Notice to user PC-500 user’s manual
6000 Series user’s manual About this manual
About this manual
The 6000 Series user’s manual provides information about installing and configuring your model in the 6000 Series of PC Microcontrollers. This manual is divided into four sections:
n Section 1 – Installation
Chapter 1: Overview Chapter 2: Quick start Chapter 3: Setup programs Chapter 4: Save and run programs
n Section 2 – Hardware
Chapter 5: Serial ports Chapter 6: EZ I/O Chapter 7: AUX I/O Chapter 8: Analog I/O Chapter 9: SSDs, DRAM, and battery backup Chapter 10: External drives Chapter 11: Video Chapter 12: IRQ routing and opto IRQs Chapter 13: LED signaling and “beep” codes Chapter 14: PC/104 expansion Chapter 15: Counter timer controller
n Section 3 – System management
Chapter 16: Watchdog timer, reset, and remote reset Chapter 17: Serial EEPROM Chapter 18: CPU power management Chapter 19: Using PICO FA Chapter 20: CAMBASIC Chapter 21: Software utilities Chapter 22: Troubleshooting
n Section 4 – Appendices
Appendix A: 6010 technical data Appendix B: 6020 technical data Appendix C: 6030 technical data Appendix D: 6040 technical data Appendix E: 6050 technical data Appendix F: Miscellaneous Appendix G: Accessories
About this manual 6000 Series user’s manual
6000 Series user’s manual Overview
Chapter 1:
Introduction
The Octagon 6000 Series PC Microcontroller™ cards are intended for easy usage and high performance in embedded control applications.
The PC Microcontroller cards combine the best features of the PC archi­tecture and microcontroller I/O. Bringing PC software to the microcontroller world eliminates the need to maintain development systems for the different microcontroller chips. The Octagon PC Microcontrollers operate in severe environments, providing an extra margin of reliability in any application. Although ROM-DOS™ 6.22 is included, you can download other operation systems into the flash drive. If you prefer operating in a high-level language, CAMBASIC has been built-in as a fast, easy-to-use, industrial control language.
Common features across the PC Microcontroller product line include: n Suite of embedded software
Overview
— Datalight ROM-DOS™ 6.22 in ROM — Phoenix PICO FA™ flash file system — CAMBASIC™ multitasking language — RS-422/485 networking software–up to 32 nodes — Phoenix BIOS™ with industrial BIOS extensions — Driver library — Diagnostic software
n 40 MHz 386SX processor n 2/4 MB of on-card DRAM n Two solid-state disks
— 1 MB flash SSD with an integral programmer — 128 KB SRAM SSD with battery backup
n Two serial ports with 8 KV ESD protection n Multifunctional parallel port n Keyboard and speaker ports n Watchdog timer n Real time calendar/clock (see note on page 1-7) n Two opto-isolated interrupt inputs n System status LEDs n Stand alone or ISA bus expansion n -40° to 85°C when operating at 25 MHz
0° to 60° C when operating at 40 MHz
n 10g shock, 2g vibration
1-1
Overview 6000 Series user’s manual
n 5V operation n Low power mode n Over voltage/reverse voltage protection
Unique features of each PC Microcontroller are listed in the following table.
Table 1-1 Features of the PC Microcontrollers
F ea tu r es 60 10 6020 60 30 60 40 6050
COM ports 2 2 4 2 2 COM3 and COM4 — RS-232 to R S-422/485
option EZ I/O digital lines 48 24 2 4 LPT port 1 1 1 1 1 Total digital l ines—
includes parallel p ort High current dri vers 8 Analog inputs ——— 8 — Analog outputs 2 — PC/10 4 inte r face YES NO NO NO NO EIDE port YESNONO NONO Floppy port YES NO NO NO NO Co unt er ti mer
controller
NO YES YES YES YES
17 65 17 41 41
NO YES NO NO NO
RS-232 industrial
——
Major features
Suite of embedded software included in SSD0 flash drive
n Phoenix BIOS and Octagon industrial extensions. The BIOS is
shadowed for fast operation.
n “Instant DOS” system. Datalight ROM-DOS 6.22 loads to high
memory on powerup allowing more lower memory for data storage and applications programs.
1-2
6000 Series user’s manual Overview
n PICO FA flash file system makes flash memory appear as a hard
disk to the PC Microcontroller.
n CAMBASIC, industrial control language includes drivers for all
on-card hardware.
n The network kernel allows up to 32 systems to be linked into an
RS-422/485 network.
n The utility library includes application examples in C and
CAMBASIC.
n Diagnostic software is included to test the system on powerup.
CAMBASIC
CAMBASIC supports all on-card I/O including digital, analog, timing, interrupts, communications, and other functions. Thus, CAMBASIC eliminates the need to write hardware drivers. You spend your time writing the applications software rather than writing and debugging drivers.
Diagnostic software verifies system integrity automatically
The PC Microcontroller has built-in diagnostic software that can be used to verify on-card I/O and memory functions. On powerup, a series of tests is performed. If a problem occurs, the failed test can be identified by the color sequence on a bicolored LED. The test is performed auto­matically every time the system is reset or powered up. No monitor, keyboard, disks, test fixtures, test equipment, or software is required. See the LED signaling and “beep” codes chapter for a complete listing of system tests.
DRAM memory is fast and rugged
The PC Microcontroller has surface-mounted, fast page mode DRAM installed. The surface mounting is far more rugged than plug-in memory.
Solid-state disks withstand shock and vibration
SSD0 is a 1 MB flash memory disk containing the software suite in less than 512 KB, leaving more than 512 KB available for user programs. The flash memory is seen by software as a hard disk. The use of the flash allows easy installation of software updates.
SSD2 is an SRAM with 128 KB capacity for data storage. SSD2 is battery-backed with an on-board battery.
1-3
Overview 6000 Series user’s manual
Boot sequence
A PC Microcontroller can be configured to boot from the on-card solid­state disk, an external floppy disk, or hard disk.
Serial ports protected against ESD
The COM1 and COM2 serial ports are 16C550 compatible. The 16 byte FIFO buffers minimize processor overhead in high speed serial commu­nications. Baud rates are programmable from 150 to 115 KB baud. Both ports have an RS-232 interface with the RS-232 voltages gener­ated on-card. The serial ports meet the new IEC1000, level 3, ESD protection specification with ±8 KV of ESD protection. Backdrive pro­tection is also included.
CAMBASIC supports the serial ports with interrupt driven, 2 KB input and output buffers which operate in the background. This ensures that data is not lost while critical control loops are being executed.
Note The network interface module is not compatible with the 6010 model.
Con venient I/O termination with the breakout board (BOB)
Except for the serial and industrial I/O lines, all other I/O is terminated with a 34-pin IDC connector, also called the AUX I/O. The AUX I/O port eliminates cable clutter and the possibility of cables being plugged into the wrong sockets during maintenance. The breakout board termi­nates each function at the appropriate connector. These functions include the keyboard, speaker, printer, floppy drive, battery, and opto­isolated interrupts.
Speaker and keyboard
The PC Microcontroller accepts a PS-2 style AT keyboard and provides speaker output through the breakout board (BOB).
Parallel port is multifunctional
The multifunctional parallel port can be used as a printer port or gen­eral purpose I/O. The parallel port can also interface with a floppy disk drive, drive alphanumeric displays and matrix keypads, or drive high current AC and DC loads using an opto rack and opto modules.
The multifunctional parallel port applications include:
n LPT1 for PC compatible printers n 17 general purpose digital I/O lines n 4 x 4 matrix keypad n 4 line alphanumeric display
1-4
6000 Series user’s manual Overview
n MPB-16PC, 16 position opto-module rack n Floppy disk drive
The printer port is IEEE 1284A compliant, unidirectional and bidirec­tional, EPP (enhanced parallel port) mode, and ECP (extended capabili­ties port) mode compatible. The printer port features backdrive protec­tion and allows for much higher speed transfers than Octagon’s previous standard printer interface. The data lines can sink up to 24 mA. The printer port signals are routed through the PC Microcontroller’s AUX I/O port when using the breakout board.
Keypad and LCD/VF displa y support for low cost operator interface
For embedded applications, a keypad and display (KAD) board and software are available to interface with an alphanumeric display and matrix keypad. The parallel port on the KAD can interface with a 16-key matrix keypad and a 2 or 4 line LCD or vacuum florescent display in applications where an inexpensive operator interface is needed. The microcontroller cards are supplied with the software which provides keypad scanning and display operation. The keypad and display board has sockets for the display and keypad. DISPLAY and KEYPAD commands in CAMBASIC and drivers in C support these devices.
Industrial I/O is EZ I/O
Several PC Microcontrollers feature the Octagon EZ I/O digital I/O chip. EZ I/O supplies 24 I/O lines which can be individually programmed as 5V input or 5V output. Each line can sink or source 15 mA. The 24 I/O lines are divided into three groups of 8 with 10 K resistors that can be connected to ground or +5V. The EZ I/O port can drive the MPB series opto-isolation module racks directly, controlling input and loads to 240V and 3A. CAMBASIC has several commands to support the EZ I/O port when working on bit, BCD, byte, or word bases.
High current outputs
Model 6050 dedicates 8 lines as high current outputs, capable of driving 100 mA loads rated up to 50V.
External interrupt and reset are optically isolated for saf ety
One opto-isolated input causes a master reset; and the other causes the system to generate an IRQ9. Both inputs accept voltages from 4.5 to 6 VDC. This could be used for an emergency stop, power failure, system synchronization, or a similar function. Drivers are provided in CAM­BASIC and C.
1-5
Overview 6000 Series user’s manual
Interrupts used to the maximum
Real time operation often requires many interrupts for high speed response to events. Five of the AT interrupts are connected to the ISA bus in addition to the four interrupts used on the card This provides the best use of the interrupts for demanding applications.
System expansion is flexible
The PC Microcontroller can expand via an 8-bit ISA unterminated backplane with the Octagon 5000 Series expansion cards.
Mounting
There are several ways to mount a PC Microcontroller: n Plug it directly into an Octagon Micro PC card cage. Power is sup-
plied through the backplane.
n Use the optional PC mounting bracket and plug it into any passive
ISA backplane. Power is supplied through the backplane.
n Panel mount it using the four mounting holes for stand alone opera-
tion. A two position terminal connector is used to supply the 5V power.
n Stack it with other Micro PC cards. An Octagon two card stacking
kit or a flexible backplane using 3M connectors and ribbon cable can be used to stack several cards together.
Hardware reset
A hardware reset can be done by any of the following means:
n Issuing the RESET software command, using the watchdog function n Depressing the reset switch n Cycling power n Input from an optically-isolated reset.
A hardware reset ensures complete reset of the system and all attached peripherals. An expired watchdog timer cycle also causes a hardware reset to occur.
Watchdog timer f or added safety
The watchdog timer resets the system if the program stops unexpect­edly. The watchdog is enabled, disabled, and strobed under software control. The time-out is 1.6 seconds (typical).
1-6
6000 Series user’s manual Overview
SETUP information stored in EEPROM for high reliability
The loss of SETUP data is serious in industrial applications. In the PC Microcontroller, SETUP data is stored in nonvolatile serial EEPROM eliminating the problem with battery or power failure (with the exception of time and date). 512 bytes of the serial EEPROM are reserved by the BIOS. An additional 1536 bytes are available to the user. A software driver is supplied for accessing the EEPROM.
Real time calendar/clock with battery backup
The PC Microcontroller has a built-in AT style, real time clock. The real time clock is powered by an external AT style battery. For additional backup, an on-card battery powers the calendar/clock when the external battery is being replaced. The clock may be read either through DOS or CAMBASIC. The calendar/clock also provides the user with 128 bytes of user-defined CMOS-RAM.
Note: The date and time occasionally resets to default. If your applica­tion requires date/time stamping you should consider another Octa­gon Systems CPU card.
Power management reduces power by more than 70%
Power management can be used to reduce power consumption or to freeze the state of the program on the occurrence of a power manage­ment interrupt. Power consumption can be reduced by more than 70%, reducing the heat load and extending battery life in mobile applications.
Rugged en vironmental operation
The CPU case temperature may range from -40° to 85°C during opera­tion at 25 MHz, or 0° to 60° C during operation at 40 MHz. The PC Microcontroller is designed to withstand 10g shock and 2g vibration.
5 volt only operation lowers system cost
The PC Microcontroller operates from a single 5V ± 4% supply. Lo­cated across the power supply, the 6.2V, 5W diode protects against reverse voltage and limits over voltage. Power is supplied to the card either through the ISA bus connector or the terminal block.
1-7
Overview 6000 Series user’s manual
Reference designators
Before you continue with the installation of your PC Microcontroller, review the following tables for a list of connectors and jumper blocks for the functions on your particular model in the 6000 Series of PC Microcontrollers.
Table 1-2 6000 Series connectors
Reference designator 6010 6020 60 30 6040 60 50
COM1 COM2 COM3 COM4 AUX I/O J2 J2 J2 J2 J2 Power J5 J5 J5 J5 J5 Battery J6 J6 J6 J6 J6 Analog I/O ———J7 USESETUP W1 W1 W1 W1 W1 EZ I/O 1 J1/W3 J1/W2/W4 J1/W2 EZ I/O 2 —J7/W3—— D/A ———W3 I/O range select A/
BIOS device PC/104 J1 Floppy J8 Hard dri ve J7
J3 J3 J3 J3 J3 J4 J4 J4 J4 J4 ——J1— — ——J7—
W2 W2 W2 W2 W2
1-8
6000 Series user’s manual Quick start
Chapter 2:
Quick start
This chapter covers the basics of setting up a PC Microcontroller sys­tem. The following topics are discussed:
n Panel mounting, stacking, or installing the PC Microcontroller into
an Octagon card cage
n Setting up a serial communications console I/O link between the PC
Microcontroller and your desktop PC
n Downloading files to the PC Microcontroller and running a program
from the virtual drive.
The PC Microcontroller may not be installed in a PC. These cards are designed to be independent CPU cards only, not accelerators or coprocessors.
Hardware installation
The PC Microcontroller card contains static-sensitive CMOS components. The card is most susceptible to damage when it is plugged into a card cage. The PC Microcontroller becomes charged by the user, and the static discharges to the back­plane from the pin closest to the card connector. If that pin happens to be an input pin, even TTL inputs may be dam­aged. To avoid damaging your card and its components:
n Ground yourself before handling the card n Disconnect power before removing or inserting the card.
WARNING!
WARNING!
Take care to correctly position the PC Microcontroller in the card cage. The VCC and ground signals must match those on the backplane. Figure 2-1 shows the relative positions of the PC Microcontroller as it is installed in the card cage.
Your PC Microcontroller can be installed in one of several ways:
n Plugging it directly into an 8-bit Micro PC card cage n Using the optional PC mounting bracket and plugging it into any
8-bit passive ISA backplane
n Panel mounting it using the four mounting holes n Stacking it with other Micro PC cards.
WARNING!
2-1
Quick start 6000 Series user’s manual
Note The product-specific appendices provide component diagrams for the PC
Microcontrollers in the 6000 Series. Refer to them as needed.
Using a Micro PC card cage
To install the PC Microcontroller in a Micro PC card cage, you will need the following equipment (or equivalent):
n PC Microcontroller n Micro PC card cage (5xxx Card Cage) n Power module (510x or 71xx Power Module) n VTC-9F Cable n Null modem adapter n PC Microcontroller ROM-DOS and utility disk n PC SmartLINK with manual n Your PC
Refer to the Miscellaneous appendix if you are making your own serial cable or using other non-Octagon components.
To install the PC Microcontroller:
1. Refer to the component diagram in the appropriate product-specific appendix for the location of various connectors before installing the PC Microcontroller.
Figure 2-1 Edge connector orientation
A31
Micro-PC
Passive
Backplane
A1 B1
B31
Card Edge Pins A31 & B31
PC Microcontroller
Card Edge Pins A1 & B1
2. Attach the Octagon power module to the card cage following the instruc­tions supplied with the power module.
3. Make sure power to the card cage is OFF.
2-2
6000 Series user’s manual Quick start
4. Slide the PC Microcontroller into the card cage. The ROM-BIOS label
on the card should face away from the power supply. See Figure 2-2 for an illustration of a PC Microcontroller in a Micro PC card cage.
Figure 2-2 Populated Micro PC card cage
WARNING!
Plugging in the card incorrectly will destroy the card!
5. Connect one end of a VTC-9F cable to the null modem adapter. Connect
the other end to COM1 on the PC Microcontroller.
Note You must use COM1 on the PC Microcontroller in order to establish a
serial communications console I/O link with your PC.
6. If your PC has a 9-pin serial connector, connect the null modem adapter
to any serial port (COM1 through COM4) on your PC. If your PC has a 25-pin serial connector, attach a 9-25 pin adapter to your null modem adapter, then insert the matching end of the 9-25 pin adapter into the serial port. See Figure 2-3.
2-3
Quick start 6000 Series user’s manual
Figure 2-3 Serial communications setup
DB-9
Connectors
Desktop PC
e
l
Cab
F
-9
C
T
V
COM Port
COM1
PC Microcontroller
Null Modem
Adapter
DB-9 to DB-25
Adapter
OR
Desktop PC
e
l
b
a
C
F
-9
C
T
V
Null Modem
Adapter
COM Port
DB-25
Connector
Note Refer to the PC SmartLINK manual for more information on using a
desktop PC COM port other than COM1. You are now ready to transfer files between your PC and the PC Micro-
controller. Continue with the section, Establishing communications with the PC Microcontroller, in this chapter.
Panel mounting or stacking the PC Micr ocontroller
To panel mount or stack the PC Microcontroller, you will need the following equipment (or equivalent):
n PC Microcontroller n 5V power supply n VTC-9F cable n Null modem adapter n PC Microcontroller ROM-DOS and utility disk n PC SmartLINK with manual n Your PC n 5252MB stacking kit (required for stacking only) (P/N 3590)
Refer to the Miscellaneous appendix if you are making your own serial cable or using other non-Octagon components.
2-4
6000 Series user’s manual Quick start
If you are panel mounting the PC Microcontroller, a screw terminal connector is provided to supply the 5V power. Refer to Figure 2-4 for an illustration of panel mounting the PC Microcontroller.
WARNING!
Miswiring the voltage at P2 of the PC Microcontroller or at the power connector of the 5252MB stacking kit (reversing +5V and ground, or applying a voltage greater than +5V), will destroy the card and void the warranty!
Figure 2-4 Panel mounting the PC Microcontroller
Power connector
Figure 2-5 Stacking the PC Microcontroller
1. To panel mount the PC Microcontroller, use #4-40 standoffs and screws
to secure the card. The following diagram shows the center-to-center mounting hole dimensions.
Power connector
5252MB
stacking kit
2-5
Quick start 6000 Series user’s manual
To stack the PC Microcontroller, refer to the 5252MB stacking kit prod­uct sheet enclosed with the kit. Then proceed with Step 2 in this section.
Figure 2-6 PC Microcontroller center-to-center hole dimensions
A = 4.90 in. (124,46 mm) B = 0.20 in. (5,08 mm) C = 3.50 in. (88,90 mm) D = 0.10 in. at 45°, 2 PLCS (2,54 mm at 45°) E = 0.475 in. (4,44 mm) F = 0.85 in. (21,59 mm) G = 3.20 in. (81,28 mm) H = 0.30 in. (7,62 mm) J = 4.20 in. (106,68 mm) K = 0.20 in. (5,08 mm) L = 4.50 in. (114,30 mm) M = .475 in (12,07 mm)
A
L
J
0.015 in. at 45• CHAMFER, 2 PLCS (0,038 mm)
A31
H
F
GF
BEVEL CARD EDGE, 2 PLCS .015 in. x 45• (0,038 mm x 45•)
A1
K
B
0.125 in. HOLE (3.17 mm) 4 PLCS
C
M
E
D
2. Connect the ground and 5V wires to the terminal block of the PC Micro­controller or P2 of the stacking kit.
2-6
3. Connect one end of the VTC-9F cable to the null modem adapter. Con­nect the other end to COM1 on the PC Microcontroller.
Note You must use COM1 on the PC Microcontroller in order to establish a
serial communications console I/O link with your PC.
4. If your PC has a 9-pin serial connector, connect the null modem adapter to any serial port (COM1 through COM4) on your PC. If your PC has a 25-pin serial connector, attach a 9-25 pin adapter to your null modem adapter, then insert the matching end of the 9-25 pin adapter into the serial port. See Figure 2-3.
Note Refer to the PC SmartLINK manual for more information on using a
desktop COM port other than COM1. You are now ready to transfer files between your PC and the PC Micro-
controller. Continue with the section, Establishing communications with the PC Microcontroller in this chapter.
6000 Series user’s manual Quick start
Using the PC Microcontroller in a passive ISA bac kplane
To plug the PC Microcontroller into a passive ISA backplane, you will need the following equipment (or equivalent):
n PC Microcontroller n Unterminated backplane n Mounting bracket (optional) n Power module n VTC-9F cable n Null modem adapter n PC Microcontroller ROM-DOS and utility disk n PC SmartLINK with manual n Your PC
Refer to the Miscellaneous appendix if you are making your own serial cable or using other non-Octagon components.
To install the PC Microcontroller:
1. Make sure power to the backplane is OFF.
2. Insert the PC Microcontroller into a connector on the backplane (see Figure 2-7). Take care to correctly position the card’s edge with the connector of the backplane. Figure 2-1 shows the relative positions of the PC Microcontroller card as it is installed into a backplane.
Incorrectly plugging the card into the backplane will destroy the card and void the warranty!
Figure 2-7 Using a passive ISA backplane
WARNING!
Mounting bracket
XT/AT passive backplane
2-7
Quick start 6000 Series user’s manual
3. Connect one end of a VTC-9F cable to the null modem adapter. Connect the other end to COM1 on the PC Microcontroller.
Note You must use COM1 on the PC Microcontroller in order to establish a
serial communications console I/O link with your PC.
4. If your PC has a 9-pin serial connector, connect the null modem adapter to any serial port (COM1 through COM4) on your PC. If your PC has a 25-pin serial connector, attach a 9-25 pin adapter to your null modem adapter, then insert the matching end of the 9-25 pin adapter into the serial port. See Figure 2-3.
Note Refer to the PC SmartLINK manual for more information on using a
desktop PC COM port other than COM1. You are now ready to transfer files between your PC and the PC Micro-
controller. Continue with the section, Establishing communications with the PC Microcontroller in this chapter.
Establishing communications with the PC
Microcontroller
1. Install PC SmartLINK (or other communications software) on your PC if you have not already done so. Refer to the PC SmartLINK manual for installation instructions.
2. Copy the PC Microcontroller files from the supplied utility disk to a subdirectory on your PC hard drive.
C: MD C:\MPC XCOPY A:\*.* C:\MPC /S
3. Start PC SmartLINK. You are now ready to establish communications between your PC and the PC Microcontroller.
4. Power on the PC Microcontroller.
5. A logon message similar to the one below will appear on your PC moni­tor:
PhoenixBIOS (TM) A386 Version x.xx Copyright (C) 1985-1992 Phoenix Technologies, Ltd. All Rights Reserved
Octagon Systems Corp. 40 MHz 60xx CPU Release vx.xx - mm/dd/yy
Ali 386SX-V8T processor detected operating at 40 MHz 640K Base Memory, 1024K Extended INT 17h BIOS extension vx.xx
Copyright (c) 1995-97 Octagon Systems Corporation PICO Flash Array
2-8
6000 Series user’s manual Quick start
Copyright (c) 1996,Phoenix Technologies Ltd. Resident Flash (RFA) OEM Layer
Phoenix PICO Flash Array (TM) Copyright (c) 1996 Phoenix Technologies LTD Octagon Systems vx.xx First drive of size 896K is installed in SSD0 (AMD 1MB flash)
Second drive of size 128K is installed in SSD2 (128K SRAM) RS-485 support BIOS extension vx.xx Copyright (c) 1996, Octagon Systems
Starting ROM-DOS... HIMEM v6.22 (Revision x.xx)
Copyright (c) 1989-1995 Datalight, Inc. VDISK v6.22 (Revision x.xx)
Copyright (c) 1989-1995 Datalight, Inc.
Extended Memory Present
VDISK v6.22 (Revision x.xx) Copyright (c) 1989-1995 Datalight, Inc.
Formatting 1024K XMS memory as drive E:
60xx C:\>
If you do not get the proper logon message: n Check the PC SmartLINK serial parameters of your PC to make sure
they are set correctly. Parameters should be 9600 baud, 8 data bits, no parity, and 1 stop bit.
n Make sure a video card is not installed in the card cage n Make sure all jumpers are set to factory defaults n If the system still does not respond, refer to the Troubleshooting
chapter.
6. Use the directory command to make sure your equipment and software are working properly. Enter:
60xx C:\> DIR
A directory listing of ROM-DOS files stored in the BIOS socket should appear:
Volume in drive C has no label Directory of C:\
AUTOEXEC BAT 43 09-12-96 2:03p COMMAND COM 26,321 04-17-95 6:22a CONFIG SYS 73 09-12-96 2:03p DOS <DIR> 02-24-97 10:57p UTILS <DIR> 02-24-97 10:57p CAMBASIC <DIR> 02-24-97 10:57p
6 file(s) 26,437 bytes
489,472 bytes free
7. You are now ready to transfer files between your PC and the PC Microcontroller.
2-9
Quick start 6000 Series user’s manual
Transferring files between the PC Microcontroller
and your PC
Once you have established communications between your PC and the PC Microcontroller, you can serially download files to any read/write drive used by the PC Microcontroller. You can then test and debug your application files. You can also upload files from the PC Microcontroller to your desktop PC for editing and debugging.
When booting from the PC Microcontroller BIOS drive, the default CONFIG.SYS device drivers designate drive C: as the BIOS drive (SSD0), drive D: as the SRAM drive (SSD2), and drive E: as the virtual drive. All drives assigned, can be accessed as read/write drives and files can be serially transferred to and stored on any of these drives.
Note The virtual drive is optional when booting from SSD0, floppy drive or
hard drive. If you do not need a virtual drive, do not use VDISK.SYS. There are two methods to download files through the serial port to the
PC Microcontroller: n The TRANSFER utility is used to download files, one at a time, to
the PC Microcontroller using the XMODEM protocol. TRANSFER.EXE resides on the PC Microcontroller BIOS drive and on the PC Microcontroller utility disk and is used to send or receive files via the serial port (e.g., COM1). TRANSFER.EXE uses the XMODEM protocol, as does PC SmartLINK. (See the note below on XMODEM).
Note In Windows 95 when the TRANSFER utility is used to download files,
set the idle time sensitivity of PC SmartLINK on your desktop PC to “low” for TRANSFER to run quickly. To change your settings, follow the steps below:
1. Open Windows Explorer.
2. Select SL.EXE with the right mouse button.
3. Select the Properties menu item.
4. Select the Miscellaneous tab in the Properties window.
5. Move the Idle Sensitivity slide bar to low.
6. Select the Apply button.
7. Exit the Properties window. n REMDISK/REMSERV utilities allow access to all of the files on a
remote disk drive. REMDISK.EXE and REMSERV.EXE are located on the PC Microcontroller BIOS drive and the PC Microcontroller utility disk. Once these programs are executed, single or multiple files can then be transferred to and from the PC Microcontroller using DOS COPY or XCOPY commands.
Note REMDISK/REMSERV will not work with Windows 95. Use
REMDISK/REMSERV with ROM–DOS, MS–DOS, or on a network.
2-10
6000 Series user’s manual Quick start
TRANSFER.EXE, REMDISK.EXE, and REMSERV.EXE are located on the PC Microcontroller BIOS drive, in the DOS directory, and on the PC Microcontroller utility disk in the \DOS directory. Refer to the Software
utilities chapter for more information on these programs.
Note XMODEM only transfers files in which the file size is exactly on a
128 byte boundary. If the file size does not fall exactly on the boundary, XMODEM automatically rounds the file size up to the next 128 byte boundary with padding characters. For example, a file with a size of 10,000 bytes, will be rounded up to 10,112 bytes, transferred, and written with the new file size. In most cases, this is not a concern, but in some instances the XMODEM padding causes problems. The pad­ding problems become apparent when an application program is expect­ing a specific file size or is expecting characters other than the padding characters to be at the end of the file.
The following information on downloading files between the PC Micro­controller and your PC uses the example program DEMO.EXE. This file is on the PC Microcontroller utility disk in the \DEMO directory.
Downloading files to the PC Microcontr oller using TRANSFER.EXE
The following procedures assume you are using PC SmartLINK and that it is included in your directory path. For other communication programs, refer to their instructions on sending a file from your PC to a target system. Refer to the Software utilities chapter for specific infor- mation on using TRANSFER.EXE.
Hardware and software requirements: n Desktop PC, running PC SmartLINK, connected by a VTC-9F cable
and a null modem adapter to COM1 of the PC Microcontroller
n A PC Microcontroller running TRANSFER.EXE out of COM1.
2-11
Quick start 6000 Series user’s manual
1. Connect the equipment as per the following diagram:
Figure 2-8 Downloading files using TRANSFER.EXE
PC SmartLINK
PC Microcontroller
COM1
VTC-9F cable
Null modem
adapter
Desktop PC
COM port
TRANSFER.EXE
2. On the desktop PC, log into the directory which contains the file(s) you will download to the PC Microcontroller, for example:
C:\MPC\60xx\DEMO
3. Start PC SmartLINK and power on the PC Microcontroller.
4. Execute the TRANSFER.EXE program from the PC Microcontroller by entering:
60xx C:\> TRANSFER E:DEMO.EXE
Note In this case, E: is the virtual drive assigned in CONFIG.SYS. Any PC
Microcontroller read/write drive could be substituted.
Note When sending a file, enter the following:
60xx C:\> TRANSFER /S
The following message is displayed from the PC Microcontroller:
Receiving E:DEMO.EXE . . .
5. Execute the following steps using PC SmartLINK: a. Press <ALT><D> to enter the download screen.
b. Type in the name of the file to transfer, e.g. DEMO.EXE (if PC
SmartLINK was not started in the DEMO directory as instructed in Step 2, then the entire path may have to be entered C:\MPC\DEMO\DEMO.EXE)
2-12
6000 Series user’s manual Quick start
c. To begin the transfer, do one of the following:
n press ENTER (default download START) n tab to START and press ENTER n mouse click on the START button in the download screen.
d. When the file transfer is completed, press <ESC> twice to return to
the main PC SmartLINK screen.
Note TRANSFER.EXE will time-out if the program has not been started after
approximately 40 seconds. If the time-out occurs, the following message from the PC Microcontroller is displayed:
Failed to receive E:DEMO.EXE! Deleting E:DEMO.EXE
6. When the file transfer is complete, type the following DOS command to
view the E: drive directory and confirm that your file has been trans­ferred to the PC Microcontroller:
60xx C:\> DIR E:
The system will display the contents of drive E:
Volume in drive E is VDISK vX.XX Directory of E:\
DEMO EXE 27264 06-07-96 2:57p
1 file(s) 27264 bytes
7. To execute the program you have just downloaded, type:
60xx C:\> E:DEMO
The DEMO program displays a message on your PC.
Downloading files to the PC Microcontr oller using REMDISK/ REMSER V
There are three methods of using REMDISK/REMSERV with a PC Microcontroller:
n PC Microcontroller with no video card and one serial cable n PC Microcontroller with no video card, two PCs, and two serial cables n PC Microcontroller with a 5420 video card and one serial cable.
Refer to the Software utilities chapter for specific information on using REMDISK.EXE and REMSERV.EXE.
Note REMDISK/REMSERV will not work with Windows 95 or on a network.
Use REMDISK/REMSERV with ROM–DOS or MS–DOS.
2-13
Quick start 6000 Series user’s manual
PC Microcontroller with no video card and one serial cable
Hardware and software requirements: n Desktop PC, running C:\DOS\REMDISK, connected by a VTC-9F
cable and a null modem adapter to COM1 of the PC Microcontroller
n A PC Microcontroller running C:\DOS\REMSERV out of COM1
1. Connect the equipment and load appropriate software on each system as per the following diagram:
Figure 2-9 Downloading files to the PC Microcontroller with no video card using
REMDISK/REMSERV
REMDISK.EXE
PC Microcontroller
REMSERV.EXE
VTC-9F
cable
Desktop PC
COM port
COM1
Null modem adapter
2. On the desktop PC, start PC SmartLINK from the C:\MPC\60xx\DOS directory and power on the PC Microcontroller.
3. Execute REMSERV.EXE on the PC Microcontroller. Read/write SSD flash drive C: is the shared drive and COM1 is the default port. Enter:
60xx C:\DOS> \REMSERV C:
The following message is displayed from the PC Microcontroller:
REMSERV v1.0 Copyright (c) 1990-1994 Datalight, Inc. All rights reserved.
Using COM1 at 115K+ baud. Accessing Drive C: Time-out is 9 seconds Press <Esc> to Exit.(There may be a delay before exit occurs)
2-14
6000 Series user’s manual Quick start
4. Exit PC SmartLINK by pressing <ALT><X>.
5. Execute REMDISK.EXE on the PC, by entering:
C:\> REMDISK
The following message is displayed on the PC:
Remote Disk v1.0 Copyright (c) 1990-1994 Datalight, Inc. All rights reserved.
Installed as Drive E: /COM1 /B115+ /T10
Note REMDISK.EXE is located in the \DOS directory on the PC Microcon-
troller utility disk. REMDISK assigns the remote drive as the last drive in the system. In this case, drive E: was assigned.
6. Files are transferred to the PC Microcontroller’s read/write drives by
using the DOS COPY or XCOPY commands. Enter:
C:\> COPY C:\MPC\60xx\DEMO.EXE E: C:\> DIR E: C:\> E:DEMO.EXE
The DEMO program displays a message on your PC. In this case, drive E: is the remote read/write SSD flash disk drive of the
PC Microcontroller. Files are easily copied between the drives.
7. When finished, execute:
C:\> REMDISK /U
This unloads REMDISK from the desktop PC.
8. Restart PC SmartLINK and reset the PC Microcontroller.
PC Microcontroller with no video card, two PCs, and two serial cables
The first desktop PC is used as the terminal for the PC Microcontroller, and the second desktop PC’s hard drive is accessed as a remote drive, containing the files to be downloaded to the PC Microcontroller.
Hardware and software requirements: n Desktop PC, running PC SmartLINK, connected by a VTC-9F cable
and a null modem adapter to COM1 of the PC Microcontroller
n Desktop PC, running REMSERV.EXE, connected by a VTC-9F cable
and a null modem adapter to COM2 of the PC Microcontroller
n A PC Microcontroller running REMDISK.EXE from COM2.
1. Connect the equipment and load the appropriate software on each
system as per the following diagram:
2-15
Quick start 6000 Series user’s manual
Figure 2-10
Downloading files to the PC Microcontroller with no video card and two PCs
PC SmartLINK
PC Microcontroller
REMDISK.EXE
VTC-9F
cable
COM1 COM2
VTC-9F
cable
Null modem
adapter
Desktop PC #1
COM
port
REMSERV.EXE
Desktop PC #2
COM
port
Null modem
adapter
2. On PC #1 (i.e., the terminal PC), start PC SmartLINK and power on the PC Microcontroller.
3. Execute REMDISK.EXE from COM2 on the PC Microcontroller by enter­ing:
60xx C:\> REMDISK /COM2
The following message is displayed from the PC Microcontroller:
Remote Disk v1.0 Copyright (c) 1990-1994 Datalight, Inc. All rights reserved.
Installed as Drive F: /COM2 /B115+ /T10 60xx C:\>
2-16
6000 Series user’s manual Quick start
4. On PC #2 (i.e., the remote disk drive PC), execute REMSERV.EXE by
entering:
C:\> REMSERV C:
The following message is displayed on PC #2:
REMSERV v1.0 Copyright (c) 1990-1994 Datalight, Inc. All rights reserved.
Using COM1 at 115K+ baud. Accessing Drive C: Time-out is 9 seconds Press <Esc> to Exit.(There may be a delay before exit occurs)
5. At PC #1, access the remote disk drive by entering:
60xx C:\> F: 60xx G:\> CD F:\MPC\PC 60xx\DEMO
6. Files are transferred to the PC Microcontroller read/write drives by
using the DOS COPY or XCOPY commands. Enter:
60xx F:\MPC\60xx\DEMO> COPY DEMO.EXE C: 60xx F:\MPC\60xx\DEMO> DIR C: 60xx F:\MPC\60xx\DEMO> C:DEMO.EXE
The DEMO program displays a message on your PC. In this case, drive F: is the remote disk drive of PC #2, and drive C: is
the read/write SSD flash disk drive of the PC Microcontroller. Files are easily copied between the drives.
PC Microcontroller with a video card and one serial cable
Hardware and software requirements: n Desktop PC, running REMSERV, connected by a VTC-9F cable and
a null modem adapter to COM1 or COM2 of the PC Microcontroller.
n A PC Microcontroller system, including a keyboard, a 5420 SVGA
video card and VGA monitor, running REMDISK from COM1.
1. Connect the equipment and load the appropriate software on each
system as per the following diagram:
2-17
Quick start 6000 Series user’s manual
Figure 2-11 Downloading files to the PC Microcontroller with a video card
REMDISK.EXE
5420
SVGA Card
PC
Microcontroller
REMDISK.EXE
COM1
VTC-9F
cable
Null modem adapter
REMSERV.EXE
Desktop PC
COM
port
2. On the PC Microcontroller system, execute REMDISK.EXE by entering:
60xx C:\> REMDISK
The following message is displayed on the PC Microcontroller monitor:
Remote Disk v1.0 Copyright (c) 1990-1994 Datalight, Inc. All rights reserved.
2-18
Installed as Drive F: /COM1 /B115+ /T10
Note REMDISK assigns the remote drive as the last drive in the system. In
this case, drive F: was assigned.
3. Execute REMSERV.EXE on the desktop PC:
C:\> REMSERV C:
The following message is displayed on the PC:
REMSERV v1.0 Copyright (c) 1990-1994 Datalight, Inc. All rights reserved.
Using COM1 at 115K+ baud. Accessing Drive C: Time-out is 9 seconds Press <Esc> to Exit.(There may be a delay before exit occurs)
Note REMSERV.EXE is located in the PC Microcontroller utility disk \DOS
directory.
6000 Series user’s manual Quick start
4. Files are transferred to the PC Microcontroller’s read/write drives by using the DOS COPY and XCOPY commands. From the PC Microcon­troller system, enter:
60xx C:\> COPY F:\MPC\60xx\DEMO.EXE C: 60xx C:\> DIR C: 60xx C:\> C:DEMO.EXE
The DEMO program displays a message on the PC Microcontroller monitor.
In this case, drive F: is the remote PC disk drive, and C: is the read/write SSD flash drive on the PC Microcontroller. Files are easily copied between the drives.
5. When finished, on the PC Microcontroller system, execute:
60xx C:\> REMDISK /U
This unloads REMDISK from the PC Microcontroller.
6. On the desktop PC press <ESC> to exit REMSERV.
2-19
Quick start 6000 Series user’s manual
2-20
6000 Series user’s manual Setup programs
Chapter 3:
SETUP
Setup programs
This chapter discusses running the SETUP configuration program, the SETSSD program, and the PMISETUP program on the PC Microcontroller.
n SETUP — Configures devices set up by the BIOS such as serial
ports, floppy drives, etc.
n SETSSD — Configures PICO FA device order. n PMISETUP — Configures power management options at a more
detailed level than SETUP.
SETUP can be entered in one of two ways:
n Running SETUP.COM n Pressing the “backspace” key followed by the “S” key during BIOS
POST sequence (this occurs between the memory test and bootup).
Also, by removing the USESETUP jumper from the “S” position at W1, you may force the setup to temporarily revert to the defaults shown in the following table, which allows the user to reconfigure the setup.
The SETUP program defines the PC Microcontroller system param­eters. It is shipped with default configuration parameters stored in the serial EEPROM. Changes are made by running the SETUP program. The SETUP program is stored on the SSD0 drive and on the PC Microcontroller utility disk.
3-1
Setup programs 6000 Series user’s manual
Table 3-1 6000 Series setup parameters and defaults
SETUP parameters Description Default
Seria l console for COM1 Specifie s that COM1 is to be
Enabled used for console if video card i s not p resent
COM1 console baud rate Specifies communications rate
9600 between PC & 60xx when no video card is in use
Power–o n memory test Extensive memory testing
Enabled performed on bootup
Boot sequence Specifies whether the floppy
C: Only drive will be ignored as a boot device
Se ri al port A Specifies COM1 enable/di s ab le Enabled
Se ri al port B Specifies COM2 enable/di s ab le Enabled
Parallel (LPT) p o r t Specifies LPT por t
Enabled enable/disable
Parallel port mode Specifies mode to use with
parallel port
B idirection al
printer port
P arallel port address Specifies LPT address 378h
Number of floppy drives Specifies number of floppy drives
0 attached
Number of hard drives Specifies number of hard drives
0 attach ed
SETUP entry via hotkey Specifies <backspace><S>
Enabled hotkey enable/disable
Power manage ment fo r DOS
Time u pd ate afte r suspe nd Specif ie s to allow u pdate o f ti m e
Specifies power management enable/disable
Enabled
Enabled after suspend mode
Shadow video BIOS area Specifies video BIOS shado w
Disabled enable/disable
Shadow C8000h-CFFFFh Shadow enable/disable Disabled Shadow D0000h-D7FFFh Shadow enable/disable Disabled Shadow D8000h-DFFFFh Shadow enable/dis able Disabled
3-2
6000 Series user’s manual Setup programs
Running SETUP
1. Make sure you have established a serial communications console I/O link between the PC Microcontroller and your PC. Refer to the Quick start chapter for more information on establishing communications with your PC Microcontroller.
2. Enter:
60xx C:\> SETUP
Note You may also enter SETUP after the memory test and before the sys-
tem has booted by pressing the “backspace” key followed by the “S” key.
3. The system will display the PC Microcontroller setup parameters and available options. Select the option by pressing the space bar until the correct information appears, then press <ENTER>. Press <ESC> twice if you want to exit setup without saving your responses.
Note Options having an * are default settings.
n Serial Console on COM1:
Enabled* Disabled
WARNING!
Disabling the serial console when there is no video card present will stop further serial console communication with the system after the system resets. Once disabled, you may re-enable the serial console by running SETUP. To run SETUP, choose one of the following methods:
n Remove the USESETUP jumper, reboot, and run SETUP n Install a video card/monitor, reboot, and run SETUP.
(This method disables the serial console.)
n COM1 Console Baud Rate:
1200 2400 4800 9600* 14400 19200 28800 38400 57600 115200
n Power on memory test:
Enabled* Disabled
You may want to disable the memory test to speed up the boot process. You may also press the space bar to cancel the memory test while in progress.
3-3
Setup programs 6000 Series user’s manual
n Boot Sequence:
C: Only* A: Then C:
n Serial Port A:
Enabled* Disabled
n Serial Port B:
Enabled* Disabled
n Parallel (LPT) Port:
Enabled* Disabled
n Parallel Port Mode:
Bidirectional mode* EPP mode ECP mode Floppy disk mode Standard (Unidirectional) mode
n Parallel Port Address:
378h* 278h 3BCh
Note Standard mode is provided for compatibility only. We recommend the
use of bidirectional mode. EPP and ECP modes are provided for equip­ment that has the capability to operate at these modes for enhanced performance.
n Number of floppy drives:
0*, 1, 2
n Onboard floppy controller: (6010 only)
Enabled Disabled*
n Floppy drive 1 size:
5.25", 360KB
5.25", 1.2 MB
3.5", 720KB
3.5", 1.44 MB*
n Floppy drive 2 size:
5.25", 360KB
5.25", 1.2 MB
3.5", 720KB
3.5", 1.44 MB*
n Number of hard drives:
0* 1 2
3-4
6000 Series user’s manual Setup programs
Note If you are using a 5800A or a 5815 with the PC Microcontroller, set
“Number of hard drives” to “0” on either the 5800A or 5815 or on the PC Microcontroller. See the following table for details.
Table 3-2 Hard drive setup
No. of driv es in HDSETUP
(5800A/5815)
1 or 2 IRQ14 0 0N/A1 or 2
IRQ setting in HDSETUP
No. of drives in CP U SETUP
Note The PC Microcontroller does not support floppy drives on the 5800A
without first making some modifications to the 5800A. Call Technical Support for assistance.
n Onboard IDE interface: (6010 only)
Enabled Disabled*
Note The 6010 has an on-board floppy controller and IDE controller. If an
external controller is desirable, the on-board controllers can be disabled through SETUP.
n Auto Drive Configuration
Enabled* Disabled
n Drive 0 parameters
Cylinders (xxx): Heads (x): Sectors (xx):
n Setup entry via hotkey
Enabled* Disabled
n Power management
Enabled* Disabled
n Time update after suspend
Enabled* Disabled
n Shadow C8000H - CFFFFH
Disabled* Enabled
n Shadow D0000H - D7FFFH
Disabled* Enabled
n Shadow D8000H - DFFFFH
Disabled* Enabled
3-5
Setup programs 6000 Series user’s manual
Press ENTER to SAVE the changes or Press ESC to EXIT without saving the changes. Saving options. Options saved.
Depending on the options you have selected, the system may display the following message:
You must reset for these options to take effect.
If you entered SETUP with the hotkeys (i.e., “backspace” and “S” keys), the system will reboot automatically.
SETUP example
The following example configures a system with no memory test, 9600 baud, and booting from C:
OCTAGON SYSTEMS CORPORATION
60xx SETUP UTILITY Vx.x
(c) Phoenix Technologies, Ltd. 1985, 1995
_____________________________________________________________
(Press SPACE to CHANGE, ENTER to ACCEPT, ESC to EXIT)
Serial Console on COM1: ENABLED COM1 Console Baud Rate: 9600 Power on memory test: DISABLED Boot Sequence: C: ONLY Parallel (LPT) Port: ENABLED Parallel Port Mode: Bidirectional Printer Port Number of floppy drives: 1 Floppy drive 1 size 3.5", 1.44 MB Number of hard drives 1 Auto Drive Configuration: ENABLED SETUP Entry via Hotkey: ENABLED Power Management: DISABLED Shadow Video BIOS Area: DISABLED Shadow C8000h-CFFFFh: DISABLED Shadow D0000h-D7FFFh: DISABLED Shadow D8000h-DFFFFh: DISABLED
Press ENTER to SAVE the changes or Press ESC to EXIT without saving the changes. Options Saved. You must reset for these options to take effect. 60xx C:\>
Note Executing SETUP /D will change all setup parameters to default values. Note Power management should be disabled when using CAMBASIC.
3-6
6000 Series user’s manual Setup programs
SETSSD
SETSSD allows the user to set or change the PICO FA drive (SSD) order. PICO FA drives are “simulated” hard drives. They can exist before or after any IDE drives and can appear in any order. By setting the order, the SSDs may be accessed as C:, D:, etc. For example,
n To set SSD0 first and SSD2 second, enter the following command:
60xx C:\> SETSSD SSD0 SSD2
If there are other hard drives on the system, add the /before option to place the order of the SSDs before the hard drives, or add the /after option to place the SSDs after the hard drives. For example,
n To set SSD0 as the first drive, SSD2 as the second drive, and an IDE
drive as the third drive, enter the following command:
60xx C:\> SETSSD SSD0 SSD2 /before
n To set the IDE drive as first in order and SSD0 as second, enter the
following command:
C:\> SETSSD SSD0 /after
In the last example, the IDE drive is C:, SSD2 is D: and SSD0 is E:. Other drive letter designations may be added by device drivers (such as VDISK.SYS), which are in the CONFIG.SYS file on the boot drive.
The boot drive is based upon the drive order set by the SETSSD com­mand and by SETUP’s “boot sequence” option. If the boot sequence is set to “A: THEN C:,” the system will look for a floppy disk in drive A:. If a diskette is not installed, or a floppy is not defined, the boot drive will be the first drive specified in the SETSSD command. If the boot se­quence is set to “C: ONLY,” the check for a disk is bypassed.
Note The SETSSD parameters may also be overwritten by removing the
USESETUP jumper from the “S” position at W1 and resetting the system. If the parameters specified at the PICO FA first/second drive prompt are different from the previous SETSSD command, and you answered “No” to the “Save” prompt, the SETSSD output will not be accurate. Therefore, we recommend that you answer “Yes” to the save option to prevent confusion.
Note After you run SETSSD and the drive order has changed, the new
parameters will take effect after a reset.
Note The drive order affects the number entered at the PFORMAT Hn
command.
3-7
Setup programs 6000 Series user’s manual
PMISETUP
PMISETUP allows the user to customize the power management fea­tures of the PC Microcontroller. Refer to the CPU power management chapter. See also the Software utilities chapter for details.
3-8
6000 Series user’s manual Save and run programs
Chapter 4:
Save and run programs
Save and run your programs on the PC
Microcontroller
Once you have written, tested, and debugged your application, you can then save it to flash memory in SSD0. When you reboot the PC Microcontroller, your program can automatically load into DOS memory and execute. As shipped from the factory, SSD0 already contains a bootable ROM-DOS.
This chapter describes the following:
n Saving an application program to SSD0 n Autoexecuting the program from the PC Microcontroller n Overriding autoexecution of your program.
The information in this chapter assumes you will be using ROM-DOS in your application. Some Microsoft programs make undocumented DOS calls. With ROM-DOS, an error will be returned when an undocumented DOS call is made, causing your program to operate erratically. We recommend booting from SSD0 and using your own DOS, when using programs with undocumented DOS calls. Refer to the Adding operating system startup files section in this chapter for more information on saving and autoexecuting programs.
This chapter also assumes you will be using the PC Microcontroller without a video card/monitor. If you are using these devices, refer to the Video chapter for more information on transferring and saving programs.
Saving program and support files
By default, SSD0 comes from the factory preformatted, loaded with Datalight’s ROM-DOS startup files and with an example demo pro­gram. To replace the demo program on SSD0 with your own, see Add- ing your application section in this chapter.
Formatting SSD0
This section describes how to format SSD0.
1. Define the SSD order with the SETSSD command. Since the command input varies depending upon the parameters you would need to enter, see the SETSSD command in the Software utilities chapter.
4-1
Save and run programs 6000 Series user’s manual
2. To begin formatting SSD0, execute PFORMAT as follows:
60xx C:\> PFORMAT H
n
where n is the hard drive sequence number. This number includes IDE drives and SSDs.
For example, if you have 0 IDE drives and SETSSD shows:
[hdd] SSD0 SSD2
then enter:
60xx C:\> PFORMAT H0
On the other hand, if you have 1 IDE drive, enter:
60xx C:\> PFORMAT H1
Note If the drive has not been previously formatted, reset the system before
accessing the drive. This allows DOS to recognize the drive and add a letter designation to it.
Note PFORMAT.EXE must be downloaded from the PC Microcontroller
utility disk. This file is located in the \UTILS directory. After formatting the drive and resetting the system, you may access it
as a normal DOS drive.
Adding operating system startup files (using SYS)
To add the system files, issue the following operating systems command:
C:\> SYS
where x: specifies the drive letter. For example, if your system has 1 IDE drive, and SETSSD shows “[hdd]
SSD0 SSD2,” then SSD0 should be drive D:. To SYS this drive, use the “SYS D:” command.
Note If you are adding the ROM-DOS operating system, SYS.COM must be
downloaded from the PC Microcontroller utility disk. This file is located in the \DOS directory.
Note If you are adding the MS-DOS operating system, you must first boot
from an MS-DOS bootable device (floppy or hard drive).
Note If you are not booting from ROM-DOS, and wish to SYS ROM-DOS back
to the drive, the SYS command requires the access of the following ROM-DOS files: COMMAND.COM, ROM-DOS.SYS and SYS.COM.
x:
4-2
6000 Series user’s manual Save and run programs
Adding your application
To add your application to your SSD, do the following:
1. Three methods of copying your application to the SSD are available. Do one of the following:
a. From a local drive to the PC Microcontroller, issue the COPY
command.
b. From a host drive, download your application by issuing the
TRANSFER command when using PC SmartLINK. Refer to the section, Transferring files between the PC Microcontroller and your PC in the Quick start chapter.
c. To establish a remote drive and copy from it, issue the REMDISK
and REMSERV commands. Refer to the section, Transferring files between the PC Microcontroller and your PC in the Quick start chapter.
2. Add or remove any device drivers from your application. Remember to add these drivers to your drive as well.
3. To autoexecute your application, add your application name to the AUTOEXEC.BAT file. This method is the same in any DOS environ­ment.
For instructions on downloading files using TRANSFER, REMDISK, REMSERV, and PC SmartLINK, see the sections Transferring files
between the PC Microcontroller and your PC and Downloading files from the PC Microcontroller in the Quick start chapter. In addition, the Software utilities chapter provides usage instructions for REMDISK,
REMSERV, and TRANSFER.
Autoexecuting y our application
This section describes how to autoexecute your application.
1. To autoexecute your application in SSD0, use the SETSSD command to define your SSD as the boot device. Since you need to define the order of SSD0 as the first of the SSDs (and before any IDE drives), enter the following command:
60xx C:\> SETSSD SSD0 SSD2 /before
2. Reset the system. SSD0 is now drive C: and your application should begin execution.
Note If the SETUP option “Boot Sequence” is set to “A: THEN C:”, remove
any floppy in drive A: before resetting the system.
Note The SETSSD options are not used when USESETUP (“S” position at
W1) is not jumpered.
4-3
Save and run programs 6000 Series user’s manual
Overriding the autoexecution of your application
1. Remove the jumper from the “S” position at W1 (USESETUP).
2. Reset the system. This will force the system to ignore all SETUP infor­mation, including the floppy/hard drive and the SETSSD information.
3. At the prompt, “PICO FA first drive (0=SSD0, 2=SSD2, other=no drive),” enter “0”.
4. At the prompt, “PICO FA second drive (2=SSD2, other=no drive),” enter “2”.
5. At the prompt, “Do you wish to save this information now? (Y/N),” enter “Y”.
6. After saving this information, reinstall the USESETUP jumper.
7. Reset the system. The system should boot from SSD0.
4-4
6000 Series user’s manual Serial ports
Chapter 5:
Description
Each PC Microcontroller in the 6000 Series has two serial ports, except for the 6030 which has 4 serial ports. These serial ports are 16C550 compatible. They can be used for interfacing to a printer, terminal, or other serial device. These ports support 5-, 6- 7-, or 8-bit word lengths, 1, 1.5, or 2 stop bits, and baud rates up to 115.2 KB.
The serial ports meet IEC1000, level 3, ESD protection specification with ±8 KV of ESD protection. Backdrive protection is also included. COM2 can be converted to optically isolated, RS-422/485 with the network interface module (NIM). NIM mounts directly onto the PC Microcontroller without the need of a cable or external power supply.
Note The Network Interface Module (NIM) is not compatible with the 6010
PC Microcontroller. Use a VTC-9F cable to connect the ports to external serial equipment.
The pinout of the connector allows you to plug the cable directly into a 9-pin PC serial connector (refer to the product-specific appendix for the connector pinout). When interfacing the PC Microcontroller to your PC, you will need to use a null modem adapter. The serial port at COM1 defaults to IRQ4 at I/O address 3F8H, which is the PC standard for COM1. Likewise, the serial port at COM2 defaults to IRQ3 at I/O address 2F8H. Refer to Table 5-1 for the connector designation of each COM port on your model in the 6000 Series.
Serial por ts
Table 5-1 Serial port connector reference
Reference designator 6010 6020 6030 6040 6050 COM1 J3 J3 J3 J3 J3 COM2 J4 J4 J4 J4 J4 COM3 ——J1—— COM4 ——J7——
Selecting console devices
The PC Microcontroller has two options for console devices:
1. Serial console from COM1, as selected with the SETUP program (“Serial Console on COM1: ENABLED”). A serial cable/null modem adapter plugged into a host PC running PC SmartLINK provides both input and output. The local keyboard allows input.
5-1
Serial ports 6000 Series user’s manual
2. No console device (as selected with the SETUP program – “Serial Console on COM1: DISABLED”) means no console output. The local keyboard allows input.
COM1 as RS-232 I/O
When you have completed developing your application and programmed the PC Microcontroller, you can use COM1 as a standard RS-232 serial port for connection to a printer, modem, or other serial device. COM1 as a standard RS-232 serial port is configured at port address 3F8H. To access COM1 as standard RS-232, configure your serial port for your application or add a video card and monitor to your PC Microcontroller system. Use COM1CON.EXE to return to the serial port for console operation. Refer to the COM1CON.EXE support command in the Soft- ware utilities appendix.
Use a VTC-9F cable to connect the ports to external serial equipment. The pinout of the connector allows you to plug the cable directly into a 9-pin PC serial connector.
Using QuickBASIC to communicate via COM1
Several programming languages including QuickBASIC assume a video card is present, and for system speed reasons write directly to the video hardware. Assuming that a video card is present can be a problem since many control applications require video output. The following discus­sion is directed at QuickBASIC, but the principles (not accessing the print routines which access the video memory directly) apply to many languages. There are several ways to use COM1 from QuickBASIC.
Systems with a video card
Add a video card to the system and open/close COM1 using the QuickBASIC OPEN/CLOSE commands.
Systems without a video card
WARNING!
The system will lock up if you use commands such as PRINT or PRINT USING. Because QuickBASIC writes directly to video memory, these commands are usually displayed on a monitor.
5-2
6000 Series user’s manual Serial ports
Method 1
The system display will not appear over COM1 while the BIOS boots.
1. Run SETUP to disable the “COM1 as console” option.
2. Use QuickBASIC’s OPEN/CLOSE/PRINT/INPUT commands to access COM1. The following is an example program using these commands:
OPEN "COM1:9600,N,8,1,BIN" FOR RANDOM AS #1 CRLF$=CHR$(13)+CHR$(10) PRINT #1, "INPUT A STRING" + CRLF$ INPUT #1, A$ PRINT #1, CRLF$ + A$ CLOSE #1
Note All PRINT/PRINT USING/INPUT . . . commands must use the COMx
device number, where x represents the COM port used.
Method 2
1. Run SETUP to enable the “COM1 as console” option.
2. Use QuickBASIC’s OPEN/CLOSE/PRINT/INPUT commands to access COM1. After closing the device, manually restore the serial param­eters. The following example assumes 9600, N, 8, and 1 parameters:
OPEN"COM1:9600,N,8,1,BIN" FOR RANDOM AS #1 CRLF$ = CHR$(13) + CHR$(10) PRINT #1, "INPUT A STRING" + CRLF$ INPUT #1, A$ PRINT #1, CRLF$ + A$ CLOSE #1
Note All PRINT/PRINT USING/INPUT . . . commands must use the COM1
device number.
3. Restore the serial parameters by using a batch file specifying your program’s name as the first line of the file and COM1CON as the last line of the file.
For example, TEST.BAT may include the following to execute a user application named USECOM1:
USECOM1 COM1CON
Execute TEST.BAT. COM1 will be used as a communication port by USECOM1, then COM1
is restored to a console port by COM1CON.
Note COM1CON is located on the PC Microcontroller utility disk.
5-3
Serial ports 6000 Series user’s manual
Method 3
1. Run SETUP to enable the “COM1 as console” option.
2. Use the PRINTS, PRINTSL, KEYHIT$, INKEY2$ commands as found in the DEMO.BAS and DSQBTEST.BAS programs (included on the PC Microcontroller utility disk). Unformatted string output and string input must be done manually.
Note Programs written in this manner will also work with a video card
present and therefore systems can be “debugged” on your PC.
Method 4
1. Use an off-the-shelf communications library.
2. This may require restoring the COM1 parameters similar to Method 2, if the console video is expected after the QuickBASIC program termi­nates.
Method 5
1. Use COM2 instead of COM1. This is similar to Method 1, but you will still get the system displays over COM1.
Using T urbo C
If you need to restore the serial parameters after executing a C pro­gram, refer to the file COMTEST.CPP. This file can be downloaded from the Octagon Bulletin Board at (303) 427-5368 using 14400 baud, 8 data bits, no parity, and 1 stop bit.
COM2
Operation
There are two modes of operations for COM2:
n PC mode n Network mode
The “N” position at W1 distinguishes the COM2 mode on powerup. PC mode (“N” position at W1 jumpered, default) configures COM2 as a standard RS-232 port. Network mode (“N” position at W1 not jumpered) configures COM2 to communicate at 38.4 KB, respond to Optomux type commands, respond to Octagon commands, and automatically perform network housekeeping functions.
5-4
6000 Series user’s manual Serial ports
PC mode/network mode
On powerup, the BIOS extension reads the “N” position at W1 to deter­mine which COM2 mode to select.
Table 5-2 COM2 mode select
“N” posi tion at W1 M ode Des cription
Jum p ered PC m ode U se d efa u lt c onf igu ra tio n fo r
COM2 of 2400 baud , 8 data bits, 1 st op bit , and no pa rity.
Not jum pe red Netw or k m ode In sta ll I RQ3 ve ctor .
Change default baud rat e to
38.4 KB. Read serial EEPROM bytes
1 20h, 121h t o de ter m i ne if an I D has been previously esta blished. If it has, use the exis ting ID, i f not, use FFh.
Discard messag es addre ssed to other nodes. Selectively respond to messa ge s ad dressed t o no de.
Await INT 17H BIOS calls to collect me ssages.
COM2 as RS-232 I/O
COM2 is a standard RS-232 serial port, default configured at port address 2F8H.
The “N” position at W1 distinguishes the COM2 mode on powerup. PC mode (“N” position at W1 jumpered, default) configures COM2 as a standard RS-232 port.
COM2 as RS-422/485
The PC Microcontrollers feature a predefined, easy-to-use software interface for using COM2 as an RS-422/485 port. This software inter­face supports Optomux type message-passing as well as additional Octagon messages. Up to 32 nodes are supported at a default baud rate of 38.4 KB. This built-in feature provides a simple, low cost, and effec­tive method of rapidly implementing an RS-422/485 network. An Octa­gon network interface module and an opto-isolated RS-232 to RS-422/485 converter (Octagon P/N 4820), is required to convert RS-232 signals to RS-422/485.
Network mode (“N” position at W1 not jumpered) configures COM2 to communicate at 38.4 KB, respond to Optomux type commands, respond to Octagon commands and automatically perform network housekeeping functions.
5-5
Serial ports 6000 Series user’s manual
Up to 32 nodes with valid ID range from 0 to FF are supported. ID 0 is reserved for the host. ID FF is reserved for a new node that connects to the network and has not yet been assigned an ID.
Both input and output ring buffer size is 2 KB.
Host/remotes
An application may implement a node as either the “host” node or as a “remote” node in an RS-422/485 network. There can be up to 32 nodes without any bus repeaters in the network. A “host” is referred to as the node that initiates a communication; while a “remote” is referred to as a node that is addressed by the host.
The host is responsible for initiating communication, maintaining network registration, and providing housekeeping tasks with other nodes. There can only be one network host.
Remotes cannot initiate a communication. They can only respond to messages that are addressed to them from the host.
While there can be many remotes, all remotes initially respond to FFh as the ID before the ID is assigned or recognized by the host. To avoid conflict, only one new node at a time shall be added to the network. Other unregistered nodes must not be powered up while the new node is being registered. This allows assigning each node a unique node ID. Once a node has been added to the network and its ID stored in serial EEPROM, any node can thereafter attach to the network in any powerup sequence. Periodically, the host shall try to communicate to all the existing nodes in the network, plus the potential new node with the ID FFh.
Network interface module (NIM)
The Octagon network interface module (NIM) is designed for easy installation onto COM2 of the PC Microcontrollers. The NIM supports four-wire RS-422 and two-wire RS-485 configurations. Power is sup­plied to the NIM via the COM2 connector on the PC Microcontroller. For more information about the network interface module, see the NIM
product sheet.
Note The network interface module is not compatible with the 6010 model.
5-6
6000 Series user’s manual Serial ports
Figure 5-1 Network interface module RS-485 two-wire example
Host Transmit/
NIM
COM2
PC Microcontroller
Host
Receive Pair
NIM
COM2
PC Microcontroller
Remote
PC Microcontroller
NIM
COM2
PC Microcontroller
Remote
Figure 5-2 Network interface module RS-422 four-wire example
Host Transmit
Pair
NIM
COM2
PC Microcontroller Host
NIM
COM2
PC Microcontroller Remote
NIM
COM2
PC Microcontroller Remote
Remote
Receive
Pair
COM2
PC Microcontroller Remote
NIM
COM2
Remote
Host Receive
Remote Transmit
NIM
Pair
Pair
Refer to Octagon application notes AN-0047, AN-0048, and AN-0049 for additional information in setting up an RS-485 network. Contact Octagon Systems Technical Support , Customer Service, or Octagon’s web site at www.octagonsystems.com for this information.
RS-422/485 support functions
This section provides definitions for the following INT 17h BIOS routine functions pertinent to RS-422/485 support functions.
n Initialization n Send message n Receive message
5-7
Serial ports 6000 Series user’s manual
n Get receiver status n Get transmitter status n Get ID n Set ID n Get incoming message buffer pointer n Get outgoing message buffer pointer n Set incoming message buffer pointer n Set outgoing message buffer pointer n Set roll call response n Set state wish response n Set internal state response
Function 00 – Initialization
On entry: AH = 0FAh = RS-485 function signature
AL = 00h = RS-485 sub-function DX = 0ffffh
On exit: AL = status = 0 -> ok
= Not 0 -> error
Function 01 – Send message
On entry: AH = 0FAh = RS-485 function signature
AL = 01h = RS-485 sub-function DX = 0ffffh ES:BX = Transmit buffer pointer
On exit: AL = status = 0 -> ok
= Not 0 -> error
Function 02 – Receive message
On entry: AH = 0FAh = RS-485 function signature
AL = 02h = RS-485 sub-function DX = 0ffffh ES:BX = Receive buffer pointer
On exit: AL = status = 0 -> message available
= Not 0 -> message not collected yet
Function 05 – Get receiver status
On entry: AH = 0FAh = RS-485 function signature
AL = 05h = RS-485 sub-function DX = 0ffffh
On exit: AX = incoming message status
BX = incoming message count
5-8
6000 Series user’s manual Serial ports
Function 06 – Get transmitter status
On entry: AH = 0FAh = RS-485 function signature
AL = 06h = RS-485 sub-function DX = 0ffffh
On exit: AX = outgoing message status
BX = outgoing message count
Function 07 – Get ID
On entry: AH = 0FAh = RS-485 function signature
AL = 07h = RS-485 sub-function DX = 0ffffh
On exit: AX = our current ID
Function 08 – Set ID
On entry: AH = 0FAh = RS-485 function signature
AL = 08h = RS-485 sub-function BX = desirable ID DX = 0ffffh
On exit: AL = status = 0 -> ok
=Not 0 -> error
Function 09 – Get incoming message buffer pointer
On entry: AH = 0FAh = RS-485 function signature
AL = 09h = RS-485 sub-function DX = 0ffffh
On exit: ES:BX = incoming message buffer pointer
Function 0a – Get outgoing message buffer pointer
On entry: AH = 0FAh = RS-485 function signature
AL = 0Ah = RS-485 sub-function DX = 0ffffh
On exit: ES:BX = outgoing message buffer pointer
Function 0b – Set incoming message buffer pointer
On entry: AH = 0FAh = RS-485 function signature
AL = 0Bh = RS-485 sub-function DX = 0ffffh ES:BX = incoming message buffer pointer
On exit: AL = status = 0 -> ok
= Not -> error
5-9
Serial ports 6000 Series user’s manual
Function 0c – Set outgoing message buffer pointer
On entry: AH = 0FAh = RS-485 function signature
AL = 0Ch = RS-485 sub-function DX = 0ffffh ES:BX = outgoing message buffer pointer
On exit: AL = status = 0 -> ok
= Not -> error
Function 0d – Set roll call response
On entry: AH = 0FAh = RS-485 function signature
AL = 0Dh = RS-485 sub-function DX = 0ffffh BX = roll call response code (See roll call reply message format)
On exit: AL = status = 0 -> ok
= Not -> error
Function 0e – Set state wish response
On entry: AH = 0FAh = RS-485 function signature
AL = 0Eh = RS-485 sub-function DX = 0ffffh BX = state wish response code (See state wish reply message format)
On exit: AL = status = 0 -> ok
= Not -> error
Function 0f – Set internal state response
On entry: AH = 0FAh = RS-485 function signature
AL = 0Fh = RS-485 sub-function DX = 0ffffh BX = internal state response code (See internal state reply message format)
On exit: AL = status = 0 -> ok
= Not -> error
5-10
6000 Series user’s manual Serial ports
Octagon’ s command set
This section provides definitions for the following Octagon RS-485 network commands:
Table 5-3 Definitions list for Octagon RS-485 network commands
Fr om host From re mote
Roll Ca ll (Are you there?)
>zzA**.
State Wish (What ID do you want?)
>zzB**.
Assign ID (Your new ID is xx.)
>zzCnn**.
Report State ( Report internal state. )
>zzD**.
> = start character zz = intended listener’s ID field ** = checksum field . = end message character
Reply to Rol l Call
>00Zx xyy**.
xx=my ID yy =status=00- >doi ng fine, no requ est =01->ask for ID request =02->tell me to disconnect =03->ask for internal state
Reply to State Wish
>00Yxxzz **.
xx=my existing ID zz=new ID I want to be
Reply to Assign ID
>00Xxxzz **.
xx=my existing ID zz=my new ID
Reply to Report St ate
>00Wxxyy**.
xx=my ID yy=user defined state response
Checksum field
The checksum field of Octagon’s command set is computed by adding the ID field to the original Optomux type checksum. Note that by providing the checksum in this way, Optomux type equipment treats Octagon’s add-on commands as invalid messages while Octagon’s equip­ment gains a unique set of commands.
5-11
Serial ports 6000 Series user’s manual
Examples
Full C code examples are included in the \EXAMPLES directory on the PC Microcontroller utility disk. The following examples are for concept only.
Example 1:
The following is a description of how Roll Call is implemented: Host sends: (Dear node #1, are you there?)
>01AA3. ;> ;message start character ; 01 ;intended listener is ID 01 ; A ;command code A (roll call) ; A3 ;checksum = uchar (‘0’+‘1’+’A’+0x01) = 0xA3 ; . ;message end character
Remote replies: (Dear 00: 01 is here. I have no special request.) >00Z01007B. ;> ;message start character ; 00 ;intended listener is ID 00 (host) ; Z ;command code Z (reply to roll call) ; 01 ;01 = my ID ; 00 ;00 = status = no special request ; 7B;checksum = uchar (‘0’+‘0’+’Z’ +‘0’+’1’ +‘0’+’0’) = 0x7B ; .;message end character
Host sends: (Dear node #2, are you there?) >02AA5. ;> ;message start character ; 02 ;intended listener is ID 02 ; A ;command code A (roll call) ; A5 ;checksum = uchar (‘0’+‘2’+’A’+0x02) = 0xA5 ; . ;message end character
Remote replies: (Dear 00: 02 is here. I have no special request.) >00Z02007C. ;> ;message start character ; 00 ;intended listener is ID 00 (host) ; Z ;command code Z (reply to roll call) ; 02 ;02 = my ID ; 00 ;00 = status = no special request ; 7C;checksum = uchar (‘0’+‘0’+’Z’ +‘0’+’2’ +‘0’+’0’) = 0x7C ; .;message end character
The host continues with the roll call until all nodes have been queried. Not all of the 32 possible nodes need to be queried, only the known nodes. When the last known node has been queried, then the host queries for an unknown node.
5-12
6000 Series user’s manual Serial ports
Host sends: (Dear FF, are you there?) >FFACC. ;> ;message start character ; FF ;intended listener is ID FF ; A ;command code A (roll call) ; CC ;checksum = uchar (‘F’+‘F’+’A’+0xff) = 0xCC ; . ;message end character
Remote replies: (Dear 00: FF is here. I have no special request.) >00ZFF00A6. ;> ;message start character ; 00 ;intended listener is ID 00 (host) ; Z ;command code Z (reply to roll call) ; FF ;FF = my ID ; 00 ;00 = status = no special request ; A6;checksum = uchar (‘0’+‘0’+’Z’ +‘F’+’F’ +‘0’+’0’) = 0xA6 ; .;message end character
Example 2:
The following is a description of how an ID can be assigned to a new remote node:
Host sends: (Dear FF: are you there?) >FFACC. ; > ;message start character ; FF ;intended listener is ID FF ; A ;command code A (roll call) ; CC ;checksum = uchar (‘F’+’F’+’A’+0xff) = 0xCC ; . ;message end character
Remote replies: (Dear 00: FF is here. I have no special request.) >00ZFF00A6. ; > ;message start character ; 00 ;intended listener is ID 00 (host) ; Z ;command code Z (reply to roll call) ; FF ;FF = my ID ; 00 ;00 = status = no special request ; A6 ;checksum = uchar (‘0’+’0’+’Z’+’F’+’F’+’0’+’0’) = 0xA6 ; .;message end character
Host sends: (Dear FF: your new ID shall be 05.) >FFC0533. ; > ;message start character ; FF ;intended listener is ID FF ; C ;command code C (assign ID) ; 05 ;new ID ; 33 ;checksum = uchar (‘F’+’F’+’C’+’0’+’5’+0xff)= 0x33 ; .;message end character
5-13
Serial ports 6000 Series user’s manual
Remote replies: (Dear 00: FF acknowledges my new ID to be 05.) >00XFF05A9.
; > ;message start character ; 00 ;intended listener is ID 00 (host) ; X ;command code X (reply to assign ID) ; FF ;FF = my ID ; 05 ;05 = my new ID ; A9;checksum = uchar (‘0’+’0’+’X’+’F’+’F’+’0’+’5’) = 0xA9 ; . ;message end character
Example 3:
The following is a description of how a remote (of ID 02) can notify the host of a state change:
1. The
2. The
application program sets internal state using INT 17h function 0fh. application program sets roll call reply status to 03 (ask for Report).
3. Since a remote cannot initiate a communication, it must wait until it is spoken to at this point.
Host sends: (Dear 02: are you there?) >02AA5. ; > ;message start character ; 02 ;intended listener is ID 02 ; A ;command code A (roll call) ; A5 ;checksum = uchar (‘0’+’2’+’A’+0x02) = 0xA5 ; . ;message end character
Remote replies: (Dear 00: 02 is here. Ask for my internal state.) >00Z02031F. ; > ;message start character ; 00 ;intended listener is ID 00 (host) ; Z ;command code Z (reply to roll call) ; 02 ;02 = my ID ; 03 ;03 = status = Ask for a report of internal state ; 1F;checksum = uchar (‘0’+’0’+’Z’+’0’+’2’+’0’+’3’) = 0x1F ; .;message end character
Host sends: (Dear 02: What is your internal state?) >02DA8.
; > ;message start character ; 02 ;intended listener is ID 02 ; D ;command code D (Internal state query) ; A8 ;checksum = uchar (‘0’+’2’+’D’+0x02) = 0xA8 ; . ;message end character
5-14
6000 Series user’s manual Serial ports
Remote replies: (Dear 00: 02 internal state = 47.) >00W024784. ; > ;message start character ; 00 ;intended listener is ID 00 (host) ; W ;command code W (reply to internal state query) ; 02 ;02 = my ID ; 47 ;47 = my internal state ; 84;checksum = uchar (‘0’+’0’+’W’+’0’+’2’+’4’+’7’) = 0x84 ; .;message end character
The application program interprets the message and then responds accordingly. In this case, state 47 would have been defined in the host application as a specific response from a Remote with a user-defined meaning.
6030
COM3/COM4
The 6030 PC Microcontroller has two additional serial ports. COM3 uses IRQ12 at I/O address 3E8H. COM4 uses IRQ11 at I/O address 2E8H. Both COM ports have 4 RS-232 signals available: RxD, TxD, RTS, and CTS. DTR is pulled high. Refer to the 6030 technical data appendix for pinout information.
5-15
Serial ports 6000 Series user’s manual
5-16
6000 Series user’s manual EZ I/O
Chapter 6:
EZ I/O
Note EZ I/O is available on the 6020, 6040, and 6050 PC Microcontrollers.
Digital I/O lines
Several PC Microcontroller models feature the Octagon EZ I/O digital I/O chip. Each EZ I/O chip supplies 24 I/O lines which can be individually programmed as 5V input or 5V output. Each line can sink or source 15 mA.
EZ I/O lines can be used to sense switch closures, turn on lamps and LEDs, and interface with other devices that have TTL input or output such as printers and scales. The EZ I/O port can drive the Octagon MPB series opto-isolation module racks directly, controlling AC and DC loads to 240V at 3A. CAMBASIC has several commands to support the EZ I/O port when working on bit, BCD, byte or word bases. Figure 6-1 shows typical EZ I/O configurations.
Figure 6-1 Typical EZ I/O configurations
EZ I/O port
12 76543891413121110 15 16
LOGIC
J1
+–
P8
J2
PC
Microcontroller
EZ I/O port
PC
Microcontroller
EZ I/O port
PC
Microcontroller
CMA-26
ribbon cable
CMA-26
ribbon cable
CMA-26
ribbon cable
01234567
MPB Opto Rack
J2
J1
STB-26
12 76543891413121110 15 16
LOGIC
J1
+–
P8
J2
01234567
MPB Opto Rack
J2
J1
STB-26
6-1
EZ I/O 6000 Series user’s manual
WARNING!
Apply power to the PC Microcontroller before applying an input voltage to the digital I/O lines. This prevents excessive currents from flowing and damaging input devices.
The following chart specifies PC Microcontroller cards with EZ I/O capability.
Table 6-1 PC Microcontrollers with EZ I/O
PC Microcontroller model 6010 6020 6030 6040 6050
Number of EZ I/O chips none 2 none 1 1 EZ I/O digital li nes 48 24 24 High current drivers 8
EZ I/O is located at the J1 connector for the 6020, 6040, and 6050. An additional EZ I/O port is located at J7 on the 6020. Refer to the prod­uct-specific appendix for its associated jumper setting. Each EZ I/O connector is configured below:
Table 6-2 EZ I/O connector: J1 (6020, 6040, 6050) and J7 (6020 only)
Pin Function Pin Function Pin Function
Port A Port B* Port C
19 bit 0 10 bit 0 13 bit 0
2 1 bit 1 8 bit 1 16 bit 1 2 3 bit 2 4 bit 2 15 bit 2 2 5 bit 3 6 bit 3 17 bit 3 2 4 bit 4 1 bit 4 14 bit 4 2 2 bit 5 3 bit 5 11 bit 5 2 0 bit 6 5 bit 6 12 bit 6
1 8 bit 7 7 bit 7 9 bit 7
2+5 VDC Safe 26 Gnd
*Port B can only be configured as output on the 60 50. Th e output level is inverted
from input. This is due to the inverte d- output , high-c urrent driver used on the
6050. Consider these factors when using a nd programming this port .
Model 6020
Each EZ I/O port has 24 I/O lines available, which makes a total of 48 lines. The 24 I/O lines are divided into three groups of 8 with 10K resistors that can be connected to ground or +5V. Each of the 48 lines
6-2
6000 Series user’s manual EZ I/O
can be individually programmed as 5V input or 5V output. Each line can sink or source 15 mA.
6020 — Pulling the I/O lines high or low
Jumper block W3 pulls ports A, B, and C of EZ I/O 1 high or low. Jumper block W4 pulls ports A, B, and C of EZ I/O 2 high or low.
Note For the location of W3 and W4, refer to the component diagram in the
6020 technical data appendix.
Table 6-3 6020 pull-down/pull-up EZ I/O configuration
Configuration Description
W3[2-4] All lines in Port A are pulled to Gnd through 10K Ohm W3[4-6] * All lines in Por t A are pulled to +5V th rough 10K Ohm W3[7-9] All lines in Port B are pulled to Gnd through 10K Ohm W3[7-8] * All lines in Por t B are pulled to +5V th rough 10K Ohm W3[1-3] All lines in Port C are pulled to Gnd through 10K Ohm W3[3-5] * All lines in Por t C are pulled to +5V th rough 10K Ohm
* = default, pins jumpered
Table 6-4 6020 pull-up/pull-down EZ I/O 2 configuration
Conf iguration Description
W4[2-4] All lines in Port A are pulled to Gnd through 10K Ohm W4[4-6] * All lines in Por t A are pulled to +5V th rough 10K Ohm W4[7-9] All lines in Port B are pulled to Gnd through 10K Ohm W4[7-8] * All lines in Por t B are pulled to +5V th rough 10K Ohm W4[1-3] All lines in Port C are pulled to Gnd through 10K Ohm W4[3-5] * All lines in Por t C are pulled to +5V th rough 10K Ohm
* = default, pins jumpered
6020 — Organization of ports
The two EZ I/O digital ports have 24 I/O lines connected to J1 and 24 lines connected to J7. Each of the 24 lines are configured into three groups consisting of 8 lines each. Any of the lines at ports A, B, or C can be configured individually as inputs or outputs. Immediately after reset, each I/O line becomes an input.
6-3
EZ I/O 6000 Series user’s manual
Figure 6-2 Location of EZ I/O in the 6020
Base
Base + 1
Base + 2
Base + 3
See Table 6-9 for the 6020 EZ I/O base address selection.
A
8
B
8
C
8
Control
Register
EZI/O digital I/O chip
or
or
or
J1 J7
26-position connectors
6020
Model 6040
The 24 I/O lines are divided into three groups of 8 with 10K resistors that can be connected to ground or +5V. The 24 I/O lines can be indi­vidually programmed as 5V input or 5V output. Each line can sink or source 15 mA.
6040 — Pulling the I/O lines high or low
Jumper block W2 pulls ports A and C high or low. Likewise, jumper block W4 pulls port B high or low. The default pulls all of the I/O lines high.
Note For the location of W2 and W4, refer to the component diagram in the
6040 technical data appendix.
6-4
6000 Series user’s manual EZ I/O
Table 6-5 Pull-up/pull-down EZ I/O: 6040
Configuration Description
W2[2-4]* All lines in Port A are pulled to +5V through 10K Ohm W2[4-6] All lines i n Port A are pulled to Gnd through 10K Ohm W4[1-2]* All lines in Port B are pulled to +5V through 10K Ohm W4[1-3] All lines i n Port B are pulled to Gnd through 10K Ohm W2[1-3]* All lines in Port C are pulled to +5V through 10K Ohm W2[3-5] All lines i n Port C are pulled to Gnd through 10K Ohm
*=default, pins jumpered
6040 — Organization of ports
The EZ I/O digital port has a total of 24 I/O lines connected to J1. The lines are configured into three groups: ports A, B and C, each group consisting of 8 bits. Any of the lines at ports A, B or C can be configured individually as inputs or outputs. Immediately after a reset, each I/O line becomes an input.
Note For the location of J1, refer to the component diagram in the 6040
technical data appendix.
Figure 6-3 Location of EZ I/O in the 6040
Base
Base + 1
Base + 2
Base + 3
A
B
C
Control
Register
8
8
8
or
or
or
J1
26-position connector
See Table 6-10 for the 6040 EZ I/O base address selection.
EZI/O digital I/O chip
6040
6-5
EZ I/O 6000 Series user’s manual
Model 6050
Sixteen of the 24 lines can be individually programmed as inputs or outputs. These are divided into two groups of 8 lines with 10K resistors that can be pulled to ground or +5V. As output lines, they can sink and source 15 mA.
The remaining 8 lines are dedicated high current outputs, using a ULN2804 high current Darlington array. The outputs are open collec­tors and are capable of driving loads up to 100 mA at 50V.
6050 — Pulling the I/O lines high or low
Jumper block W2 pulls the I/O lines at ports A and C high or low. The default pulls all of the I/O lines high.
Note For the location of W2, refer to the component diagram in the 6050
technical data appendix.
Table 6-6 6050 pull-up/pull-down EZ I/O
Configuration Description
W2[2–4]* All lines in Port A are pulled to +5V through 10K Ohm W2[4–6] All lines in Port A are pulled to Gnd through 10K Ohm W2[1–3]* All lines in Port C are pulled to +5V through 10K Ohm
Gnd
W2[3–5] All lines in Port C are pulled to
* = default, pins jumpered
Note Port B of model 6050 is dedicated as a high current output port and is
not affected by the position of W2.
through 10K Ohm
6050 — Organization of ports
The EZ I/O digital port has a total of 24 I/O lines connected to J1. The lines are configured into three groups: port A, port B, and port C, each consisting of 8 bits. Any of the lines at ports A or C can be configured individually as inputs or outputs. Port B is dedicated as the high cur­rent port and can only be configured as outputs. Immediately after a reset, each I/O line on ports A and C becomes an input, and port B drivers are off.
6-6
6000 Series user’s manual EZ I/O
Figure 6-4 Location of EZ I/O in the 6050
Base
Base + 1
Base + 2
Base + 3
A
8
B
8
C
8
Control
Register
EZ I/O digital I/O chip
or
output only UNL2804
high current outputs
or
J1
26-position connector
6050
See Table 6-10 for the 6050 EZ I/O base address selection.
Note For the location of J1, refer to the component diagram in the 6050
technical data appendix.
6050 high current port
The high current port is used as dedicated outputs to drive relays, LEDs, solenoids, and similar devices. The port includes eight I/O lines at J1, port B. These outputs switch loads to ground.
On powerup, all high current driver inputs are pulled LOW. This forces all high current outputs OFF. The user program must configure port B as outputs and then control the state of each bit of the port. The outputs of port B are inverted. A written logic 1 switches the current driver to ON and switches current to ground. A written logic 0 opens the switch and the outputs are pulled high.
Note When ON, the saturation voltages are incompatible with TTL logic
levels and should not be used to drive other logic devices.
Considerations for high current outputs
n Each of the high current outputs can sink 500 mA at 50V. However,
the package dissipation will be exceeded if all outputs are used at the maximum rating. The following conservative guidelines assume the number of outputs are on simultaneously. The following derat­ing is based upon an ambient temperature of 70° C.
6-7
EZ I/O 6000 Series user’s manual
Table 6-7 6050 high current outputs
# of Outputs Max current per o utput
1500 mA 2410 mA 3310 mA
4260 mA 5210 mA 6190 mA 7160 mA 8150 mA
nSince the thermal time constant of the package is very short, the
number of outputs that are on at any one time should include those that overlap even for a few milliseconds.
n Incandescent lamps have a “cold” current of 11 times that of their
“hot” current. It is recommended that lamps requiring more than 50 mA not be used.
n When inductive loads are used, protection diodes or other schemes
must be used. Refer to Figure 6-4.
Figure 6-5 Inductive load protection circuitry
+
Supply
(To High Current Output)
n Configuring outputs in parallel for higher drive is NOT recom-
mended and could result in damage since the outputs will not share current equally.
WARNING!
If external devices, such as 24 VDC relays, are driven, the ground of the external 24V supply must be connected to J1, pin 26 and NOT the power ground. Failure to do so will produce aground loop within the PC Microcontroller and can cause erratic operation.
1N4002
6-8
6000 Series user’s manual EZ I/O
Figure 6-6 High current output hookup
UNL2804
high current driver
@ U15
EZ I/O connector
10
Port B,
bit 0
EZ I/O
26
Equivalent circuit 6050
Opto-module rack interface
M
+
+24V supply
Example external circuit
You can interface digital I/O lines to an 8-, 16-, or 24-position opto­module rack. One end of the CMA-26 cable plugs into the EZ I/O con-
nector and the other plugs into an MPB-8, MPB-16, or MPB-24 opto rack. Refer to the MPB opto racks product sheet for more information.
You can also use a CMA-26 cable to connect the EZ I/O port to an STB-26 terminal board and then to the opto rack. The STB-26 has two 26-pin connectors, one of which connects to the EZ I/O port, the other connects to the opto rack.
For either configuration, run a separate power line to +5V and ground on the opto rack.
6-9
EZ I/O 6000 Series user’s manual
Figure 6-7 Opto rack hookup
EZ I/O port
CMA-26
PC
ribbon cable
Microcontroller
Figure 6-8 Optional EZ I/O opto rack configuration
EZ I/O port
CMA-26
ribbon cable
LOGIC +–
P8
J2
12 76543891413121110 15 16
J1
01234567
MPB opto rack
12 76543891413121110 15 16
LOGIC
J1
+–
P8
J2
01234567
MPB Opto Rack
6-10
J2
PC
Microcontroller
J1
STB-26
Use the following table to determine the corresponding opto channel for a particular port:
6000 Series user’s manual EZ I/O
Table 6-8 EZ I/O opto-rack interface
M PB opto rack EZ I/O por t Connector pin Opto–module positi on Port C
0bit 013 1bit 116
2bit 215
3 MPB–08 bit 3 1 7
4bit 414 5bit 511 6bit 612 7bit 79
Opto–module position Po rt A
8bit 019 9bit 121 10 bit 2 23 11 MPB–16 bit 3 25 12 bit 4 24 13 bit 5 22 14 bit 6 20 15 bit 7 18
Opto–module position Port B*
16 bit 0 10 17 bit 1 8 18 bit 2 4 19 MPB–24 bit 3 6
20 bit 4 1
21 bit 5 3
22 bit 6 5
23 bit 7 7
*
: Por t B on the 6050 c an only be used with output opto modules. Also, the out put
Not e
is inverted from the input. Conside r these factors when using and programmin g this
port.
Keypad and display interface
Through the EZ I/O port, you may connect a keypad and display board
(KAD) to your PC Microcontroller. One end of the CMA-26 cable plugs
into the EZ I/O connector on the PC Microcontroller and the other plugs
into the KAD. Refer to the Keypad and display board (KAD) section in
the AUX I/O chapter of this manual or refer to the Keypad and display
product sheet for more information.
6-11
EZ I/O 6000 Series user’s manual
Figure 6-9 Keypad and display board hookup
LCD display
or
16-pin cable
VF display
14-pin cable
4x4 Keypad
10-pin cable
CMA-26 cable
EZ I/O port
6000 Series
PC Microcontroller
Interfacing to switches and other devices
The STB-26 terminal board provides a convenient way of interfacing switches or other digital I/O devices to the EZ I/O digital port. I/O lines at the EZ I/O connector can be connected to an STB-26 with a CMA-26 cable. Parallel I/O devices are then connected to the screw terminals on the STB-26. Refer to the STB-26 product sheet for more information.
6-12
Figure 6-10 PC Microcontroller interfacing with an STB-26
EZ I/O port
CMA-26
ribbon cable
PC
Microcontroller
J2J1
STB-26
6000 Series user’s manual EZ I/O
Configuring and programming the EZ I/O ports
On powerup and software or hardware reset, all digital I/O lines are reset as
inputs.
Each digital I/O connector has an Octagon EZ I/O digital chip associated
with it. Each has three ports with eight parallel I/O lines (bits) per port.
The address of the port is determined by jumper settings as follows:
Table 6-9 EZ I/O base address selection: 6020
IA: W2[7-8]
not
jumpere d jumpere d not
not
jumpere d jumper ed * jumper ed * 140H* 14 8H * 150H* 0xA8, b it 4
* = defa ult, pins jumpered
IB: W1 [9-10]
not
jumpere d
jumpere d jump ered 340H 348H 350H 0xA8, bit 4
J1: EZ I/O 1 address
320H 328H 330H 0xA8, bit 4
120H 128H 130H 0xA8, bit 4
J7: EZ I/O 2
address
Note Selecting a different EZ I/O address for the 6020 PC Microcontroller also
selects a different I/O address for the CTC (Counter Timer Controller). For
information on the CTC, refer to the Description section in the Counter timer
controller chapter.
Table 6-10 EZ I/O base address selection: 6040 and 6050
IA: W 2[7-8] IB: W1[9-10] I/O address: J1
not jum pered not jump ered 320H
ju mp ered not jumpere d 120H
not jumpere d ju mpered 340H
jumpered* jumpered* 140H*
* = default, pins jumpered
CTC: I/O address
Gate address & bit
On the 6040 PC Microcontroller, ports A, B and C can be programmed as all
inputs, all outputs or individually as inputs or outputs. On the 6050 PC
Microcontroller, port B can only be programmed as outputs, while ports A
and C can be programmed as inputs or outputs. You can alter which bits are
inputs or outputs by writing a control command to the control register in the
EZ I/O. When a line is configured as an output, it can sink a maximum of 15
mA at 0.4V or can source 15 mA at 2.4V.
6-13
EZ I/O 6000 Series user’s manual
Table 6-11 EZ I/O port addressing
Port I/O address
A Base address
B Base ad dr ess + 1* C Base address + 2 Control register Base address + 3
*Port B can only be configured as output on the 6050.
T he ou t put le ve l is inv ert ed fr om inp u t. Thi s is due to
the inverted-output, high-current driver used on the
6050. Consider these factors when using and
programming this port.
Programming EZ I/O
Program the EZ I/O chip as follows:
1. Configure the bit directions.
2. Write to port A, B, or C with the desired level, or read the bit level from the desired port.
Configuring EZ I/O
Configure the EZ I/O chip as follows:
1. Write a “2” to the control register (base address+3). This places the I/O chip into the “direction” mode:
OUT 143H, 2 (control register)
2. Set the direction of each bit. A “0” bit to the corresponding line indicates an output. A “1” bit indicates an input. Each bit corresponds to the equivalent I/O line.
Table 6-12 EZ I/O port byte
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 I/O line
x7
x6
x5
EZ I/O p ort byte EZ I/O p ort
x4
x3
x2
x1
x0
For example, writing 00011100 to port C (base address+2) will configure port C I/O lines 0, 1, 5, 6, and 7 to be inputs and lines 2, 3, and 4 to be outputs:
6-14
6000 Series user’s manual EZ I/O
OUT 142H, 1CH (00011100 binary = 1C hexadecimal)
3. Write a “3” to the control register (base register+3). This places the I/O chip back into “operation” mode:
OUT 143H, 3 (control register)
Writing and reading from EZ I/O
Writing to or reading from the desired EZ I/O port is accomplished with single program statements:
1. To write a bit pattern to the desired EZ I/O port:
OUT 142H, FFH
All bits of port C go high; all input bits are unaffected.
2. To read a bit pattern from the desired EZ I/O port:
PORTC = INP(142H)
The byte read from port C is assigned to variable port C.
EZ I/O output program examples
To configure ports A, B, and C as all outputs, issue the command:
OUT 143H, 2 ‘Direction’ Mode OUT 140H, FFH ‘Port A’ OUT 141H, FFH ‘Port B’ OUT 142H, FFH ‘Port C’ OUT 143H, 3 ‘Operation’ Mode
Note With CAMBASIC, you can also accomplish the same configuration and
outputs with one statement. Enter:
CONFIG EZIO &140, &0, &FF, &0, &FF, &O, &FF
Syntax
The CAMBASIC syntax is as follows:
CONFIG EZIO
initC
Parameters
Parameters are defined as follows: n address specifies the base address of the Octagon EZ I/O parallel I/O
device in use.
n initA, initB, and initC specify the logic state of portA, port B, and
port C, respectively, when this statement is executed. The value range is 0 to 255.
n dirA, dirB, and dirC are the directions of port A, port B, and port C,
respectively. The value 0 of an individual bit specifies output and the value 1 specifies input.
address, dirA, initA, dirB, initB, dirC,
Note Usually, once the chip is configures with the CONFIG EZ IO statement,
there is no reason to reconfigure this statement again
6-15
EZ I/O 6000 Series user’s manual
Ports A, B, and C will now output all “1”s after issuing the following commands:
OUT 140H, FFH (port A) OUT 141H, FFH (port B) OUT 142H, FFH (port C)
or all “0”s after:
OUT 140H, 0 (port A) OUT 141H, 0 (port B) OUT 142H, 0 (port C)
Note The outputs of port B on model 6050 are inverted due to the ULN2804
high-current Darlington array.
EZ I/O input program examples
To configure ports A and C as inputs and port B as outputs, issue the following command:
OUT 143H, 2 ‘Direction Mode’ OUT 140H, 0 OUT 141H, FF OUT 142H, 0 OUT 143H, 3 ‘Operation Mode’
To read ports A and C, issue the following commands:
PORTA = INP(140H) (port A) PORTC = INP(142H) (port C)
Note Port B is used as output on the 6050 PC Microcontroller.
Enhanced INT17H function definitions
This section provides definitions for the following functions: Initialize EZ I/O (1), Write EZ I/O (1), Read EZ I/O (1), Initialize EZ I/O (2), Write EZ I/O (2), and Read EZ I/O (2).
Initialize EZ I/O (1)
Function: efh Subfunction: 00h
Purpose: To set the directions and to program the initial values of
an EZ I/O port.
Calling registers: AH efh
AL 00h DI Port A configuration
xxxxxxxx xxxxxxxxB xxxxxxxx Initial data for port A
6-16
6000 Series user’s manual EZ I/O
xxxxxxxxB
direction; 1->output, 0->input
BX Port B configuration
xxxxxxxx xxxxxxxxB xxxxxxxx Initial data for port B
xxxxxxxxB
direction; 1->output, 0->input
CX Port C configuration
xxxxxxxx xxxxxxxxB xxxxxxxx Initial data for port C
xxxxxxxxB
direction; 1->output, 0->input
DX ffffh
Return registers: Carry flag cleared if successful
Carry flag set if error AL Error code
Comments: This function is used to initialize the first EZ I/O (i.e., the EZ
I/O that has the lower I/O address when two EZ I/O chips are present on a board) before normal use.
Programming example:
/* Inline assembly code for Borland C++ 3.1 */ asm { mov ax,0ef00h mov di,00ffh
/*port A all outputs, init data=all 0’s */ mov bx,55ffh /*port B all outputs, init data=55h*/ mov cx,0000h /*port C all inputs* mov dx,0ffffh int 17h
}
Write EZ I/O (1)
Function: efh Subfunction: 01h
Purpose: To write a value of an EZ I/O port. Calling registers: AH efh
AL 01h DI Port A mask and data
xxxxxxxx xxxxxxxxB xxxxxxxx Mask for port A; 1->bit to be
changed
xxxxxxxxB Data for port A
BX Port B mask and data
xxxxxxxx xxxxxxxxB xxxxxxxx Mask for port B; 1->bit to be
changed
xxxxxxxxB Data for port B
CX Port C mask and data
xxxxxxxx xxxxxxxxB xxxxxxxx Mask for port C; 1->bit to be
changed
6-17
EZ I/O 6000 Series user’s manual
xxxxxxxxB Data for port C
DX ffffh
Return registers: Carry flag cleared if successful
Carry flag set if error AL Error code
Comments: This function is used to write to the first EZ I/O (i.e., the
EZ I/O that has the lower I/O address when two EZ I/O chips are present on a board).
Programming example:
/* Inline assembly code for Borland C++ 3.1 */ asm { mov ax,0ef01h mov di,00ffh /*port A: no change */ mov bx,8000h /*port B: mov cx,0202h /*port C: bit 1=1,
bit 7=0, other bits unchanged*/
other bits unchanged* mov dx,0ffffh int 17h
}
Read EZ I/O (1)
Function: efh Subfunction: 02h
Purpose: To read from an EZ I/O port. Calling registers: AH efh
AL 02h DX ffffh
Return registers: Carry flag cleared if successful
AL Port A data AH Port B data BL Port C data
Carry flag set if error AL Error code
Comments: This function is used to read from the first EZ I/O (i.e., the
EZ I/O that has the lower I/O address when two EZ I/O chips are present on a board).
Programming example:
/* Inline assembly code for Borland C++ 3.1 */ unsigned char aData, bData, cData; asm {
mov ax,0ef02h mov dx,0ffffh int 17h mov aData,al
6-18
6000 Series user’s manual EZ I/O
mov bData,ah mov cData,bl }
Initialize EZ I/O (2)
Function: efh Subfunction: 03h
Purpose: To set the directions and to program the initial values of
an EZ I/O port.
Calling registers: AH efh
AL 03h DI Port A configuration
xxxxxxxx xxxxxxxxB xxxxxxxx Initial data for port A
xxxxxxxxB
BX Port B configuration
xxxxxxxx xxxxxxxxB xxxxxxxx Initial data for port B
xxxxxxxxB
CX Port C configuration
xxxxxxxx xxxxxxxxB xxxxxxxx Initial data for port C
xxxxxxxxB
DX ffffh
direction; 1->output, 0->input
direction; 1->output, 0->input
direction; 1->output, 0->input
Return registers: Carry flag cleared if successful
Carry flag set if error AL Error code
Comments: This function is used to initialize the second EZ I/O (i.e.,
the EZ I/O that has the higher I/O address when two EZ I/O chips are present on a board) before normal use.
Programming example:
/* Inline assembly code for Borland C++ 3.1 */ asm { mov ax,0ef03h
mov di,00ffh mov bx,55ffh /*port B all outputs, init data=55h*/ mov cx,0000h /*port C all inputs* mov dx,0ffffh int 17h
}
/*port A all outputs, init data=all 0’s */
Write EZ I/O (2)
Function: efh Subfunction: 04h
Purpose: To write a value to an EZ I/O port.
6-19
EZ I/O 6000 Series user’s manual
Calling registers: AH efh
AL 04h DI Port A mask and data
xxxxxxxx xxxxxxxxB xxxxxxxx Mask for port A; 1->bit to be
changed
xxxxxxxxB Data for port A
BX Port B mask and data
xxxxxxxx xxxxxxxxB xxxxxxxx Mask for port B; 1->bit to be
changed
xxxxxxxxB Data for port B
CX P ort C mask and data
xxxxxxxx xxxxxxxxB xxxxxxxx Mask for port C; 1->bit to be
changed
xxxxxxxxB Data for port C
DX ffffh
Return registers: Carry flag cleared if successful
Carry flag set if error AL Error code
Comments: This function is used to write to the second EZ I/O (i.e.,
the EZ I/O that has the higher I/O address when two EZ I/O chips are present on a board).
Programming example:
/* Inline assembly code for Borland C++ 3.1 */ asm { mov ax,0ef04h mov di,00ffh /*port A: no change */ mov bx,8000h mov cx,0202h
/*port B: bit 7=0, other bits unchanged*/
/*port C: bit 1=1, other bits unchanged* mov dx,0ffffh int 17h
}
Read EZ I/O (2)
Function: efh Subfunction: 05h
Purpose: To read from an EZ I/O port. Calling registers: AH efh
AL 05h DX ffffh
Return registers: Carry flag cleared if successful
AL Port A data AH Port B data BL Port C data Carry flag set if error AL Error code
6-20
6000 Series user’s manual EZ I/O
Comments: This function is used to read from the second EZ I/O (i.e.,
the EZ I/O that has the higher I/O address when two EZ I/O chips are present on a board).
Programming example:
/* Inline assembly code for Borland C++ 3.1 */ unsigned char aData, bData, cData; asm {
mov ax,0ef05h mov dx,0ffffh mov 17h mov aData,al mov bData,ah mov cData,bl }
6-21
EZ I/O 6000 Series user’s manual
6-22
6000 Series user’s manual AUX I/O
Chapter 7:
AUX I/O
Description
The AUX I/O port is a 34-pin connector at J2 which incorporates the parallel printer, speaker and keyboard ports, two optically isolated inter­rupts, and the AT battery connection. An alphanumeric display, matrix keypad, or floppy drive also interface through this port. These features
are easily accessed through the use of the breakout board or through the construction of a breakout cable. See the product-specific appendix for the AUX I/O connector pinout.
Breakout board (BOB)
The breakout board (BOB) is designed for use with all 6000 Series PC Microcontrollers. Keyboard, printer, speaker, optically isolated interrupt and reset, and an optional AT battery, are connected from the breakout board to the PC Microcontroller through the 34-pin AUX I/O header. The AUX I/O header provides a convenient and quick method of disconnecting these external devices from the PC Microcontroller during maintenance.
Note The AUX I/O port supports either a printer, an MPB-16PC opto-rack, a
floppy drive, or can interface to a keypad and alphanumeric display, but not to all at the same time.
Figure 7-1 BOB component and dimensions diagram
Note 1
NPTH = Non-plated through hole Note 1: These holes are used only for strapping the battery
7-1
AUX I/O 6000 Series user’s manual
Figure 7-2 Breakout board hookup diagram
Speaker
To PC Microcontroller AUX I/O Port
Keyboard
Opto Isolated Remote Reset
Printer
PCA-36
CMA-26
MPB 16PC Opto Rack
12 76543891413121110 15 16
LOGIC
J1
+–
P8
J2
Opto Isolated IRQ9
Floppy Drive
FCA-12
Opto-isolated inputs
Pin 2 of P1 on the breakout board is the opto-isolated return pin com­mon to both opto-isolated A and B inputs. Octagon recommends that these input sources have a common ground point established that is tied to pin 2. See Figure 7-3 for recommended timing usage.
Figure 7-3 Recommended timing usage
5V
01234567
STB-26
CMA-26
J2J1
Refer to the Breakout board product sheet for more information.
7-2
0V
µ
s
500 minimum
6000 Series user’s manual AUX I/O
Parallel printer port
The parallel printer interface supports standard (unidirectional), bidi­rectional, enhanced parallel port (EPP), extended capabilities port (ECP), and floppy drive modes. The default I/O address is 378H using interrupt IRQ5. A number of devices are supported including a PC compatible printer, an opto rack with opto-isolated digital I/O modules, a multiline alphanumeric display, a matrix keypad, and a floppy drive. This interface is located at J5 on the breakout board. See the Breakout board product sheet for the printer interface pinout at J5.
Installing a printer
To install a printer:
1. Remove power from the PC Microcontroller.
2. Connect a CMA-34 cable from the breakout board AUX I/O connector to the PC Microcontroller AUX I/O port.
3. Connect a PCA-36 cable from J5 on the breakout board to the printer.
4. Power on the PC Microcontroller and make certain that the LPT1 port is in standard or bidirectional mode. The LPT1 port mode is configured in SETUP.
Opto rack
The Octagon MBP-16PC opto rack interfaces directly to the parallel printer port and can control high voltage/high current G4 opto-isolated modules. Of the available 16 positions, 8 can be either input or output, 4 are dedicated as inputs and 4 are dedicated as outputs. Refer to the MPB-16PC opto module rack product sheet for more information.
Installing an opto rack
To install an MPB-16PC opto rack:
1. Remove power from the PC Microcontroller.
2. Connect a CMA-34 cable from the breakout board AUX I/O connector to the PC Microcontroller AUX I/O port.
3. Connect a CMA-26 cable from J5 on the breakout board to the MPB-16PC.
4. Power on the PC Microcontroller and make certain that the LPT1 port is in standard or bidirectional mode. The LPT1 port mode is configured in SETUP.
Keyboard
A PS-2 style keyboard can be used with the PC Microcontroller. This interface is located at J4 on the breakout board.
7-3
AUX I/O 6000 Series user’s manual
Installing a keyboard
To install a keyboard:
1. Remove power from the PC Microcontroller.
2. Connect a CMA-34 cable from the AUX I/O port on the breakout board to the AUX I/O port on the PC Microcontroller.
3. Connect a PS-2 style keyboard to J4 on the breakout board.
4. Power on the PC Microcontroller. Refer to the Breakout board product sheet for the keyboard interface
connector pinout at J4.
Speaker
The speaker is interfaced via a 4-pin connector at J2 on the breakout board. An external speaker from 8 to 50 ohms can be used. If an ampli­fier/speaker is used, Speaker Data, +5V and Gnd are supplied for the amplifier. If only a speaker is used, attach the speaker directly to Speaker Data and +5V.
Installing a speaker
To install a speaker:
1. Remove power from the PC Microcontroller.
2. Connect a CMA-34 cable from the breakout board AUX I/O connector to the PC Microcontroller AUX I/O port.
3. Connect a speaker to J2 on the breakout board.
4. Power on the PC Microcontroller. Refer to the Breakout board product sheet for the speaker interface
pinout at J2.
Floppy disk drive
The parallel port on the breakout board can be used as a floppy disk drive port. The following section provides instructions for installing a floppy disk drive. Table 7-1 provides the pinouts to wire the AUX I/O connector to a floppy drive.
Installing a floppy disk drive
To install a floppy disk drive:
1. Remove power from the PC Microcontroller.
2. Connect a CMA-34 cable from the AUX I/O port on the breakout board to the AUX I/O port on the PC Microcontroller.
7-4
6000 Series user’s manual AUX I/O
3. Connect an FCA-12 cable from the printer port on the breakout board to the floppy drive. See the Breakout board product sheet for an LPT1 to floppy drive cable pinout.
4. Connect an external power cable to the floppy drive.
5. Power on the PC Microcontroller and make certain that the LPT1 port is in floppy disk mode. The LPT1 port mode is configured in SETUP.
Table 7-1 AUX I/O connected to a standard 3.5" floppy disk drive
AUX I/O port 34–pin connect or, female Function
1 –OPTOA, B NC NC
2 +OPTOB NC NC 3Pwr GndNC NC 4 +OPTOA NC NC 5 Keyboard Data NC NC
6 Keyboard Clock NC NC 7 +Battery NC NC
8 Speaker NC NC
9 +5VDC Saf e NC NC 10 STB 12 DS0 * 11 AFD N/C DenSel 12 Data0 8 Index* 13 E rr 32 HDSel* 14 Data1 26 Trk0* 15 Init 18 Dir* 16 Data2 28 WP* 17 S LIN 20 Step* 18 Data3 30 RData* 19 Gnd 29 Gnd
20 Data4 34 DskChg*
21 Gnd 31 Gnd
22 Data5 N/C Msen0
23 Gnd 17 Gnd
24 Data6 16 Mtr0*
25 Gnd 19 Msen1
26 Data7 N/C Msen1
27 Gnd 27 Gnd
28 Ack 14 DS1*
29 Gnd 33 Gnd
30 Bus y 10 Mtr1*
31 Gnd 21 Gnd
32 PE 22 WData*
33 Gnd 23 Gnd
34 SLCT 24 WGate*
* = active lo w
Note: The AUX I/O and floppy drive connectors are 3M 34 14 series connectors or
T h o mas and B e tts, 6 09–3430.
DB–34 IDC connector, female (floppy port) Function
7-5
AUX I/O 6000 Series user’s manual
Note The DB connectors are the 3M D891xx series connectors. The AUX I/O
connector is a 3M 3414 series connector or Thomas and Betts, 608–3430. A wiremount male connector can be used to connect a VTC10–IBM cable.
AT battery
The PC Microcontroller is shipped with an on–board battery for backing the real time clock and the SRAM SSD2.
There are three options for battery backup of the real time clock and SRAM SSD2 for the PC Microcontrollers.
1. The PC Microcontrollers are shipped with an on–board battery.
2. An external AT battery is added to the J6 connector on the PC Microcontroller. If an external AT battery is used, then the on–board battery can remain on–board or be removed.
3. An AT style battery is added to the break–out board (BOB). The on–board battery can remain on–board or be removed.
Installing an AT battery on the breakout board
A 3.6V AT battery (Octagon P/N 3186) can be installed on the breakout board to provide backup for the real time clock and the SRAM SSD2.
To install the AT battery:
1. Remove power from the PC Microcontroller.
2. Position the AT battery on the breakout board so that the 4-position battery connector faces the same direction as J3 on the breakout board. Secure the battery with a tie-wrap using the holes provided.
3. Connect the 4-position battery connector onto J3.
4. Connect a CMA-34 cable between the breakout board AUX I/O connec­tor and the PC Microcontroller AUX I/O port.
5. Power on the PC Microcontroller.
Keypad and display board (KAD)
You can easily add a 16-position keypad and either a 2 or 4 line display to the system. The keypad and display boards connects to either the EZ I/O port or the AUX I/O port on the PC Microcontroller.
Note When the breakout board is used with the PC Microcontroller, the
AUX I/O port becomes unavailable to the keypad and display board. Hence, you must connect the keypad and display board to the PC Microcontroller’s EZ I/O port.
7-6
6000 Series user’s manual AUX I/O
The keypad and display board plugs into the EZ I/O port on the PC Microcontroller using a CMA-26 cable. Refer to the EZ I/O chapter for interfacing to the EZ I/O port. The keypad and display board plugs into the AUX I/O port on the PC Microcontroller using a CMA-34 cable. Refer to the AUX I/O chapter for interfacing to the AUX I/O port.
Figure 7-4 KAD component and dimensions diagram
1.650"
1.400"
0"
-.250"
4X156" NPTH
0"
-.250"
Alphanumeric display
To interface a VF-2 x 20, a VF-4 x 20, or an LCD 4 x 40 alphanumeric display to the PC Microcontroller, use the keypad and display board. The program DISPLAY.EXE (found on the PC Microcontroller utility disk) provides an easy method to use the display. Refer to the file DISPLAY.DOC on the PC Microcontroller utility disk for information on initializing and using the display.
Installing an alphanumeric display
To install an alphanumeric display:
1. Remove power from the PC Microcontroller.
3.500"
3.750"
2. If you are using a breakout board with the PC Microcontroller, connect a CMA-26 cable from the EZ I/O port on the PC Microcontroller to the EZ I/O port on the keypad and display board.
If you are not using a breakout board with the PC Microcontroller, you may use either the EZ I/O port or the AUX I/O port. To use the EZ I/O port, follow the instructions described above. To use the AUX I/O port,
7-7
AUX I/O 6000 Series user’s manual
connect a CMA-34 cable from the AUX I/O port on the PC Microcontroller to the AUX I/O port on the keypad and display board.
3. Supply +5V to the keypad and display board.
4. Connect the selected display, either VF-2 x 20, VF-4 x 20 or LCD 4 x 40 display to the appropriate connector on the keypad and display board.
Note Do not connect both VF and LCD displays to the keypad and display
board simultaneously.
5. Power on the PC Microcontroller and make certain that the LPT1 port is in standard or bidirectional mode. The LPT1 port mode is configured in SETUP.
Refer to the Keypad and display board product sheet for the KAD VF display and the KAD LCD display interface pinouts at J5 and J3, re­spectively.
Keypad
To interface a 4 x 4 matrix keypad to the PC Microcontroller, use the keypad and display board. The program DISPLAY.EXE (found on the PC Microcontroller utility disk) provides an easy method to use the keypad. Refer to the file DISPLAY.DOC on the utility disk for informa­tion on initializing and using the keypad.
Installing a 4 x 4 keypad
To install an alphanumeric display:
1. Remove power from the PC Microcontroller.
2. If you are using a breakout board with the PC Microcontroller, connect a CMA-26 cable from the EZ I/O port on the PC Microcontroller to the EZ I/O port on the keypad and display board.
If you are not using a breakout board with the PC Microcontroller, you may use either the EZ I/O port or the AUX I/O port with the keypad and display board. To use the EZ I/O port, follow the instructions described above. To use the AUX I/O port, connect a CMA-34 cable from the AUX I/O port on the PC Microcontroller to the AUX I/O port on the keypad and display board.
3. Supply +5V to the keypad and display board.
4. Connect the keypad to the J4 connector on the keypad and display board.
5. Power on the PC Microcontroller and make certain that the LPT1 port is in standard or bidirectional mode. The LPT1 port mode is configured in SETUP.
Refer to the Keypad and display board product sheet for the KAD key­pad interface pinout at J4.
7-8
6000 Series user’s manual Analog I/O
Chapter 8:
Note Analog I/O is only available on the 6040 PC Microcontroller.
Description
The 6040 has eight input channels and two analog output channels, all with 12 bits of resolution. It can read and write data at 100,000 samples per second.
The range of each input channel is independently software selectable for ±10V, ±5V, 0 to 10V, or 0 to 5V. An adjustment potentiometer is pro­vided to adjust the selected input voltage range by +5%. The input multiplexer is fault protected to ±16.5V. The input resistance is 10M .
The output ranges are individually jumperable for ±5V, 0 to 10V, or 0 to 5V. Both the analog input and analog output lines are located at J7.
Analog I/O
WARNING!
The analog output channels come up in an undefined state until they are configured in your software. Critical systems should be disabled until the analog output channels are initialized to a known state.
8-1
Analog I/O 6000 Series user’s manual
Analog I/O interface
To interface analog I/O devices to J7 of the 6040, use an STB-20 termi­nal board and a CMA-20 cable. See the following diagram.
Figure 8-1 Interfacing analog I/O devices to the 6040
Analog I/O port
J7
6040
CMA-20
ribbon cable
Analog input device
+
STB-20
Analog output device
+
Configuring and programming the analog I/O
port
Configuring and reading from analog input with CAMB ASIC
To configure the 6040 for analog input, use CAMBASIC’s CONFIG AIN command. For more details regarding CONFIG AIN, refer to your CAMBASIC user’s manual.
Example
An analog input program example using CAMBASIC’s AIN command is provided below.
10 CONFIG AIN 0,0: ‘Config A/D channel 0 to 0 to 5V
input range
20 CONFIG AIN 1,1: ‘Config A/D channel 1 to -5 to 5V
input range
30 CONFIG AIN 2,2: ‘Config A/D channel 2 to 0 to 10V
input range
8-2
6000 Series user’s manual Analog I/O
40 CONFIG AIN 3,3: ‘Config A/D channel 3 to -10 to 10V
input range
50 CONFIG AIN 4,0: ‘Config A/D channel 4 to 0 to 5V
input range
60 CONFIG AIN 5,0: ‘Config A/D channel 5 to 0 to 5V
input range
70 CONFIG AIN 6,0: ‘Config A/D channel 6 to 0 to 5V
input range
80 CONFIG AIN 7,0: ‘Config A/D channel 7 to 0 to 5V
input range 100 FOR X=0 TO 5 110 C(X) = AIN(0): ‘Assign analog input readings from
channel 0 to array C
120 NEXT X
Reading numbers less than zero
Do the following to read numbers less than zero:
1. Subtract 65535 (FFFF), then
2. Apply the multiplier.
Configuring analog output
Refer to Table 8-1 to configure for analog output on the 6040 PC Microcontroller.
Table 8-1 6040 digital to analog output range select: W3
Output range Channel A Channel B
0 V to 10V W3[6-8] W3[3-5] 0V to 5V W3[8-10] W3[1-3]
-5V to +5V W3[7-8]* W3[3-4]*
* = default, pins jumpered
Note The 12–bit digital–to–analog converters (DACs) can be jumpered for
different ranges. For example, for a 0 to 10V range, x = 0 implies 0.00V output; x = 4095 implies 10V output. This means there are 10/4095 =
0.002442 volts per count.
Writing to analog output with CAMBASIC
An analog output program example using CAMBASIC’s AOT statement is provided below.
10 ‘Assume that DAC jumper is configured to generate
0 to 10V
8-3
Analog I/O 6000 Series user’s manual
20 AOT 0,2048: ‘Output approximately 5V to channel 0 30 AOT 1,1024: ‘Output approximately 2.5V to channel 1
Table 8-2 Analog specifications
Analog input Specifications
Chan nels : 8 sing le -e n ded
Re s ol uti o n : 12-bit Input voltage ranges: ±10V, ±5V, 0 to 10V, or 0 to 5V Gain: x1 Overload protection: ±16.5V Input impedance: unipolar: 21 kW; bipolar: 16 kW Conversion time: 10 µs
MUX settling time: 3 µs track to hold acquisition time
Throug hp ut: 100 ksp s
Analog output Specifications
Channels: 2 independent
Resolution: 12-bit Ou t put vol tage r an g es: ±5V, 0 to 10 V, or 0 to 5V Output current: 5 mA
Throughput: max. setting time = 10 µs (for data to stabilize)
Configuring and reading from analog input and output with INT17H functions
The analog input can also be determined through the use of built-in INT17H functions. For more information, refer to the section below, Enhanced INT17H function definitions.
Enhanced INT17H function definitions
This section provides definitions for the following functions: Analog to Digital Conversion and Digital to Analog Conversion.
8-4
6000 Series user’s manual Analog I/O
Analog to digital conversion
Function: f8h Subfunction: 00h
Purpose: To perform an analog to digital conversion at a specified
A/D channel. This function will perform averaging based on the last setting done using subfunction 2.
Calling registers: AH f8h
AL 00h BL A/D channel number (0 to 7) BH range and polarity selection
0 -> 0 to +5V 1 -> -5V to +5V 2 -> 0 to +10V 3 -> -10V to +10V
DX ffffh
Return registers: Carry flag cleared if successful
AX 12-bit data corresponding to input voltage or the
average of multiple readings.
Carry flag set if error AL Error code
Programming example:
unsigned int atod0Data; /* Inline assembly code for Borland C++ 3.1 */ asm { mov ax,0f800h mov dx,0ffffh mov bl,0 /*A/D channel 0 */ mov bh,1 /*input range -5V to +5V */ int 17h mov atodData, ax
}
print(“Data from A/D channel 0 = %04x.\n”,atod0Data);
Digital to analog conversion
Function: f8h Subfunction: 01h
Purpose: To perform a digital to analog conversion at a specified D/A
channel.
Calling registers: AH f8h
AL 01h BL D/A channel number (0 to 1) CX 12-bit digital input DX ffffh
8-5
Loading...