Datasheet

4D SYSTEMS DIABLO16 Processor
© 2014 4D SYSTEMS Page 15 of 33 www.4dsystems.com.au
DIABLO16 PROCESSOR
The following table illustrates which of the GPIO
can be used for the three different I
2
C channels
available.
DIABLO16 Alternate Pin Configurations
I
2
C Communications
I
2
C1 SDA
I
2
C1 SCL
I
2
C2 SDA
I
2
C2 SCL
I
2
C3 SDA
I
2
C3 SCL
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 Section 5.10
SPI 5.9.
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.
Example Connection Diagram
This illustrates SPI being configured on GPIO PA4,
PA6 and PA7, with user GPIO PA5 being used for
the CS, and connections are to an external SPI
Flash Chip.
Note: This example is an illustration of SPI
connection to the Diablo16 processor. It is not the
complete circuit nor illustrates best practice.
Please refer to the separate document titled
'DIABLO16-4DGL-Internal-Functions.pdf' for more
information on how to use the SPI functions.