Datasheet

4D SYSTEMS uLCD-220RD Display Module
© 2014 4D SYSTEMS Page 12 of 22 www.4dsystems.com.au
uLCD-220RD Display Module
Quadrature In 4.10.
There are two Quadrature Input channels available
on the DIABLO16 processor, which requires 2 GPIO
pins each.
Please refer to the table on the previous page for
details on which GPIO can be configured for
Quadrature Input.
Quadrature Input allows a quadrature encoder to
be connected, and the position counter and delta
counter can be read at any time.
To enable the Quadrature Input function on a set
of GPIO pins (2 pins required), the following 4DGL
function is used:
Qencoderx(PHApin, PHBpin, mode);
Where Qencoderx’ is substituted for Quencoder1
or Quencoder2 accordingly, ‘PHApin’ is the pin
connected to the A Phase of the Encoder, ‘PHBpin’
is the pin connected to the B Phase of the Encoder,
and mode’ is not currently used so is to be set to
zero (0).
Please refer to the separate document titled
'DIABLO16-4DGL-Internal-Functions.pdf' for more
information on how to use the Quadrature Input
functions, along with the separate document titled
DIABLO16-Processor-Datasheet-REVx.x.pdf’.
Analog Inputs 4.11.
Please refer to the table in section 4.2 for details
on which GPIO can be configured to be analog
inputs.
The analog inputs on the DIABLO16 have a range
of 0 to 3.3V, each with a max resolution of 12-bits.
The analog inputs can be read using three modes,
standard mode, averaged mode or high speed
mode.
Standard Mode results in a sample being
immediately read. Standard Mode can read over
40000 values per second. Operates at 12-bit.
Averaged Mode results in a 16 sample being
immediately read and their average returned.
Averaged Mode can read approximately 20000
values per second. Operates at 12-bit.
Highspeed Mode collects a user specified number
of samples at a user specified rate/frequency and
can execute a user function when complete. The
updated value updates approximately 250000
times across 1-4 channels. Operates at 10-bit.
To enable a GPIO to be used as an Analog Input for
Standard or Averaged modes, the following 4DGL
function is used to set the pin:
pin_Set(mode, pin);
Where ‘mode’ is the desired mode defined above,
either Standard or Averaged, and ‘pin’ is the GPIO
compatible with this function which is to become
an Analog Input.
For highspeed mode, the following 4DGL function
is used to set the pin and define the parameters:
ana_HS(rate, samples, 1buf, 2buf, 3buf, 4buf, func);
Where ‘rate’ is the number of samples per second,
‘samples’ is the number of samples to collect per
channel, ‘1buf’ ‘4buf’ are the buffer addresses
for the 4 channels, and ‘func’ is the user function
to call when the number of samples specified have
been collected.
Please refer to the separate document titled
'DIABLO16-4DGL-Internal-Functions.pdf' for more
information on the Analog Input functions, along
with the separate document titled DIABLO16-
Processor-Datasheet-REVx.x.pdf’.