ice40-prim-0.3.1.0: Lattice iCE40 Primitive IP
Copyright(c) David Cox 2021
LicenseBSD 3-Clause
Maintainerstandardsemiconductor@gmail.com
Safe HaskellNone
LanguageHaskell2010

Ice40.Rgb

Description

RGB hard IP primitive from Lattice Ice Technology Library. See iCE40 LED Driver Usage Guide for more information.

Synopsis

Documentation

rgbPrim Source #

Arguments

:: String

currentMode - Parameter values: "0b0" = Full Current Mode (Default), "0b1" = Half Current Mode.

-> String

rgb0Current

-> String

rgb1Current

-> String

rgb2Current

-> Signal dom Bit

curren - enable the mixed signal control block to supply reference current to the IR drivers. When it is not enabled (CURREN=0), no current is supplied, and the IR drivers are powered down. Enabling the mixed signal control block takes 100us to reach a stable reference current value.

-> Signal dom Bit

rgbleden - enable the SB_RGB_DRV primitive. Active High.

-> Signal dom Bit

rgb0Pwm - input data to drive RGB0 LED pin. This input is usually driven from the SB_LEDD_IP.

-> Signal dom Bit

rgb1Pwm - input data to drive RGB1 LED pin. This input is usually driven from the SB_LEDD_IP.

-> Signal dom Bit

rgb2Pwm - input data to drive RGB2 LED pin. This input is usually driven from teh SB_LEDD_IP.

-> Signal dom (Bit, Bit, Bit)

(RGB0 LED output, RGB1 LED output, RGB2 LED output)

SB_RGBA_DRV primitive is the RGB LED drive module which contains 3 dedicated open drain I/O pins for RGB LED outputs. Each of the RGB LED output is bonded out together with an SB_IO_OD primitive to the package pin. User can either use SB_RGB_DRV primitive or the SB_IO_OD primitive to drive the package pin, but not both.

The primitive allows configuration of each of the 3 RGB LED outputs individually. When the RGBx_CURRENT parameter of RGBx output is set to "0b000000", then SB_IO_OD can be used to drive the package pin.

RGB Current ParameterFull Mode CurrentHalf Mode Current
"0b000001"4mA2mA
"0b000011"8mA4mA
"0b000111"12mA6mA
"0b001111"16mA8mA
"0b011111"20mA10mA
"0b111111"24mA12mA