Our -074, and -077 embedded controllers provide several types of interface to peripheral devices and sensors. The interface we prefer because of its' simplicity, versatility, and capacity, is our own Vesta Addressable Synchronous Transfer (VAST) bus. The VAST bus can address as many as 30 or even 60 devices (depending on the configuration).
The VAST bus uses a serial protocol on a 10-wire cable to power and communicate to our inexpensive, low power peripherals. The addressable feature of the VAST interconnection allows peripheral boards to be assigned to one of 16 addresses on the same expansion port. Some peripherals allow more than one board to share the same address.
The VAST protocol is based on a synchronous clock similar to Motorola 's SPI, National Semiconductor's MicroWire, Texas Instruments' shift register, and Phillips Signetics' IIC. Basically, all are variations of a shift register where a master device supplies the synchronous clock, and either clocks data into the shift register or out of it.
We use a 100 kHz clock rate. Most data packets to or from a peripheral consist of 2 to 4 eight-bit data transfers.
It's easy to design your own VAST peripheral. Most serial integrated circuit peripherals can be attached to the VAST interconnection scheme without any interface logic at all. If you want full VAST addressing capability, just look at any of our schematics and follow the example.
You can also modify our peripheral extensionroutines to support special features for your application. Click here to see the text of the extension files we supply with our peripherals.
VAST Signals
| Pin | Signal | Notes |
| 2 & 1 | +5 and Ground | power to all peripherals on the net |
| 3 | VSCLK | the synchronous clock, either active high or active low is supported |
| 5 | VDOUT, MOSI | data to the peripheral |
| 7 | VDIN, MISO | data from the peripheral |
| 9 | VINT* | open collector interrupt from any peripheral |
| 4 | VADDR0 | address line |
| 6 | VADDR1 | address line |
| 8 | VADDR2 | address line |
| 10 | VADDR3 | address line |
Vesta Technology has added 4 hardware address lines and some generic software layering that allows any type of synchronous serial device to be connected to the VAST network.
We specify 10 feet, but routinely use 20 to 30 feet. Longer cable lengths will work, but they depend on which peripherals you are using. For longer communication up to 4000 feet we have a pair of RS-485 adapters that transmit and receive the signals differentially.
Addresses are set using jumpers on the specific board. Some boards take 2 addresses. See the Address Jumpers chart in the section in this manual pertaining to each specific VAST peripheral that you are using.
Several of the routines used with specific peripheral boards are written in Basic, and must be included in your program before they may be called (See INCLUDE for more information on using the Include command).
The text of the files that must be included reside on the Vesta Basic CD in the \Examples folder under \Peripherals.
The following table lists commands that are specialized for use with certain peripherals, and describes the external files that must be included in order for these commands to work. See the section on each specific peripheral for more information on software control of that device.
The following Vesta Basic commands allow easy connection to IIC type and SPI type peripherals:
These procedures should be called only from within a VITAL procedure to prevent interference with the VAST bus before the transaction is complete.
VAST_OPEN () is used to select the VAST address of the device you wish to control.
VAST_OPEN(spi-address)
Where:
"spi-address" is an integer whose 4 least significant bits represent the VAST address. Legal values for SPI addresses are 0 thru 14.
* Address 15 is reserved for IIC devices.
See the SPI Transfer example, below.
VAST_CLOCK () is used to set the clock polarity and phase relationship for SPI transfers.
VAST_CLOCK(op-mode)
Where:
"op-mode" is a value from 0 to 3 that defines how hardware deals with the data in relation to the clock signal:
| Op-Mode | Active | Idle | Data read | Data changes |
| 0 | High | Low | when the clock rises | when the clock falls. |
| 1 | High | Low | when the clock falls | when the clock rises. |
| 2 | Low | High | when the clock rises | when the clock falls. |
| 3 | Low | High | when the clock falls | when the clock rises. |
* System default op-mode is 0. Most VAST peripherals use op-mode value 0. VAST ADC24 uses op-mode value 3.
* The clock rate is set at 100kHz.
Because Vesta Basic implements SPI transfers in software, rather than with hardware, the data line does not have to change simultaneously with the clock line. In order to be compatible with both phase relationships for clock polarity, we make certain that the active clock pulse is entirely within the outgoing data bit.
The sequence for each bit is:
See the SPI Transfer example, below.
Use VAST_CLOSE () to end an SPI transfer by deselecting the VAST address of the SPI peripheral with which you have been communicating.
VAST_CLOSE(address)
Where:
"address" is an integer whose 4 least significant bits represent the VAST address.
* The address argument should always be 15 (the IIC VAST address) in order to deselect all VAST SPI devices.
See the SPI Transfer example, below.
VAST_SPI_XFER()performs a simultaneous transfer of information to and from a VAST SPI peripheral.
inval = VAST_SPI_XFER(bit_count, outval)
Where:
"inval" is an integer variable that will hold the result value coming from the peripheral.
"bit_count" is the number of bits being transferred. A maximum of 16 bits can be sent or received in one transfer.
"outval" contains the integer value of the bits being transferred to the peripheral.
* This procedure sends "bit_count" bits of the outval argument to the peripheral.
* VAST_SPI_XFR() provides a full duplex transfer (you get as many bits of incoming data as you send). If the peripheral with which you are communicating only supports half-duplex transfers, you will need to call VAST_SPI_XFR() twice; once to send information to the peripheral, and once to obtain the return information.
The following example demonstrates a function to start a conversion on a VAIO12/VADC12 then get the result using low level VAST functions. This function runs conversions only on channel 0 of the VAIO12/VADC12 at VAST address 0. The data values and transfers are specific to the VAIO12 peripheral and will not work for other VAST peripherals.
REM A function to perform an analog to
REM digital conversion on a VADC12/VAIO12
VITAL FUNCTION VADC12_CONVERT() AS INTEGER
CALL VAST_OPEN(0) :REM select VAST address
REM Send a command byte which starts a unipolar
REM conversion on channel 0.
retval = VAST_SPI_XFER(8, 0x8E)
REM To receive the conversion result. Outgoing data is
REM all don't cares. Conversion result data is clocked
REM in as the dummy data is clocked out.
VADC12_CONVERT = VAST_SPI_XFER(13, 0)
REM Now "close" the VAST connection to this peripheral
CALL VAST_CLOSE(15) :REM Always call with '15'
END
REM MAIN -- Get analog input and print
PRINT VADC12_CONVERT(),"\013\010"
VAST_IIC_START() sends an IIC start condition, which begins an IIC transfer.
VAST_IIC_START()
Where:
No value is required or allowed within the parenthesis.
* VAST address must be set to 15 using the VAST_OPEN() command prior to starting any VAST IIC transaction, and must remain at 15 until the transaction is completed. See the IIC Transfer example, below.
VAST_IIC_STOP() sends out the low byte of the integer argument to the VAST bus, and is called to end an IIC transfer by sending an IIC stop condition.
VAST_IIC_STOP()
Where:
No value is required or allowed within the parenthesis. See the IIC Transfer example, below.
VAST_IIC_SEND() sends out the low byte of the integer argument to the VAST bus, and returns the value of the acknowledge bit sent by the peripheral.
VAST_IIC_SEND(byte)
Where:
"byte" is an integer whose low byte is being sent. See the IIC Transfer example, below.
This function reads a data byte from a VAST IIC peripheral, and sends a bit to the peripheral to tell it whether more bytes will follow in the transaction.
VAST_IIC_READ (last)
Where:
"last" is a 0 or 1 indicating to the peripheral whether another byte will be read as part of the same transaction. (Zero = another byte expected, nonzero = no more bytes expected.)
AIN() will also work with this peripheral when properly configured.
REM Run a conversion on channel 0 of the VAIODIO8 peripheral and
REM return the result.
REM Note that the data and number/order of transfers is specific
REM to the VAIODIO8 peripheral, and will not work with other IIC
REM devices. This example is provided strictly as an example
REM of proper usage of the IIC transfer procedures.
VITAL FUNCTION VAIODIO8_CONVERT() AS INTEGER
LOCAL retval AS INTEGER
REM Make sure we are addressing the IIC VAST address
CALL VAST_OPEN(15)
REM Send command bytes to start the conversion
CALL VAST_IIC_START()
retval = VAST_IIC_SEND(0x90) :REM Wakeup chip, etc.
retval = VAST_IIC_SEND(0x40)
retval = VAST_IIC_SEND(0x00)
CALL VAST_IIC_STOP()
REM The conversion result is collected in
REM two separate transactions.
CALL VAST_IIC_START()
retval = VAST_IIC_SEND(0x91)
retval = VAST_IIC_READ(1) :REM no more bytes this transaction
CALL VAST_IIC_STOP()
CALL VAST_IIC_START()
retval = VAST_IIC_SEND(0x91)
retval = VAST_IIC_READ(1) :REM no more bytes this transaction
CALL VAST_IIC_STOP() :REM return the conversion value
VAIODIO8_CONVERT = retval
END
REM MAIN - run conversion on VAIODIO8 and print
PRINT VAIODIO8_CONVERT(),"\013\010"
© 2002 Vesta Technology