Z-World Fox LP3500 User Manual

C-programmable single-board computer
Table of Contents

Advertisement

Quick Links

Fox (LP3500)
C-Programmable Single-Board Computer
User's Manual
019–0111 • 041029–E

Advertisement

Table of Contents
loading

Summary of Contents for Z-World Fox LP3500

  • Page 1 Fox (LP3500) C-Programmable Single-Board Computer User’s Manual 019–0111 • 041029–E...
  • Page 2 Z-World reserves the right to make changes and improvements to its products without providing notice. Trademarks Rabbit and Rabbit 3000 are registered trademarks of Rabbit Semiconductor. Dynamic C is a registered trademark of Z-World Inc. Z-World, Inc. 2900 Spafford Street Davis, California 95616-6800...
  • Page 3: Table Of Contents

    ABLE OF ONTENTS Chapter 1. Introduction 1.1 LP3500 Description ..........................1 1.2 LP3500 Features ...........................2 1.3 Optional Add-Ons..........................3 1.4 Development and Evaluation Tools......................4 1.4.1 Tool Kit ............................4 1.4.2 Software ............................5 1.5 CE Compliance .............................6 1.5.1 Design Guidelines .........................7 1.5.2 Interfacing the LP3500 to Other Devices ..................7 Chapter 2.
  • Page 4 4.2 Programming Cable..........................37 4.2.1 Switching Between Program Mode and Run Mode ..............37 4.2.2 Detailed Instructions: Changing from Program Mode to Run Mode ......... 37 4.2.3 Detailed Instructions: Changing from Run Mode to Program Mode ......... 37 4.3 Sample Programs..........................38 4.3.1 Power Modes ..........................
  • Page 5 Appendix E. Power Management E.1 External Power Supply ........................119 E.2 Batteries and External Battery Connections..................121 E.2.1 Replacing the Backup Battery ....................122 E.2.2 Power to VRAM Switch......................122 E.2.3 Reset Generator ........................123 E.3 Chip Select Circuit ...........................123 Appendix F. Programming Cable Appendix G. Running a Sample Program Notice to Users Index Schematics...
  • Page 6 Fox (LP3500)
  • Page 7: Chapter 1. Introduction

    1. I NTRODUCTION The LP3500 is a low-power single-board computer with built-in analog and digital I/O. Although the LP3500 was designed spe- cifically for low-power applications and data logging, it has a host of features that make it attractive for other applications as well.
  • Page 8: Lp3500 Features

    1.2 LP3500 Features ® • Rabbit 3000 microprocessor operating at up to 7.4 MHz. • 512K/128K static RAM and 512K/256K flash memory options. • 26 digital I/O: 16 protected digital inputs and 10 high-current digital outputs provide sinking and sourcing outputs. •...
  • Page 9: Optional Add-Ons

    Further details on the Prototyping Board, the plastic enclosure, and the LCD/keypad mod- ule are provided in Appendix B, Appendix C, and Appendix D. Visit Z-World’s Web site for up-to-date information about additional add-ons and features as they become available. The Web site also has the latest revision of this user’s manual and schematics.
  • Page 10: Development And Evaluation Tools

    1.4 Development and Evaluation Tools 1.4.1 Tool Kit A Tool Kit contains the hardware essentials you will need to develop applications with the LP3500 single-board computer. The items in the Tool Kit and their use are as follows. • LP3500 User’s Manual with schematics (this document). •...
  • Page 11: Software

    1.4.2 Software The LP3500 is programmed using version 7.26P or later of Z-World’s Dynamic C. A com- Library functions provide an easy-to-use patible version is included on the Tool Kit CD-ROM. interface for the LP3500. Software drivers for digital and analog I/O, and for serial com- munication are included with Dynamic C.
  • Page 12: Ce Compliance

    1.5 CE Compliance Equipment is generally divided into two classes. CLASS A CLASS B Digital equipment meant for light industrial use Digital equipment meant for home use Less restrictive emissions requirement: More restrictive emissions requirement: less than 40 dB µV/m at 10 m 30 dB µV/m at 10 m or 100 µV/m (40 dB relative to 1 µV/m) or 300 µV/m These limits apply over the range of 30–230 MHz.
  • Page 13: Design Guidelines

    • When connecting the LP3500 to outdoor cables, the customer is responsible for provid- ing CE-approved surge/lightning protection. • Z-World recommends placing digital I/O or analog cables that are 3 m or longer in a metal conduit to assist in maintaining CE compliance and to conform to good cable design practices.
  • Page 14 Fox (LP3500)
  • Page 15: Chapter 2. Getting Started

    2. G ETTING TARTED Chapter 2 explains how to connect the programming cable and power supply to the LP3500. 2.1 LP3500 Connections 1. Use the 4-40 screws supplied with the Tool Kit to attach the metal stand-offs to your LP3500 series board as shown in Figure 2. RELAY C55 R44 RP13...
  • Page 16 3. Attach the LP3500 main board to the Prototyping Board as shown in Figure 3. Press the headers on the LP3500 series board firmly into the corresponding header sock- ets located at J1, J2, and J4 on the Prototyping Board. NOTE: It is important that you line up the header pins on the LP3500 exactly with the header sockets J1, J2, and J4 corresponding...
  • Page 17 LP3500. NOTE: Use only the programming cable that has a red shrink wrap around the RS-232 level converter (Z-World part number 101-0276), which is supplied with the LP3500 Tool Kit. Other Z-World programming cables might not be voltage-compatible or their connector sizes may be different.
  • Page 18 5. Connect the power supply. Hook up the connector from the wall transformer to header J5 on the Prototyping Board as shown in Figure 4. The orientation of this connector is not important since the VIN (posi- tive) voltage is the middle pin, and GND is available on both ends of the three-pin header NOTE: Do not connect the AC adapter to the VBAT terminal on the Prototyping Board.
  • Page 19: Remove Battery Tab

    EXT GND VIN GND Figure 6. Remove Battery Tab NOTE: Z-World recommends that the battery tab not be removed until you are ready to place the LP3500 in normal service with regular power connected to header J3. The backup battery protects the contents of the SRAM and keeps the real-time clock running when regular power to the LP3500 is interrupted.
  • Page 20: Installing Dynamic C

    2.3 Installing Dynamic C If you have not yet installed Dynamic C version 7.26P (or a later version), do so now by inserting the Dynamic C CD in your PC’s CD-ROM drive. The CD will auto-install unless you have disabled auto-install on your PC. If the CD does not auto-install, click from the Windows button and...
  • Page 21: Pong.c

    This program shows that the CPU is working. 2.6 Where Do I Go From Here? NOTE: If you purchased your LP3500 through a distributor or Z-World partner, contact the distributor or Z-World partner first for technical support. If there are any problems at this point: •...
  • Page 22 Fox (LP3500)
  • Page 23: Chapter 3. Subsystems

    3. S UBSYSTEMS Chapter 3 describes the principal subsystems for the LP3500. • Power Modes • Digital I/O • Serial Communication • A/D Converter Inputs (LP3500 only) • PWM Outputs • Relay Output Circuit (LP3500 only) • Memory Figure 7 shows these Rabbit-based subsystems designed into the LP3500. Programming Digital Port...
  • Page 24: Lp3500 Pinouts

    3.1 LP3500 Pinouts The LP3500 pinouts are shown in Figure 8. 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 AIN0 AIN1 AIN2 AIN3 AIN4 RxC/CTS AIN5 TxC/RTS AIN6 AIN7 PWM0 PWM1 RS-485+ PWM2 RS-485–...
  • Page 25: Power Modes

    3.2 Power Modes See note User’s Manual...
  • Page 26: Setting The Power-Save Mode

    Table 2 lists the power modes based on clock frequency that can be defined in software using the function. powerMode The LP3500 can operate at various power levels, depending on the clock frequency and on which subsystems on the board are turned off using the function.
  • Page 27: Operating In The Power-Save Mode

    3.2.2 Operating in the Power-Save Mode VIN may be removed to allow the LP3500 to operate using the external battery once the LP3500 is in Mode 10. At this point, the LP3500 will draw 200 µA after the subsystems listed in Table 3 are turned off. The LP3500’s linear regulator may then be turned off using function call, and this will lower the current draw to 100 µA.
  • Page 28: Digital I/O

    3.3 Digital I/O 3.3.1 Digital Inputs The LP3500 has 16 digital inputs, IN00–IN15. The inputs are factory-configured to be pulled up to +K in banks of eight, but they can also be pulled up to Vcc or down to 0 V in banks of eight by changing a surface-mounted 0 Ω...
  • Page 29: Digital Outputs

    3.3.2 Digital Outputs The LP3500 has 10 digital outputs: OUT0–OUT7 can each sink up to 200 mA, and OUT8–OUT9 can each source up to 200 mA at 36 V. Figure 11 shows a wiring diagram for using the digital outputs in a sinking or a souring configuration. 1 MW Figure 11.
  • Page 30 When the LP3500 is connected to the Proto- typing Board, a 0 Ω resistor on the Prototyp- ing Board (R1) ties +K to VIN, the raw DC input voltage. Figure 12 shows the location of this 0 Ω resistor on the Prototyping Board. NOTE: R1 on the Prototyping Broad must be removed to avoid damage to the power supplies if you are using the...
  • Page 31: Serial Communication

    3.4 Serial Communication The LP3500 has three RS-232 serial ports that can set using the software function serMode call as one RS-232 serial channel (with RTS/CTS) and one 3-wire channel, or they may be set as three RS-232 (3-wire) channels. Table 4 summarizes the options. Table 4.
  • Page 32: Rs-232

    3.4.1 RS-232 The LP3500 RS-232 serial communication is supported by an RS-232 transceiver. This trans- ceiver provides the voltage output, slew rate, and input voltage immunity required to meet the RS-232 serial communication protocol. Basically, the chip translates the Rabbit 3000’s logic-level signals to RS-232 signal levels.
  • Page 33 Ground recommended 485+ 485– OUT9 DISPLAY DISPLAY Figure 13. LP3500 Multidrop Network Zener diodes are used in lieu of termination and bias resistors to minimize power con- sumption. User’s Manual...
  • Page 34: Serial Interface Port

    3.4.3 Serial Interface Port The LP3500 offers a Serial Interface port at header J6, a 2 mm 2 × 5 socket. This port may be used to connect serial logic-level devices such as Z-World’s PIO_2 PF2_SRST serial flash expansion cards to Serial Port D on the...
  • Page 35: Display Interface

    3.5 Display Interface The LP3500 supports an interface with the parallel ports on the Rabbit 3000 via the Display Interface at header J9. The Display Interface may be used with Z-World’s BFD6 BFD7 LCD/keypad module, which offers an operator interface...
  • Page 36: A/D Converter Inputs (Lp3500 Only)

    3.6 A/D Converter Inputs (LP3500 only) The single 8-channel A/D converter chip used in the LP3500 (the LP3510 does not have analog capabilities) has a resolution of 12 bits for differential measurements or 11 bits for single-ended measurements. Four of the channels can be jumpered individually for 4–20 mA using jumpers across pins on header J3, and all 8 channels can be used over several software-scaled voltage ranges.
  • Page 37 Single-ended measurements are made by connecting the analog signal between an analog input channel (AIN0–AIN7) and AGND. Differential measurements are made by connect- ing a pair of differential analog signals to an adjacent pair of analog input channels (AIN0–AIN1, …, AIN6–AIN7). The A/D converter is only capable of converting positve voltages, and so will convert the difference between an adjacent pair of input channels, and must be scaled for a voltage range appropriate for the voltage differences.
  • Page 38: Pwm Outputs

    3.7 PWM Outputs The D/A conversion outputs are pulse-width modulated and scaled to provide an output from 0 V to Vcc (approx. 2.8 V). Figure 17 shows the PWM outputs. 1 kW PWM0 PWM1 Rabbit 3000 ™ 1 nF Microprocessor Figure 17.
  • Page 39: Relay Output Circuit (Lp3500 Only)

    3.8 Relay Output Circuit (LP3500 only) A bistable relay is stuffed on LP3500 models only at position K1, and the relay contacts are accessed via screw-terminal header J8. The relay can switch up to 1 A at 30 V DC. The relay is set via Parallel Port PG4 on the Rabbit 3000, and is reset via Parallel Port PG5 by a 10 ms pulse.
  • Page 40: Memory

    TSOP case. The standard LP3500 modules comes with two 256K flash memory chips. NOTE: Z-World recommends that any customer applications should not be constrained by the sector size of the flash memory since it may be necessary to change the sector size in the future.
  • Page 41: Chapter 4. Software

    Dynamic C is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with Z-World single-board computers and other devices based on the Rabbit microprocessor. Chapter 4 provides the libraries, function calls, and sample pro- grams related to the LP3500.
  • Page 42: Upgrading Dynamic C

    The default installation of a patch or bug fix is to install the file in a directory (folder) dif- ferent from that of the original Dynamic C installation. Z-World recommends using a dif- ferent directory so that you can verify the operation of the patch without overwriting the existing Dynamic C installation.
  • Page 43: Programming Cable

    4.2 Programming Cable The programming cable has a level converter board in the middle of the cable since the LP3500 programming port supports CMOS logic levels, and not the higher voltage RS-232 levels that are used by PC serial ports. When the programming cable is connected, Dynamic C running on the PC can hard-reset the LP3500 and cold-boot it.
  • Page 44: Sample Programs

    4.3 Sample Programs Sample programs are provided in the Dynamic C folder. The sample program Samples demonstrates the output to the window. STDIO PONG.C The various directories in the folder contain specific sample programs that illus- Samples trate the use of the corresponding Dynamic C libraries. folder provides sample programs specific to the LP3500.
  • Page 45: Serial Communication

    4.3.3 Serial Communication The following sample programs are found in the subdirectory in RS232 SAMPLES\LP3500 —This program demonstrates basic initialization for a simple RS-232 • SIMPLE3WIRE.C 3-wire loopback displayed in the window. STDIO The following sample programs are found in the subdirectory in RS485 SAMPLES\LP3500...
  • Page 46: Pwm Outputs

    4.3.5 PWM Outputs The following sample program is found in the subdirectory in SAMPLES\LP3500 —This program demonstrates the PWM functions. It will set the PWM chan- • PWMOUT.C nels, PWM0–PWM2, to the following duty cycles: PWM Channel 0 to 10% PWM Channel 1 to 25% PWM Channel 2 to 50% All activity will be displayed in the...
  • Page 47: Lcd/Keypad Module Sample Programs

    —This sample program demonstrates how to recalibrate one A/D con- • AD_CALMA_CH.C verter channel operating in the 4–20 mA current mode using two known currents to generate two coefficients, gain and offset, which are rewritten into the user block data area.
  • Page 48: Lp3500 Libraries

    4.4 LP3500 Libraries With Dynamic C running, click File > Open , and select . The following list of Dynamic C libraries and library directories will be displayed. Two library directories provide libraries of function calls that are used to develop applica- tions for the LP3500.
  • Page 49: Lp3500 Function Apis

    4.5 LP3500 Function APIs 4.5.1 LP3500 Power Modes int devPowerSet(int devices, int state); Sets individual devices to low-power or fully active states in the order listed below. PARAMETERS devices is a list of the following macros, which are OR'ed together, that will be affected by the state parameter, e.g., RS232DEV|ADCDEV.
  • Page 50 int powerMode(int mode); Sets the LP3500 operating power. PARAMETERS mode is the operating mode based on the following macros. Typical Current Debug Mode Description Consumption Capable? CCLK = PCLK = MainOsc = 7.3728 MHz CCLK = PCLK = MainOsc/2 = 3.6864 MHz CCLK = PCLK = MainOsc/4 = 1.8423 MHz 5–16 mA CCLK = PCLK = MainOsc/6 = 1.2288 MHz...
  • Page 51 void serCommAlert(int lowpowermode, int maxpowermode, int powersource, unsigned long timeout); Use this function to poll Serial Port E for any activity or until a timeout occurs. The function call forces the LP3500 to enter the low-power mode using the battery for polling. Upon expiration of the timeout or the receipt of a serial byte, this function will enable the normal power mode and exit.
  • Page 52 void digInAlert(int channel, int value, int lowpowermode, int maxpowermode, int powersource, unsigned long timeout) Use this function to poll a selected digital input until a timeout occurs. The function call forces the LP3500 to enter the low-power mode using the battery for polling. Upon activation of the channel or expiration of the timeout, this function will enable the normal power mode and exit.
  • Page 53: Board Initialization

    4.5.2 Board Initialization void brdInit (void); Call this function at the beginning of your program. This function initializes the system I/O ports and loads all the A/D converter and D/A converter calibration constants from flash memory into SRAM for use by your program. If the LCD/keypad module is installed, this function will turn off LED DS1 to indi- cate that the initialization was successful.
  • Page 54: Digital I/O

    4.5.3 Digital I/O void digOut(int channel, int value); OUT0–OUT9) Sets the state of a digital output ( Remember to call brdInit before executing this function. A runtime error will occur for the following conditions: 1. channel or value out of range. 2.
  • Page 55 int digIn(int channel); Reads the state of an input channel (IN00–IN15). A run-time error will occur for the following conditions: 1. channel out of range. 2. brdInit was not executed before executing digIn. PARAMETER channel is the input channel number (0–15) RETURN VALUE The logic state of the input (0 or 1).
  • Page 56: Serial Communication

    4.5.4 Serial Communication Library files included with Dynamic C provide a full range of serial communications sup- port. The library provides a set of circular-buffer-based serial functions. The RS232.LIB library provides packet-based serial functions where packets can be delim- PACKET.LIB ited by the 9th bit, by transmission gaps, or with user-defined special characters.
  • Page 57 void ser485Tx(void); Enables the RS-485 transmitter. Transmitted data get echo'ed back into the receive data buffer. These echo'ed data could be used to know when to disable the transmitter by using one of the following methods: Byte mode—disable the transmitter after the same byte that is transmitted is detected in the receive data buffer.
  • Page 58: A/D Converter Inputs

    4.5.5 A/D Converter Inputs The functions in this section apply only to the LP3500 model. unsigned int anaInConfig(unsigned int instructionbyte, unsigned int cmd, long baud); Use this function to configure the ADS7870 A/D converter. This function will address the ADS7870 in Register Mode only, and will report an error if you try to use it in Direct Mode.
  • Page 59 PARAMETERS instructionbyte will initiate a read or write operation at 8 or 16 bits on the designated register address, for example: checkid = anaInConfig(0x5F, 0, 9600); read ID and set baud rate cmd is the command data that configure the registers addressed by the instruction byte. Enter 0 if per- forming a read operation.
  • Page 60 unsigned int anaInDriver(unsigned int cmd, unsigned int len); Reads the voltage of an analog input channel by serial-clocking an 8-bit command to the ADS7870 device by its Direct Mode method. The conversion begins as soon as the last data bit is transferred. An exception error will occur if Direct Mode bit D7 is not set.
  • Page 61 RETURN VALUE A value corresponding to the voltage on the analog input channel, which will be: 0–2047 for 11-bit A/D conversions (bit 12 for sign) -1 for overflow SEE ALSO anaInConfig, anaIn User’s Manual...
  • Page 62 int anaIn(unsigned int channel, int opmode, int gaincode); Reads the value of an analog input channel using the direct method of addressing the ADS7870 A/D converter. PARAMETERS channel is the analog input channel number (0 to 7) corresponding to AIN0–AIN7 opmode is the mode of operation: SINGLE—single-ended input line DIFF—differential input line...
  • Page 63 int anaInCalib(int channel, int opmode, int gaincode, int value1, float volts1, int value2, float volts2); Calibrates the response of the A/D converter channel as a linear function using the two conversion points provided. Four values are calculated and placed into global table _adcCalib to be stored later store into simulated EEPROM using the function anaInEEWr().
  • Page 64 gaincode is the gain code of 0 to 7: Voltage Gain Code Range 0–20 V 0–10 V 0–5 V 0–4 V 0–2.5 V 0–2 V 0–1.25 V 0–1 V value1 is the first A/D converter channel value (0–2047). volts1 is the voltage or current corresponding to the first A/D converter channel value (0 to +10 V or 4 to 20 mA).
  • Page 65 float anaInVolts(unsigned int channel, unsigned int gaincode); Reads the state of a single-ended analog input channel and uses the previously set calibration constants to convert it to volts. PARAMETER channel is the channel number (0–7): Single-Ended Channel Code Input Lines +AIN0 +AIN1 +AIN2...
  • Page 66 int anaInmAmps(unsigned int channel); Reads the state of an analog input channel and uses the previously set calibration constants to convert it to current. PARAMETER channel is 0–3: 4–20 mA Channel Input Lines AIN0 AIN1 AIN2 AIN3 * Negative input is ground. RETURN VALUE A current value between 4.00 and 20.00 mA corresponding to the current on the analog input channel.
  • Page 67 float anaInDiff(unsigned int channel, unsigned int gaincode); Reads the state of a differential analog input channel and uses the previously set calibration constants to convert it to volts. PARAMETER channel is the channel number (0, 2, 4, 6): Differential Channel Input Lines +AIN0 -AIN1 +AIN2 -AIN3...
  • Page 68 int anaInEERd(unsigned int channel, int opmode, unsigned int gaincode); Reads the calibration constants, gain, and offset for an input based on its designated channel code posi- tion into global table _adcCalib. The constants are stored in the the top 1K of the reserved user block memory area 0x1C00–0x1FFF.
  • Page 69 int anaInEEWr(unsigned int channel, int opmode unsigned int gaincode); Writes the calibration constants, gain, and offset for an input based on its designated channel code posi- tion from global table _adcCalib. The constants are stored in the the top 1K of the reserved user block memory area 0x1C00–0x1FFF.
  • Page 70: Vcc Monitoring (Lp3500 Only)

    4.5.6 Vcc Monitoring (LP3500 only) void VccMonitorInit(int state); PIO3 on the ADS7870 A/D converter enables or disables Vcc monitoring. If monitoring is enabled, ana- log input channel AIN7 is not available. PARAMETER state 1 = enable Vcc monitor 0 = disable Vcc monitor SEE ALSO VccMonitor, anaInConfig, brdInit float VccMonitor(void);...
  • Page 71: Pwm Outputs

    4.5.7 PWM Outputs The PWM functions in this section can be used to operate the analog outputs on the LP3500 model. int pwmOutConfig(unsigned long frequency); Sets the base frequency for the PWM pulses and enables the PWM driver on all four channels. The base frequency is the frequency without pulse spreading.
  • Page 72: Relay Output (Lp3500 Only)

    4.6 Relay Output (LP3500 only) int relayOut(int relay, int value) A 10 ms low-to-high pulse sets the state of a relay. On power-up or brdInit() the relay contact will go to the normally closed (NC) RESET contact. PARAMETERS relay 0 = the one relay value is a value used to connect the relay common contact: 0 = relay normally closed (NC or RESET) (Parallel Port PG5) 1 = relay normally open (NO or SET) (Parallel Port PG4)
  • Page 73: Appendix A. Lp3500 Specifications

    A. LP3500 S PPENDIX PECIFICATIONS Appendix A provides the specifications for the LP3500, and describes the conformal coating. User’s Manual...
  • Page 74: Electrical And Mechanical Characteristics

    A.1 Electrical and Mechanical Characteristics Figure A-1 shows the mechanical dimensions for the LP3500. 0.120 dia (3.05) RELAY C55 R44 RP13 C50 R36 R40 C54 RESET R20 R25 AIN0 AIN1 AIN2 AIN3 PROGRAM PORT VBAT AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 GND EXT GND VIN GND 0.29 2.84...
  • Page 75 Table A-1 lists the electrical, mechanical, and environmental specifications for the LP3500. Table A-1. LP3500 Specifications Feature LP3500 LP3510 Microprocessor Rabbit 3000® at up to 7.4 MHz EMI Reduction Spectrum spreader for ultra-low EMI (radiated emissions) Flash Memory 512K (2 × 256K) 256K SRAM 512K...
  • Page 76 Table A-1. LP3500 Specifications (continued) Feature LP3500 LP3510 6 shared high-speed, CMOS-compatible ports: • 1 RS-485 • 3 RS-232 (one 5-wire and one 3-wire or three 3-wire), jumper option for Serial Ports logic-level outputs; one RS-232 port needs to have wake-up capability •...
  • Page 77: Exclusion Zone

    A.1.1 Exclusion Zone It is recommended that you allow for an “exclusion zone” of 0.25" (6 mm) around the LP3500 in all directions when the LP3500 is incorporated into an assembly that includes other printed circuit boards. This “exclusion zone” that you keep free of other components and boards will allow for sufficient air flow, and will help to minimize any electrical or electromagnetic interference between adjacent boards.
  • Page 78: Headers

    A.1.2 Headers The LP3500 uses 0.1" IDC headers at J1–J4 for physical connection to other boards. J5, the programming port, is a 2 × 5 header with a 2 mm pin spacing. Figure A-3 shows the LP3500 footprint. These values are relative to the mounting hole. PROGRAM PORT 0.100...
  • Page 79: Conformal Coating

    A.2 Conformal Coating The areas around the 32 kHz real-time clock crystal oscillator has had the Dow Corning silicone-based 1-2620 conformal coating applied. The conformally coated area is shown in Figure A-4. The conformal coating protects these high-impedance circuits from the effects of moisture and contaminants over time.
  • Page 80: Jumper Configurations

    A.3 Jumper Configurations Figure A-5 shows the header locations used to configure the various LP3500 options via jumpers. IN00 IN01 IN02 IN03 IN04 IN05 IN06 IN07 IN08 IN09 IN10 JP13 IN11 IN12 IN13 IN14 4–20 mA IN15 PROGRAM PORT VBAT Figure A-5.
  • Page 81 Table A-2 lists the configuration options. Table A-2. LP3500 Jumper Configurations Factory Header Description Pins Connected Default × None Voltage Option 1–2 AIN0 4–20 mA Option A/D Converter Voltage/Current 3–4 AIN1 4–20 mA Option Measurement Options 5–6 AIN2 4–20 mA Option 7–8 AIN3 4–20 mA Option ×...
  • Page 82 Table A-2. LP3500 Jumper Configurations (continued) Factory Header Description Pins Connected Default × JP11 Manufacturing Use 1–2 × JP12 Manufacturing Use 1–2 × JP13 Manufacturing Use 1–2 NOTE: The jumper connections on header J3 are made using standard slip-on jumpers. All other jumper connections except those across JP11 and JP12 are made using 0 Ω...
  • Page 83: Use Of Rabbit 3000 Parallel Ports

    A.4 Use of Rabbit 3000 Parallel Ports Figure A-6 shows the Rabbit 3000 parallel ports. PD0–PD7 PB0–PB5 PB6–PB7 PA0–PA7 Port D Port A Port B PE0–PE1, PE4–PE5 Port E PC0, PC2, PC4 Port C PE2–PE3, PE6–PE7 (Serial Ports B,C & D) PC1, PC3, PC5 PF1–PF2 Port F...
  • Page 84 Table A-3. Use of Rabbit 3000 Parallel Ports (continued) Port Signal Output Function State Input IN05 Pulled up Input IN06 Pulled up Input IN07 Pulled up Output LCD Buffer Enable Inactive high Output Serial Device Select Inactive high Output TXD Serial Device Int. Inactive high Serial Port D Input...
  • Page 85 Table A-3. Use of Rabbit 3000 Parallel Ports (continued) Port Signal Output Function State Output ADC Serial Clock Inactive high Input ADC Busy Inactive low Input Not used Pulled up Output ADC Device Select Inactive high Output PWM0 Inactive high Output PWM1 Inactive high...
  • Page 86 Fox (LP3500)
  • Page 87: Appendix B. Prototyping Board

    B. P PPENDIX ROTOTYPING OARD Appendix B describes the features and accessories of the Proto- typing Board included with the LP3500 Tool Kit, and explains the use of the Prototyping Board to demonstrate the LP3500 and to build prototypes of your own circuits. The screw-terminal headers on the Prototyping Board facilitate access to the LP3500 connector pins, and the Prototyping Board is available for purchase separately.
  • Page 88: Mechanical Dimensions And Layout

    B.1 Mechanical Dimensions and Layout Figure B-1 shows the mechanical dimensions and layout for the LP3500 Prototyping Board. 3 V VBAT + 485 – OUT9 OUT8 OUT7 OUT6 OUT5 OUT4 OUT3 OUT2 OUT1 OUT0 4.14 (105) Figure B-1. LP3500 Prototyping Board Dimensions Table B-1 lists the electrical, mechanical, and environmental specifications for the Proto- typing Board.
  • Page 89: Using The Prototyping Board

    B.2 Using the Prototyping Board B.2.1 Interface to LP3500 The Prototyping Board serves as a convenient interface for the LP3500, extending the IDC headers to convenient screw-terminal connectors, and provides interfaces to the AC adapter included with the Tool Kit and to a user-supplied external battery. Figure B-2 shows the pinouts for the Prototyping Board.
  • Page 90: Demonstration Board

    B.2.2 Demonstration Board The Prototyping Board is actually both a demonstration board and a prototyping board. As a demonstration board, it can be used to demonstrate the functionality of the LP3500 right out of the box without any modifications to either board. There are no jumpers or dip switches to configure or misconfigure on the Prototyping Board so that the initial setup is very straightforward.
  • Page 91: Appendix C. Lcd/Keypad Module

    Figure C-1. LCD/Keypad Modules Models LCD/keypad modules sold prior to the launch of the LP3500 might not be voltage- compatible with the LP3500. Contact your Z-World sales representative or your authorized Z-World distributor for further assistance in purchasing an LCD/keypad module.
  • Page 92 Table C-1 lists the electrical, mechanical, and environmental specifications for the LCD/keypad module. Table C-1. LCD/Keypad Specifications Parameter Specification 2.60" × 3.00" × 0.75" Board Size (66 mm × 76 mm × 19 mm) 4.50" × 3.60" × 0.30" Bezel Size (114 mm ×...
  • Page 93: Contrast Adjustment

    C.2 Contrast Adjustment Depending on when you acquired your LCD/keypad module, you will be able to set the contrast on the LCD display by adjusting the potentiometer at R2 or by setting the voltage for 2.8 V by setting the jumper across pins 1–2 on header J5 as shown in Figure C-3. Only one of these two options is available on a given LCD/keypad module Pins Factory...
  • Page 94: Keypad Labeling

    C.3 Keypad Labeling The keypad may be labeled according to your needs. A template is provided in Figure C-4 to allow you to design your own keypad label insert. 1.10 (28) 2.35 (60) Figure C-4. Keypad Template To replace the keypad legend, remove the old legend and insert your new legend prepared according to the template in Figure C-4.
  • Page 95: Header Pinouts

    C.4 Header Pinouts Figure C-6 shows the pinouts for the LCD/keypad module. Figure C-6. LCD/Keypad Module Pinouts NOTE: Note that there are no connections from headers J2 and J3 of the LCD/keypad module to the LP3500. These headers interface to the keypad and to the LEDs on the LCD/keypad module, and need to be interfaced to the digital I/O on the LP3500 if you need keypad or LED functionality.
  • Page 96: Bezel-Mount Installation

    C.5 Bezel-Mount Installation This section describes and illustrates how to bezel-mount the LCD/keypad module. Follow these steps for bezel-mount installation. 1. Cut mounting holes in the mounting panel in accordance with the recommended dimen- sions in Figure C-7, then use the bezel faceplate to mount the LCD/keypad module onto the panel.
  • Page 97 3. Fasten the unit with the four 4-40 screws and washers included with the LCD/keypad module. If your panel is thick, use a 4-40 screw that is approximately 3/16" (5 mm) longer than the thickness of the panel. DISPLAY BOARD Figure C-8.
  • Page 98: Connect The Lcd/Keypad Module To Your Lp3500

    Note the locations and connections relative to pin 1 on both the LP3500 and the LCD/key- pad module. Z-World offers two different lengths of ribbon cable–5" (127 mm) and 2 ft. (60 cm). Contact your authorized Z-World distributor or a Z-World sales representative at +1(530)757-3737 for more information.
  • Page 99: Lcd/Keypad Module Function Apis

    C.7 LCD/Keypad Module Function APIs The LCD/keypad module is normally off. Add the function call after devPowerSet to turn on the LCD/keypad buffers. brdInit brdInit(); // Initialize the LP3500 devPowerSet(DISPDEV, 1); // Enable LCD/keypad buffer C.7.1 LEDs When power is applied to the LCD/keypad module for the first time, the red LED (DS1) will come on, indicating that power is being applied to the LCD/keypad module.
  • Page 100: Lcd Display

    C.7.2 LCD Display The functions used to control the LCD display are contained in the library GRAPHIC.LIB located in the Dynamic C library directory. When x and y coordi- DISPLAYS\GRAPHIC nates on the display screen are specified, x can range from 0 to 121, and y can range from 0 to 31.
  • Page 101 void glSetContrast(unsigned level); Sets display contrast. NOTE: This function is not used with the LCD/keypad module since the support circuits are not available on the LCD/keypad module. void glFillScreen(char pattern); Fills the LCD display screen with a pattern. PARAMETER The screen will be set to all black if pattern is 0xFF, all white if pattern...
  • Page 102 void glPlotVPolygon(int n, int *pFirstCoord); Plots the outline of a polygon in the LCD page buffer, and on the LCD if the buffer is unlocked. Any portion of the polygon that is outside the LCD display area will be clipped. If fewer than 3 vertices are specified, the function will return without doing anything.
  • Page 103 void glFillVPolygon(int n, int *pFirstCoord); Fills a polygon in the LCD page buffer and on the LCD screen if the buffer is unlocked. Any portion of the polygon that is outside the LCD display area will be clipped. If fewer than 3 vertices are specified, the function will return without doing anything.
  • Page 104 void glPlotCircle(int xc, int yc, int rad); Draws the outline of a circle in the LCD page buffer and on the LCD if the buffer is unlocked. Any por- tion of the circle that is outside the LCD display area will be clipped. PARAMETERS is the x coordinate of the center of the circle.
  • Page 105 void glXFontInit(fontInfo *pInfo, char pixWidth, char pixHeight, unsigned startChar, unsigned endChar, unsigned long xmemBuffer); Initializes the font descriptor structure, where the font is stored in xmem PARAMETERS *pInfo is a pointer to the font descriptor to be initialized. pixWidth is the width (in pixels) of each font item. pixHeight is the height (in pixels) of each font item.
  • Page 106 void glPutFont(int x, int y, fontInfo *pInfo, char code); Puts an entry from the font table to the page buffer and on the LCD if the buffer is unlocked. Each font character's bitmap is column major and byte-aligned. Any portion of the bitmap character that is outside the LCD display area will be clipped.
  • Page 107 void glPutChar(char ch, char *ptr, int *cnt, glPutCharInst *pInst) STDIO Provides an interface between the string-handling functions and the graphic library. The STDIO string-formatting function will call this function, one character at a time, until the entire format- ted string has been parsed. Any portion of the bitmap character that is outside the LCD display area will be clipped.
  • Page 108 void glBuffLock(void); Increments LCD screen locking counter. Graphic calls are recorded in the LCD memory buffer and are not transferred to the LCD if the counter is non-zero. NOTE: glBuffLock() and glBuffUnlock() can be nested up to a level of 255, but be sure to balance the calls.
  • Page 109 int glGetBrushType(void); Gets the current method (or color) of pixels drawn by subsequent graphic calls. RETURN VALUE The current brush type. SEE ALSO glSetBrushType void glPlotDot(int x, int y); Draws a single pixel in the LCD buffer, and on the LCD if the buffer is unlocked. If the coordinates are outside the LCD display area, the dot will not be plotted.
  • Page 110 void glLeft1(int left, int top, int cols, int rows); Scrolls byte-aligned window left one pixel, right column is filled by current pixel type (color). PARAMETERS left is the top left corner of bitmap, must be evenly divisible by 8, otherwise truncates. is the top left corner of the bitmap.
  • Page 111 void glDown1(int left, int top, int cols, int rows); Scrolls byte-aligned window down one pixel, top column is filled by current pixel type (color). PARAMETERS left is the top left corner of bitmap, must be evenly divisible by 8, otherwise truncates. is the top left corner of the bitmap.
  • Page 112 void glVScroll(int left, int top, int cols, int rows, int nPix); Scrolls up or down, within the defined window by x number of pixels. The opposite edge of the scrolled window will be filled in with white pixels. The window must be byte-aligned. Parameters will be verified for the following: left cols...
  • Page 113 void glXPutFastmap(int left, int top, int width, int height, unsigned long bitmap); xmem Draws bitmap in the specified space. The data for the bitmap are stored in . This function is like glXPutBitmap , except that it is faster. The restriction is that the bitmap must be byte-aligned. Any portion of a bitmap image or character that is outside the LCD display area will be clipped.
  • Page 114 void TextGotoXY(windowFrame *window, int col, int row); Sets the cursor location to display the next character. The display location is based on the height and width of the character to be displayed. NOTE: Execute the TextWindowFrame function before using this function. PARAMETERS *window is a pointer to a font descriptor.
  • Page 115 void TextPutChar(struct windowFrame *window, char ch); Displays a character on the display where the cursor is currently pointing. If any portion of a bitmap character is outside the LCD display area, the character will not be displayed. The cursor increments its position as needed.
  • Page 116: Keypad

    C.7.3 Keypad The functions used to control the keypad are contained in the library KEYPAD7.LIB located in the Dynamic C library directory. KEYPADS void keyInit(void); Initializes keypad process RETURN VALUE None. SEE ALSO brdInit void keyConfig(char cRaw, char cPress, char cRelease, char cCntHold, char cSpdLo, char cCntLo, char cSpdHi);...
  • Page 117 cCntLo is a low-speed hold tick, which is approximately one debounce period or 5 µs. How long to hold before going to high-speed repeat. 0 = Slow Only. cSpdHi is a high-speed repeat tick, which is approximately one debounce period or 5 µs. How many times to repeat after low speed repeat.
  • Page 118 void keypadDef(); Configures the physical layout of the keypad with the default ASCII return key codes. Keypad physical mapping 1 × 7 ['L'] ['U'] ['D'] ['R'] ['–'] ['+'] ['E'] where 'D' represents Down Scroll 'U' represents Up Scroll 'R' represents Right Scroll 'L' represents Left Scroll '–' represents Page Down '+' represents Page Up...
  • Page 119: Sample Programs

    C.8 Sample Programs Sample programs illustrating the use of the LCD/keypad module with the LP3500 board are provided in the directory. SAMPLES\LP3500\Display_Keypad To run a sample program, open it with the menu (if it is not still open), compile it File using the menu, and then run it by selecting...
  • Page 120 Fox (LP3500)
  • Page 121: Appendix D. Plastic Enclosure

    D. P PPENDIX LASTIC NCLOSURE The plastic enclosure provides a secure way to protect your LP3500. The enclosure itself may be mounted on any flat sur- face. The complete plastic enclosure consists of a base and a cover. The base alone is a convenient surface on which to mount the LP3500, and also provides a means to mount the LP3500 on any flat surface.
  • Page 122: Assembly Instructions

    D.1 Assembly Instructions 1. Remove any stand-offs on the LP3500 board or LP3500 board/Prototyping Board com- bination to be enclosed. RELAY C55 R44 RP13 RESET AIN0 AIN1 AIN2 AIN3 PROGRAM PORT GND VBAT AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 GND EXT GND VIN GND Figure D-1.
  • Page 123 3. Mount plastic enclosure (optional). Use four #10 screws to attach the plastic enclosure at the four outer corner mounting holes to the surface on which it will be mounted. This step will be most suitable to production versions of LP3500 units once development has been completed. 4.
  • Page 124: Dimensions

    D.2 Dimensions Figure D-4 shows the dimensions for the plastic enclosure. 0.70 (18) 0.375" (9.5 mm) is cut off each corner 5.00 (127) 4.35 (110) 0.25 1.375 2.85 (6.4) (35) (72) 5.60 (142) Figure D-4. Plastic Enclosure Dimensions Fox (LP3500)
  • Page 125: Appendix E. Power Management

    E. P PPENDIX OWER ANAGEMENT Appendix E describes the power circuitry provided on the LP3500. The LP3500 can operate from an unregulated external power source, or from an external battery. There is onboard bat- tery backup for the SRAM and the real-time clock. E.1 External Power Supply Power is normally supplied to the LP3500 via pins 16 and 17 of header J2 on the LP3500.
  • Page 126 The linear regulator maintains its output voltage to within ±5% as long as the linear regula- tor is dissipating less than 0.75 W. Thermal shutdown turns the regulator off when it over- heats. Figure E-1 shows the power operating curves for the specified VIN range of 3–30 V DC.
  • Page 127: Batteries And External Battery Connections

    LP3500 processor is off. Even though there is limited capacity in the onboard battery, and its circuit is in parallel with that of the external battery, Z-World strongly recommends against relying on the onboard battery for any role besides that of keeping the SRAM and the real-time clock functional when the LP3500 processor is off.
  • Page 128: Replacing The Backup Battery

    E.2.1 Replacing the Backup Battery The battery is user-replaceable, and is fitted in a battery holder. To replace the battery, lift up on the spring clip and slide out the old battery. Use only a Panasonic CR2330 or equiv- alent replacement battery, and insert it into the battery holder with the + side facing up. NOTE: The SRAM contents and the real-time clock settings will be lost if the battery is replaced with no power applied to the LP3500.
  • Page 129: Reset Generator

    E.2.3 Reset Generator The LP3500 module uses a reset generator on the module, U11, to reset the Rabbit 3000 microprocessor when the voltage drops below the voltage necessary for reliable operation. The reset occurs between 2.55 V and 2.75 V, typically 2.63 V. E.3 Chip Select Circuit The current drain on the battery in a battery-backed circuit must be kept at a minimum.
  • Page 130 Fox (LP3500)
  • Page 131: Appendix F. Programming Cable

    F. P PPENDIX ROGRAMMING ABLE Appendix F provides additional theoretical information for the ® Rabbit 3000 microprocessor when using the DIAG PROG connectors on the programming cable. The connector is PROG used only when the programming cable is attached to the pro- gramming connector (header J3) while a new application is being developed.
  • Page 132 The programming port, which is shown in Figure F-1, can serve as a convenient communica- tions port for field setup or other occasional communication need (for example, as a diag- nostic port). If the port is simply to perform a setup function, that is, write setup information to flash memory, then the controller can be reset through the programming port and a cold boot performed to start execution of a special program dedicated to this functionality.
  • Page 133 Once you establish that the programming port will never again be needed for program- ming, it is possible to use the programming port for additional I/O lines. Table F-1 lists the pins available for this alternate configuration. Table F-1. LP3500 Programming Port Configurations Pin Name Default Use Alternate Use...
  • Page 134 Fox (LP3500)
  • Page 135: Appendix G. Running A Sample Program

    G. R PPENDIX UNNING A AMPLE ROGRAM Appendix G goes through the steps of running a sample program with the LP3500 connected to the Prototyping Board. Sample programs are provided in the Dynamic C folder. The various directories Samples in the folder contain specific sample programs that illustrate the use of the cor- Samples responding Dynamic C libraries.
  • Page 136 2. +K must be connected to an external power supply. A 0 Ω resistor on the Prototyping Board (R1) ties +K to VIN from the AC adapter and thus satisfies this requirement as long as the LP3500 is connected to the Prototyping Board. 3.
  • Page 137: Notice To Users

    Specifications are based on characterization of tested sample units rather than testing over temperature and voltage of each unit. Z-World products may qualify components to operate within a range of parameters that is different from the manufacturer’s recom- mended range.
  • Page 138 Fox (LP3500)
  • Page 139: Index

    NDEX A/D converter features ........2 LCD/keypad module ....3 buffered inputs ....30 flash memory bezel-mount installation ..90 calibration constants ..31 lifetime write cycles ..35 dimensions ......86 differential measurements . 31 header pinout ....89 single-ended measurements 31 I/O address assignments ...
  • Page 140 power management .....119 software ........5 power modes .....19, 20, 21 A/D converter inputs sample programs ....38 entering power-save mode 20 anaIn ......56 A/D converter inputs low-power mode ....19 anaInCalib .....57 AD_CALDIFF.C ...40 LP3500 subsystems that can anaInConfig ....52 AD_CALMA_CH.C ..41 be turned off ....20 anaInDriver ....54 AD_RDDIFF_CH.C ..39...
  • Page 141 glSetPfStep ....100 specifications glSwap ......102 LCD/keypad module glUp1 ......104 dimensions ....86 glVScroll ..... 106 electrical ......86 glXFontInit ....99 header footprint ..... 86 glXPutBitmap ..... 106 mechanical ....86 glXPutFastmap .... 107 relative pin 1 locations .. 86 TextCursorLocation ..
  • Page 142 Fox (LP3500)
  • Page 143: Schematics

    CHEMATICS 090-0150 LP3500 Schematic www.zworld.com/documentation/schemat/090-0150.pdf 090-0151 LP3500 Prototyping Board Schematic www.zworld.com/documentation/schemat/090-0151.pdf 090-0156 LCD/Keypad Module Schematic www.zworld.com/documentation/schemat/090-0156.pdf 090-0128 Programming Cable Schematic www.zworld.com/documentation/schemat/090-0128.pdf The schematics included with the printed manual were the latest revisions available at the time the manual was last revised. The online versions of the manual contain links to the latest revised schematic on the Web site.

Table of Contents