Zilogic Systems ZIO User manual

ZIO, Motherboard
User Manual
2.0, Oct 2013

ZIO, Motherboard User Manual Rev. 2.0
This work is licensed under the Creative Commons Attribution-Share Alike 2.5 India License. To
view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/in/ or send a letter
to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page iii
Table of Contents
1. Introduction ........................................................................................................................... 1
1. Philosophy ..................................................................................................................... 1
2. Product Features ............................................................................................................ 1
2. Connecting to ZIO .................................................................................................................. 3
1. SPI Pinmap .................................................................................................................. 3
2. UART-I2C Pinmap ........................................................................................................ 4
3. DIO Pinmap .................................................................................................................. 4
4. PWM Pinmap .................................................................................................................. 5
5. AIO Pinmap .................................................................................................................. 6
3. ZIO Recipes ............................................................................................................................ 8
1. GPIO Port ....................................................................................................................... 8
2. I²C Port ........................................................................................................................ 11
3. SPI Port ........................................................................................................................ 12
4. Sensor Port .................................................................................................................. 12
5. PWM Port ..................................................................................................................... 15
4. ZIO Control Panel ................................................................................................................. 19
A. Legal Information ................................................................................................................ 21
1. Copying ........................................................................................................................ 21
2. Limited Hardware Warranty ......................................................................................... 21

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 1
Chapter1.Introduction
1.Philosophy
• Move development from micro-controllers to PC
• Use high level languages like Python and Java.
• Extend the IO capabilities of the PC.
• Rapid prototype development.
Figure1.1.Block Diagram
2.Product Features
• Connects to PC through USB
• Interfaces - GPIO, PWM, ADC, DAC, SPI, I²C
• Host-side API for programming the ports
• APIs available for Java and Python
• API documentation for easy reference

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 2
• Port interfacing guidelines for common scenarios
• GUI based Control Panel to explore the board
• On-field firmware upgrade through USB

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 3
Chapter2.Connecting to ZIO
In this chapter we will describe the connector used for the ZIO ports and the pins found on each
of the ports. The ZIO has 5 FRC connectors.
1. DIO
2. AIO
3. PWM
4. UART-I²C
5. SPI
1. SPI Pinmap
The SPI header is terminated with serial peripheral interface (SPI) bus, 4 general purpose IO
and power supply. Add-on boards with SPI interface and general purpose IOs like MMC/SD
card,EEPROM etc., can be connected through this header.
Table2.1. SPI Header
Pin # Header Signal Signal Type
1VCC +5V
2SCK TTL Out
3MISO TTL In 1
4MOSI TTL Out
5SS TTL Out
6DIO0 OC 2
7DIO1 OC 2
8DIO2 OC 2
9DIO3 OC 2
10 GND Ground
1 5V tolerant Input
2 Open collector, with 5V pull-up
VCC (Pin 1) This is the +5V power supply for the external devices. The supply has a
total current limit of 200mA when powered through USB.
SCK (Pin 2) This is Serial Clock signal.
MISO (Pin 3) This is the Master Input, Slave Output signal.
MOSI (Pin 4) This is the Master Output, Slave Input signal.
SS (Pin 5) This is the SPI chip select signal.
DIO (Pin 6-9) These are digital input/output signals. These lines can be used to
interface any extra signals required for a SPI devices like SD Card, etc., or

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 4
can be used as chip selects for four other devices. The signals are pulled
up to 5V, through a 10K resistor.
GND (Pin 10) This is the ground signal. All other signals are referenced to the this
signal.
2. UART-I2C Pinmap
The UART-I2C header is terminated with serial communication signals, I²C signals and power
supply. Add-on boards, with different functionalities, can be connected through this header.
Table2.2. UART-I2C Header
Pin # Header Signal Signal Type
1VCC +5V
2RXD TTL In 1
3TXD TTL Out
4SCL OC 2
5SDA OC 2
6DIO0 OC 2
7DIO1 OC 2
8DIO2 OC 2
9DIO3 OC 2
10 GND Ground
1 5V tolerant input
2 Open collector, with 5V pull-up
VCC (Pin 1) This is the +5V power supply for the external devices. The supply
has a total current limit of 200mA when powered through USB.
RXD (Pin 2) This is receive line of serial IO.
TXD (Pin 3) This is transmit line of serial IO.
SCL , SDA (Pin 4, 5) These are I²C bus signals(clock, data), and can be used to connect
I²C devices. The signals are pulled up to 5V, through a 4.7K
resistor.
DIO (Pin 6-9) These are digital input/output signals. These pins can be used
for hand-shake and flow control signals like DTR , RTS , CTS , etc.
The signals are pulled up to 5V, through a 10K resistor.
GND (Pin 10) This is the ground signal. All other signals are referenced to this
signal.
3. DIO Pinmap
The DIO header is terminated with GPIO signals, along with power supply. Add-on boards, with
different functionalities, can be connected through this header.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 5
Table2.3. DIO Header
Pin # Header Signal Signal Type
1VCC +5V
2DO0 TTL Out
3DO1 TTL Out
4DO2 TTL Out
5DO3 TTL Out
6DO4 TTL Out
7DO5 TTL Out
8DO6 TTL Out
9DO7 TTL Out
10 DIO8 OC 2
11 DIO9 OC 2
12 DIO10 OC 2
13 DIO11 OC 2
14 GND Ground
1 5V tolerant input
2 Open collector, with 5V pull-up
VCC (Pin 1) This is the +5V power supply for the external devices. The supply has
a total current limit of 200mA when powered through USB.
DO (Pin 2-9) These are digital output signals. The signal is a 5V logic signal, but the
output can drive a 5V device or 3.3V device with 5V tolerance.
DIO (Pin 10-13) These are digital input/output signals. The signal is a 5V logic signal,
but the output can drive a 5V device or 3.3V device with 5V tolerance.
These signals can be used as control and hand-shake signals. The
signals are pulled up to 5V, through a 10K resistor.
GND (Pin 14) This is the ground signal. All other signals are referenced to this signal.
4. PWM Pinmap
The PWM header is terminated with 5 pulse width modulation signals and power supply. Add-on
boards like LED control, motor control can be connected through this header.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 6
Table2.4. PWM Header
Pin # Signal Name
1VCC
2PWM 0
3PWM 1
4PWM 2
5PWM 3
6PWM 4
7PWM 5
8Freq-In 0
9Freq-In 1
10 GND
VCC (Pin 1) This is the +5V power supply for the external add-on boards. The
supply has a total current limit of 200mA when powered through
USB.
PWM (Pin 2 - 7) These are PWM output signals. The PWM signal when active
produces a stream of pulses whose width can be controlled
through software. An important parameter of a PWM signal is the
duty cycle. The duty cycle is defined as the ratio between the
pulse duration and pulse period of a rectangular waveform.
The PWM signal can be used to control the power delivered to
a load, by controlling the duty cycle of the PWM signal. PWM
signals are generally used for Motor speed control, LED brightness
control, power supplies and wave form generation.
The PWM signal is a 5V CMOS/TTL output.
Freq-In (Pin 8, 9) These are input signals, used for event counting and frequency
measurement. These signals are 5V tolerant CMOS/TTL inputs.
5. AIO Pinmap
The AIO header is terminated with 6 ADC channels, 1 DAC and power supply. Sensors can be
connected to this header.
Table2.5. AIO Header
Pin # Signal Name
1VCC
2ADC 0
3ADC 1

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 7
Pin # Signal Name
4ADC 2
5ADC 3
6ADC 4
7ADC 5
8DAC 0
9VREF-OUT
10 GND
VCC (Pin 1) This is the +5V power supply for the external add-on boards. The
supply has a total current limit of 200mA when powered through
USB.
ADC (Pin 2-5) These are analog input signals connected to a 10-bit Analog-to-
Digital Converter. The maximum analog input voltage is 3.0V.
DAC (Pin 8) This is analog output signal connected to a 10-bit Digital-to-Analog
Converter. The voltage level can vary from 0V to 5V.
VREF-OUT (Pin 9) This is the ADC’s reference voltage.
GND (Pin 10) This is the ground signal. All other signals are referenced to this
signal.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 8
Chapter3.ZIO Recipes
1.GPIO Port
Connecting LEDs. Connect the anode of the LED to an Output signal, and the cathode to GND.
The built-in series resistor is sufficient to limit the current.
Connecting series of LEDs. Since the Output signal can not provide sufficient power for more
than one LED, and external power source is to be used. And the power supply can be controlled
using a MOSFET switch.
The circuit diagram for connecting a series of LEDs is shown above. The following formula can
be used to calculate the resistance for the current limiting resistor. (The voltage drop across the
MOSFET is considered to be negligible.)
R = (Vcc - NVd) / Id
Where,
VdVoltage Drop Across LED
N No. of LEDs
IdCurrent for the required brightness
Vcc LED supply voltage
R Current Limiting Resistor
As an example, for the following parameters,
• Vcc = 12V
• Id = 11mA
• N = 4
the calculated current limiting resistance is 470 ohms.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 9
Connecting relays. Relays are used to control a high-voltage/high-current circuit with a low-
voltage/low-current signal. A relay can be connected to the ZIO through a MOSFET as shown in the
following circuit diagram.
Isolating outputs using opto-coupler. There are situations in which signals from one
subsystem need to be electrically isolated from another subsystem in an electrical equipment. For
example, a microcontroller operating at 5V, controls the power to a load operating at 230V AC. In
such situations, the microcontroller needs to be electrically isolated from the high voltage section,
using a opto-coupler.
Note that, though relays can also be used for this purpose, they are generally bulky, slow, unreliable,
and power hungry.
Connecting to CMOS/TTL inputs. CMOS/TTL inputs can be directly connected to the Output
signal. An example of shift register connected to the Output signals is shown in the following
circuit diagram.
Connecting Switches. Switches can be directly connected between the Input and GND . When
the switch is pressed the Input signal will be low, and when the switch is released the Input
signal will be become high due to the built-in in pull-up resistor.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 10
Detecting External Voltage. Any external voltage input can be connected to the ZIO Input
signal through a MOSFET or a BJT. An example circuit using a MOSFET is shown below.
If the input voltage (Vs) is greater than the threshold voltage of the MOSFET, the Input signal will
be low, or else it will be high.
An example circuit using a BJT is shown below.
If the input current (Is) is greater than (It = 0.5mA / hFE), the Input signal will be low, or else it
will be high. For all practical purposes, a (It = 1mA) input current is sufficient to make the Input
signal go low. The base resistance (Rb) has to be chosen to make the Input signal low, when the
required input voltage is driven.
Rb = (Vs - Vbe) / It
Connecting an Analog Comparator. An analog comparator can be used to identify if the input
voltage is larger than a specified reference voltage. Any operational amplifier can be used as a
comparator, but a dedicated comparators like LM339 which provide open collector CMOS/TTL
outputs are suitable for interfacing with logic circuits. An example circuit is shown in the following
diagram.
Isolating inputs using opto-coupler. As in the case of outputs, inputs can also be electrically
isolated using opto-couplers.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 11
2.I²C Port
Connecting 5V I²C devices. Since the I²C signal are pulled up to 5V, 5V I²C devices can be directly
connected to the I²C port.
Connecting 3.3V I²C devices with 5V tolerance. Any 3.3V I²C device with 5V tolerance can be
directly connected to the I²C port. The device can be powered from an external 3.3V supply, or the
3.3V supply can be generated from the +5V Power using a regulator. An example circuit with the
commonly available LM1117-3.3 regulator is shown below.
IO Expander. Additional digital inputs and outputs, if required, can be obtained using a I²C IO
expander. The PCA8574 provides 8 digital I/O lines, and PCA8578 provides 16 digital I/O lines. An
example circuit using the PCA8574, with I²C device address set to 0x20 , is shown below.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 12
3.SPI Port
Connecting 5V SPI devices. Since the SPI signal are 5V TTL/CMOS signals, 5V SPI devices can be
directly connected to the SPI port.
Connecting 3.3V SPI devices with 5V tolerance. Any 3.3V SPI device with 5V tolerance can be
directly connected to the SPI port. The device can be powered from an external 3.3V supply, or the
3.3V supply can be generated from the +5V Power using a regulator. An example circuit with the
commonly available LM1117-3.3 regulator is shown below.
4.Sensor Port
4.1.Resistive Sensors
Connecting a Potentiometer. The position of potentiometer can be sensed by connecting the
potentiometer to the sensor input as shown in the figure below. When the centre pin 2 of the

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 13
potentiometer is moved from pin 1 to pin 3, the raw value varies from 0 to Nmax. Where Nmax is
given by the following formula.
Nmax = (0xFFFF x Rmax) / (Rmax + 10K)
Here,
• Rmax is the maximum resistance of the potentiometer
• 10K is the internal pull up resistor on the Sensor signal. For more details refer ???.
For a 10K potentiometer, Nmax = (0xFFFF x 10K) / (10K + 10K) = 0x7FFF
Connecting a Resistive Sensor. Sensors whose resistance varies with the parameter being
measured are called resistive sensors. Examples of resistive sensors are Light Dependent Resistor
(LDR), thermistor, etc. These sensors can be directly connected between the Sensor signal and
GND . As the parameter being measured varies, the resistance varies accordingly, and the raw value
(N) produced is given by the following formula.
N = (0xFFFF x R) / (R + 10K)
Here,
• R is the resistance of the sensor
• 10K is the internal pull up resistor on the Sensor signal. For more details refer ???.
An example circuit, using the LDR, is shown below.
4.2.Voltage Sensors
Voltage measurement, -3V to +3V. Though the ADC input range is 0 to 3V, it is possible to
measure voltages between -3V and +3V using a simple circuit. The circuit diagram is shown in the
figure below.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 14
To better understand the operation of the circuit, the circuit is shown with the internal pull-up
resistor on the Sensor signal, in the following diagram.
Using superposition, the voltage at Sensor 0 is given by the following formula.
Voltage at Sensor 0 = 1.5V + Vi / 2
As Vi decreases from 3V to -3V, the voltage at the Sensor 0 decreases linearly from 3V to 0V, and
the raw value from 0xFFFF to 0.
Vi (V) Voltage at Sensor 0 (V) Raw Value
3 3 0xFFFF
0 1.5 0x7FFF
-3 0 0
Voltage measurement, -15V to +15V. The following circuit can be used to measure voltages
in the range -15V to +15V. The input voltages and the corresponding raw values is shown in the
table below.
Vi (V) Voltage at Sensor 0 (V) Raw Value
15 3.0 0xFFFF
0 1.5 0x7FFF
-15 0.0 0
4.3.Non-resistive Sensors
Transistor Buffer. Non-resistive sensors usually generate a voltage signal that varies with the
parameter being measured. Such sensors cannot be directly connected to the Sensor N signal,
due the signal being pulled-up to 3V using a 10K resistor. A transistor buffer can be used to
overcome this problem. The transistor isolates the sensor from the pull-up. A transistor buffer
circuit is shown below.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 15
This is a PNP emitter follower, where the emitter voltage is almost equal to the base voltage. For
a Vi range of 0 to 4.4V, the voltage at Sensor 0 is (Vi + 0.6). To compensate for the added 0.6V,
subtract 0.6 to the obtained voltage.
Temperature Sensor. The LM35 is an example of an non-resistive sensor. The LM35 produces a
voltage that is proportional to the temperature. The voltage output by the LM35, increases by 10mV
for every degree Celsius rise in temperature. As the temperature changes from 2oC to 150oC, the
voltage rises from 0V to 1.5V. The LM35 can be connected to the Sensor port using the transistor
buffer and is shown in the following circuit.
5.PWM Port
LED Brightness Control. An LED can be connected between the PWM N signal and GND as shown
in the following diagram. When the duty cycle is varied the LED brightness varies accordingly.
One Bit DAC. An analog output can be generated from the PWM signal, using a low pass filter
circuit. The low pass filter circuit with an op-amp buffer is shown in the following diagram.
If the analog output has a frequency of F, the PWM frequency should be much higher than F. The
values of R and C are given by the following formula.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 16
RC = 1 / (2 F)
For an output frequency of 1kHz, choosing R = 4kohm, C = 0.04uF.
DC Motor Control. A DC motor’s speed and direction of rotation can be controlled using the
PWM port. The DC motor has to be interfaced through a circuit called the H-Bridge. A simple H-
Bridge constructed using switches is shown in the following diagram. By controlling, the switches
the motor can be made to rotate forward, reverse, brake, and free run. The various switch states
and their effect on the motor is shown in the following table.
S1 S2 S3 S4 Function
0 0 0 0 Free-run
0 1 1 0 Reverse
1 0 0 1 Forward
0 1 0 1 Brake
1 0 1 0 Brake
Forward The current to flows in one direction through the motor.

