![]() |
| Fox (LP3500) User's Manual |
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 single-board computers and other devices based on the Rabbit microprocessor.
Chapter 4 provides the libraries, function calls, and sample programs related to the LP3500.
You have a choice of doing your software development in the flash memory or in the static RAM included on the LP3500. The flash memory and SRAM options are selected with the Options > Project Options > Compiler menu.
The advantage of working in RAM is to save wear on the flash memory, which is limited to about 100,000 write cycles. The disadvantage is that the code and data might not both fit in RAM.
Developing software with Dynamic C is simple. Users can write, compile, and test C and assembly code without leaving the Dynamic C development environment. Debugging occurs while the application runs on the target. Alternatively, users can compile a program to an image file for later loading. Dynamic C runs on PCs under Windows 2000/NT and later. Rabbit's Technical Note TN257, Running Dynamic C® With Windows Vista®, in the online documentation set provides additional information about using Windows Vista® with versions of Dynamic C prior to v. 9.60.
Programs can be downloaded at baud rates of up to 460,800 bps after the program compiles.
Dynamic C has a number of standard features.
- Full-feature source and/or assembly-level debugger, no in-circuit emulator required.
- Royalty-free TCP/IP stack with source code and most common protocols.
- Hundreds of functions in source-code libraries and sample programs:
- Powerful language extensions for cooperative or preemptive multitasking
- Loader utility program to load binary images into Rabbit targets in the absence of Dynamic C.
- Provision for customers to create their own source code libraries and augment on-line help by creating "function description" block comments using a special format for library functions.
- Standard debugging features:
- u Breakpoints--Set breakpoints that can disable interrupts.
- u Single-stepping--Step into or over functions at a source or machine code level, µC/OS-II aware.
- u Code disassembly--The disassembly window displays addresses, opcodes, mnemonics, and machine cycle times. Switch between debugging at machine-code level and source-code level by simply opening or closing the disassembly window.
- u Watch expressions--Watch expressions are compiled when defined, so complex expressions including function calls may be placed into watch expressions. Watch expressions can be updated with or without stopping program execution.
- u Register window--All processor registers and flags are displayed. The contents of general registers may be modified in the window by the user.
- u Stack window--shows the contents of the top of the stack.
- u Hex memory dump--displays the contents of memory at any address.
- u STDIO window--
printfoutputs to this window and keyboard input on the host PC can be detected for debugging purposes.printfoutput may also be sent to a serial port or file.4.1 Upgrading Dynamic C
4.1.1 Patches and Bug Fixes
Dynamic C patches that focus on bug fixes are available from time to time. Check the Web site www.rabbit.com/support/ for the latest patches, workarounds, and bug fixes.
The default installation of a patch or bug fix is to install the file in a directory (folder) different from that of the original Dynamic C installation. Rabbit recommends using a different directory so that you can verify the operation of the patch without overwriting the existing Dynamic C installation. If you have made any changes to the BIOS or to libraries, or if you have programs in the old directory (folder), make these same changes to the BIOS or libraries in the new directory containing the patch. Do not simply copy over an entire file since you may overwrite a bug fix; of course, you may copy over any programs you have written. Once you are sure the new patch works entirely to your satisfaction, you may retire the existing installation, but keep it available to handle legacy applications.
4.1.2 Extras
Dynamic C installations are designed for use with the board they are included with, and are included at no charge as part of our low-cost kits.
Starting with Dynamic C version 9.60, Dynamic C includes the popular µC/OS-II real-time operating system, point-to-point protocol (PPP), FAT file system, RabbitWeb, and other select libraries. Rabbit also offers for purchase the Rabbit Embedded Security Pack featuring the Secure Sockets Layer (SSL) and a specific Advanced Encryption Standard (AES) library.
In addition to the Web-based technical support included at no extra charge, a one-year telephone-based technical support subscription is also available for purchase.
Visit our Web site at www.rabbit.com for further information and complete documentation.
4.2 Sample Programs
Sample programs are provided in the Dynamic C
Samplesfolder. The sample programPONG.Cdemonstrates the output to the STDIO window.The various directories in the
Samplesfolder contain specific sample programs that illustrate the use of the corresponding Dynamic C libraries.The
LP3500folder provides sample programs specific to the LP3500. Each sample program has comments that describe the purpose and function of the program. Follow the instructions at the beginning of the sample program.To run a sample program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The LP3500 must be in the Program mode (see Section 3.9, "Serial Programming Cable") and must be connected to a PC using the programming cable as described in Section 2.1, "LP3500 Connections."
Appendix F, "Running a Sample Program," takes you through the steps of running one of the sample programs.
4.2.1 Power Modes
The following sample program is found in the
POWERsubdirectory inSAMPLES\LP3500.
POWER.C--This program demonstrates switching from the normal raw DC power source to an external battery using the Prototyping Board. Pressing a switch will change from the power source and will be displayed by flashing LEDs.
LOWPWRDEMO.C--This program demonstrates a low-power mode with the normal power source connected to the LP3500.4.2.2 Digital I/O
The following sample programs are found in the
IOsubdirectory inSAMPLES\LP3500.
DIGIN.C--Demonstrates the use of the digital inputs. Using the Prototyping Board, you can see an input channel toggle from HIGH to LOW when pressing a pushbutton on the Prototyping Board.
DIGOUT.C--Demonstrates the use of the high-current outputs configured as either sinking or sourcing outputs. Using the Prototyping Board, you can see an LED toggle on/off via a high-current output.
DIGBANKIN.C--Demonstrates the use of the digital inputs. Using the Prototyping Board, you can see a bank of input channels toggle from HIGH to LOW when pressing a pushbutton on the Prototyping Board.
DIGBANKOUT.C--Demonstrates the use of the high-current outputs configured as either sinking or sourcing outputs. Using the Prototyping Board, you can see a bank of channels toggle the corresponding LEDs on/off via high-current outputs.4.2.3 Serial Communication
The following sample programs are found in the
RS232subdirectory inSAMPLES\LP3500.
SIMPLE3WIRE.C--This program demonstrates basic initialization for a simple RS-232 3-wire loopback displayed in the STDIO window.The following sample programs are found in the
RS485subdirectory inSAMPLES\LP3500.
SIMPLE485MASTER.C--This program demonstrates a simple RS-485 transmission of lower case letters to a slave LP3500. The slave will send back converted upper case letters back to the master LP3500 and display them in the STDIO window. UseSIMPLE485SLAVE.Cto program the slave LP3500.
SIMPLE485SLAVE.C--This program demonstrates a simple RS-485 transmission of lower case letters to a slave LP3500. The slave will send back converted upper case letters back to the master LP3500 and display them in the STDIO window. UseSIMPLE485MASTER.Cto program the master LP3500.4.2.4 A/D Converter Inputs
The following sample programs are found in the
ADCsubdirectory inSAMPLES\LP3500.
AD_RDVOLT_ALL.C--This program reads and displays the voltage and equivalent values of each single-ended A/D converter channel. Coefficients are read from the A/D converter's simulated EEPROM in flash memory to compute the equivalent voltages. Computed raw data and equivalent voltages are displayed in the STDIO window.
AD_RDVOLT_CH.C--This program reads and displays the voltage and equivalent values of one single-ended A/D converter channel. Coefficients are read from the A/D converter's simulated EEPROM in flash memory to compute the equivalent voltages. Computed raw data and equivalent voltages are displayed in the STDIO window.
AD_RDDIFF_CH.C--This program demonstrates reading one differential A/D converter channel. Coefficients are read from the A/D converter's simulated EEPROM in flash memory to compute the equivalent voltages. Computed raw data and equivalent voltages are displayed in the STDIO window.
AD_RDMA_CH.C--This program demonstrates reading one milliampere A/D converter channel. Coefficients are read from the A/D converter's simulated EEPROM in flash memory to compute the equivalent currents. Computed raw data and equivalent currents are displayed in the STDIO window.
AD_SAMPLE.C--This program demonstrates how to use the A/D low-level driver. The program will display the average voltage that is present on an A/D converter channel. The particular channel and the number of samples may be changed by the user.4.2.5 PWM Outputs
The following sample program is found in the
IOsubdirectory inSAMPLES\LP3500.
PWMOUT.C--This program demonstrates the PWM functions. It will set the PWM channels, PWM0-PWM2, to the following duty cycles:4.2.6 Relay Output
The following sample program is found in the
RELAYsubdirectory inSAMPLES\LP3500.
SWRELAY.C--This program demonstrates the relay-switching function call operating on normal power source. Use the pushbutton switches on the Prototyping Board to switch the relay between the SET (NO) and RESET (NC) positions. All activity will be displayed with the LEDs.4.2.7 Vcc Monitoring
The following sample program is found in the
POWERsubdirectory inSAMPLES\LP3500.
VCCMONITOR.C--This program demonstrates the Vcc monitoring function on AIN7. All activity will be displayed in the STDIO window4.2.8 LP3500 Calibration
The following sample programs are found in the
ADCsubdirectory inSAMPLES\LP3500.
AD_CAL_ALL.C--This program demonstrates how to recalibrate all single-ended A/D converter channels using two known voltages to generate constants for each channel, and will be written into the user block data area. The program uses the STDIO window to display the voltage that is being monitored.
NOTE This sample program will overwrite the calibration constants set at the factory.
AD_CAL_CHAN.C--This program demonstrates how to recalibrate one single-ended A/D converter channel using two known voltages to generate constants for each channel, and will be written into the user block data area. The program uses the STDIO window to display the voltage that is being monitored.
NOTE This sample program will overwrite the calibration constants set at the factory.
AD_CALDIFF_CH.C--This sample program demonstrates how to recalibrate one differential A/D converter channel using two known voltages to generate constants for that channel and rewrite the constants into the user block data area. The program uses the STDIO window to display the voltage that is being monitored.
NOTE This sample program will overwrite the calibration constants set at the factory.
AD_CALMA_CH.C--This sample program demonstrates how to recalibrate one A/D converter 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. The program uses the STDIO window to display the current that is being monitored.
NOTE This sample program will overwrite the calibration constants set at the factory. 4.2.9 LCD/Keypad Module Sample Programs
Sample programs for the LCD/keypad module are described in Section C.8.
4.3 LP3500 Libraries
One library directory provides the function calls that are used to develop applications for the LP3500.
LP3500--libraries associated with features specific to the LP3500. The functions in theLIB\Rabbit3000\LP35xx.LIBlibrary are described in Section 4.4, "LP3500 Function Calls."The LCD/keypad module functions are described in Section C.7. Other generic functions applicable to all devices based on the Rabbit 3000 microprocessor are described in the Dynamic C Function Reference Manual.
4.4 LP3500 Function Calls
4.4.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
devicesis a list of the following macros, which are OR'ed together, that will be affected by thestateparameter, e.g.,RS232DEV|ADCDEV.
RS232DEV--RS-232 devicesRS485DEV--RS-485 devicesADCDEV--ADS7870 A/D converter devicesDISPDEV--LCD/keypad moduleALLDEVICES--all devices
state- 0 = shuts or powers down listed devices
- 1 = activates listed devices
- Table E-1 provides further information about the power consumption associated with each section.
RETURN VALUE
- 0 if valid parameter
- -1 otherwise
SEE ALSO
powerMode, anaInConfig, brdInit
int powerMode(int mode);
- Sets the LP3500 operating power.
PARAMETERS
modeis the operating mode based on the following macros.
NOTE When using modes 6-10, be sure to call hitwd()explicitly since periodic interrupts, which incorporate a virtual watchdog, are disabled in these modes.
- Table 2 provides more specific information on the LP3500's capabilities associated with these and other software-defined modes.
RETURN VALUE
- 0 if valid parameter
- -1 if invalid parameter
SEE ALSO
devPowerSet, rdPowerState, setPowerState, VccMonitor
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.
- Use
devPowerSet(ALLDEVICES, int state)before and after this function call to deactivate and activate all devices to operate at less power.PARAMETERS
lowpowermodeis the low-power mode setting to enter, usually 10 (seepowerMode())
maxpowermodeis the maximum operating power mode setting to enter, usually 1 (seepowerMode())
powersource
- 1 = battery
2 = raw DC power
timeoutis the timeout in seconds if no activity is detected on the RxE receiver line. Enter 0 for no timeoutSEE ALSO
powerMode, digInAlert, timedAlert, devPowerSet
void timedAlert(int lowpowermode, int maxpowermode, int powersource, unsigned long timeout)
- Use this function to poll the real-time clock until a timeout occurs. The function call forces the LP3500 to enter the low-power mode, disables the normal power source, and may enable the external battery for polling. Upon expiration of the timeout this function will enable the normal power mode and exit. If the normal power source is not available, the LP3500 will not be able to resume operation at the maximum- power mode, and may reset.
- Use
devPowerSet(ALLDEVICES, int state)before and after this function call to deactivate and activate all devices to operate at less power.PARAMETERS
lowpowermodeis the low-power mode setting to enter, usually 10 (seepowerMode())
maxpowermodeis the maximum operating power mode setting to enter, usually 1 (seepowerMode())
powersource
- 1 = battery
2 = raw DC power
timeoutis the timeout in seconds if an input is not received.SEE ALSO
powerMode, digInAlert, serCommAlert, devPowerSet
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.
- Use
devPowerSet(ALLDEVICES, int state)before and after this function call to deactivate and activate all devices to operate at less power.PARAMETERS
channelis the digital input channel (IN00- IN15) to poll
valueis the input value of 0 or 1 to receive
lowpowermodeis the low-power mode setting to enter, usually 10 (seepowerMode())
maxpowermodeis the maximum operating power mode setting to enter, usually 1 (seepowerMode())
powersource
- 1 = battery
2 = raw DC power
timeoutis the timeout in seconds if an input is not received. Enter 0 for no timeout.SEE ALSO
powerMode, serCommAlert, timedAlert, devPowerSet
int rdPowerState(void);
- Determines if the LP3500 is running under battery power or a raw DC power source.
RETURN VALUE
- 0 if on raw DC power source
- 1 if on battery power
SEE ALSO
powerMode, setPowerState
int setPowerSource(int state);
- Turns the linear regulator "off" or "on."
PARAMETER
- 0 for normal power source
- 1 for battery
RETURN VALUE
- 0 if successful
- -1 if raw DC power source is not available
- -2 if battery is not available
SEE ALSO
powerMode, rdPowerState4.4.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 indicate that the initialization was successful.
- Summary of Initialization
- LP3500 uses main oscillator
- LCD/keypad module buffer is disabled
- RS-485 serial communication is not enabled
- RS-232 serial communication is enabled
- Unused configurable inputs are tied and unused configurable outputs are set low
- Self-timed chip select is set to 109 ns
- If A/D converter chip is installed, chip is reset and SCLKD is set to 19,200 bps
- If A/D converter chip is installed, calibration constants are read
- If relay is installed, relay is set to NC or RESET position
- The ports are initialized according to Table A-3.
4.4.3 Digital I/O
void digOut(int channel, int value);
- Sets the state of a digital output (OUT0-OUT9).
- Remember to call
brdInitbefore executing this function.
- A runtime error will occur for the following conditions:
- 1. channel or value out of range.
- 2. brdInit was not executed before executing digOut.
PARAMETERS
channelis the output channel number (0-9).
valueis the output value (0 or 1).SEE ALSO
brdInit, digIn, digBankOut
void digBankOut(int bank, int value);
- Writes the state of a block of designated digital output channels. The first bank consists of OUT0- OUT7, the second bank consists of OUT8-OUT9.
- A run-time error will occur for the following conditions:
- 1.
channelorvalueout of range.- 2.
brdInitwas not executed before executingdigOut.PARAMETER
bankis 0 for OUT0-OUT7, 1 for OUT8-OUT9.
valueis an 8-bit output value, where each bit corresponds to one channel. OUT0 and OUT8 are the least significant bit 0.RETURN VALUE
- None.
SEE ALSO
brdInit, digOut, digBankIn
int digIn(int channel);
- Reads the state of an input channel (IN00-IN15).
- A run-time error will occur for the following conditions:
- 1.
channelout of range.- 2.
brdInitwas not executed before executingdigIn.PARAMETER
channelis the input channel number (0-15)RETURN VALUE
- The logic state of the input (0 or 1).
SEE ALSO
brdInit, digOut, digBankIn
void digBankIn(int bank);
- Reads the state of a block of designated digital input channels. The first bank consists of IN0-IN07, the second bank consists of IN08-IN15.
- A run-time error will occur for the following conditions:
- 1.
bankout of range.- 2.
brdInitwas not executed before executingdigIn.PARAMETER
bankis 0 for IN00-IN07, 1 for IN08-IN15.RETURN VALUE
- An input value in the lower byte, where each bit corresponds to one channel. IN00 and IN08 are in the bit 0 place.
SEE ALSO
brdInit, digOut, digBankOut
4.4.4 Serial Communication
Library files included with Dynamic C provide a full range of serial communications support. The
LIB\Rabbit3000\RS232.LIBlibrary provides a set of circular-buffer-based serial functions. TheLIB\Rabbit3000\PACKET.LIBlibrary provides packet-based serial functions where packets can be delimited by the 9th bit, by transmission gaps, or with user-defined special characters. Both libraries provide blocking functions, which do not return until they are finished transmitting or receiving, and nonblocking functions, which must be called repeatedly until they are finished. For more information, see the Dynamic C User's Manual and Rabbit's Technical Note TN213, Rabbit 2000 Serial Port Software.Use the following function calls with the LP3500.
int serMode(int mode);
- User interface to set up LP3500 serial communication lines. Call this function after
serXOpen().
- Whether you are opening one or multiple serial ports, this function must be executed after executing the last
serXOpenfunction AND before you start using any of the serial ports. This function is non-reentrant.
- If Mode 1 is selected, CTS/RTS flow control is exercised using the
serBflowcontrolOnandserBflowcontrolOfffunctions from theRS232.LIBlibrary.PARAMETER
modeis the defined serial port configuration.
RS-232, 3-wire
RS-232, 3-wire
RS-232, 3-wire
RS-485
RS-232, 5-wire
CTS/RTS
RS-232, 3-wire
RS-485
RETURN VALUE
- 0 if valid mode, 1 if not.
SEE ALSO
ser485Tx, ser485Rx
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.
- Block data mode--disable the transmitter after the same number of bytes transmitted is detected in the receive data buffer.
serMode()must be executed before running this function.SEE ALSO
serMode, ser485Rx
void ser485Rx(void);
- Disables the RS-485 transmitter. This puts the LP3500 in listen mode, which allows it to receive data from the RS-485 interface.
serMode()must be executed before running this function.SEE ALSO
serMode, ser485Tx
_485BAUD=576004.4.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. Refer to ADS7870 specification for proper addressing and commands.
PARAMETERS
instructionbytewill 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
cmdis the command data that configure the registers addressed by the instruction byte. Enter 0 if performing a read operation.
i = anaInConfig(0x07, 0x3a, 0); // write ref/osc reg and enable
baudis the serial clock transfer rate of 9600 to 57,600 bps.baudmust be set on the first call to this function. Enter 0 in this parameter thereafter.
anaInConfig(0x00, 0x00, 9600); // resets device and sets baudRETURN VALUE
- 0 on write operations, data value on read operations.
SEE ALSO
anaInDriver, anaIn, brdInit
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.
PARAMETER
cmdcontains a gain code and a channel code as follows.
- D7--1; D6-D4--Gain Code; D3-D0--Channel Code
- Use the following calculation and the tables below to determine
cmd:
cmd = 0x80 | (gain_code*16) + channel_code
Single-Ended Input Lines1
1 Negative input is ground.
len, the output bit length, is always 12 bits.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
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
channelis the analog input channel number (0 to 7) corresponding to AIN0-AIN7
opmodeis the mode of operation:
SINGLE--single-ended input lineDIFF--differential input linemAMP--milliamp input line
gaincodeis the gain code of 0 to 7:
RETURN VALUE
- A value corresponding to the voltage on the analog input channel, which will be:
- 0-2047 for 11-bit A/D conversions (signed 12th bit)
- ADOVERFLOW (defined macro = -4096) if overflow or out of range
SEE ALSO
anaIn, anaInConfig, anaInDriver
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
_adcCalibto be stored later store into simulated EEPROM using the functionanaInEEWr(). Each channel will have the following information:
- a linear constant,
- a voltage offset,
- a calculation gain code used to calculate calibrations, and
- a user gain code to set voltage range (defaults to the calculation gain code).
NOTE Vcc monitoring is disabled when anaInCalibis running.PARAMETERS
channelis the analog input channel number (0 to 7) corresponding to AIN0-AIN7
opmodeis the mode of operation:
SINGLE--single-ended input lineDIFF--differential input linemAMP--milliamp input line
gaincodeis the gain code of 0 to 7:
- 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).
- value2 is the second A/D converter channel value (0-2047).
- volts2 is the voltage or current corresponding to the first A/D converter channel value (0 to +10 V or 4 to 20 mA).
RETURN VALUE
- 0 if successful.
- -1 if not able to make calibration constants.
SEE ALSO
anaIn, anaInVolts, anaInmAmps, anaInDiff, anaInSetRange, anaInVoltXGain, anaInCalib, brdInit
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
channelis the channel number (0-7):
Single-Ended Input Lines1
1 Negative input is ground.
gaincodeis the gain code of 0 to 7.RETURN VALUE
- A voltage value corresponding to the voltage on the analog input channel.
- ADOVERFLOW (defined macro = -4096) if overflow or out of range.
SEE ALSO
anaInCalib, anaIn, anaInmAmps, brdInit
float 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
channelis 0-3:
4-20 mA Input Lines1