CME486 sx/nx/nx2 cpuModulerM UserosManual

ffi RearrimeDevices, rnc. "Accessingthe Analog World"g

ISO9001 and AS9100 Certified PublicationNo. CMM86.9516 CME486sx/nx/ox2 cpuModule UsertsManual

ffi REALTIME DEVICES, INC. PostOffice Box 906 StateCollege, Pennsylvania 16804 Phone:(814)234-8087 FAX:(814) 234-5218 Publishedby Real Time Dwices, Inc. P.O.Box 906 StateCollege, PA 16804

Copyright @ 1995by Real Time Devices,Inc. All rights reserved Printedin u.s.A.

PCDff, PC/AT are registeredtrademarks of IBM Corporation. IBM is a registeredtrademark of InternationalBusiness Machines Inc. MS-DOS is a registeredtrademark of corp. PCllO4 is a registeredtrademark of PC7l04 Consortium. cprModule is a trademarkof Real Time Dwices. All other trademarksappearing in this documentare the property of their respectiveowners. TABLE OF CONTENTS rNTRODUCTr0N...... I-1 Tr{ESTRUCTURE OF TrrE DOS SYSTEM ...... i-3 TIIE CME486SX/DX/DX2 MODULE ...... i4 cMBr86SX/DX/DX2 MODIILE SPECrFrCATrONS...... i-5

MODULESETUP ...... l_4 POWER Mt urrFuNcTIoNcoNNEcToRJl...... l-5 Speaker ...... l-5 Keyboard ...... l-5 SystemReset...... l-6 WatchDog Timer ...... l-6 Battery ...... l_6 FlashProgramming ...... l-6 CoNNECTORJ2PARALLELPORT...... l-6 CONNECTORJ3 FIRSTSERIAL PORT ...... ,..,..I:7 CoNNECTORJ4SECOND SERIALPORT...... l_8 CoNNECTORSJ5 AND J6 pC/104 BUS...... l-8 SomeUseful Recommendations ...... I-lz oN-BOARDCONFIGURATIONOPTIONS ...... l-12 SolidState Disk...... L-tz CHAPTER 2......

INPUT/OUTPUTMAp ...... 2-3 TIIE SETT,PPROGRAI\{ ..,24 AvailableOptions ...... 2-s StandardEEPROM Setup...... 2-5 AdvancedEEPROM Setup...... 2-g FlardDisk Utiliry...... 2-12

ThePOSTs ...... 2-t3 Bypassingthe StoredConfiguration ...... 2-15 THECORE 8IOS...... 2-16 EEPROMControl ...... 2-16 EEPROMAccess Example.... 'Watch ...... 2-17 DogTimer Control...... -...... 2-lg VIRTUALDEVICES ...... ,2.20 InitiatingVirtual Device Mode from the SetupProgram ...... 2-ZO Initiatingvirtual DeviceMode by JumperingSerial Port Pins...... 2-2r Disconnectingthe Host ...... 2-Zl Noteswhen Using Virtual Device Mode ...... 2-21 ...... 3-1 STORINGDAIA ON SOLIDSTATE DEVICES (RAIvI AND ROM MEMORTES)...... 3-3 soLID STATEDrSKS ...... 3_3 RAM Disk ...... 3-3 ROMDisk ...... 34 DTRECTMANAGEMENT OF Tr{E SOLrD STATE DrSK ...... 3-5

MiniDOSSpecifications ...... 3-10 UsingMiniDOS ..3-ll BIOSEXTENSTONS...... 3-ll TheStructure of a BIOSExtension...... 3-ll Creatinga BIOSExtension ..3-12 UTILITYPROGRAMS .....3-12 SolidState Disk Builder ...... 3-12 FILECHK.EXE ...... 3-15 BIOS8LD.EXE...... 3-15 APPEI\( A CME486 MODI]LES STAIYDARD PC BIOS INTERNACE...... A-1 APPEI\DD( B JT]MPER CONNGI]RATION AND LOCATIONS...... B.I APPEIYDD(C WARRANTY ...... c-r INTRODUCTION

This manual is meantfor engineersand programmerswho wish to developsystems based on the Real Time DevicesCMBt86-4xx (S)V DXIDX2) module.It containsthe module'stechnical specifications, and dealswith its connectionsand /software.

The manualis organizedas follows: rntroduction After a short introduction to DoS systems,this part gives general information on the moduleand its main features,together with a brief fu nctional description. Chapter I Providesdetailed information on the hardwareof the CME486- 4xx moduleand on its connectionsto the outside. Chapter 2 Providesall the necessaryinformation on the Setupand BIOS of the CME486-4xxmodule. Chapter 3 Lists and explainsthe various storagemodes on solid state devices,and gives detailedinformation on the supportsoftware providedby Real Time Devices. Appendix A Givesthe completespecifications of the BIOS implementedon the CME486-4:ormodule. Appendix B Providesa completelist of the module'sjumpers with their use and locations. Appendix C Warranty

i-l

THE The structureof a DOS qystemconcerns the machineas a whole and not only the operating STRUCTURE system.A simple way to understanda DOS systemis to imagine a hierarchical strudure wherethe OF THE DOS various functions are distributedthroughout the system.Each level providesa welldefined set of SYSTEM servicesupon which the higher level can be constructed:each level can be thought of as a virtual machine.The following figure describesthis concept:

APPLrcArloN \ ./

\ DOS /

Bros \ / \7

Figure I

The figure showsthe four levels composinga DOS system.They are:

The PhysicalMachine @ardware) It is the lowestlwel, where many difrerencesdistinguish the various systems: ' fiie microprocessorused: it is alwaysa processorbelongingto the 80X86 family, which includes:8086, 80286, 80386, 80486, Pentiunr, etc. ' The devicescomposing the memory:difrerent kinds of memoriescan be used@RAN[S, SRAN{S,RO}VG, Flash EPRO\IIs,EPROIVIS, etc.), having different sizesand performing a difrerent memorymanagement. ' The VO devices:there are numeroustypes ofthem and they can be orderedfrom hundredsof dtfferent suppliers.As a resul! a hard disk capacitycan rangefrom 20Mbfes to some Gbytes,a floppy disk capacityfrom 3ti0Kbytesto 2.88Nlbytes,while monitor bpes range from Monochrometo SuperVGA 1024*1024256 colors, and numerousperipheral devices are availablefor the most diverseand surprising uses. The BIOS

The secondlevel in the virtual machineis the first softwarelwel, the BIOS (Basic InpuVOutput System).At this lwel, a standardimage of the machineis createdfor the higher level. This imageis usedto concealthe specific hardwareframe through a set of servicesobtained using a standardized intemrpts stnrchre, which is qpical of the PC and AT compatiblearchitecture. The DOS

The upper level is the DOS kernel which, basing itself on the standardservices provided by the BIOS, becomesable to provide hardwareindependent services which can be usedby apptication progams. Roughly, DOS servicescan be divided as follows: . File management . D5mamicmemory allocation . Disk operationscontrol . Error managementand control . Peripheralsnranagement and control

t-5 . Applications rnanagementand control . Net functions

The Application The top level is the applicationsoftware. It can be one of the thousandsof MS-DOS applications availablefor saleor a customapplication written by the systemintegrator. At all the abovedescribed levels, the virtual machinehas been fully integratedby Real Time Devicesin the CME486 modulesfamilv.

THF One of the main featuresof the CN{E486modules is theirvery high integration level, which cME486 combinesall the functions of a PC/AT. Thesetwo modulesare basedon the PC/104 ;they sx/Dx/Dx2 integrateall the functions of a'DOS Engine" and at the sametime provide the primary VO functions, MODT'LE that is: a PC/AT compatibleke5iboard interface, a parallel porL two RS232serial ports. The modulesalso integate a RAlvl/ROM disk, a Real Time Clock and a Watch Dog Timer. The CME486 modulesare designedessentially for industrial applications,which usually require: . softwareand hardwarecompatibility with the PC/AT world . high speednumber-crunching operation . low power consumption . small dimensions . high reliability . very goodnoise immunity.

Figure 2 presentsthe module'sblock diagram.

SERIAL DRAM SERIAL 486DX/ Blos 486DX2 PARALLEL SOLIDSTATE DISK WITHMATH KEYBOARD coPRocEssoR EEPBOM SPEAKER WATCHDOGTIMER o o rt o o c

Figure2

i4 Additional functions can be implementedusing Real Time DevicesutilityModulesrM and dataModulesoas well as other PC/f04 modulesmounte4 typically for the PC1L}4standard, in stack- through, which avoidsexpensive installations ofbackplanes and card cagesand preservesthe module'scompactness. Thesefeatures allow the CME486 modulesto be easily customizedby adding LAN controllers, modems,video controllers,analog and digital data acquisitionmodules. A PC compatibleBIOS is alsoimplemented in the CME486modules. This BIOS zupportsthe MS-DOS operatingqystem from version 3.0 to version 6.2. The drivers implementedin the system BIOS allow to boot the systemboth from the floppy disk and from the RAI4/ROM dis( thus enabling the qystemto be usedin disklessmode. For industrial applications,a set of functions havealso becn implementedin the systemBIOS to allow a fast and easysystem control and debug.

CME486 CME486-4xxCPU SXIDX/I)X2 MoDuLE : llXTiilHltlfifur*.33Mrrz, 4*tvftiz SPECIFI. cATroNs DMA/ crc . 7 DMA channels(8237 compatible) . 15 intemrptchannels (8259 compatible) . 3 counter/timers(8253 compatible)

Memora Configurations . 2lvlbytes DRAM . 4Mby'tes DRAI\,I

Solid StateDisk ' two 32-pin socketsare available,where the fotlowing devicescan be installed:

64Kbytes 128Kbrtes 256Kbytes 5l2Kbytes lMbvte EPROM yes yes yes yes yes Flash yes yes yes yes no SRAM no yes no yes no NO\IRAM no yes no yes no

Peripherals

' Two fullduplex RS232*rjal portswith baudrates from 50 to 115200baud . Bidirectional . PC/AT keyboardinterface . Speakerport . Real Time Clock (requiresexternal battery) . WatchDogTimer

r-5 BIOS . Mappedfrom 0F0000hto 0FEFFFh . Direct supportof RAIWROMDisk . Userdefinable through the Setupprogam . Virtual devicessupport (VDS) . Direct call, beforeboog of user's progmns . Boot possiblefrom floppy dish RAN4/ROMdislq or serial line.

Connections . AT bus accordingto the PC/104specifications (64-pin J6, 40-pin J5) . Serialport I connector(f0-pin J3) . 2 connector(10-pin Ja) . Parallel port connector(26-pinl2) . Servicesconnector (10-pin Jl)

PhysicalCharacteristics . Dimensions:90.2 x 95.9mm(3.6'x 3.8"),height: l6mm (0.6") . Powersupply: 5V+/- 5% (qrpicalconsumption: @ 800 mA) . l0-layer surface-mountPCB

Operating Environment . Temperatuip:0 - 75 degreesC . Relativehumidity: 5 - 95Yo . Altitude:0 - 3000m . Storagetemperature: -55 to +85 degreesC.

N o

Jall c c c c . . c . . . c . ol ll c . o ...... o . .l ..o....o1 G ilccooo .o.cc.ccl H J!

Figure3 Mechanicaldimensions in inches,t.005 i4 CIIAPTER 1

This chaptercontains all the necessaryinformation concerning:

. Pinout ofthe connectorsand signal definitions . Specificationsofthe externaldevices . On-boardjutnper configuration . Specilicationsofinstallabledevices.

t-l

CONNEC- Figure l-l showsthe interfaceconnectors of the CME486 modulesand Table 1-l lists their TIONS tunctions.

/T\ \17 o ,. IQT lo "l lo "l lo ol lo "l

rz l6-El lo ol l" "l lo ol l""l lo ol lo ol l'"1 lo "l l" ol lo "l lo ol lo ol J' IETol lo ol lo ol lo lo ol

ooooooooooooooooooooooooooooooo ooooooooooooooooooooooooooooooo ooooooooooooooooooo ooooooooooooooooooo

Figure1-l ConnectorLocations

Table1-1 GonnectorFunctions Connector Function Dimensions II Multifunction l0 oin T2 Parallel oort 26 oin J3 Serialport l0 oin J4 Serialnort l0 oin J5 PC/104Bus 40 nin J6 PCl104Bus 64 oin

In the module layout pin I of wery connectoris indicatedby a sqrnre pad on the printed circuit board.

l-3 MODULE No specificboard setupis requiredfor normal operation.With the setting providedby the SETUP manufacturer,the modulecan be connectedto the peripheralsand immediatelybecome operative. The only settingsthat must be performedby the user are thoseconcerning the SSD (Solid StateDisk) definition. Every allowed hardwareoperation is performedby jumper sening.In the modulelayoug the junpers are indicatedas "JP" followed by the jumper's number,while pin I of wery jumper is indicatedby a s$nre solderpad on the printed circuitboard or a roundedcorner of the outline silk- screenedon the board. The following jumpers can be found on the CME486-4rx module: Two 2-pinjumpers: JP5 and JP6, which canbe setas follows:: . pin I connectedwith pin 2 (which will be indicatedas 'closed') . pin I and pin 2 not connected(which will be indicatedas 'open')

Two 3-pin jumpers: JP2and JP4,for which there are three possibilities: . connectingpin I to pin 2 (which will be indicatedas l-2) . connectingpin 2 to pin 3 (which will be indicatedas 2-3) . performing no connectionat all.

Two 6-pin jumpen: JPI and JP3,where the pins can only be connectedtwo by two so as to fonn three pairs. There are, therefore,four possibilities: . connectingpin I to pin 2 (which will be indicatedas 1-2) . conn@tingpin 3 to pin 4 (which will be indicatedas 34) . connectingpin 5 to pin 6 (which will be indicatedas 56) . performing no connectionat all.

On the modulethere are also somesolder jumpers, indicatedin the layout as "JPS" followed by a number.These jumpers are correctly setby the manufacturerand should not be removedby the user. Appendix B containsthe jumper lisg explainsthe functions performedby eachjumper, and indicatestheir exactpositions on the module.

POWER Thepower supply is conveyedto the CMB|86modules by PC/104bus connectors J5 and J6, SUppL1' accordingto the followingtable:

Table1-2 PowerSupplv Connectors Connector/ Pin Sional Tolerance J6/ 6-58 +5\IDC +l- 504 Isl34 t6tr0 -5\IDC +l- 5o/o 16tt8 +12\1DC +l-5o/o J6tt4 -r2vDc +l-s%o J612424344 gnd NA ts t2-3840

WARNING: The CME486 will be destroyedif power is connectedincorrectly. Make rbsolutely certain all power connectionsare correct before applying power!

t4 The exactpower consumptionof the CME486 modulesdepends on which peripheralsare connectedto the board,on the selectedSSD configuration,on the selectedmemory configuration and on the microprocessorinstalled. Typical power consumptionfor a commonconfiguration is as follows: . installed memory:4Mbytes . installedsSD: 5I2KEEPROM . installed processor:25lvfrIz Intel 486DX

Table'13 TypicalPower Consumption of a CME486-6DXModule (Vcc=5V) Module 5V -5V 12V -12V cME4864DX 750mA 0 0 0

MI]LTI. This connectorimplements all the following functions: FI]NCTION . Speaker CONNECTOR Jl . AT Keyboard . SystemReset . WatchDogTimer . Battery . Flash ProgrammingPowerSupply (VPP)