ZIO, Motherboard User Manual Rev. 2.0
Zilogic Systems Page 17
Reverse The current flows in the opposite direction through the motor.
Brake Applying same voltage to both the terminals, counters the back EMF produced
by the motor, and causes it to come to a sudden stop.
Free-run Power is cut-off from the motor, and the motor free-runs and eventually stops.
To control the motor through digital signals, the switches are replaced by transistors / MOSFETs.
Driver ICs like the L298, that implement the H-Bridge can also be used for motor control
applications. The block diagram of one half of a L298 is shown in the following diagram.
By controlling the inputs, various functions can be selected, as shown in the table below.
In1 In2 Function
0 0 Brake
0 1 Reverse
1 0 Forward
1 1 Brake
When in Forward state or Reverse state, the speed of the motor can be controlled by driving the
inputs with a PWM signal
In1 (Duty Cycle) In2 (Duty Cycle) Function
0% 0% Brake
100% 100% Brake
0% 100% Reverse, full speed
100% 0% Forward, full speed
0% X% Reverse, speed proportional to duty cycle
X% 0% Forward, speed proportional to duty cycle
A circuit for interfacing a DC motor to the PWM port using the L298, is shown in the following
diagram.
Table of contents
Popular Motherboard manuals by other brands

SofTec Microsystems
SofTec Microsystems IDB-HC08AP user manual

DFI
DFI LanParty KT400A user manual

Renesas
Renesas ISL81802EVAL1Z user manual

Biostar
Biostar Hi-Fi H77S manual

Texas Instruments
Texas Instruments TMS320DM648 Getting started guide

Lattice Semiconductor
Lattice Semiconductor CrossLink-NX user guide