11
iCE40 UltraLite Breakout Board
GUI Serial Communication Interface
LED Control via SPI
The Software GUI demonstration program communicates with the iCE40 UltraLite device using a SPI serial com-
munication channel. The SPI interface (mode 0) control link is implemented using a simple write-only protocol (see
Figure 10).
Figure 10. SPI Physical Transaction
SPI Protocol
Data on the MOSI serial line is transmitted MSB first.
Addr[7:0] – Controls which of the 16 bits are updated with REG data.
Note: Unspecified REG bits must be written, but are ignored.
REG[15:0] – Consists of four control fields.
Addr
Bits Written
Bit Position
0x13
REG[3:0]
------------dddd
0x14
REG[7:4]
--------cccc----
0x15
REG[11:8]
----bbbb--------
0x16
REG[15:12]
aaaa------------
0x19
REG[15:0]
aaaabbbbccccdddd
Field
Bit Positions
Function
aaaa
REG[15:12] RGB
Color[3:0]
bbbb
REG[11:8] Brightness[3:0]
cccc
REG[7:4]
Breathe Ramp [3:0]
dddd
REG[3:0] Blink
Rate
[3:0]
ADDR
REG [15:8]
REG [7:0]
CSn
SCK
MOSI
[7:0]