The following table givesthe pinout of connectorJl.

Table1.4 MultifunctionGonnector Jl Jl Pin Sional Function in/out I SPKR+ Speakeroutput out 2 SPKR. Speakeroutput out J RESET External reset ln 4 WD WatchDos out KBD Ketroarddata ln 6 KBC Ketroardclock out 7 GND Groundsisnal 8 KBP Keyboardpower out 9 BAT Batteryinput m l0 I/PP \1PPfor Flashorosrammins in

Speaker A speakeroutput is availableon two pins of the multifunction connectorJl. Theseoutputs are controlled by a transistorto supply 0.1 watt of power to an external speaker.As a rule, the external speakermust havean 8 ohm impedance.

Keyboard An AT compatiblekeyboard can be connectedto the modulethrough connector Jl. Usuallythese ke),boardscome with a cableending with a 5-pinmale DIN connector.Table l-5 lists thepinout of connectorJl andthe conespondingsignals on theDIN connettor.

t-5 Table 1-5 Kevboard Connector Jl Jl Pin Siqnal Function DIN 5 KBD Kevboarddata 2 6 KBC Keyboardclock I 7 GND Groundsisnal 4 8 KBP Keytoard power )

SystemReset Pin 3 of the multifunction connectorallows the connectionof an externalpushbutton to senda resetsignal to the system.This pushbuttonshould normallybe openand connectedto ground when pushed.

Watch Dog The Watch Dog Timer signal generatedon the CME486 modules(active high) is availableon Timer pin 4 of the multifunction connector.The Watch Dog timeout is set to I.2s. If the watchdogtimer is not resetwithin this time, a modulereset is automaticallyperformed.

Battery Pin 9 of the multifunction connectorallows connectionof an externalbackup battery (typically 3.69. This battery is usedby the CME486-4xxmodule when powereddown, to: a preservethe time and date in the Real Time Clock preservethe information storedin the static RAlvf; in this case,please check that jumpers IP2 andIP4 arecorrectly set to position 2-3.

Flash Pin l0 of the multifunction connectoris providedto programthe on-boardFlash .The Programming user must supplythis pin with the requiredVPP (usually sVD9+l-syo or I2VDC+/-57o) and select the Flash EPROI{Ssize as describedin Tables l-12 and l-13. Rememberthat \lPP is controlledbv connectorJPI pins 5-6 for bank I and by connectorJ3 pins 56 for bank 2.

CONNECTOR J2 The parallel port is alailable on connectorJ2. Its addresscan be selectedfrom amongthe PARALLEL standardDOS addresses,by using the Setupprogram. The pinout of connectorJ2 allows a ribbon PORT cableto directly connect12 to a DB25 connector,thus providing a standardPC compatibleparallel port. Table 16 lists the signalswith their meaning and explainshow to connectthem to the DB25 connectorto obtain a PC compatibleouput. To ensurecorrect operation" keep the length ofthe cableconnecting the moduleto the parallel devicebelow 3 meters.

l6 Table1-6 ParallelPort GonnectorJ2 J2 Pin Siqnal Function in/out DB25 I -STB StrobeData out I 2 -AFD Autofeed out t4 3 PDO LSB of printerData out 2 4 .ERR error ln l5 5 PDl PrinterData I out 3 6 .IMT Initialize printer out l6 PD2 PrinterData2 out 4 8 .SLIN Selectprinter out L7 9 PD3 Printer Data 3 out 5 l0 GND Sienal sround l8 ll PD4 PrinterData 4 out 6 t2 GND Sienalsround t9 l3 PD5 PrinterData 5 out 7 l4 GND Sienalsround 20 l5 PD6 PrinterData 6 out 8 t6 GND Signalground 2t t7 PD7 MSB PrinterData out 9 l8 GND Sienalqround 22 l9 .ACK Characteracceoted ln t0 20 GND Sienalground 23 2l BSY Busv ln ll 22 GND Signalground 24 23 PE PaperEnd ln t2 24 GND Signalground 25 25 SLCT ReadyTo Receive ln t3 26 GND Sienalsround 26

COITI\ECTOR J3 An RS232serial port is availableon connectorJ3. Its addresscan be selectedfrom the standard FIRST SERIAL DOS addresses(2E8, 2F8, 3E8, 3F8) using the Setupprogam (seeChapter 2). PORT Table l-7 givesthe pinout ofconnector J3 and explainsthe appropriateconnections to obtain an XT compatible@825) or AT compatible@B9) externalserial connector.

L-7 Table1-7 RS232Serial Port ConnectorJ3 J3 Pin Signal Function in/out DB25 D89 I DCD Data Carrier Detect m 8 I 2 DSR Data SetReadv ln 6 6 3 Rx ReceiveData ln 3 2 4 RTS RequestTo Send out 4 7 5 Tx Transmit data out 2 3 6 crs ClearTo Send in f, 8 7 DTR Data Terminal Readv out 20 4 8 RI Ring Indicator ln 22 9 9.10 GND SienalGround 7 5

CONI\'ECTOR J4 The secondserial port is implementedon connectorJ4. The serial port addresscan be selected SECOND SERIAL from the standardDOS addresses(288, 2F8,3E8, 3F8)using the Setupprogam (seeChapter 2). PORT The following table lists the pinout and functions of this connector.

Table1{ RS232Serial Port ConnectorJ4 J4 Pin Siqnal Function in/out DB25 D89 I DCD Data CanierDetect ln 8 I 2 DSR Data SetReadv ln 6 6 3 Rx ReceiveData in 3 2 4 RTS RequestTo Send out 4 7 5 Tx Transmit data out 2 3 6 crs ClearTo Send tn 5 8 1 DTR Data Terminal Readv out 20 4 8 RT Rins Indicator ln 22 9 9.10 GND SienalGround 7 5

l-8 CONNECTORS The signalson connectorsJ5 and J6 belongto the PC/104Bus; their functions and definitions J5 AI\[D J6 match the correspondingsignals defined in the IEEE P966 standard.The pinout and the pin func- PC/104BUS tions are listed in the following tables.

Table1-9 PC/104Bus GonnectorJ5 J5 Pin J5 row A J5 row B I 0v 0v 2 SBIIE* MEMCS16* 3 LA23 IOCSI6* 4 LA22 IROIO 5 LA2I IRO1I 6 LA2O IROI2 7 LAI9 IRQl5 8 LAIs IRO14 9 LAIT DACKOT l0 MEMR+ DRQo ll MEMW* DACKs+ t2 sD8 DRQ5 l3 sDe DACK6* t4 sD10 DRO6 l5 sDu DACKTI l6 sDl2 DnQz t7 sD13 +5V l8 sDl4 MASTER* l9 SDI5 0v 20 (KEY) OV

l-9 Table1-10 PCr104Bus ConnectorJ6 J6 Pin J6 row A J6 row B I IOCHCHK+ OV 2 SD7 RESETDRV 3 SD6 +5V 4 sD5 IRQs 5 sD4 -5V 6 sD3 DRQ2 7 sD2 -l2v 8 sDl ENDXFR* 9 sD0 +l2v l0 IOCHRDY (KEY-) ll AEN SMEMW t2 SAI9 SMEMR* l3 sAlS IOW* I4 sAlT IORT l5 sAl6 DACK3* l6 SAT5 DRQr t7 sAl4 DACKI* l8 SAI3 DROI l9 SAI2 REFRESH* 20 SAII SYSCLK 2l SAIO IRQZ 22 sA9 IRQ6 23 sA8 IRQ5 24 sA7 IRO4 25 sA6 IRQT 26 sAs DACK2I 27 s44 TC 28 sA3 BALE 29 sA.2 +5V 30 sAl osc 3l sA0 0v 32 OV OV

The signalsfollowed by a (*) are active low All the bus lines can drive a maximum current of 6mA at TTL levels. The following is a brief descriptionof the various PC/104bus lines.

l-10 Sigrat TJO DescriDtion AEN o AddressENable: when this line is active (high), this meansthat a DMA transferis being performedand thereforethe DtvIA controller hascontrol over the databus, the addressbus and the control lines. BALE o Bus AddressLatch Enable,active high. When active, it indicatesthat the addresslines SA0 to SAlg arevalid. DACK* o DMA ACKnowledge0-7. Active low, theseare the an$werlines to 0-7 DMA requests. DRQ 0-7 I DIvIA Request0-7: theseare asynchronouslines usedby the peripheral dwices to require a DMA service.They have rising priority from DRQ0 up to DRQ7. A DMA requestis performedby setting the DRe line high and keeping it high until the correspondingDACK line is activated. ENDXFR* vo It is the only synchronoussignal of the PC/104bus and it is active low. It indicatesthat the current bus cycle must be performedat 0 wait states.It is usedonly for l6-bit boards. IOCHCHK+ I UO ChannelCheck, active low, indicatesan eror condition that cannotbe corrected. IOCHRDY I VO ChannelReady: this line, usually high (ready)is controlledat low level by the dwices which needlonger bus cvcles. IOCSI6* I Active low. This signal is controlledby the devicesmapped in the VO addlessspace and indicatesthey havea l6-bit bus width. TOR+ o VO Rea4 active low, indicateswhen the devicespresent on the bus can sendtheir information on the databus. IOW* o VO Write, active low. When active, it allows the peripheraldevices to 4ad datapresent on the databus. rRQ2-15 I IntemrptRequest 2 to 15 active on rising edge.IRQI5 hastop priority, the other lines havedecreasing priority starting from IRQI4 down to IRQ2. The intemrpt requestis performedby changing the level of the correspondingline from low to high and keeping it high until the rnicroprocessorhas recognised it. KEY N/A Key for connectorinsertion. LAJ,3..LAI7 o Active higlU they selecta l28Kbytes window in the l6N{bytesaddress spaceavailable on the bus. MASTER* I Active low. Indicatesthaq inside the requestedDldA cycle, a resour@ on the bus is aboutto drive the data and addresslines. MEMCS16* I Active low. This signal is driven by the devicesmapped in the address spaceand indicatesfor thesedevices a l6-bit bus width. MEMR* IJO Active low. Indicatesa memoryread operation.The devices(rnapped in the addressspace) which usethis signal must de€odethe addresses presenton linesLA23..LAL7 and SAI9..SA0. MEMW* vo Activelow. Indicatesa memorywrite operation.The devices (rnapped in theaddress qpace) which use this signalmust decode the addresses presen!on linesLA23..LAl7 and SAI9..SA0. osc o OSCillator:clock with a 70 ns period anda S}%odutvcvcle. REFRESH* o This line is active low and indicatesthat the current bus cycle is a DRAI\{ refreshcycle. The refreshcycles are activatedwery 15 microseconds. RESETDRV o This line, active higtr, is usedto res€tthe deviceson the bus, at power- on or after a resetcommand. sA0/19 o Addressbits from 0 to 19: theselines are usedto addressthe memory spaceand the VO space.SA0 is the lesssignificant bit while SAlg is the most sienificant bit. SBIIE+ o This signal is active low and indicatesa transferof the most significant databyte(SD15..SD8). sD0-7 vo Data bits: theseare the databus lines. SDOis the lesssignificant bit, SD7is the mostsisnificant bit. SMEMR* o MemoryReadcommand. active low. SMEMW* o Memory Write command,active low. SYSCLK o SystemClock, programmed at 8Mhzwithas}yoduw cvcle. TC o Terminal Count: this line is active high and indicatesthe conclusionof theDMA transfer.

SomeUseful o The driving capacityof the add-onboards must be at least 6mA at low lwel. Recommendatiors a usually, no termination is requiredfor the bus lines but, if necessary,we r@ommend terminating eachsignal of the bus with a seriesresistor and capacitor(40-60 ohms,30-?0 pF) from eachsignal line to ground. Ifyou needto connectthe modulebus (connector15) to other boards,first designa bus extenderusing a 4Jayer PCB (2 signal layers, I ground layer and I power supply layer) in order to avoid crosstalkinterference. Ifyou usea 2-layerPCB, one ofthe two layersabso- lutely mustbe entirely usedas ground.Ribbon cableconnections should be avoided but if necessaryuse the shortestpossible cable, nwer longer than 20cm. While designingyour systen\ pleaseconsider that with ribbon cableconnections, bus control signals (IO& IOW, MEN,IR,MEMW, RESET, etc.) will be inwitably exposedto crosstalkinterference and disnuted by addressand databus changes. Someexpansion boards have TTL inputs exposedto interference.More specifically,the RESET signal is often critical. If you notice spurious-resetproblems, try connectinga 200- 500pFcapacitor between RESETand ground to preventfalse resetson the expansionboard. If you wish to designyour omt expansionboards, you should carefirlly select the compo- nentsthat will act as an interfaceto the Pgl04 bus. We recommendyou usecomponents having aTrise andTfall times compatiblewith thoseof the LS and HCT logic families.

ON.BOARI) This sectione4plains how to add and removethe board's oomponents.As a nrle, this procedure CONFIGT]RAIION is necessaryonly for solid statedisks. OPTIONS

SolidState Disk A Solid StateDisk can be installed into the eME486 module,which can then be usedas a stand- alone device.The Solid StateDisk can be implementedusing different devices(SRAMs, Flash EPRoMs, EPRolvIs,NovRAlvk) and its capacitycan rangefrom 64KBytesto 2MBytes. The Solid StateDisk is organizedin two ban*s, identified in the layout as U6 and U?. Generally, the devicet)?e and size for bank I of the SSD doesnot haveto match the devicet)?e and sizefor bank 2. Exceptionsto this rule are listed below:

