Reference Manual DOC. REV.
WWW.VERSALOGIC.COM 3888 Stewart Road Eugene, OR 97402 (541) 485-8575 Fax (541) 485-5712 Contents Copyright © 2009 All Rights Reserved Notice: Although every effort has been made to ensure this document is error-free, VersaLogic makes no representations or warranties with respect to this product and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose.
Product Release Notes Rev 3 Release Production release. Rev 2 Release Beta release. Some functionality has not yet been implemented. Rev 1 Release Pre-production only. No customer releases. Support Page The EBX-22 support page, at http://www.versalogic.com/private/sidewindersupport.
Table of Contents Introduction ..................................................................................................................... 1 Description.......................................................................................................................... 1 Technical Specifications ..................................................................................................... 3 EBX-22 Block Diagram...........................................................................
Table of Contents Clearing CMOS RAM ......................................................................................... 29 CMOS Setup Defaults ...................................................................................................... 29 Default CMOS RAM Setup Values..................................................................... 29 Saving CMOS Setup Parameters as Custom Defaults ......................................... 30 Real Time Clock .............................................
Table of Contents Analog Input ..................................................................................................................... 51 External Connections........................................................................................... 51 Calibration ........................................................................................................... 51 Binary Format (0 to +4.095V Only) ....................................................................
Introduction 1 Description The EBX-22 is a feature-packed single board computer designed for OEM control projects requiring fast processing, industrial I/O, flexible memory options and designed-in reliability and longevity (product lifespan). Its features include: VIA Eden 1.2 GHz processor CX700M chipset with integrated 200MHz 128-bit UniChrome Pro II 2D/3D graphics processor.
Introduction The EBX-22 is compatible with popular operating systems such as Windows and Linux. A full complement of standard I/O ports are included on-board. Additional I/O expansion is available through the high-speed PCI-based PC/104-Plus expansion site (which supports both PC/104 and PC/104-Plus expansion modules), and through the serial peripheral interface (SPI). A limited ISA bus is created in the PLD to support legacy 8-bit and 16-bit PC/104 ISA cards. It supports I/O, memory, and interrupts.
Introduction Technical Specifications Specifications are typical at 25°C with 5.0V supply unless otherwise noted. Board Size: 5.75" x 8.00" x 1.75"; EBX compliant Storage Temperature: -40° C to 85° C Free Air Operating Temperature: 0° C to +60° C EBX-22g COM3–4 Interface: RS-232 4-wire, RS-422, RS-485, 16C550 compatible, 460k baud max. LPT Interface: Bi-directional/EPP/ECP/floppy mode compatible Power Requirements: (with 256 MB DDR2 SODIMM, keyboard and mouse, Windows XP) EBX-22g – +5.0V ± 5% @ 2.2.
Introduction EBX-22 Block Diagram VIA Eden DDR2 SDRAM VIA SODIMM CX700 Chipset PC/104-Plus (PCI) PC/104 (ISA) 10/100 Ethernet (2) SPX Interface PLD Legacy I/O Industrial I/O SVGA Analog Analog Input PCI Bus Digital I/O 0-15 SPI Host Bus CPU Digital I/O 16-31 LVDS Flat Panel USB 4 HDMI J5 CBR-4004 I/O Connector J23 CBR-4004 I/O Connector LPC Bus Audio Codec SATA 1 COM 1-2 RS-232 LPC Super I/O SATA 2 COM 3-4 RS-232/422/485 J14 CBR-5009 I/O Connector PS/2 Mouse / Keyboard USB 0-3
Introduction CX700M Block Diagram VIA Eden CPU LVDS: 2 single-channels, 1 dual-channel DVI: 1 single-channel LVDS/DVI Transmitter Component Video Video DACs LVDS, DVI, HDMI Transmitter/ HDTV Encoder VCP: 1 8-bit Transport Streams/ 1 16-bit or 2 8-bit CCIR656/601 Inputs Digital Video Port 1 Video Capture Port Host Interface HDTV Encoder 2D GFX Processor 3D GFX Processor Unified Video Decoding Accelerator – MPEG-2/4 and WMV9 video acceleration Hi-Def Video Processor PCI HD Audio 4 Master Devi
Introduction Warnings ELECTROSTATIC DISCHARGE Electrostatic discharge (ESD) can damage boards, disk drives and other components. The circuit board must only be handled at an ESD workstation. If an approved station is not available, some measure of protection can be provided by wearing a grounded antistatic wrist strap. Keep all plastic away from the board, and do not slide the board over any surface.
Introduction Technical Support If you are unable to solve a problem with this manual please visit the EBX-22 Product Support web page listed below. If you have further questions, contact VersaLogic technical support at (541) 485-8575. VersaLogic technical support engineers are also available via e-mail at Support@VersaLogic.com. EBX-22 Support Website http://www.versalogic.com/private/Sidewindersupport.
Configuration and Setup 2 Initial Configuration The following components are recommended for a typical development system. Note that this is a recommended configuration only. Note You may substitute other components for the ones listed below, such as a PS/2 mouse and keyboard, a parallel ATA hard drive or CD-ROM drive, or another type of monitor. If you substitute other components, be sure to adjust the basic setup steps accordingly.
Configuration and Setup ATX Power Supply CBR– 0401 CBR– 2022 CD-ROM Drive USB OS Installation CD-ROM USB J6 EBX-22 SATA Hard Drive “Sidewinder” J4 J11 J3 J9 J10 J8 CBR– 0701 J7 USB Keyboard and Mouse CBR– 1201 Analog SVGA Figure 3. Typical Start-up Configuration 1. Install Memory Insert the DDR2 DRAM module into the SODIMM socket J2 and latch it into place. 2. Attach Cables and Peripherals Plug the video adapter cable CBR-1201 into socket J7.
Configuration and Setup Note The mating connector on some SATA data cables may interfere with the proper seating of a PC/104-Plus (PCI) expansion board at connector J17. The SATA specification does not specify exterior dimensions for connector housings, and some manufacturers make wider housings than others. The 3M 5602 Series straight SATA connector is 0.22 in. wide and will interfere less with the PC/104-Plus card.
Configuration and Setup CMOS Setup The default CMOS Setup parameters for the EBX-22 are shown below. Due to changes and improvements in the system BIOS, the information on your monitor may differ from that shown below. The factory default date will correspond to the BIOS build date. Some values may vary depending on the configuration of your EBX-22.
Configuration and Setup Boot Tab + | | | | | | | | | | | | | | | | | | | | | | | | | | + Main Exit Boot POST SIO Features Firmbase Misc Board ------------------------------------------------------ + ------------------- + System Boot Configuration |Select initialization| ------------------------------------------------------ |and boot priority for| |all devices. | Boot Device Prioritization (BBS) | | 0 [IDE 2/ATA Master] |Backspace deletes | 1 [None] |selection.
Configuration and Setup SIO Tab + | | | | | | | | | | | | | | | | | | | | | | | | + Main Exit Boot POST SIO Features Firmbase Misc Board ------------------------------------------------------ + ------------------BIOS Super I/O Configuration | ------------------------------------------------------ | | SCH3114 Devices | ------------------------------------------------------ | Parallel Port (J29) [Enabled] | Address [378h] | IRQ [IRQ 7] | DMA [Channel 4] | Mode [Printer] | Serial Port 1 (J3 Top) [Enabled] |
Configuration and Setup Firmbase Tab + | | | | | | | | | | | | | | | | | | | | | | | | | + Main Exit Boot POST SIO Features Firmbase Misc Board ------------------------------------------------------ + ------------------- + Features Enabled by Firmbase[R] Technology |Enable to support USB| ------------------------------------------------------ |keyboard and mouse | Legacy USB [Enabled] | | USB Boot [Enabled] | | EHCI/USB 2.
Configuration and Setup Board Tab + | | | | | | | | | | | | | | | | | | | | | | | | | + Main Exit Boot POST SIO Features Firmbase Misc Board ------------------------------------------------------ + ------------------Flash Protection [Enabled] |Write-protect Flash |BIOS sectors.
Configuration and Setup Status Tab POST SIO Features Firmbase Misc Board Chipset Status +--------------------------------------------------------+---------------------+ | | | | CPU Real-Time Statistics | | | -------------------------------------------------------| | | Thermal Diode Reading, Current *C: 50 | | | | | | | | +--------------------------------------------------------+---------------------+ Operating System Installation The standard PC architecture used on the EBX-22 makes the installati
Physical Details 3 Dimensions and Mounting The EBX-22 complies with all EBX standards which provide for specific mounting hole and PC/104-Plus stack locations as shown in the diagram below. 7.80 7.60 0.125 DIA x8 Use 3mm or #4 standoffs 5.80 5.70 2.80 2.65 0.00 5.25 5.35 5.55 1.875 –0.20 0.00 -0.20 Figure 4. EBX-22 Dimensions and Mounting Holes (Not to scale. All dimensions in inches.
Physical Details Caution The EBX-22 must be supported at all eight mounting points to prevent excessive flexing when expansion modules are mated and demated. Flex damage caused by excessive force on an improperly mounted circuit board is not covered under the product warranty. Heatsink 0.85 0.06 Figure 5. EBX-22 Height Dimensions (Not to scale. All dimensions in inches.) 5.50 5.10 1.575 1.87 1.9 1.175 1.325 0.06 Figure 6. CBR-5009 Dimensions and Mounting Holes (Not to scale.
Physical Details 2.87 0.25 0.25 2.38 0.70 J1 J2 J3 J4 + + 1.95 0.63 J5 + + J6 J7 J8 J9 0.62 0.06 0.40 Figure 7. CBR-4004 Dimensions and Mounting Holes (Not to scale. All dimensions in inches.
Physical Details HARDWARE ASSEMBLY The EBX-22 mounts on four hardware standoffs using the corner mounting holes (A). These standoffs are secured to the underside of the circuit board using pan head screws. Four additional standoffs (B) must be used under the circuit board to prevent excessive flexing when expansion modules are mated and separated. These are secured with four male-female standoffs (C), threaded from the top side, which also serve as mounting struts for the PC/104 stack.
Physical Details External Connectors EBX-22 CONNECTORS J15 Analog, PWM, Digital I/O J29 LPT V3 V2 J14 COM 1-4, PLED, PS/2 Keyboard and Mouse, Reset Button, Speaker J23 Audio, Digital I/O, USB 4 J6 Power J22 IDE V6 J25 SPI V5 J13 USB SSD J26-27 PC/104 (ISA) Battery J17 PC/104-Plus (PCI) J10 SATA 2 V1 J20 CompactFlash J5 Ethernet 1 J12 Ethernet 0 J4 J11 USB 3 USB 1 J3 J9 USB 2 USB 0 J8 SATA 1 V4 = Pin 1 = Key J2 SODIMM Memory CPU J7 SVGA J16 Fan J19 LVDS J24 HDMI Figure 9.
Physical Details EBX-22 CONNECTOR FUNCTIONS AND INTERFACE CABLES The following table notes the function of each connector, as well as mating connectors and cables, and the page where a detailed pinout or further information is available.
Physical Details CBR-5009 CONNECTORS 1 2 49 50 J2 Soft Power Button J1 Breakout Board Adapter 5 1 1 5 SP1 J5 Speaker COM4 1 5 J6 COM3 J3 COM1 (Top) COM2 (Bottom) J4 PS/2 Mouse (Top) Keyboard (Bottom) D1 Power (Top) PLED (Bottom) S1 Reset = Pin 1 Figure 10.
Physical Details CBR- 4 004 CONNECTORS J1 5 J2 1 5 J3 1 5 J4 1 5 1 40 39 2 1 J5 1 5 J6 1 5 1 J7 5 1 J8 5 J9 = Pin 1 Figure 11. CBR-4004 Connectors CBR-4004 connector functions depend on the I/O connector to which it is attached, J15 or J23. See Table 6 (J15) or Table 7 (J23) for details.
Physical Details Jumper Blocks JUMPERS AS-SHIPPED CONFIGURATION V6 V3 2 2 1 1 V3 V2 8 7 6 5 4 3 2 1 V6 V5 V2 V1 V5 V1 3 3 2 2 1 V4 1 V4 1 2 3 Figure 12.
Physical Details JUMPER SUMMARY Table 3: Jumper Summary Jumper Block V1 V2[1-2] V3[3-4] V4 V5 V6[1-2] V6[3-4] V6[5-6] V6[7-8] Description CMOS RAM and Real Time Clock Erase [1-2] In – Normal [2-3] In – Erase CMOS RAM and real-time clock COM3 RS-485 Termination In – 100 Ohm terminated Out – COM3 Not terminated COM4 RS-485 Termination In – 100 Ohm terminated Out – COM4 Not terminated CRT and TV Select [1-2] In – CRT [2-3] In – TV Reset Select [1-2] In – Generated [2-3] In – Power button The EBX-22 r
System Features 4 Power Supply POWER CONNECTORS Main power is applied to the EBX-22 through an EPIC-style 10-pin polarized connector at location J6. Warning! To prevent severe and possibly irreparable damage to the system, it is critical that the power connectors are wired correctly. Make sure to use both +5VDC pins and all ground pins to prevent excess voltage drop.
System Features LITHIUM BATTERY Warning! To prevent shorting, premature failure or damage to the lithium battery, do not place the board on a conductive surface such as metal, black conductive foam or the outside surface of a metalized ESD protective pouch. The lithium battery may explode if mistreated. Do not recharge, disassemble or dispose of in fire. Dispose of used batteries promptly. Normal battery voltage should be at least 3.0V. If the voltage drops below 3.
System Features CPU The VIA Eden is an extremely low power consumption (7W at 1 GHz) x86 microprocessor with a maximum operating frequency of 1.2 GHz and bus speeds up to 800 mega-transfers per second (MT/s). The VIA Eden features two 64 KB Level 1 caches, one 128 KB Level 2 cache, and DDR2 SDRAM support. System RAM COMPATIBLE MEMORY MODULES The EBX-22 accepts one 240-pin SODIMM memory module with the following characteristics: Size Voltage Type Up to 1GB 1.
System Features SAVING CMOS SETUP PARAMETERS AS CUSTOM DEFAULTS To save custom CMOS defaults, perform the following steps. 1. Configure CMOS Setup to your preferred custom default settings. 2. Install DOS onto one of the devices that has been configured as a boot device, and copy FBU to the device. 3. Boot the EBX-22 from this device. (During the early boot cycle, press the B key to access the boot menu, and select the DOS drive.) 4. Run FBU and select Save CMOS contents. A file named CMOS.
5 Interfaces and Connectors Utility I/O Connectors A number of interfaces on the EBX-22 are grouped together and made accessible through utility I/O connectors J14, J15, and J23. Cables and boards are available from VersaLogic that provide discrete connectors for each of the interfaces; however, you can create custom cables that surface only the interfaces required by your application.
Interfaces and Connectors J15 I/O CONNECTOR The 40-pin I/O connector (J15) incorporates 16 digital I/O channels, eight analog channels, a reset, three PWM outputs, and four general purpose I/O lines. Table 6 shows the function of each pin.
Interfaces and Connectors J23 I/O CONNECTOR The 40-pin I/O connector (J23) incorporates the USB4 interface, 16 digital I/O channels, and the audio interface. Table 7 illustrates the function of each pin.
Interfaces and Connectors IDE One IDE interface is available to connect up to two IDE devices, such as hard disks and CDROM drives. If the on-board CompactFlash is configured for use, only one other IDE device can be attached to the IDE controller. Connector J22 provides the interface to the IDE controller. Jumper V6[1-2] determines if the CompactFlash plugged into J20 is the master device or slave. Use CMOS Setup to specify the drive parameters of the attached drives.
Interfaces and Connectors SATA Ports The EBX-22 provides two serial ATA (SATA) ports, which communicate at a rate of up to 1.5 gigabits per second (SATA 1). The SATA connectors at locations J8 and J10 are standard 7-pin straight SATA connectors with friction latching. Power to SATA drives is supplied by the ATX power supply. Note that the standard SATA drive power connector is different than the common 4-pin Molex connector used on IDE drives.
Interfaces and Connectors Serial Ports The EBX-22 features four on-board 16550-based serial channels located at standard PC I/O addresses. COM1 and COM2 are RS-232 (115.2K baud) serial ports. IRQ lines are chosen in CMOS Setup. COM ports can share interrupts with other COM ports, but not with other devices. COM3 and COM4 can be operated in RS-232 4-wire, RS-422 or RS-485 modes. Additional nonstandard baud rates are also available (programmable in the normal baud registers) of up to 460k baud.
Interfaces and Connectors SERIAL PORT CONNECTORS See the Connector Location Diagrams on pages 21 for connector and cable information. The pinouts of the DB9M connectors apply to the serial connectors on the VersaLogic breakout board CBR-5009. These connectors use IEC 61000-4-2-rated TVS components to help protect against ESD damage.
Interfaces and Connectors Parallel/Floppy Port PARALLEL PORT OPERATION The EBX-22 includes a standard bi-directional/EPP/ECP compatible LPT port (connector J29) that resides at the PC standard address of 378h. The port can be enabled or disabled and interrupt assignments can be made via CMOS Setup. The LPT mode is also set via CMOS Setup. This connector uses IEC 61000-4-2-rated TVS components to help protect against ESD damage.
Interfaces and Connectors PS/2 Keyboard and Mouse A standard PS/2 keyboard and mouse interface is accessible through connector J4 of the VersaLogic breakout board, CBR-5009. The breakout board is connected to connector J14 of the EBX-22. The 5V power provided to the keyboard and mouse is protected by a 1 Amp fuse. This connector uses IEC 61000-4-2-rated TVS components to help protect against ESD damage.
Interfaces and Connectors USB The USB interface on the EBX-22 is UHCI (Universal Host Controller Interface) and EHCI (Enhance Host Controller Interface) compatible, which provides a common industry software/hardware interface. There are six USB ports. Four standard USB Series A sockets (USB0-3) are located on the base board at locations J3, J4, J9, and J11. USB4 is available on the CBR-4004 I/O board as a screw terminal connector at location J1.
Interfaces and Connectors CompactFlash Connector J20 provides a socket for a Type I or Type II CompactFlash (CF) module. This IDE based interface operates on the same channel than the IDE interface at connector J22. The CF interface supports operation in DMA mode. The following CF modules have been tested and qualified as bootable devices by VersaLogic. Part numbers with a suffix of -3500 are RoHS-compliant. Table 15.
Interfaces and Connectors Programmable LED Connector J14 includes an output signal for attaching a software controlled LED. Connect the cathode of the LED to J14, pin 48; connect the anode to +5V. An on-board resistor limits the current to 15 mA when the circuit is turned on. A programmable LED is provided on the CBR-5009 breakout board. To turn the LED on and off, set or clear bit D7 in I/O port 1D0h (or 1E0h). When changing the register, make sure not to alter the values of the other bits.
Interfaces and Connectors Video Interface An on-board video controller integrated into the chipset provides high performance video output for the EBX-22. Video output options include SVGA analog, LVDS flat panel, and DVI/HDMI. CONFIGURATION The video interface uses PCI interrupt INTA#. CMOS Setup is used to select the IRQ line routed to INTA#. The EBX-22 uses shared memory architecture. This allows the video controller to use variable amounts of system DRAM for video RAM.
Interfaces and Connectors LVDS FLAT PANEL DISPLAY CONNECTOR The integrated LVDS Flat Panel Display provided through connector J19 on the EBX-22 is an ANSI/TIA/EIA-644-1995 specification-compliant interface. It can support up to 24 bits of RGB pixel data plus 3 bits of timing control (HSYNC/VSYNC/DE) on the 4 differential data output pairs. The LVDS clock frequency ranges from 25 MHz to 112 MHz. CMOS Setup provides several options for standard LVDS Flat Panel types.
Interfaces and Connectors COMPATIBLE LVDS PANEL DISPLAYS The following flat panel displays are reported to work properly with the integrated graphics video controller chip used on the EBX-22. Table 18: Compatible Flat Panel Displays Manufacturer Model Number Panel Size eVision Displays au Optronix eVision Displays au Optronix eVision Displays Sharp xxx084S01 series B084SN01 xxx104S01 series B104SN01 xxx141X01 series LQ121S1LG411 8.4” 8.4” 10.4” 10.4” 14.1” 12.
Interfaces and Connectors CONSOLE REDIRECTION The EBX-22 can be operated without using the on-board video output by redirecting the console to a serial communications port. CMOS Setup and some operating systems such as DOS can use this console for user interaction. Console redirection settings are configured on the Features tab of CMOS Setup. The default setting causes the console not to be redirected to COM1 unless a signal (a Ctrl-C character) is detected from the terminal.
Interfaces and Connectors Ethernet Interface The EBX-22 features two Intel 82551ER Fast Ethernet controllers on-board. While these controllers are not NE2000-compatible, they are widely supported. Drivers are readily available to support a variety of operating systems. BIOS CONFIGURATION Each Ethernet controller can be enabled or disabled in CMOS Setup. Ethernet interface 0 (J12) uses PCI interrupt INTC#. CMOS Setup is used to select the IRQ line routed to each PCI interrupt line.
Interfaces and Connectors ETHERNET CONNECTOR Board-mounted RJ-45 connectors are provided to make connections with Category 5 Ethernet cables. The 82551ER Ethernet controller auto-detects 10BaseT/100Base-TX connectors. These connectors use IEC 61000-4-2-rated TVS components to help protect against ESD damage.
Interfaces and Connectors Audio The audio interface on the EBX-22 is implemented using the VIA VT1708 High Definition Audio Codec. This interface is AC’97 2.3 compatible. Drivers are available for most Windowsbased operating systems. To obtain the most current versions, consult the EBX-22 product support page at http://www.versalogic.com/private/Sidewindersupport.asp. J23 provides the line-level stereo input and line-level stereo output connection points.
Interfaces and Connectors REFRESHING THE WATCHDOG If the watchdog timer is enabled, software must periodically refresh the WDHOLD register at a rate faster than the timer is set to expire. (This is sometimes referred to as “petting” or “feeding” the watchdog.) To reset the timer, first write 55h to the WDHOLD register (I/O port 1E1h) followed by AAh to the same register.
Interfaces and Connectors Analog Input The EBX-22 analog input interface uses a 12-bit A/D converter that accepts up to eight singleended input signals. The converter features 500 kilo-samples per second (kSPS) conversion time, with an input range of 0 to +4.095V with 4096 steps at 0.001V each. A/D input capacitance is 33 pF. The absolute maximum input voltage is 4.395V (4.095V + 0.300V) and minimum input voltage -0.300V.
Interfaces and Connectors BINARY FORMAT (0 TO +4.095V ONLY) The full analog input range is divided into 4096 steps. The output code (0000h) is associated with an analog input voltage of 0 volts (ground). All codes are considered positive. The following formulas are used for calculating analog and digital values: Analog Digital = Analog = Step x Digital Step Where: Analog = Applied voltage Digital = A/D conversion data Step = 0.001V Sample values are shown in the following table.
Interfaces and Connectors Table 26 shows the addresses of all analog input registers.
Interfaces and Connectors ANALOG INPUT USING THE SPI INTERFACE See SPI Interface for a description of the EBX-22 SPI interface and registers. Initiating an Analog Conversion Using the SPI Interface The following procedure can be used to initiate an analog conversion using the SPI interface. 1.
Interfaces and Connectors IN AX, DX ;16bit input reads current conversion data ;from SPIDATA1 into AH and from SPIDATA0 into ;AL For more detailed information on the EBX-11 A/D converter, please refer to the National Semiconductor ADC78H90 Datasheet ANALOG INPUT “BIT BANG” REGISTER A special register is available at 1D5h that enables the direct control (“bit banging”) of the ADC.
Interfaces and Connectors Digital I/O The EBX-22 includes a 32-channel digital I/O interface. The digital lines are grouped into two banks of 16-bit bi-directional ports. The direction of each line is controlled by software. The digital I/O ports are powered up in the input mode. The 24 mA source/sink drive and short protected outputs are an excellent choice for industrial LVTTL interfacing. All I/O pins use 3.3V signaling. Warning! Damage may occur if the I/O pins are connected to 5V logic.
Interfaces and Connectors AND JNZ AL, 01h BUSY MOV MOV OUT MOV MOV OUT MOV MOV OUT MOV MOV OUT MOV MOV OUT DX, AL, DX, DX, AL, DX, DX, AL, DX, DX, AL, DX, DX, AL, DX, 1D8h 27h AL 1D9h 30h AL 1DBh 44h AL 1DCh 0Ah AL 1DDh 40h AL ;Isolate the BUSY bit ;Loop back if SPI transaction is not complete ;SPICONTROL: SPI Mode 00, 24bit, auto DIO_1_SS# ;SPISTATUS: 8MHz, no IRQ, left-shift ;SPIDATA1: Mirror & Open-Drain interrupts ;SPIDATA2: MCP23S17 address 0x0A ;SPIDATA3: MCP23S17 write command Writing to a Dig
Interfaces and Connectors BUSY: OUT CALL DX, AL BUSY ;Poll busy flag to wait for SPI transaction MOV IN AND JNZ DX, 1D9h AL, DX AL, 01h BUSY ;Get SPISTATUS ;Isolate the BUSY flag ;Loop if SPI transaction not complete Reading a Digital I/O Port Using the SPI Interface The following code example reads the DIO15-DIO8 input lines.
Interfaces and Connectors 'MCP23S17 SPI Control Byte (Write) '--------------------------------'D7 SLAVEFA3 = 0 Slave Address (Fixed Portion) 'D6 SLAVEFA2 = 1 " " " " 'D5 SLAVEFA1 = 0 " " " " 'D4 SLAVEFA0 = 0 " " " " 'D3 SLAVEHA2 = 0 Slave Address Bits (Hardware Address Bits) 'D2 SLAVEHA1 = 0 " " " " 'D1 SLAVEHA0 = 0 " " " " 'D0 READWRITE = 0 Read/Write Bit = Write OUT SPIDATA3, &H40 WHILE (INP(SPISTATUS) AND &H1) = &H1: WEND 'INITIALIZE DIRECTION OF DIO LINES D15-D8 AS INPUTS '=============================
Interfaces and Connectors Bit Mnemonic D7 D6 D5-D4 DIOIN DIOINT – Digital I/O Input – This bit is read-only. Digital I/O Interrupt – This bit is read-only. Reserved – These bits have no function. D3 D2 D1-D0 DIOCLK DIOOUT DIOCS Digital I/O Clock – This bit is read/write. Digital I/O Output – This bit is read/write. Digital I/O Chip Select – These bits are read/write.
Interfaces and Connectors SPI Interface The serial peripheral interface (SPI) can function in two modes on the EBX-22. In legacy mode, the interface functions as implemented in other VersaLogic SBCs, such as the EBX-11 Rev. 6.00 and above, and makes use of a set of control and data registers. In “bit bang” mode, you can operate the SPIBB register (1D7h) directly. Each mode is described in this section. SPI is, in its simplest form, a three wire serial bus.
Interfaces and Connectors SPI LEGACY MODE The following tables describe the legacy SPI control registers (SPICONTROL and SPISTATUS) and data registers (SPIDATA3-0), such as those used on the EBX-11. To enable SPI legacy mode, the SPI field (bits D6-D5) of the MODCON register (1DFh) must be set to 1h.
Interfaces and Connectors SPISTATUS (READ/WRITE) 1D9h D7 D6 D5 D4 IRQSEL1 IRQSEL0 SPICLK1 SPICLK0 D3 D2 HW_IRQ_EN LSBIT_1ST D1 D0 HW_INT BUSY Table 32: SPI Control Register 2 Bit assignments Bit Mnemonic Description D7-D6 IRQSEL IRQ Select – These bits select which IRQ will be asserted when a hardware interrupt from a connected SPI device occurs. The HW_IRQ_EN bit must be set to enable SPI IRQ functionality.
Interfaces and Connectors SPIDATA0 (READ/WRITE) 1DAh D7 D6 D5 D4 D3 D2 D1 MSbit D0 LSbit SPIDATA1 (READ/WRITE) 1DBh D7 D6 D5 D4 D3 D2 D1 MSbit D0 LSbit SPIDATA2 (READ/WRITE) 1DCh D7 D6 D5 D4 D3 D2 D1 MSbit D0 LSbit SPIDATA3 (READ/WRITE) 1DDh D7 MSbit D6 D5 D4 D3 D2 D1 D0 LSbit SPIDATA3 contains the most significant byte (MSB) of the SPI data word.
Interfaces and Connectors SPI “BIT BANG” MODE A special register is available at 1D7h, which enables the direct control (“bit banging”) of the SPI interface. To use this register, the SPI field (bits D6-D5) of the MODCON register (1DFh) must be set to 0h (see Table 44 for mode control settings).
Interfaces and Connectors PWM Outputs and TACH Inputs The EBX-22 incorporates three pulse width modulation (PWM) outputs and three tachometer (TACH) inputs which can be used, in a limited fashion, as general purpose frequency generators and counter/timers. The PWM output frequency options are: 11.0 Hz, 14.6 Hz, 21.9 Hz, 29.3 Hz, 35.2 Hz, 44.0 Hz, 58.6 Hz, 87.7 Hz, 15 kHz, 20 kHz, 25 kHz, and 30 kHz. The PWM duty cycle is user definable from 0% (1/256) to 100% (255/256) and also invertible.
Interfaces and Connectors ; ; ; ; MOV MOV OUT MOV IN OR OUT PWM 1 Configuration Register = 5Ch PWM 2 Configuration Register = 5Dh PWM 3 Configuration Register = 5Eh DX, AL, DX, DX, AL, AL, DX, C70h 5Ch AL C71h DX E0h AL ;PWM 1 Configuration Register ;Read Current Value ;Set Manual Mode ;Set Zone X Low Temp Limits to valid values (Required) ;All three must be set even if only one PWM is used...
Interfaces and Connectors OUT MOV IN AND OUT DX, DX, AL, AL, DX, AL C71h DX F1h AL ;Read Current Value ;Set to 14.
Interfaces and Connectors PC/104 Expansion Bus EBX-22 has limited support of the PC/104 bus. Most PC/104 cards will work, but be sure to check the requirements of your PC/104 card against the list below. PC/104 I/O SUPPORT The ISA I/O ranges listed below are supported. The I/O ranges allocated to COM ports 1-4 are available to ISA when the on-board COM port function is disabled in CMOS Setup.
System Resources and Maps 6 Memory Map The lower 1 MB memory map of the EBX-22 is arranged as shown in the following table. Table 35: Memory Map Start Address End Address Comment E0000h FFFFFh System BIOS D0000h DFFFFh PCI or ISA BIOS extensions or boot ROMS C0000h CFFFFh Video BIOS A0000h BFFFFh Video RAM 00000h 9FFFFh System RAM I/O Map The following table lists the common I/O devices in the EBX-22 I/O map.
System Resources and Maps Interrupt Configuration The EBX-22 has the standard complement of PC type interrupts. Four non-shared interrupts are routed to the PC/104 bus, and up to four IRQ lines can be allocated as needed to PCI devices. The following tables show the default and allowed interrupt settings. There are no interrupt configuration jumpers. All configuration is handled through CMOS Setup. If your design needs to use interrupt lines on the PC/104 bus, IRQ5 and IRQ10 are recommended.
Special Registers 7 Product ID and PLED Register PRODID (Read/Write) 1D0h D7 D6 D5 D4 D3 D2 D1 D0 PLED ID6 ID5 ID4 ID3 ID2 ID1 ID0 Table 39: PRODID Register Bit Assignments Bit Mnemonic D7 PLED D6-D0 ID Description Light Emitting Diode – Controls the programmable LED on connector J4. 0 = Turns LED off 1 = Turns LED on Product ID – These bits are hard-coded to represent the product ID. ID6 ID5 ID4 ID3 0 0 0 0 These bits are read-only.
Special Registers Revision and Type Register REVTYP (Read Only) 1D1h D7 D6 D5 D4 D3 D2 D1 D0 PLDREV4 PLDREV3 PLDREV2 PLDREV1 PLDREV0 EXTEMP PLDCUST PLDDEV This register is used to indicate the PLD revision level and model of the EBX-22. Table 40: REVTYP Register Bit Assignments Bit Mnemonic Description D7-D3 PLDREV PLD Revision Level – These bits represent the EBX-22 PLD revision level. Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PLD Revision Level 0 0 0 0 1 2.01 0 0 0 1 0 3.
Special Registers Jumper Status Register JSR (Read Only) 1D2h D7 D6 D5 D4 D3 D2 D1 D0 Reserved Reserved Reserved Reserved Reserved Reserved VB_SEL Reserved Table 41: JSR Register Bit Assignments Bit Mnemonic D7-D2 – D1 VB_SEL Description Reserved – These bits have no function. Video BIOS Selection – Indicates the status of jumper V6[3-4]. 0 = Jumper in, Primary Video BIOS selected 1 = Jumper out, Secondary Video BIOS selected This bit is read-only.
Special Registers IRQ and Resource ISA Routing Register IRQISA (Read/Write) 1DEh D7 D6 D5 D4 D3 D2 D1 D0 COM2 COM1 COM4 COM3 IRQ10 IRQ5 IRQ4 IRQ3 This register is used to allow IRQs to be routed across the ISA bridge.
Special Registers Mode Control Register MODCON (Read/Write) 1DFh D7 D6 D5 D4 D3 D2 D1 D0 Reserved SPI1 SPI0 DIO1 DIO0 Reserved ADC1 ADC0 This register is used to set the mode of the analog input, digital I/O, and SPI interfaces. Table 44: MODCON Register Bit Assignments Bit Mnemonic D7 D6-D5 – SPI D4-D3 DIO D2 D1-D0 – ADC EBX-22 Reference Manual Description Reserved – This bit has no function. SPI Mode Control – These bits set the mode of the general purpose I/O function.
Appendix A – References CPU VIA Eden VIA Eden Datasheet Chipset VIA CX700 CX700 Datasheet Ethernet Controller Intel 82551ER Intel Corporation PC/104 Specification PC/104 Resource Guide PC/104 Consortium PC/104-Plus Specification PC/104 Resource Guide VersaLogic Corporation General PC Documentation The Programmer’s PC Sourcebook Microsoft Press General PC Documentation The Undocumented PC Powell’s Books EBX-22 Reference Manual A 77