![4D systems gen4-HMI Series Datasheet Download Page 10](http://html1.mh-extra.com/html/4d-systems/gen4-hmi-series/gen4-hmi-series_datasheet_3118545010.webp)
gen4-HMI Display Modules
gen4-uLCD-50D Page 10 of 29 www.4dsystems.com.au
Further information is available in the next sections for
each of the alternative pin functions.
Note: Quadrature In requires 2 Pins
The following table illustrates which of the GPIO can
be used for the three different SPI channels available.
DIABLO16 Alternate Pin Configurations
SPI Communications
SP
I1
S
D
O
SP
I1
S
D
I
SP
I1
S
C
K
SP
I2
S
D
O
SP
I2
S
D
I
SP
I2
S
C
K
SP
I3
S
D
O
SP
I3
S
D
I
SP
I3
S
C
K
PA0
✓
✓
✓
PA1
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA2
✓
✓
✓
PA3
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA4
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA5
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA6
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA7
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA8
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA9
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA10
✓
✓
✓
PA11
✓
✓
✓
PA12
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA13
✓
✓
✓
✓
✓
✓
✓
✓
✓
PA14
PA15
The following table illustrates which of the GPIO can
be used for the three different I
2
C channels available.
DIABLO16 Alternate Pin Configurations
I2C Communications
I
2
C
1
S
D
A
I
2
C
1
S
C
L
I
2
C
2
S
D
A
I
2
C
2
S
C
L
I
2
C
3
S
D
A
I
2
C
3
S
C
L
PA0
✓
✓
✓
✓
✓
✓
PA1
✓
✓
✓
✓
✓
✓
PA2
✓
✓
✓
✓
✓
✓
PA3
✓
✓
✓
✓
✓
✓
PA4
✓
✓
✓
✓
✓
✓
PA5
✓
✓
✓
✓
✓
✓
PA6
✓
✓
✓
✓
✓
✓
PA7
✓
✓
✓
✓
✓
✓
PA8
✓
✓
✓
✓
✓
✓
PA9
✓
✓
✓
✓
✓
✓
PA10
✓
✓
✓
✓
✓
✓
PA11
✓
✓
✓
✓
✓
✓
PA12
✓
✓
✓
✓
✓
✓
PA13
✓
✓
✓
✓
✓
✓
PA14
SPECIAL
SPECIAL
SPECIAL
PA15
SPECIAL
SPECIAL
SPECIAL
SPECIAL – please see
4.5.
SPI
There are 3 user configurable SPI channels available
for mapping to GPIO, for use by the user for the target
application. All 3 SPI channels are Master only, and
cannot be configured to be slaves at this time.
The SPI Bus speed is configurable using the SPIx_Init()
Function in 4DGL, and allows various speeds from
78.125Khz to 17.5Mhz.
Please refer to the table on the previous page for
details on which GPIO can be configured for SPI.
Note: The additional SPI channel (SPI0) is dedicated to
memory cards and cannot be reconfigured for
alternate uses.
To map an SPI channel to a set of GPIO pins, the
following 4DGL functions are used:
SPIx_SCK_pin(pin); // Map the SCK pin
SPIx_SDI_pin(pin); // Map the SDI pin
SPIx_SDO_pin(pin); // Map the SDO pin
Where ‘SPIx’ is substituted with SPI1, SPI2 or SPI3
accordingly, and ‘pin’ is the target GPIO pin compatible
with that particular pin function.
Chip Select for use with SPI can be any other unused
GPIO pin, configured as a Digital Output. The lowering
and raising of the selected CS (GPIO) pin is done
manually by the user is the 4DGL application.
Please refer to the separate document titled
'DIABLO16-4DGL-Internal-Functions.pdf'
for more
information on how to use the SPI functions, along
with the separate document
titled ‘DIABLO16-
Processor-Datasheet-REVx.x.pdf’
.
4.6.
I2C
There are 3 user configurable I
2
C channels available for
mapping to GPIO, for use by the user for the target
application. All 3 I
2
C channels are Master only, and
cannot be configured to be slaves at this time.
Please refer to the table on the previous page for
details on which GPIO can be configured for I
2
C.
To map an I
2
C Channel to a set of GPIO pins, the
following 4DGL function is used:
I2Cx_Open(Speed, SCLpin, SDApin);