l-t2 While implementingthe Solid StateDisk, you must alwaysapply the two following rules: . The secondbank (U7) cannotbe useduntil the first is filled; ' When the Solid StateDisk is implementedwith two SRAMs or two NO\1RAlvft. both devicesmustbe the samesize. The following table lists the possibleconfigurations for the first bank (U6) and the corresponding jumpers:

Table1-11 SolidState Disk for BankUG Tvpe Capacity JPl JP2 EPROM l28k 34 L-2 EPROM 256K 34 t-2 EPROM 5l2K 34 t-2 EPROM IM L-2 t-2 FIaShEPROM 64K 5{* t-2 FIaShEPROM l28K 5-6* t-2 FIaShEPROM 256K 56* t-2 SRAM l28K 34 (rr) SRA]\d 5l2K L-2 (**) NO\IRAM t28K 34 t-2 NO\IRAM 512K t-2 t-2

(*) controls programmingvoltage(\lPP) on the Flash EpROMs. (**) The power suppliedto the staticRAM is controlledby jumper Jp2 as follows: . position l-2: power suppliedby module'sVCC supply . position 2-3: power suppliedby a battery

l-13 The following table lists the possibleconfigurations for the secondbank (U7) and the cone- spondingjumpers:

Table 1-12 Solid State Disk For Bank U7 Tvpe Capacity JP3 JP4 EPROM l28k 34 l-2 EPROM 256K 34 t-2 EPROM sl2K 34 l-2 EPROM IM t-2 t-2 FIaShEPROM 64K 55* t-2 FIaShEPROM l28K 5-6r t-2 FIaShEPROM 256K 56* L-2 SRAM l28K 34 (* *) SRAM 5tzK t-2 (*r) NO\IRAM l28K 34 t-2 NO\1RAM 5l2K t-2 t-2

(*) conrols progmmmingvoltage (\lPP) on the Flash EPROMs. (**) The power suppliedto the staticRAIvI is controlledby jumper JP4as follows: . position l-2: power suppliedby module'sVCC zupply . position 2-3: power suppliedby a battery

l-14 CHAPTER 2

This chapterprovides essential information for userswho want to dwelop their own progriulls in the DOS environmentusing the CMBI86 modules.

2-l

MEMORY The module'smemory space is identifiedby 24 addresslines. Therefore, the largestdirectly MAP addressablememory is 16Mb1'te.

Table2-1 1st MbyteMemory Map F['F'FFH RealTime Devicesmotherboard BIOS implementedin Flash F00008 EPROMUI8 EFF'FFE Memory spaceavailable to the user.It can be allocatedin the E0000H BIOS FlashEPROM or left availableto the user. DFFF'FE Memory spaceavailable to the user (as a rule, memorybetween c00008 C0000Hand CTFFFI{is usedby add-onvideo cards) BFTFFH Normally usedas video RAM as follows: A00008 CGA video : 088000H to OBFFFFh Monochromevideo : 0B0000H to OBTFFFI{ EGA/VGAvideo: 0A0000H to OAFFFFII 9FFtr'FH DOS reservedmemory 005018 BIOS dataarea 00400H OO3FFE Intemrpt vectors 00000H

The memoryspace over the first megabytecan be accessedin protectedmode, which is typical of the memoryrnanagement procedures available on 386 and 486 .

INPUT/ As with all standardPCllO4 boards,the CME486 VO spaceis specifiedby f0 bis (SA0/SA9).This OUTPUT mqms that the VO spaceof any addon modulesyou install will haveto be in this range.The table MAP below lists the VO locationsused bv the module.

2-3 Table2-2 I/O LocationsUsed Bv the CME4864xx Modules AddressRanse Device 000h.00FH DMA Controller#l 020H.021H lntemrpt Controller#l 022[L02FH Reserved 040H.043H Timer 060H.064H KevboardInterface 070H.071H RTC Port 080H.08rH DMA oaeeresister OAOH.OAIH Intemrpt Controller#2 OCOIIODFH DMA Controller #2 OF2H.OF3H Reserved OFOH,OFFII Math coprocessor IFOIIIFFI{ Hard Disk 2F8H.2FFH SerialPort(*) 300It3lFr{ Reserved 378H.37FH Parallelprinter oort(*) 3BCH.3BFH Parallelorinter Dort(*) 3E8H.3EFI{ Serialport(*) 3FOH.3F7H FloppvDisk 3F8H.3EEH Serialnort(*)

The addressesmarked with a (i) can be changedin the Setupprogram, and choosingone of them excludesthe others. NOTE: When adding expansionnodules, pleasemake sure that the UO and memotT space assignmentscannot create conflicts

THE SETUP The Setupprogam allows you to customizethe CME486 module rapidly, configuring features PROGRAM and peripheralsas needed. The information you selectis storedinto the EEPROM and usedby the BIOS at power-on. The Setupprogram can be found on the floppy disk included with the module, and can be started by nrnning the CME486 program.

24 Eth IDEA AT32/Axx Module Setup UtititfVer t.O

'.EEpRoM.'s"i"; ,,,Advinced : ,fiard. .', , Disk Utility wilLe 1o:::6nrioM,And Exit', : Not save Ana' i;ii , ':,. ,,,, ' ...,,'.'.' ,..,'... :':r. . '']''''::'.'j'::':':::'''''::''..:..'..:..'.'.'''

Standard EEPROM Setup for Changing Tirne, Date, Memory, Hard Disk Type, etc.

Use: lJ+e = Se]-ect Itern EIfrER = Do Selection ESC = Exi.t

Figure2-1 The SetupScreen

Available Figure 2-l presentsthe Setupprogam as it appea$ on the screen.The video is divided in two Options arqs:

' the upperpart ofthe screenlists the various selectionfields availableto the user, described in Table 2-4 . the lower part of the screencontains a simple help menu. In the Setupprogmm, field selectionis performedusing the keys listed below.

Table23 SetuoKevs Kev Function {+} selectsnext field {T} selectsprevious field {TAB} selectsnext field on the rieht or first field of next line {e} selectsnext value in field {+} selectsprwious valuein field ESC goesback to main menu

Standard This is the first selectableoption in the Setupmenu. It allows you to selectthe simplestparam- EEPROM eterslike the date,the hard disk t1pe, numberof floppy disks, the type and addressof the serial ports, Setup etc.

2-5 Erh

,:,,:,,,,,',,,',,,,:',,,,.,,,,,,,,,.,,,,,,,,,,,",',,'i :ir:rDaUg,:::ri::,i:{ItEli dd ayJ}, ,;,0,4;y';,2,,4,;1;;t9'95;';,, i .. .-:...... : ...: : KevDoard ...... AIt,tt.LeYi:.,'titi:,:i: tiilt ,,,.sertal;,;,;,;,Poft:,:::,,1,,t,, ?FAh ,'ItIr,,,,,,S€t'la':1,,.,i,,Po rt 5! FO ".::. :: : . ,,' ::::::' PatelIC:L.,.,,::::port .Dis:abI€d .:.i.:,t,:i:,: i:::tB6og:i.:.:i:Ae#iCe',,,,,,,,,,,,,,,,,,Heid,,,,,Disk,,,,,,,,,

Figure2-2 StandardSetup Screen

The screenis divided in two areas: ' the upperpart ofthe screenlists the various selectionfields availableto the user, described in next table . the lower part of the screencontains a simple help menu.

The following is a list of all the selectablefields, with the active keys and the possiblechoices.

Table2-{ StandardSetup Selectable Fields Field Actiye kevs Selections BootDevic€ {+-},{-+} Selectsthe primary boot device. Possibleselections: . Floppy Disk r Solid StateDisk o llard Disk Note: The primary boot deviceis the one where system bootis attemDtedfirst. Date {0..e},{J} Ses the datewith the : e month:day:year Note:Ifyou setthe datein a modulewithout a battery, the seftingwill be lost at powerdown.

24 Disk C: Model {e},{-+} Selectsthe hard disk type usedas logical unit C:. The Disk C: Table {0..e}{J} selectioncan be performedin three different ways: o Model selection:select the Model field with the cursor,and scroll the supportedhard disk types. The parametersof the selectedhard disks will be displayedin the Table field. . Parametersselection: select the Table field with the cursor,and scroll the various hard disk pafirmeters. The model of the selectedhard disks will be displayedin the Model field. . Customizeddisk selection:select the ..UserDisk' option in the Model field. Theru enter the Table field, pressthe Enter key and input the parameters of the disk you wish to use. Note: The "serial" setting is usedin "Virtual Devices" mode. lee the Virtual Devicessection in this chapter. DiskD Model {<-},{+} Selecgthe hard disk tlpe usedas logical unit D:. The DiskD Table {0..e}{J} selectioncan be performedin three different ways: r Model seleclion:select the Model field with the cursor,and scroll the supportedhard disk t5pes. The parametersof the selectedhard disla will be displayedin the Table field. o Parametersselection: select the Table field with the cusor, and scroll the various hard disk parameters. The model of the selectedhard disks will be displayedin the Model field. o Customizeddisk selection:select the "IJser Disk" option in the Model field. The& enter the Table field, pressthe Enter key and input the parameters of the disk you wish to use. FloppyDriveA {+-},{+} Selectsthe format of floppy drive A from the following: o 360K8 o 720KB r l.2MB o l.44MB o Serial ( See"Virtual Devices" in this chapter) FloppyDriveB {+},{+} Selectsthe format of floppy drive B from the following: o 360KB o 720Y.8 o l.2MB o 1.44M Keyboard {<-},{+} Selectsthe keyboardoperation mode. Possibleselections: o None: no keyboardpresent o ATkey: ATkeyboardpresent o Serial (See"Virtual Devices" in this chaoter)

2:7 Memorv Size {e},{+} Selectsthe size of the dynamicRAM installed in the module.Possible selections : o 4lvlbytes o 8Mbytes Note:this selectionmust be madevely carefully: if the declaredmemory does not correspondto the installed memory,module malfunctions may en$te. Parallel Port {<-},{+} Selectsthe parallelport address.Possible selections: c 0218H r 0378H r 03BCH o Disabled SerialPort {<-},{+} Selectsthe addressand type of serial port connectedto J3.Possible selections: o 03F8H o 02F8H o 03E8H o 02E8H o Disabled Note: the correspondingIRQ can be assignedthrough the AdvancedSetup ootions. Solid StateDisk {e},{+} Selectsthe statusof the Solid StateDisks. Possible selections: o Enabled:the Solid StateDisk is enabled.The logical unit can be selectedusing the "Boot Device" option. o Disabled:the functions of Solid StateDisk are disabled. Time (0...9),{J} Ses the time with the format o hours:minutes:seconds Note: ifyou set the time in a modulewithout RTC backup battery, the settingwill be lost at powerdovm. SerialPort {+-},{+} SelecSthe addressand type ofthe serial port connected to J4. Possibleselections: o 03F8H o 02F8H o 03E8H o 0288H o Disabled Note: the correspondingIRQ can be assignedthrough the AdvancedSetup options. Video State {e},{+} Selectsthe video interfaceamong the following: r Monochrome o CGA40*25 o CGA80*25 r EGAWGA o Serial(*) o None Advanced This is the first selectableoption in the Setupmenu. It allows the user to define memory,Solid EEPROM StateDisk, and error managementoptions. Setup The advancedEEPROM Setupscreen is presentedbelow.

EEPROM

use: tJ + +. = select Item ESC = Exit

Figure 2-3 Advanced Setup Screen

The screenis divided in two areas: ' the upper part ofthe screenliss the various selectionfields availableto the user, described in next table . the lower part of the screencontains a simple help menu. The following is a list of all selectablefields, with the active keys and the possiblechoices.

2-9 Table 2-5 Advanced Setup Selectable Fields Field Active Kevs Selections ChipsetEnor {e},{+} Definesthe BIOS rection to errorsdetected during ,coprocessor, timer, DMA controller and intemrpt controller operations. ON: error warning OFF: continueanyway Floppy Enor {e},{+} Definesthe BIOS reactionto floppy drives operationenors. ON: error warning OFF: continueanyway Ilard Disk Enor {e},{-+} Definesthe BIOS reactionto hard disk operationenors. ON: errorwarning OFF: continueanyway IRQ3 Source {<-},{+} Assignsone of the two serial ports to hardwareintemtpt 3. Possibleselections: o Serial port I (availableon connectorJ3) o Serial port 2 (availableon connectorJ4) o Disabled IRQ4 Source {<-},{+} Assignsone of the two serial ports to hardwareintemrpt 4. Possibleselections: o Serial port I (availableon connectorJ3) o Serial port 2 (availableon connectorJ4) r Disabled IRQ5 Source {e},{-+} Assignsone of the two serial ports or the parallel port to hardware intemrpt 5. Possibleselections: o Serialport (availableon connectorJ3) o LPT o Disabled IRQT Source {e},{-+} Assignsone of the two serial ports or the parallel port to hardware intemrpt7. Possibleselections: o Serial port 2 (availableon connectorJ4) r LPTI o Disabled KeyboardEnor {e},{+} Definesthe BIOS reactionto keyboardinitialization errors. ON: error warning OFF: continueanywav Memoryerror {+},{-+} Definesthe BIOS reactionto errors detectedduring memory operationsperformed by the CME486-4)O( modules: ON: errorwarning OFF: continueanyway This selectionis active with the following testsperformed by the BIOS atpowercn: o rlemory sizing @aseand extended) . memorytest Oase and extended). RTCError {+},{+} Definesthe BIOS reactionto Real Time Clock initialization erTors. o ON: errorwarning o OFF: continuean) vay. In this case,the time and dateare set by defaultto 00:00:00and 0l/01/1990

