Skip to content

Testing the Examples

Juan Gonzalez-Gomez edited this page Jun 13, 2021 · 117 revisions

Contents

Introduction

The iceK collection includes some examples for testing the blocks with different boards. These examples can also be used for testing the boards with icestudio, as the examples are very simple. Therefore, if it is the first time you are using icestudio with you board these examples could be a good starting point

Constant are very important! Specially the bit constant! With them we can create our first "hello world" circuit for turning on LEDs!

Turning on LEDs

Examples on how to use constants for turning LEDs on and off

Alhambra II

Examples for the Alhambra II Board

Example: 01-One-LED

The LED 0 is turned on

  • Result:

Example: 02-Two-LEDs

The LEDs 0 and 1 are turned on

  • Result:

IceStick

Examples for the iceStick Board

Example: 01-One-LED

  • Result: The LED D1 (red) is turned on

Example: 02-Two-LEDs

  • Result: The LEDs D1 and D2 are turned on

TinyFPGA

Example: 01-One-LED

  • Result: The LED is turned on

IceBreaker

Example: 01-One-LED

The LEDs G and R of the iceBreaker board work with negative logic. The constant 0 is used for turning the LED on and the constant 1 por turning it off

  • Result: The LED is turned on

Example: 02-Two-LEDs

  • Result: The LEDs G and R are turned on

NandLand Go Board

Example: 01-One-LED

  • Result: The LED D1 (green) is turned on

Example: 02-Two-LEDs

  • Result: The LEDs D1 and D2 are turned on

Icezum Alhambra

Example: 01-One-LED

  • Result: The LED0 is turned on

Example: 02-Two-LEDs

  • Result: The LEDs 0 and 1 are turned on

Mystorm BlackIce

Example: 01-One-LED

  • Result: The LED1 (blue) is turned on

Example: 02-Two-LEDs

  • Result: The LED1 (blue) and LED2 (green) are turned on

Lattice iCE40-HX8K Breakout Board

Example: 01-One-LED

  • Result: The LED0 (D9) is turned on

Example: 02-Two-LEDs

  • Result: The LED0 (D9) and LED1 (D8) are turned on

Lattice iCE40UP Breakout Board

Example: 01-One-LED

For turning the RGB LED the red component should be activated and the green and blue components deactivated. As the RGB led works with negative logic, a 0 bit should be placed on the Red output, and a 1 bit on the Green and Blue outputs

  • Result: The RGB LED is turned red

Example: 02-Two-LEDs

  • Result: The RGB LED is turned yellow because the red and green components are activated

Radiona ULX3S-12F

Example: 01-One-LED

  • Result: The LED0 (D0) is turned on

Example: 02-Two-LEDs

  • Result: The LEDs 0 and 1 (D0 and D1) are turned on

Fomu

Example: 01-One-LED

For turning the RGB LED Green, the green component should be activated and the red and blue components deactivated. As the RGB led works with negative logic, a 0 bit should be placed on the Gree output, and a 1 bit on the Red and Blue outputs

Also the USB signals should be set to "0"

  • Result: The RBG LED turns green

Example: 02-Two-LEDs

  • Result:

iCESugar-1.5

Example: 01-One-LED

For turning the RGB LED Red, the red component should be activated and the Green and blue components deactivated. As the RGB led works with negative logic, a 0 bit should be placed on the red output, and a 1 bit on the Green and Blue outputs

  • Result: The RGB LED is turned red

Example: 02-Two-LEDs

  • Result: The RGB LED turns magenta

Testing in another boards

If you want to test the examples in another boards not mentioned here, but supported in Icestudio just follow these steps:

  1. Select your board from the Select/Board menu
  2. Make sure the iceK collection is installed and selected in Icestudio
  3. Choose an example for another board from the File/Examples/01-Turn-on-LEDs menu
  4. A pop up window will be shown asking you to load the example for board it was designed or convert it to the one you have selected. Click on convert. In this example, the current selected board is UPDuino v.3.0, and the examples opened was designed for the Alhambra II board:

  1. The example is open BUT the output pins will be in blank, with the name NULL or with an aleatory chosen pin. This means that you have to select first which pins you want to use in your board (every board has different pins, so sometimes it is not possible to automatically convert from one board to another). It should be done manually by the user

  1. If you do not select the pins, an error message will be shown. It is encouraged to always select manually the pins, for the safe side