Datasheet

4D SYSTEMS uLCD-220RD Display Module
© 2014 4D SYSTEMS Page 11 of 22 www.4dsystems.com.au
uLCD-220RD Display Module
Pulse Out 4.7.
Pulse Out is used to create a single pulse of set
duration on the selected pin of choice, which is
inverted in polarity to the current state of the pin.
This ‘inversion of polarity’ means if a Pin is
currently held HI, and Pulse Out is executed on
that Pin, the pin will pulse LO and then return to
HI. Same with vice versa, if currently LO and Pulse
Out is executed on that Pin, it will pulse HI and
then return to LO.
This is available in both blocking and non-blocking
versions.
Please refer to the table on the previous page for
details on which GPIO can be configured to this.
Note: Each Pulse Out request needs at least a 1ms
lead time due to the scheduling of the event with
the internal 1ms timer.
To enable the Pulse Out function on a GPIO pin,
the following 4DGL functions are used:
pin_Pulseout(pin, value); //Non-Blocking
pin_PulseoutB(pin, value); //Blocking
Where ‘pin’ is the target GPIO pin compatible with
that particular pin function, and ‘value’ is the
length of the pulse in milliseconds.
Please refer to the separate document titled
'DIABLO16-4DGL-Internal-Functions.pdf' for more
information on how to use the Pulse Out
functions, along with the separate document titled
DIABLO16-Processor-Datasheet-REVx.x.pdf’.
PWM Out 4.8.
There are 6 PWM channels available to be
configured by the user, with 4 time bases available
for selection.
The PWM can be configured to be used in Servo
Mode, or Simple Mode.
Please refer to the table on the previous page for
details on which GPIO can be configured for PWM.
Servo Mode allows a millisecond input value with
0.01ms resolution, which runs at a frequency of
approximately 50Hz or 50pps (20ms). The position
of the servo is determined by the width of the
pulse. Generally 1.5ms is 90 degrees, 1ms being 0
degrees and 2ms being 180 degrees. Servos
however vary, and the DIABLO16 PWM control can
be adjusted to suit most applications.
Simple Mode allows a percentage input value with
resolution of 0.1%, which runs at a frequency of
approximately 70KHz.
To enable the PWM output on a GPIO pin, the
following 4DGL function is used:
PWM_Init(pin, mode, value);
Where ‘pin’ is the GPIO compatible with the
particular pin function, ‘mode’ is the type of PWM
to generate, and ‘value’ is the parameter which
defined the PWM pulse itself.
Please refer to the separate document titled
'DIABLO16-4DGL-Internal-Functions.pdf' for more
information on how to use the PWM functions,
along with the separate document titled
DIABLO16-Processor-Datasheet-REVx.x.pdf’.
Pin Counter 4.9.
There are 6 Pin Counter channels available to be
configured by the user, used to count incoming
pulses with the ability to call a user function on
overflow. The Pin Counter function is available for
use in a variety of modes.
The counters can be read and written at any time.
Please refer to the table in section 4.4 ‘Alternate
Pin Functions Overview’ for details on which
GPIO can be configured for this.
To enable the Pin Counter function on a GPIO pin,
the following 4DGL function is used:
pin_Counter(pin, mode, OVFfunction);
Where ‘pin’ is the GPIO pin compatible with this
particular function, ‘mode’ is the type of trigger
used to count on such as Rising/Falling/Edge, and
‘OVFfunction’ is the user function to call when the
counter overflows, if desired.
Please refer to the separate document titled
'DIABLO16-4DGL-Internal-Functions.pdf' for more
information on how to use the Pin Counter
functions, along with the separate document titled
DIABLO16-Processor-Datasheet-REVx.x.pdf’.