2-10 SegmentE000H {e},{+} Controlsthe allocation of the memoryspace comprisea Uetrveen E0000H and EFFFFII. Possibleselections: o Internal BIOS: the first 64K of the BIOS Flash EpROM are seenin the selectedaddress space. This selectionis required for BIOS Extensionsand MiniDOS. o ExternalBus: the devicespresent on the pC/104bus are seen in the selectedaddress space. ShadowC0000 {e},{+} In DOS systems,the memoryaddress space between e0OOOlt and ShadowC8000 FFFFFHis usually reservedto dwices mappedon the bus. firis is ShadowD0000 why accessto this addressrange is slowerthan accessto the systemmemory. The shadowoption allows copying the programs controlling thesedevices into the systemDRAI\4 thus improving the generalperformance of the system.In the CME4864)O( modules,the addressspace going from A0000H to FFFFFII has beendivided into four areas.For eachare4 the shadowoption can be enabledor disabled. Possibleselections: o Enabled: the relevantaddress range is copied into the DRAT{. o Disabled: the relevantaddress range remainsmapped on the bus. Solid StateDisk {e},{+} Selectsthe physical devicetpe installed by the useras U6. Bank 0 Tpe Possibleselections: RAM 128Kbytes 512Kbytes NOVRAI\{ 128Kbytes 512Kbytes ELASH 64 Kbytes 128Kbytes 256Kbytes 512Kbytes EPROM 128Kbytes 256Kbytes 512Kbytes I Mbyte Note: To avoid malfunctions,check that the physical device selectedfrom Setupis actually the dwice installed in socketU6, and that jumpers JPI and IP2 arecorrectly set. When solid state disks are used,the installed devicetype must alwaysbe selected.

2-tl Solid StateDisk {e},{-+} Selectsthe physical deviceqpe installed by the useras U7. Bank I Tpe Possibleselections: RAIVI 128Kbytes 512Kbytes NOVRAI\{ 128Kbytes 512Kbytes FLASH 64 Kbytes 128Kbytes 256Kbytes 512Kbltes EPROM 128Kbytes 256Kbytes 512Kbytes I Mbyte Note: To avoid malfunctions,check that the physicaldevice selectedfrom Setupis actually the deviceinstalled in socketU7, and thatjumpers JP3and JP4are correctly set. When solid statedisla are used,the installed devicetype must alwaysbe selected. Solid StateDisk (<-),{+} Selects,in the addressspace of the CME486 modules,the 32Kbyte Window window wherethe solid statedisk is mapped. Possibleselections: o fromD0000HtoD7Fm{ o from D8000H to DFFFFII o fromE0000HtoE7FFFH o ftom E8000Hto EFFffi{ Note: When selectingthe solid statedisk window, pleasecheck that: o other devicesare not mappedin the sameaddress space. o tbe shadowmemorT is not enabledin the sameaddress space. Video Error {<-},{+} Definesthe BIOS reactionto video initialization errors: ON: enorwarning OFF: continueanyway

Hard Disk This is the third selectableoption in the Setupmenu. Unlike the other two options, it doesnot Utility allow you to perform direct changesin the BIOS parameters.This utility only providesinformation concerninginstalled hard disk drives. The hard disk utility screenis presentedbelow:

2-t2 ' r - ,,,bisx,,,Ci''Disk ct' sel:cctcdS;f'cctCd ,,.',,,,,,_- :: :::: ..::::i::i...... ,,:...,:,,,,',,, ..:..,,..r, ,,,..: . ,,,.,, , ' .Installed...-:l:.;---- -.-:. , .. ,::,..Not. r,. ..:.:: i,,,,,,,CfIn'ItCdd,j.. . . ,.,,,., nl,pcom:':Lzoha:::.:.!ect : Si-:ze ; '980: ';,10 'Nonc a ,:,,,**** :11 ,,83DfB

;i."..lU;*

Figure24 HardDisk Utility

The screenis divided in two areas.The first presentsthe t5'peand parametersof the user-selected dislq while the secondlists the panmeters of the hard disk actually found. If more than one disk is installed, it is possibleto switch betweendisks by pressingthe {PgDn} and {pgup} keys.

THE BIOS The BIOS @asicInpuVOutput System) is softwarethat actsas an interfacebetween the hardware of a POl04 systemand the DOS operatingsystem. Physically,the BIOS is residentin the Flash EPROM (Ul8). As for its functions, it is divided in two parts: The first part of the BIOS is active from the machinepowercn to the boot and is known as POST @ower-OnSelf-Test). It performsa seriesof tesg to checkthe hardwarepart, setsthe machineas definedin the Setupprogxarq and performsthe boot. The secondpart of the BIOS is the real interfacebetween harduare and DOS, and it is active from the machineboot to power down. It providesthe systemwith a seriesof software intemrpts to control the various devices(core BIOS).

The At the systempower{n, the BIOS performsa seriesof testsand initializations tlpical of the POSTs CME486 modules.Every step (POST)is identified by a numeric codesent to VO port 3781uwhich can be displayedusing a commerciallyavailable POST codedisplay board. The following is a list of the POST codesexpressed in hexadecimal,with the corresponding meanings.

2-L3 Table 2-6 POST Code List Post Meaninq 00H CPUvalidation 0lH CPU test 02H ComDonentsdefault prosrammin s 03H Timer initialization 04H Refreshline test 05H EPROMBIOStest 06H Kevboardcontroller test 07H First 64KbltesRAM test 08H EEPROMtest 09H 0F0000H- 0FFFFFHshadow memory test OAH DMA controller and intem"rptcontroller intialization OBH Video devicestest 0cH Timer 2 test ODH DMA controllerI test OEH DMA controller 2 test OFI{ DMA pagecontrol registerstest l0H Intermrptcontroller I test 1lH Intemmt controller2 test t2H Shutdownbvte test l3H Intemrnt line 0 test l4H Ke$oard test 15H Protectmode switch test 16H Basememorv size L7H Exoandedmemorv size l8H Basememorv test l9H Expandedmemorytest IAH Coorocessortest IBH Real Time Clock test lcH IRO line test IDH Parallel Dortstest IEH Floppy disk test IFH Ilard disk test 20H Serial oorts test 2lH Reserved 22H ShadowRAlvI test

Any enor encounteredin tests I to 8 causesthe moduleto halt. Errors encounteredin the other testscan be deatt with in different ways accordingto the selectionperformed in the Setup: - with OFF selectedin the Setup,the error is ignoredbut displayedon the screenwith a speakertone. The boot is performedif possible. - with ON selectedin the Setup,the error tpe is displayedif possibleand the operatoris askedwhether operation should be continuedor not.

2-t4 Nowyou can: . continue,pressing the Fl function key. . halt the system,pressing any other key.

If an error is detectedin the EEPROMtest (POSTcode 8), the systemsets itself accordingto the default configurationpresented below.

Table2-7 BIOSDefault Confiouration Function Defaultsettinq BootstrapDevice floppy ChipsetEnor on Disk C disabled Disk D disabled ExtendedMemory 3MBytes Floppy Drive A selectedfor 1.44M FlonpvDrive B disabled FloppyError off Hard Disk ofr Kevtoard AT KevtoardError off Memory Error on MemorySize 640Kbytes ParallelPort selectedat 378H RTC Enor off Serial Port I selectedat 3F8Hbv IRO4 Shadowoptions disabled Solid StateDisk disabled SSDbank 0 N/A SSDbank I N/A SSDwindow N/A SerialPort 2 disabled VideoError off Video State EGA/VGA

In this situation, the systemdisplays the detectederrors beforebooting and waits for operator confirmation beforebooting.

Bypassing the Under certain circumstances,you may want to bypassthe conliguration storedin the EEPROM. Stored For example,the storedconfiguration maybe invalid, causingthe systemto halt or refuseto boot. In Configuration this situation, you can install (short the pins of) jumper JP5 and then re-boot.This will force the BIOS to skip the configuration storedin EEPROM and usethe default configuration shownin Table 2-7. T\e configuration can then be correctedusing the Setupprogram, jumper JP5 opened"and the systemre-booted.

2-15 THE CORE The BIOS interfaceto DOS is a standardinterface fully specifiedin appendixA. To simplig BIOS accessingthe hardware,a softwareinterrupt (.52II) hasbeen inserted to control the following devices: . EEPROM . WatchDogTimer . Solid StateDisk.

EEPROM The EEPROM installed in the CME486 modulesis a serial type EEPROM madeof 1024birs Control organizndin 64 words, 16 of which are usedby the BIOS, while the rest are availableto tle useras non-volatilememory locations. These locations can be accessedthrough the functionsof intemrpt 52H, which are listed below.

Function 0 EnableEEPROM write/erase. It is active until the next disablecommand and allows the deviceto be written to and erased. IMIIT AII=0 RETT]RN AII=nor code

Function 1 DisableEEPROM write,/erase. This instruction must alwaysbe given as the last operationperformed on EEPRoM, in order to preventundesired access to this device. INPI'T AII=l RETT]RN All=error code

Function 2 readsfrom the deviceaddress specified in AL the numberof words specifiedin CX then storesthe readvalues into the bufrer addressedbv ES:DI INPUT AJy-2 Al=address (0-3FI{ accepted) CX=numberof words to read ES:DI = pointer to the buffer wherethe readvalues are stored RETT]RN AII=rror code if AII = 0, then Al=number of read locations

Function3 writes at the deviceaddress specified in AL, for the numberof words specifiedin cX the valuespointed by DS:sI . It doesnot allow write operationsat locations between0 and l0IL which are reservedto the BIOS. INPUT AH=3 Al=address (I5H-3FH accepted) CX=numberof wordsto write DS:SI = pointer to the buffer wherethe write valuesare stored RETURN AII=rror code if AH = 0, ften Al=number of read locations

Function4 verifies that the valuescontained in the device,starting at the addressspecified by AL and continuing for the number of words specifiedin CX exactly match the valuespointed to by ES:DI INPIIT AH=4 Al=address (0-3FI{ accepted) CX:number of words to verif ES:DI = pointer to the bufrer wherethe veri$ valuesare stored RETURN All=error code if AII=FF, then Al=address of the location where the compareoperation failed 2-L6 Flrnction 5 Deletethe words starting from the addressspecified in AL, for the length specifiedin CX INPIJI AII=5 Al=address (I5H-3FH accepted) CX=numberof wordsto delete RETTJRN AII=rror code if AII = 0, then Al:number of deletedlocations

Error code The possibleerrors detectedby intemrpt 52Hare returnedin registerAII with the following meanings: register AH = 00H no errors lOH accessattempted to locationsreserved by BIOS 20H invalid address 40H illegal command SOHtime-out FFII error in veriS procedure

NOTE: To prevent unintendedchanges to BIOS information storedin the EEPROM, you shouldonly accessthe EEPROM usingthe intermpt functionssupplied.

EEPROM A correctEEPROM write cycle must be performedas follows: Access l. EnabletheEEPROM. Example 2. Erasethe relwant locations. 3. Write the relevantlocations. 4. DisabletheEEPROM. 5. Veri$ that the unite operationhas been correctly performed.

As an example,a short program illustrating an EEPROM unite cycle is presentedbelow:

MODEL Compact

enable equ 0 ;enable cotnnand dlsable equ 1 ;disable eeprom command read equ 2 ;read eeprom command wrlte equ 3 iwrite eeprom colunand verify equ 4 ;verify eeprom crd erase equ 5 ierase eeprom cmd endeeprom equ 3fh ;last eeprom location starteeprom equ 15h ,first user eeprom location

STACK SEGMENT PARA STACK ISTACK' lstack, db 100 dup( ) STACK ENDS i ------DATA SEGMENT PARA PUBUC TDATA'

lrrltebuffer dw endeeprom-starteeprom+l dup ( 0 ) readbuffer dw endeeprom-starteeprom+1 dup(0) EeprorMsg db 'Int 52H Error Found'1OdhrOahr"$'

DATA ENDS

CODE SEGMENTPARA PUBLIC ICODE' ASSTJME CS:CODE, DS: DATA (continued)

2-t7 START: mov axrDATA ;set ds,es reg to data segment mov ds, ax mov esrax

;enable eeprom mov ahrenable ;ah-enable comrnand lnt 52h ienabl-e eeprom cmp ah, 0 i error ? Je EepromEnabled caLl error ;display error jnp exit

ierase location from 15h thru 3fh EepromEnabled: mov ahrerase ;ah=erase comand mov alrstarteeprom istart address mov cx, (endeeprom-stalteeprom+l) ;words to be erased int 52h ido erase cmp ahro ;error ? Je EepromErased caII €rror ;display error Jmp exit EepromErased:

;filI write buffer lrith test pattern mov cxrendeeprom-starteeprom+1 tnow axr 0aa55h itest pattern mov si,offset writebuffer

StorePattern: mov word ptr ds: [si],ax add s!.2 loop StorePattern iwrlte eeprom location from 15h thru 3fh with test pattern Oaa5h mov ahrwrite iah=write conunand mov alrstarteeprom istart address mov cxrendeepron-starteeprom+1 iwords to be erased mov slroffset wrltebuffer ;ds:si polnt to source buffer int 52H ido write cmp ahro ierror ? je EepromProgrammed call elror jmp exit icopy location from 15h thru 3fh to readbuffer EepromProgrammed: mov ahrread ;ah=read command mov alrstarteeprom ;start address mov cxrendeeprom-starteeprom+l iwords to be erased mov diroffset readbuffer tes:di point to buffer to fill int 52h ;do read cmp ah,o ierror ? je EepromRead call error ;display error Jnp exit

2-18 EepromRead: mov ahrverify ;ah=verify comrnand mov alrstarteeprom istart address mov cx, endeeprorn-starteeprom+l iwords to be erased mov dl,offset readbuffer ies:di point to buffer int 52h ;do verify cmp ahro ;erlor ? je Exit call exror idisplay error Jmp exit

Exlt: idisable eeprom to avoid extra access mov ahrdisable ;ah-disable command int 52h ;disable eeprom access cmp ah,o ierror ? Je ReturnToDos call error ReturnToDos: mov axr 4c00h int 21h

;Display error Proc near push ax push dx mov ahr009h ; DOS display string function mow dxroffset EepromMsg ; Get string addless lnt 2Ih ; DOS function pop dx pop ax ret error endp

CODE ENDS

END START

To performa simpleEEPROM read operatioq the devicedoes not needto be enabledand the BIOSread conunand (function 2) canbe used directly.

Watch Dog Three functions havebeen implemented on the CME486 modulesfor Watch Dog Timer aontrol. Timer Control Through thern"the user has direct accessto three functions: . Watch Dog enable . Watch Dog disable . WatchDogrefresh

Flnction OCE Watch Dog enable INPUT AII=0CH RETURN None

Function ODE Watch Dog disable INPIJT AI{={DH RETURN None

2-t9 FunctionOEH WatchDog refresh IMUT AH=OEH RETURN None

VIRTUAL The CME486 modulesare designedfor usein industrial environmentsas stand-alonemodules, DEVICES without externalperipherals. Nevertheless,it may be necessaryto interfacea CME4g6 with yO deviceslike a ke$oard, monitor, or floppy or hard drive, especiallyfor set-upor maintenance. The CME486 modulesare thereforeprovided with'Virtual Devices" modewhich allows you to accessa ke$oard, monitor, floppy disks, and a hard disk without actually interfacing them to the pC/ 104bus of the modules. Instead,the CME486 serial port is connectedto the serial port of a pC or AT "host" computer. The host computer'skeyboard, monitor, floppy disks, and hard disk can then be madeavailable to the CME486. You can then boot from the host's floppy or hard drives, edit and debugprograms using the host's keyboardand monitor, and so on. There are two limitations when using Virtual Device mode: programsmust operateonly in text modeand must be basedonly on DOS calls. Applicationswhich use graphicsmodes or directly accesshardware (video memory,the ke$oard, or the disk drives)will not work properly. To usethe Virtual Denicemode, you will need: . a PC or AT compatible"host" computerwith a serial port . an RS232"null modem"cable with all pins connected ' the connectionprogmm (SERRX.DG) installed on the host computer . the CME486module

There are two waysto initiate Virhnl Devicemode. You can either enablethe modeby using the CME486 Setupprogram, or by jumpering pins on the CME486 serial port. Pleasenote that behavior differs slightly dependingon how Virtual Devicemode was initiate.d. The following sectionsdiscuss the two methods.

InitiatingVirtual If the CME486 systemis operational,Virtual Device modecan be accessedfrom the I)evice Setuo Modefrom pro$am. This methodhas the advantagethat devicescan be individually selectedfor use in Virtnal theSetup Program Dwices mode.To usethis method,run the Setupprogram on the CME486 and enablethe Virtgat Devicesyou wish to use. The fields for floppy drive A:, keyboard,video state,and hard disk C: can eachbe set to "serial". save your changesand then follow the procedurebelow: l. Turn ofrpower to the CMB|86 system. 2. Connectthe null modemcable betrveen the CMBI86 and the host computer. 3. Turn on the host computer.

4. Sart the SERRX.DG program on the host computer,speci$nng which serial port you wish to use. 6. Turn on the CME486 system.

The CME486 systemwill now boot from the disk drive you configuredin the Setupprogram. If you havea C: disk on the PC/104systenr" it will be ignored,and the host computefsC: &st

2-20 Initiating Vir$al Device modecan also be initiated by shorting pins on the CME486 serial port. This Virtual Device methodhas a slight disadvantagein that the keyboard,video, floppy and hard drives are all redirected Mode by to the serial port. To usethis metho4 you must short (connect)two pins on the serial port connector. Jumpering The exactprocedure is: SerialPort Pins l. Turn offpowerto the CME486system. 2. Connectthe RI and DTR pins of J3, the serial port connector(refer to Table l-7 for pin locations). Connectthe null modemcable between the CME486 and the host computer. Turn on the host computer.

5. Start the SERRX.DG program on the host computer,speci$ing which serial port you wish to use. 6. Turn on the CME486system. The CME486 systemwill then boot from the host computer'sdisk drives. The drive it bootsfrom will be the one set in the Setupprogram. Note that if both the CME486 systemand the host haveC: disks, the one on the host computerremains disk C:, while the one on the CMBI86 systembecomes availableas disk D:.

I)isconnecting To disconnectthe host computer,press the {Prt Sc} kcy at any time. The host computerthen the Host recoversits peripheralsand returnsto normal operation. Computer To re-connectthe CME486 to the hosg re-run SERRX.EXEon the host and wait for the message: Itaiting and then pressthe key.

Notes when Using When using Virtual Devicemode, large data transfers(file accesses,display updates,etc.) Virtual Device take considerabletime. Pleasebe patient. Mode When you make the kryboard a Virtual Device, the key combinationCTRL-ALT-DEL is not passedto the CME486but resetsthe host computerinstead. whe you makefloppy drive A: a Virtual Denice,both A: and B: floppy disla are actually redirectedto the host computer.

If communicationerrors occur on the serial line, you will hear a beepfromboth the host computerand the cME486 module (assumingqpeakers are presentin both systems).

2-21

CHAPTER3

This chapterexplains in detail how it is possibleto storethe operatingsystem and the applicationprograms on solid statedevices. It also presentsthe utility programsand supportsoftware.

3-l 3-2 STORING The CME486 moduleswere designedto be usedas embeddeddwices. It is well-known that in DATA ON embeddedtechnolory, tlte presenceof magneticmedia like hard disks and floppy disks to storethe SOLII) operatingsystem and the user's applicationsis never recommended.It is far more advisableto replace STATE magneticunits with solid statedevices. DEVICES The CME486 modulesprovide three different solutions: (RAM ANn . Solid StateDisk (SSD).Thanks to the Real Time Devicesdrivers for SSD management ROM implementedin the BIOS, the CME486 modulescan be usedwith one or nro Solid Sate MEMORTES) Disks. Theseare seenas normal floppy disls and are thereforethorougNy compatiblewith the MS-DOS operatingsystem. While developingprograms, no additional efrort is required: utilities (seethe Utility Programssection in this chapter)are provided to make SSDuse particularly easyand convenient. . MiniDOS. Not alnays doescontrol progam developmentinclude file systemaccess and control operations.For zuchcases, Real Time Dwices has developeda MiniDOS enabling easyprogxam development in the MS-DOS environmentand immediateprogam migration to the CME486-4xxmodule. The user's applicationsare storedin the BIOS Flash EPROM which provides64Kbytes of user-availablememory. Here again, Real Time Deviceshas implementeda set of utilities (seethe Utility Programssection in this chapter)for device programmingand migration contlol, which simpli$ the user's work when realizing custom applications. . BIOS Extensions.If the user's applicationdoes not require any MS DOS servicesand there is no needof a floppy disk or SSD,the 64Kbytesof the BIOS Flash EPROM canbe directly usedto storeand load userapplications. This can be achievedin the soralled "BIOS Extension" mode,where an applicationis automaticallyexecuted by the BIOS at powercn. A detaileddescription of thesethree techniquesand of the utilities will be given in the following pages.

SOLD Solid StateDisls can be implementedby the operatorusing the physical memorydevices listed STATE in Tablesl-12 and l-13 of Chapterl. The Solid StateDisk managementimplemented in the DISKS CMpt86 modulesis independentof their physicalrealization and allows them to appearto DOS as normal floppy disks (write-protecteddisks if they consistof Flash EPRONGor EPRONG). The following Solid StateDisk configurationscan be implementedon the CME486 modules: . one non-rewritabledisk (maximum unformattedcapacity: 2lvlbytes) . one read/write disk (ma"ximumunformatted capacity: llvlbyte) . one non-reuni&$ledisk (maximum unformattedcapacity: lMbyte) plus one read/rvritedisk (maximum unformattedcapacity: 5 l2Kbytes). All theseconfigurations can assumeeither the logical addressesnormally usedfor boot units (A: or B:) or the logical addressesimmediately following thoseof the instralledfloppy drives. Control and initialization of the SSDwill of coursevary dependingon which physical memory devicesactually implement the SSD.

RAM When the Solid StateDisk is composedof read/write devices(SRAlfs or NO\IRAMs), it must be Disk installed by the operatoras explainedbelow:

3-3 l. Selectthe device(or devices)according to table l-12 of Chapter1, mountit (or them)on the CME486-4xxmodule, then set the jumpers as shovrnin the table. 2. Perform a boot of the CME486-4xxmodule with an installed disk (either a physicaldisk or a Solid StateDisk or a virtual device). 3. Using Setup,define the RAM disk logical mapping.Remember that: ' selecting'boot" meansthat the Solid StateDisk will be seenas the A: logicat device, while the physicalfloppy disks, if present,will be seenas the following units; ' selecting"no boot" meansthat the Solid StateDisk will be seenas the first logical unit availableafter the physicalfloppy disks. 4. Selectfrom AdvancedSetup the selectedphysical devicetype. 5. Selectfrom Advance.dSetup the addressspace where the devicewill be mapped. 6. Resetthe CME486-4xxmodule. This way,the Solid StateDisk will be addedto the svstem's availabledevices.

At the end of this procedure,the Solid StateDisk will be seenas a normal floppy. It will haveto be formattedand it will acceptall the normal DOS commandsfor floppy disks. To format a Solid StateDisk madeof read/writedevices, you shoulduse the format command followed by the disk sizeparameters of the floppy you wish to emulate.For instance,to format the RAlv{ disk (identified as deviceB:) as a 360Kbytefloppy dish use the following commandstring: fonuat b: /u lo,t9 lt-t&O

In order to achievethe largestspace available on the RAM disk, we recommendyou selectfor the format commandthe lowestpossible dimension parameters which are over the total dimensionsof the installed devicesas a whole. For instance,if 256Kbfes of SRAM havebeen installed, the selectedformat dimensionshould be the typical 360Kb1tesfloppy disk size.

ROM Non-renritable Solid StateDisks can be implementedby the operatorusing two different devices: Disk . EPROMS . Flash EPROIvfs

The procedurefor creatingthe SSDwill vary dependingon which devicesare actually used.

ROM Disk Implementedwith EPROMs To obtain an EPROM-implementedSolid StateDislg proceedas follows: 1. Selectfrom Advanc-edSetup the physical memorydwice gpe. 2. Selectfrom AdvancedSetup the addressspace where the devicewill b€ mapped. 3. Format a floppy disk using the /u option and copy onto it the applicationprograms you wish to copy onto the ROM disk. 4. On an XT or AT compatiblecomputer, start the SSDprogmm and perform the required selections,according to the physicaldevices that shalt implement the Solid StateDisk. 5. As program output, selectthe "file construct" option; the program will createas many EPROTIbo$IN files as the aumberof selectedEpRON{s. 6. Programthe EPROMswith an appropriateprognunmer.

34 7. Setthe jumpers as explainedin Tablesl-12 and l-13, andthen install the EPROMsin the CME486-4:ormodule.

From now or\ the Solid StateDisk will be seenby the systemas a normal write-protectedfloppy, and it will acceptall the DOS commandsnormally usedwith floppy disks.

ROM Disk ImplementedWith Flash EPROMs Flash EPROIvIscan be programmedeither of-board, following the stepslisted abovefor EPRONIS,or on-board,that is directly on the CME486-4xx module. For on-boardprogramming, the user must proceedas follows: 1. Setthejumpers as explainedin tablesl-12 and l-13 ofChapter l, and then install the Flash EPROlvk in the CME486-4xxmodule. 2. Selectfrom AdvancedSetup the selectedphysical memorydevice type. . 3. Selectfrom AdvancedSetup the addressspace where the devicewill be mapped. 4. Format a floppy disk and copyonto it the applicationprograms you wish to copyonto the ROM disk. 5. Performaboot of the CME486-4xxmodule. Set jumpers JPI to JP4to the requiredposition" accordingto the installed physicaldevices. 6. Surt the SSDprogram on the CME486-4xx module.From the sameprograrrL perform the selectionscompatible with the chosenphysical devices.Then start prograrnmingby 'su. seleaing

7. Turn offthe programming\/PP. From now on, the Solid StateDisk will be seenby the systemas a normal *rite-protected floppy, and it will acceptall the DOS commandsnormally usedwith floppy disks. NOTE: To ensurecorrect operationof non-rewritabteSolid StateDisks, it is advisableto transfer files using a blank, newly-fomatted floppy disk

DIRECT For userswho desiredirect accessto the Solid StateDisl$ of the CME486-4xx module,an IVIAI\TAGEMTX{T extensionto intemrpt 52H hasbeen implemented. This extensionallows direct accessto the SSD OF THE using the following interfacefunctions. SOLT) STATE DISK tr'unction6 readsdatafrom the selecteddevice and copiesthem into theuser'sbufferpointed byES:DI. INPIIT AH =g DL,BX = devicestarting addressfor read operation. DH = selectionof the bank from which the read operationmust be performed = 0 U6 selection = I U7 selection CX = numberof b1'testo read ES:DI = pointerto user'sbuffer RETTIRN none

3-5 Function 7 writesdata onto the selecteddevice, them from the user'sbuffer pointed by ES:DI. INPT'T AII _7 AL = devicetype selection: bit I =0 RAM selection bit I =l FlashEPROM selection DL,BX = devicestarting address,from which the write operationmust be performed. DH = selectionof the devicewhere to write data = 0 U6 selection = 1 U7 selection = I RAM selection = 2 Flash EPROM CX = numberof bytesto write ES:DI = pointerto user'sbuffer RETURN AL = errorcode

Function 8 erasesthe Flash EPROM selectedby registerDH INPUT AII =$ AL = devicedimensions: = | 64Kbytes - ) l28Kbytes = I 256Kbytes = 4 5l2Kbytes DH = selectsthe devicewhere to write = 0 U6 selection = | U7 selection RETT'RN AL = erorcode

Flrnction 9 comparesdata coming from the selecteddevice with user's datapointed by ES:DI. INPTTT AII -) DL,BX = devicestarting address,where the compareoperation must be performed. DH = selectionof the bank wherethe read operationmust be performed = 0 U6 selection = | U7 selection CX = numberof bytesto verif ES:DI = pointerto user'sbufrer. = I RAIvI selection = 2 Flash EPROM selection = 3 EPROM selection RETT'RN AH =errorcode

34 Function OtrH selectsthe dwice type

IMUT AII = OFH AL = Q l28Kbytes RAIvI = | 5l2Kbytes RAlv{ - 2 l28Kbytes NO\IRAM = J 5l2Kbytes NO\IRAI\4 - !, 64KbytesFlash = J l28Kbytes Flash = S 256KbytesFlash - J 5l2KbytesFlash = $ l28KbytesEPROM - 9 256KbytesEPROM =a 5l2KbytesEPROM =b llvlbyteEPROM DH - 0 U6 selection = t U7 selection RETT]RN none

Function 108 selectsthe window wherethe solid statedisk will be seen. INPIIT AII = OFH AL =Q D000:0selection = | D800:0selection - / E000:0 selection - 3 E800:0selection

Emor code The possibleerrors detectedby intemrpt 52H from function 6 to ftnction 9 are returnedin registerAL with the fofiowing code: regrsterAL (X)Hno errors OlH invalid parameter 02H Flash EPROM nrite error 04HFlash EPROM eraseerror 08H RAI\,I urite error l6H error in veri$ procedure 40H illegal comnumd

As an examplga testprogram using this intemrytis presentedbelow

#include #include (process.h) #incLude #lnclude #include #lnclude

lnt error(char) i int leadwrite(char, int, char);

union REGS lnregs, outregs; struct SREGS segregs; lnt far *p;

( continued)

3-7 int main( int argc, /* Nunber of strings in array argv */ char rargv[] ) /* Array of command-line argument strings */ { int dlmension; char devtlpe, devs i ze, devnunberi

if (argc==!)printf ("SSDTest /DevNumber /DevType /DevSize /Ntest\n\a,, 'DevNumber: specifj-es the devices to be tested\n,, legal values are 0 or 1\n" *DevType : specifies devices tlpe: R for Ram devices\n,, F for Flash devices\n,, "DevSize : specifies devices size in Kbytes\n,,); devnumber=2; if (strcmpi (argv[1], " / 0" 1:=97 6evnumber=0i if ( strcmpi ( argv[1] / L" 1==g1 6evnumber=1 i "' devtype=3; if ( strcmpi ( argv [2], " / r" | ==O')devtlpe:l ; if (strcmpi (argv[2], " / f" |::O| devtype=2t

devslze=4; 1f ( strcmpi ( argv [ 3], " / 64' ] =:0 ] {dewslze=l ; dimenslon=4 ; } if ( strcmpi ( argv [ 3], " / !28" ) ==0 ) {devsize=2 t dimension:8 ; } 1f ( strcmpl ( argv [ 3 ], " / 256" ] ==0 ) (devsize:3; dlmension-l 6; ]

if ( ( (devsize>=4 l | | (devttpe>=3) | | (devnumber>=2) )==1) {printf("Invalld selection Done"}, return(0); }

*)calloc( if( (p = (int 4096*2, sizeof( int ) )) == NULL ) {prlntf ("Unable to Allocate Memory,,), exlt(1) ; }

snitch (devtypel { case 2r /*1s flash type"/ printf ("Erasing Devices td\n,,,devnumber) ; inregs.h.ah = Ox8; lnregs.h.al = devslzei inregs.h.dh : devnumberi 1nt86 ( 0x52, &inregs, &outregs ) ; if ( (readwrite (devnumberrdimensLonrdevtype) ) !=O) exit (1 ) ; break;

case 1: /*ls ram t)4pe*/ if ( (readr"rrite (devnurnberrdimensionrdevtlpe) ) !=0) exlt ( 1 ) ; breaki ,. )

1nt error (char registeral) { if (registeral==O)retuEn(0) i switch (regist€ra1 ) { case 0x1:printf (r.Internal Error\n,,) ; break; case 0x2:printf(.'E!ror In writing Ftash Eprom\n,,); breaki case 0x4:printf(..Error In Erasing Flash Eprom Check Vpp Connection\n"); break; case 0x8:prlntf(..Error In Writing Ram Device\n,,); breaki case 0x16:printf (..Error In Verifylng Devlce\n,,); break; case 0x40:printf (..Inva1id Conmand Found\n,,) ; break; case 0x10:printf (..Invalid Devices Dimension Found\n,,) ; break; ) (continued) return(1)i

)

lnt readwrite (ehar devnumberrlnt dimension,char devtype) t Iong inltadd, int curdim,counti

printf ("Writing 3d Devices\n",devnumber) i lnltadd=0; for (curdim=O; curdin

printf ("Reading td Devices\n,,rdevnumber); initadd=O;

for (curdim:0, curdim>16 ), inregs . h. dh=devnumberi inregs.x.di = FP_OFF{ p )t seltregs.es = FP_SEG( p ); int86x ( 0x52, &inregs, &outregs, esegregs ) ; if (error(outregs.h.al) !=0)return(1) ; for (count=0i count<409G*2; ++count ) { lf(plcountl !:(shortl (count+(curdim*40961 ) ) { ("Error Printf Found At Address *Ix \n", (longl (lnttadd+count*2) ) t printf(" Wllte tx \n,,, (short! (count+(curdim*4096) ) ), printf(" Read tx \n,,,pIcountl ), return(1) i ) ) initadd+=4 096* 4; ) return(0), )

MINI.DOS You may wish to dwelop sand-aloneprogams for embeddedcontrollers. In this case,there are usually two possibilities: either write the progxamdirectly, which inevitably requiresgreat programming efrorts,or d€velopthe program in a well-knovm operatingenvironment like MS-DOS, implementing it and the operatingsystem on the embeddedcontroller. This secondchoice presents the disadvanageof extra costsboth for the MS-DOS operatingqystem and for the additional hardwareyou might needto instal. To solvethese problems, a mini-loader uas implementeddirectty

3-9 in the CME486-4:o

MiniDOS Thefollowing DOS intemrpts are supported" in a simplifiedway, by theReal Time Devices Specifications MiniDOS.

MiniDOS INT 21H:

Function I Keltoard input with echo.In MiniDOS implementation,it is not possibleto redirect STDIN and STDOUT. The key combinationCtrl-C is intercepted,and causesa call to INT 23h.

Function 2 Display output. Always performedto the video. STDO{.ff redirectionis not allowed and the Ctrl-C combinationis not supported.

Function 6 Direct ConsoleVO.

Function 7 Direct STDIN input. In MniDOS, STDIN redirectionis not possible.

Function 8 Direct STDIN input. In MiniDOS, STDIN redirectionis not allowedbut the Ctrl-C combinationis supported.

Function 9 Display String. In MiniDOS, STDOUT redirection is not possible.

Function Oah Buffered STDIN input. In MiniDOS, STDIN redirectionis not possiblc

Function Obh CheckSTDIN Status.In MiniDOS, STDIN redirectionis not possibleand the Ctrl-C combinationis not supported.

Flrnction Och Clear Buffer and input. In MiniDOS, STDIN redirection is not possible.

Function 25h Set interrupt Vector.

Function 30h Get DOS Version Number.In MiniDOS, the answeris compatiblewith DOS version3.0.

Function 35h Get intemrpt Vector.

Function 3fh Readfile or Devict. In MiniDOS, the only supporteddevice is the kegoard.

Function 40h Write to a file or Device. In MiniDOS, the only zuppoftd deviceis the video.

Function 44h DeviceDriver Control.

Function 4bh ExecuteProgram. In MiniDOS, it is only possibleto load and executeprognmx with.E)(E extensions.

f,'unction4ch Terminatewith return code.In MniDos, a call to this intemrpt terminatesthe applicationprogam and halts the CME486-4xx module.

3.10 MiniDOS INT29E: Fully implemented.

MiniDOS INT 238: A call to this intemrpt (throughthe key combinationCtrl-C) terminatesthe programand halts the CMB186-4p module.

MiniDOS INT lbE: A call to this intemrpt (through the key combinationCtrl-Break) terminatesthe programand halrc the CME4864xx module.

Using MiniDOS can be usedonly with applicationprogmms tlnt do not usethe DOS/ile.qysfez. This MiniDOS me:msit cannotbe usedwith devicedrivers or residentprogams. To useMniDOS, follow this procedure:

l. Write the progam in the languageyou prefer using small or compactmodels, and apply the debugtools gpical ofthe selectedlanguage. 2. Build the .E)(E file of your applicatio4 turning offany debugoptions. 3. Checkthat the calls madebyyour application are supportedby MiniDOS. To perform this chech usethe residentprogam (ftECHK) provided.

4. Using the SSDprogram, create the UseTBIOS.BINfile, which will be usedto programthe BIOS Flash EPROM.

5. If necessary,progam the BIOS Flash EPROM using the BIOSBLD.EXE utility with the requiredparameters.

BIOS As explainedin previousparagraphs, the BIOS containsa mechanismallowing executionof EXTENSIONS progxamsdirectly from EPROM beforebooting MS-DOS. Theseprograms are called "BIOS Exten- sions" and are storedin the free 64Kbytesof the BIOS Flash EPROM (UlS). After reset,the BIOS performsthe POST and then scansthe memoryby 2Kbytessteps from address0C8000H to address FTFFFh,looking for BIOS Extensions.During this period beforeboot when no MS-DOS calls are active,BIOS Extensiors can gain control of the module.

The BIOS Extensionshave a welldefined structurewhich must be carefully respectedby the user. Structure They start with a 3- header:the first two bytesare an identification pattern (55H AAII) while the of a BIOS third is a STzFbyte indicating the numberof 5l2bytes blocks that must be included in the checksum Extension count. When the BIOS enoountersthis patterq it controls the checksumand then performsa CALL FAR at the fourth byte of the BIOS Extension@PROM address 0003h) which is the entry point of the user's application.Note that the checksumcount is performedbefore the BIOS glves up control to the extension(through the CALL FAR), as a modulo-IO0Hsum starting from bytes55AAII and for the numberof bytesspecified in SrzF. If the checksumis zero, the BIOS gives up control to the BIOS Extensioq otherwise,the extensionis ignored and the boot procedurecontinues.

3-ll Creatinga As an example,the structureof a BIOS Extensionis presentedbelow. BIOS Extension

DGROUP GROUP PROG

PROG SEGMENT BYTE PUBLIC IPROG' ASSUME CS: PROG,DS: PROG idefine ID bytes for BIOS extension and size 512 bytes db 055h,0aah ;ID bytes BlockSize db I ;512bytes size

Init PROC FAR ; expected a far proc Entry: jmp tocode ;jump not rewritable data area ideclare here your rom data i lnit user code tocode: istart user code caII main ,print * on video display ret ;return to bios init endp

nal.n proc NEAR push ax ;save reglsters push bx mov ahr Oeh i ah=write text in teletlpe mode mov aI,"*" ;character to wrlte mov bxrT int 10h ido wrlte pop bx ;restore registers pop ax

main endp

PROG ENDS END

Oncethe BIOS Extension hasbeen developed and transformedinto the corresponding.BIN file, it must: r $6 included into the BIOS of the CME486-4pr module,usrng the SSD program o Ss copiedinto the BIOS Flash memoryusing the BIOSBLD.HG prognm with the selectionscorresponding to its memoryallocation.

UTILITY PROGRAMS

SolidState The Solid StateDisk builder program (SSD) is a utility allowing implementationof the user's DiskBuilder applicationson the selectedphysical devices.The program is on the floppy disk suppliedwith the CMB[86 and can be startedby running the SSD command.

Available Options Figure 3-l showsthe SSD program as it is displayedon the monitor. The screenis divided in two arcas: . the upperpart displaysthe user-selectablefields, listed in Table 3-2. . the lower part displayshelp messagesand program output.

3-t2 Figure3-l The SSDProgram

Field Selection For the SSDprogranL field selectionis performedusing the keys listed in the following table.

Table 3-1 Setup Active Kevs Key Function {J} selectsnext field {n selectsprevious field {TAB) selectsnext lield to the right or first field ofnext line {e} selectsnext value in presentfield {+} selectsformer value in presentfield

Oncr the selectionsare made,the user can: . activatethe programbypressingthe{S} key . exit the programby pressingthe {Q} key.

Contentsof the Fields The following table lists the user-selectablefields for the SSDprogranr, with the active keysand selectionsavailable for eachfield.

3-13 Table 3-2 Selectable Fields Field Active kevs Selections BinarvFiles {e},{+} EnableVdisablesconstruction of the EpROl borBlNfiles necess:rryto program the EPROh[sforming the Solid State Disk. Possibleselections: r Construct o None Note: The SSDprogram builds the .BINtrles in the same environmentfrom which it is run. Therefore,when working with q single floppy do not enablethe Constructootion. Bios Include {e},{-+} Selectsthe BIOS Exension starting address. o 0E0000H Note: To assurecorrect operatiorq BIOS Extensionsmust be completelycontained into their sesment. Compression {e},{-+} Future erpansion.It will allow file compressionin mini- DOS mode. Devices {e},{+} Selectsthe size of the physical devicewhich implementsthe Dimension Solid StateDisk. Possibleselections: r Flash (64k, 128k,256k) o EPROM(128k, 256k,5t2k,lN4byte) o RAlv{ (128k,5l2k) Note: Checkthat the performedselection matches the installed physical devicesand thatjumpers Jpl, Jp2, Jp3 and JP4are correctlypositioned. Devices {<-},{+} Selectsthe numberof physical devicesthat constitutethe Number logic Solid StateDisk. Possibleselections: o One a Two DwicesTlpe {e},{+} Selectsthe physical devicesthat implement the Solid State Disk. Possibleselections: o Flash o EPROM o R.AlvI Note: If the selecteddevice is EPROM the binary file constmctmode is automaticallvenabled. Input File {e},{-+},{J}, Defines,either in MiniDOS modeor in BlOS-Extension {TAB},{char} mode,the nameof the user'sfile. In BlOS-Extensionmode, lhe user'sfile can havean extensionother than .EXE MiniDOS {e},{-+} Shifts benreenDOS modeand MiniDOS or BIOS Enension ootion mode. SourceDisk {+-},{+} Selectsthe floppyyou wish to be copiedinto the deviceJthat the Solid StateDisk.

3-t4 SSDSegment Selectsthe addressspace window which will be usedfor the ROM disk creation.The following windows are available: o 0D0000H o 0D8000H o 0E0000H o 0E8000H Note: this window existsonly for the time necessaryto the creationof the ROM disk and is removedfrom the address at the endof the ROM disk nrosrammi

HI,ECHICEXE The FILECHK.DG utility must be run anytimeyou wish to useMiniDOS. It is a passive Terminate-and-Stay-ResidentC[SR) progam which checksthat calls to DOS performedbyyour applicationscan be supportedby MniDOS. This programcan be executedby typing the following comrnandline:

A> FILECEK

As soonas filechk hasbeen activated, mn your own application.The residentprogram will display on the screena list of any calls not supportedby MiniDOS. Thesecalls must be removedfrom your applicationbeforeit will work withMiniDOS. After checkingyour applicationwith FILECI{K, you MUST removethe residentprogram by pressingthe tPrtsc) key.

BIOSBLD.E)(E The BIOSBLD.DG utility is usedto program the BIOS Flash EPROM in the following cases: . BIOS upgrade . installation of a MniDOS compatibleprogam into the Flash EpROM . installation of a BIOS Extensioninto the Flash EPROM.

The program must be run using the following commandline:

A>Bf Osbld f ile_nane/ start_add/ f reqselect

file-name: Name of the file to be programmedFlash EPROM (for Real Time DevicesBIOS upgrades,this namewill alwaysbe XTROM.ROM; for SSD-createdfiles, it will be USERBIOS.BTN).

start-add: Selectsthe starting addressfor Flash EPROM progranrming. This addresscan be selectedfrom the following: - e0000h -fl000h For a BIOS upgrade,the selecledaddress must be fl000h.

fteaselect Definesthe operatingfrequenry of the microprocessorinstalled in the module.It can be selectedamongthefollowing: 16,20,25 and 33 Mhz. To ensurecorrect operatioq carefully checkthat the selectedfrequency is tlnt of the installed microprocessor.

3-15 NOTES: ' TheBIOSBLD program always ends by resettingthe module and rebooting. ' To programthe BIoS FlashEPRoM prognmmingvoltage (\Ipp) mustbe apptiedto connectorJl. ' Whileusing BIOSBLD.EXE, programming voltage (\lPP) mustbe applied during the entire prognm execution.

3-16 APPEI\DIX

CME486Modules StandardPC BIOS Interface A-2 VIDEO INT Function 0 SetVideo DisplayMode (Internrpt108) INPI.TT AII = 00 AL = mode Mode DisplayMode Characteristics 0 40x25 Black & White I 40x25 Color text 2 80x25 Black & White 3 E0x25 Color text 4 320x200 Color Graphics 5 320x200 MonochromeGraphics 6 640x200 MonochromeGraphics 7 80x25 Monochrometext

Flrnction 1 Set CursorTlpe INPUT AII = 0l CH = Bits 0-4 are start scanline CL = Bits 0-4 are end scanline

Function 2 Set CursorPosition INPIJT AII = 02 DH = Row of cursor DL = Column of cursor BH = Pageto set (zero for graphics)

Function 3 Read Cursorposition INPUT AII = 03 BH = Pageofcursor RETI]RN DH = Row of cursor DL = Column of cursor CH = Start cursor scanline CL = End sursor scanline

Function4 Get Light PenPosition IMIIT AII = 04 RETT'RN AII = 0, no lightpen installed

tr'unction5 ChangeActive Display Page IMIIT AII = 05 AL = Video pageto be madeactive

A-3 VIDEO INT Function 6 Scroll Active PageUp Qnternrpt10H) INPIIT AII = 06 AL = Numberof lines to scroll. If = 0 meansfirll window blanked BH = Attribute for blanked area CH = Upper left row to scroll CL = Upper left column to scroll DH = Lower right row to scroll DL = Lower right column to scroll

Flrnction 7 Scroll Active PageDown INPUT AII _-07 AL = Numberof lines to scroll. If = 0, meansfirll window blanked BH = Attribute for blankedarea CH = Upper left row to scroll CL = Upper left column to scroll DH = Lower right row to scroll DL = Lower right column to scroll

Function 8 ReadCharacter and Attribute at Cursor INPUT AII = 08 BH = Video pageto read character RETURN AL = Character AH = Characterattribute (text modesonly)

Function 9 Write Characterand Attribute at Cursor IMIIT AII = 09 AL = Characterto write BL = characterattribute for alpha modesor charactercolor for graphicsmodes BH = Pageto write character CX = Numberof charactersto unite

Function OAE Write Characterat Cursor INPTIT AII = 0AI{ BH = Pageto write character AL = Characterto write CX = Number of charactersto write

Flmction OBE Write ColorPalefte IMIIT AH=0B BL = Color value for palette BH = Palettecolor ID (0-127\

A4 VIDEO INT Function OCH Write GraphicsPixel (Internrpt 10H) IMIIT AII = 0C AL = Color value for pixel. If bit 7 = I then color is XORed CX = Column to write pixel DX = Row to write pixel

Function ODE ReadGraphics Pixel INPUT AH= 0D CX = Column to readpixel DX = Row to readpixel RETT]RN AL = Value of pixel read

Function OEH TeletypeWrite Character INPUT AII = 0E AL = Characterto write BL = Foregroundcolor (graphicsonly)

Function OFH Return Current Video Parameters INPUT AII = 0F RETI.]RN AL = Cunentvideomode AII = Numberof charactercolumns BH = Active page

INT IIH INPIII None Equipment RETIIRN AX = equipmentflag Check Returnsa rudimentarylist of equipmentattached to the computer mearung

I Math coprocessorinstalled 2,3 PlanarRAIvI size in 16K increments 00 -Unused 4,5 Initial video mode 0l - 40x25 l0 - 80x25 ll -Monochrome Diskette drives 00 - I drive 0l - 2 drives l0 - 3 drives ll - 4 drives 8 Not used 9,1I Number of serial adapten t2 GameAdapter installed l3 Not used l4,l Number of parallel adapters

A-5 INT I2H IMIII None Get Memory RETURN AX = Numberof lK memoryblocks Qnternrpt128) Returns the numberof contiguous lK memory blocks available

Function 0H ResetDiskette System

FLOPPYINT IMIIT (Internrpt l3E) AH=0 RETURN AH = Error Status CY=0Noerror = I Error

Function OlE ReturnLast OperationStatus INPUI AH= I RETURN AH=0 AL = 80H - Timeout occurred 40H - Seekenor 20H - NEC error lOH - CRCenor OCH- Media not found 09H - DMA boundaryerror 08H - DMA overun occurred 06H - Media hasbeen changed 04H - Sectornot found error 03H - Write protecterror 02H - Addressmark not found OlH - Illegal BIOS comnand 00H - No eror @curred

Function 02H ReadSectors INPUT AII=2 DL = Drive Number(0-l) DH= HeadNumber (0-l) CH = Track Number (0-79) CL = SectorNumber (l-18) AL = Numberof sectors(l-18) ES:BX = pointerto user'sdisk buffer RETURN AH = OperationStatus AL = Number of sectorstransfened CY= 0 No error = I Error

A6 FLOPPYINT Function 03H Write Sectors (Internpt 138) INPI,IT AII=3 DL = Drive Number(0-l) DH = HeadNumber (0-l) CH = Track Number (0-79) CL = SectorNumber (l-18) AL = Numberof sectors(l-18) ES:BX = pointerto user'sdisk buffer RETURN AH = OperationStatus AL = Numberof sectorstranderred CY=0Noerror = I Error

Function 04H Veri$ Sectors INPUT AI{=4 DL = Drive Number(0-l) DH = HeadNumber (0-l) CH = Track Number (0-79) CL = SertorNumber (l-185) AL = Numberof sectors(l-18) RETURN AII = OperationStatus AL = Number of sectorsverified CY=0Noerror = I Error

Function 05H Format Track INPUT AII= 5 DL = Drive Number(0-1) DH = HeadNumber (0-l) CH = Track Number (0-79) CL = SectorNumber (l-18) AL = Numberof sectors(l-18) ES:BX = pointer to track addressfield list RETT'RN AII = OperationStatus AL = Number of sectorsformatted CY=0Noerror =l Error

Function OEERead Diskette Parameters INPIII AII = 8H DL = Drive number RETURN AX= 0 ES:DI = Pointerto parametertable DH = Maximum headsnumber DL = Number of diskenedrives present CH = Maximum tracks number L-7 ILOPPYINT CL = Numberof sectorsper track (Internrpt 13H) BL = Diskette drive type from CMOS 00 = CMOSnot presentor invalid 01 = 360KB 02 = l.2MB 03 = 720KB 04 = l.44MB Bits 4-7 = 0

Function15E ReadDASD Type INPUT AII = l5H RETTJRN If CY=0 then AII contains: 00 = Drive not present 01 = No changeline availableon drive 02 = Changeline availableon drive 03 = Fixed disk else: AII =OperationStatus

Function 168 Disk ChangeLine Status IMIJT AII = l6H RETURN AII = Disk changeline status 00 = Disk changeline not active 06 = Disk changeline active & Carry DL = Drive Number(0-l)

Function 178 SetDASD Type for format IMIII AII = l7H AL =DASD T}?e 00 = Not Used 0l = 360K8 floppy in 360KB drive 02 = 360KB floppy in l.2MB drive 03 = l.2MB floppy in 1.2M8 drive O4=720Yl8floppy in 720K8 drive DL = Drive Number(0-l) RETT]RN AII = 9peration Status CY=0Noerror = I Error

Function l8E SetMedia Tlpe for format INPIIT AH= l8H CH = Maximum tracks number gtr = (bits 0-5) - ldaximum sectorsnumber DL = Drive Number(0-l)

A-8 RETURN AH = 00H and CY = 0 if media supported AH = OlH and CY = I if function not available AII = OCHand CY = I if media not supported ES:DI = Pointerto drive paxametertable

Function 008 Inizialize SerialPort INPI.II AH=0 AL = Mode Blte bit 0.1 numberof bits in char io = z bitt 11= 8 bits bit 2 numberof stopbits 0=lstopbit l=2stopbits bit 3,4 parity used 00 = none 0l = odd 02 = align bit 5,6,?baud rate 000= ll0baud 001= 150baud 010= 300baud 011= 600baud 100= 1200baud l0l = 2400baud 110= 4800baud lll = 9600baud DX = Port baseaddress RETT]RN AII = line control status AL = modemstatus

F\rnction 01H Write characterto CommunicationPort INPIJI AII= OlH AL = character BL = time-outvalue DX = port baseaddress RETURN AHbit 7 = 0, if function successful AII bit 7 = l, if function failed; bits 0-6 show causeof failure (refer to function 0) AL = transmittedcharacter

Function 028 ReadCharacterfrom Communication Port INPUT AII=2 BL = time-out value DX = port baseaddress

A-9 Serial INT RETI,JRN @tempt 148) AIIbit 7 = 0, if function successful AHbit 7 = l, if function failed; bits 0-6 show causeof failure (refer to function 0) AL = receivedcharacter

Function 038 RequestCommunication Port Status INPUT AII = 03H rrX = port baseaddress RETTJRN AII= line statusregister: bitT=0reserved bit 6 = I transmit shift and holding registerempty bit 5 = I transmitholding register empty bit4=lbreakinterrupt bit3 = lframingenor bit2=lparityerror bit I = I ovemrnerror bit0=ldataready AL= modemstatus register: bit 7 = I data carrier detect bit6= I ringindicator bit5=ldatasetready bit4= I cleartosend bit 3 = I data carrier detecthas changed bit 2 = I ring indicator falling-edgewas detected bit I = I data set readyhas changed bit 0 = I clear to sendhas changed

trhnction 048 ExtendedInitialization INPUT AII=04 AL = break settings 00 no break 0l break BL = parity 00 No parity 0l Odd parity 02 Even parity 03 parity bit always0 04 parity bit always I BH= stopbits 00 onestop bit 0l two stopbits CH= Word length 00 5 bit word length 0l 6 bit word length 02 7 bit word length 03 8 bit word length

A-r0 CL = transmissionrate (bps) 00 ll0baud 0l l50baud 02 300baud 03 600baud 04 1200baud 05 2400baud 06 4800baud O7 9600baud 08 19200baud DX =port baseaddress RETT]RN AII =line control status AL =modemstatus

Function 058 ExtendedCommunication Port Control INPI.TT AH= 05 AL =function 00 read modemcontrol register 0l write modemcontrol register BL = modemcontrol registervalueto write P;g = port baseaddress RETT'RN AII =Line statusregister (seefunction 03II) AL =modem statusregister (see function 03II) BL = modemcontrol register bits 7,6,5= reserved bit4=lloopbacktest bit 3 = I IRQ3 or 4 (dependingon config.) bit2=loutl bitl=lrequesttosend bit 0 = I data terminal readv

Function 0 thru 4EE Systen Senices INPIJT INT 15H any RETTJRN carry flag set AL = 86H (Not Supported)

Ftnction 4FE Keyboardintercept INPUT AII = 4I|II AL =Kryboard ScanCode RETURN If carry flag set, AL = New keyboardscan code If carry flag clear, AII = Original keyboardscan code

A-ll SystemSenices Ftnction 808 thm 83E INT IsE IMUT any

RETURN carryflag set AL = 86H (Not Supported)

Function 84E JoystickSupport INPIIT AII = 84H DX = 00 read switch 0l readjoystick RETURN AX= A(X)value BX= A(Y)value CX=B(X)value DX =B(Y) value

Function 85E thm 89H IMIIT any

RETT]RN carryflag set AL = 86H (Not Supported)

Function 90E DeviceWait IMUT AII= 90H AL =Device TypeCode RETURN AX=00H (not supported)

Flnction 918 Intemlpt Complete INPI]T AI{ = 9lH

RETT]RN AX=0

Function COH Return SystemConfiguration

INPUT AII= COH RETTJRN ES:BX = pointer to systemdescriptor table in ROM

KEYBOARI) Function 00E Return an ASCII value and a scancode from the keyboard (Internrpt 168) bufrer INPUT AII = 00H RETI.]RN AL = ASCII Keystrokefrom buffer AII = Keyboardscan code ofkey A-t2 KEYBOARI) Function 01H Checksfor availabilityof a keystroke.Returns the ASCII (Internrpt 168) codeand scancode ifavailable INPUT AII = OlH RETT]RN AL = ASCII keystroke AII = Scancode ZF = No keystrokeavailable NZ =Keystroke in buffer

Ftrnction02E returnsa statusbyte indicating the condition of the Shift Keys INPUT AH = 02H RETTJRN AL = Shift status

Fhnction05H Writes to keyboardbufrer INPUT AII = 05H CL = ASCII code CH = Scancode RETI'RN AL = 0 if insert successful AL = I if keyboardbufrer full

Function10H Readextended character from buffer INPUT AH= 10H RETT]RN AL = ASCI keystroke AII = Scancode

Ftnction llH Checls an enhancedkeyboard for a keystroke INPUT AII = llH RETTJRN AL = ASCII keystrokepressed AII = Scancode ofkey ff = No keystrokeavailable NZ = Keystrokein bufrer

Flnction l2E Returnsthe statusof enhancedkelboard shft keys INPIJT AII = l2H RETURN AL = Shift status AII = Extendedshift status

A-13 Function 008 Write characterto printer PRINTER INT INPUT (Intermpt 17H) AII = 00 AL = Characterto print DX = Adapter number(0-3) RETT]RN AII = Parallel adapterstatus

Function 01E Initialize PrinterPort INPI.TT AII = 0l DX = Adapter number(0-3) RETI.]RN AII = Parallel adapterstatus

tr'unction 02H RequestPrinter Port Status INPTIT AII = 02 DX = AdapterNumber RETURN AII = Parallel adapterstatus

Function 04H ReadDate From Real Time Clock INPI]T AII = 04 RETURN CL = Year (BCD) CH = Century (BCD) DL =Day (BCD) DH=Month (BCD) Carry flag set if error

trtrnction058 SetDateof RealTime Clock INPUT AH=05 CL = Year (BCD) CH= Century@CD) DL =Day (BCD) DH=Month (BCD) RETTJRN Nothing

Function 068 SetSystem Alarm IMIIT AII = 06 CL =Minutes (BCD) CH = Hours (BCD) DH = Seconds(BCOI RETT'RN Carry llag clear ifsuccessfrrl

A-14 PRINTERINT Function 078 DisableRealTime ClockAlarm @termpt l7E) INPIJT AH= 07 RETTJRN Nothing

Real Time INT Flrnction 00H Get Clock Counter (Internrpt lAH) INPUT AII = 00 RETURN CX = High word of time count. DX = Low word of time count. AL = 00 indicatesday rollover has not occurred.

Function 01H SetClock Counter INPUT AH=01 CX = High word of time count. DX = Low word of time count. RETURN Nothing

Function 02H ReadReal Time Clock INPUT AH=02 RETURN CL =Minutes (BCD) CH=Hours (BCD) DH = Seconds(BCD) DL=0=StandardTime I = Daylight savings Carry flag set if error

Function 03H SetReaITime Clock IMIIT AH= 03 CL =Minutes (BCD) CH=Hours (BCD) DL=l=daylightsavings 0 = standardtime DH = Seconds(BCD) RETT'RN Nothing

A-15

APPEI\DIX B

JumperConfiguration andLocations

This appendixlisb the jumpers and their functions. Some indicationsare also given to pick them out more easily on the board. When using the jumper location diagrams,place the board with the PC/104bus connectorat the six o'clock position and the component sideup.

B-l

A o JP1 \l/ F-ol l""l lo ol oo F3 l.l l"l l""l lgj (EJ lo ol JF4 JP2 JP3

o o o oo o o o o o o o 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 00 0 0 0 0 0 0 00 00 00 0 0 0 00 0 0 o o o o o o o o o o oo oo oo o oo o oo o o o o o o o oo oo ooo o o

Figure2-1 CME486Jumper Locations

Jumper Use JPl 6-pinjumper; Pin I on lower right side. Usedtogether with JP2to selectthe type and size of deviceU6 accordinsto TableB-l , is}.tE JP2 3-pinjumper; Pin I on lower side Usedtogether with JPI to selectttre type and size of dwice U6 accordinsto TableB-l

JP3 6-pinjumper; Pin I on lower right side. Usedtogether with JP4to selectthe tpe and size of deviceU7 accordinqto Table B-2 ffirffiN$ffi$T3i$ JP4 3-pin jumpe4 Pin I on lower side Usedtogether with JP3to selectthe tpe and size of dwice U7 accordinsto TableB-2

JP5 2-pin jumper open: valid SetupinEEPROM;boot normally closed; invalid SehrpinEEPROM; usedefault configuration fffit*.N JP6 2-pinjumper Reserued.alwavs onen ffisfiiiilii$ii-{-$-$tiii,i,$:ffir$, To simplify your worlg the tablesfor the selectionof Solid StateDisk deviceshave been repeated below. '

TableB-1 U6 PossibleConfipurations TVne Capacity JPI Jv2 EPROM l28k 34 ta EPROM 256K 34 t-2 EPROM 5l2K 34 t-2 EPROM IM r-2 t-2 FIaShEPROM 64K 5{* r-2 FIaShEPROM l28K 5-6* t-2 FIaShEPROM 256K 5{* r-2 SRAI\{ l28K 34 (* *) SRAM 5l2K t-2 (**) NO\/RAI{ l28K 34 r-2 NOVRAM 5l2K t-2 t-2

(*) controlsprogramming voltage (VPP) on the Flash EPROM. (") the power supply to the static RAIvI is controlledby JP2as follows: . position l-2: power suppliedby module'sVCC supply . position2-3:powerzuppliedbyabauery

Table B-2 U7 PossibleConfisurations Tvpe Canacitv JP3 JP4 EPROM l28k 34 t-2 EPROM 256K 34 L-2 EPROM 5l2K 34 t-2 EPROM IM t-2 L-2 FIaShEPROM 64K 56* r-2 FIaShEPROM l28K 56* t-2 Flash EPROM 256K 5{* I-2 SRAI\,I l28K 34 (**) SRAM 5t2K t-2 (*.) NOI/RAM t28K 34 t-2 NO\IRAM 5l2K t-2 t-2

(r) controls programmingvoltage (rV?P)on the Flash EPROM. (*t) the power supply to the static RAlvf is controlled by JP4 as follows: . position l-2: power zuppliedby module'sVCC zupply . position2-3:powersuppliedbyabattery

B4 SOLDER For referencepurposes, the solderjumperson the rwerseside of the moduleare listed below. The JT]MPERS positionsof thesejumpers are set at thefactory to selectbetween 486SX and DX processorsand shouldnot be changedby theuser.

-positions actoryReserved

2-positions Close= DX processortype

2-positions Close= DX processort)?e

2-positions Close= SXprocessortype

2-positions Close= DXprocessortype

2-positions FactoryReserved

B-5

APPENDIX C

Warranty

LIMITED WARRANTY

Real Time Dwices, Inc. warrantsthe hardwareand softwareproducts it manufacturesand producesto be free from defectsin materialsand workmanshipfor one year following the dateof shipmentfrom RAAL TIME DEVICES. This warranty is limited to the original purchaserof product and is not transferable. During the oneyear warranty period, REAL TIME DEVICES will repair or replace,at its optio4 any defectiveproducts or parts at no additional charge,provided that the product is returnd shipping prepai4 to REAL TIME DEVICES. All replacedparts and productsbecome the property of REAL TIME DEVICES.Before retuming any product for repair, customersare required to contactthe factory for an RITIA number. THIS LIMITED WARRANTYDOESNOTEXTEND TO ANYPRODUCTSWHICHHA\IE BEENDAMAGED AS A RESULT OF ACCIDENT, MISUSE, ABUSE (suchas: useof incorrect input voltages,improper or insufficient ventilatiorq failure to follow the operatinginstructions that are providedby REAL TIME DEVICES, "acts of God" or other contingenciesbeyond the control of REAL TIME DEVICES), OR AS A RESIILT OF SERVICE OR MODMCATION BY ANYONE OTHER TIIAN REAL TIME DEVICES. EXCEPT AS E)(PRESSLYSET FORIII ABO\18, NO OTIIER WARRANTIES ARE HGRESSED OR IMPLIED, INCLUDING, BIIT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FTTNESSFOR A PARTICT]LAR PURPOSE,AND REAL TIME DEVICES HGRESSLY DISCLAIMS ALL WARRANTIES NOT STATED IIEREIN. ALL IMPLIED WARRANTIES, INCLUDING IMPLIED WARRANTIES FOR MECHANTABILITY AND FTINESSFOR A PARTICI]LAR PT'RPOSE,ARE LIMITED TO TIIE DI]RATION OF TI{IS WARRANTY. IN TTIE E\IENT TTIE PRODUCTIS NOT FREE FROM DEFECTS AS WARRANTED ABO\IE, TIIE PI]RCHASER'S SOLE REMEDY SHALL BE RE. PAIR OR REPLACEMENT AS PROVIDED ABO\IE. T]NDERNO CIRCT]MSTANCESWILL REAL TIME DEVICES BE LIABLE TO TIIE PI'RCHASER OR A}IY USER FOR ANY DAI\d- AGES, INCLI]DING ANY INCIDENTAL OR CONSEQUENTIALDAMAGES, E)GENSES, LOST PROFNS, LOST SAVINGS, OR OTHER DAI\4AGESARISING OIJT OF TIIE USE OR INABIL. ITY TO USE TIIEPRODUCT. SOME STATESDO NOT ALLOW THE EXCLUSION ORLIMITATION OF INCIDENTAL oR CoNSEQI'ENTIALDAIVIAGES FoR coNSItMER pRoDucrs, ANDsoME srATEsDo NOT ALLOWLIMITATIONS ON HOWLONG AN IMPLIEDWARRAI\TY LASTS, SO TI{E ABO\IE LIMITATIONSOR EXCLUSIONS MAY NOT APPLYTO YOU. THISWARRA}.ITY GIVES YOU SPECIFICLEGAL RIGIITS, AND YOU MAY ALSOHAVE OTIIERRIGIITSWHICHVARYFROM STATE TO STATE.

c-3 c-4