Showing posts with label FPGA. Show all posts
Showing posts with label FPGA. Show all posts

Wednesday, November 10, 2021

Mailbag 10 November 2021

 

In my mail today a new FPGA board to play with. This is a Lattice ICEstick ICE40HX1K-STICK-EVN .
For this FPGA free software and several demo applications are available.  Also DigiKey recently posted on YouTube a video  Introduction to FPGA Part 1 - What is an FPGA? | Digi-Key Electronics , a video in a new series of videos where this FPGA will be used.

Normaly i need to wait minimal 10 day before i receive items when ordering things (as i often order items using Aliexpress in China). This item was not ordered in China and came almost within 48 hours. The device was packaged using an extreme amount of packaging material.
I hope to find soon time to start testing and using it as it seemed to me an interesting  addition to my "FPGA collection".

I already have two other FPGA boards, a EP2C5T144 Altera Cyclone ii and a Cyclone IV board with several IO.
So this is my third FPGA board. 
Besides possibilities to interface your own hardware there is also interesting hardware on the board to play with e.g. 5 Leds and the IrDA transceiver.
The board looks like a big USB plug and can be plugged in directly in a free USB slot. (However it is recommended to use a USB cable as this will make it more easy to experiment.)
Currently i am also working on some other interesting projects, however starting with this FPGA board is a temptation.

Tuesday, March 17, 2020

Keyboard with Leds for Arduino



4X4 Matrix Keyboard For Arduino Array Module 16 Key Push Buttons Tastatur Switch Keypad Panel 4*4 Tasten 8LEDs Accessory DIY Kit
This module is advertised for Arduino, however i had plans to use it for FPGA experiments.
Just when i did think i needed to build something like this on a board as there could be a big delay in delivery due to the current situation in the world i received it this AliExpress item in my mailbag.
Small where where included, i just needed to screw them in position.




I did nit yet test it, however it seems an interesting small and cheap module to add some buttons and led's to projects or for development.

  • 16 keys in a 4*4 matrix
  • 4 keys connected to ground and with 1k resistors to VCC
  • 8 leds with 1k resistors and connected to VCC



KEY_A

KEY_B
(Photos taken with my phone, Schematic diagrams / circuits copied from AliExpress)
LED

Saturday, March 14, 2020

FPGA First steps -4- Cyclone IV (photos)

Some more photo's  of my Cyclone IV FPGA board.


Thursday, March 12, 2020

FPGA First steps -3- / Cyclone IV

Update about my FPGA adventures.
I also received my second FPGA experimenting board with a Cyclone IV
The Cyclone II board is a nice development board with a lot of IO pins. To do real experimenting and leaning how to use FPGAs you need to add some additional hardware as the button and led on the board. I did this using a breadboard, some Dupont wires leds resistors and buttons. I also have plans to make a pcbs with some hardware for this board.
The Cyclon IV board has more on board IO. (Displays, buttons, leds, buzzer, dip-switches, video a ps2 keyboard and several pins. Below a photo of my Cyclone IV board in action,
On the left is the USB blaster connected to the board for programming. It is possible to power the FPGA board using the power connector on the topleft. (On the photo below the USB cable of the USB Blaster. I used the alternative method with an USB cable (connector above the 7 segment display).
The software worked when i selected Cyclone IV GX and EP4CE6E22. Also i include a video from my YouTube channel. You see a 4 digit counter. After a few seconds i loaded a new FPGA program / configuration file using the USB Blaster. (the demo program led_test.sof )


Wednesday, March 11, 2020

FPGA First steps -2- (General procedure & Resetting the screen)

As mentioned in my previous blog post i started experimenting with a Cyclone ii FPGA. There are several steps involved. It can look complicated. Therefore before diving into details i will explain the big picture in this blogpost.

  •  Install the software
  •  Create the FPGA logic
  •  Connect inputs and outputs to physical ports (Pin Planner)
  •  Compiling the created logic
  •  Upload the project to the FPGA  (Program) 
  •  Test the project in the FPGA

Install Software:
To use my Cyclone ii FPGA
i installed Quartus ii  version 13.1 software on my computer (Windows 10)
and the USB blaster software
Quartus is a big program so downloading and installing will take a long time. It is more a interface connecting different parts for managing the FPGA. As it are different modules sometimes saving before switching to another module is needed.

Create the FPGA logic
To create the FPGA logic there are several options in the Quartus ii package e.g.
Graphical interface
VHDL
Verilog
As the graphical interface looks intuitive and i found a YouTube instruction about it. Therefore i started my first experiments with this.

Connect inputs and outputs to physical ports (Pin Planner)
To connect the logical inputs and outputs a part in Quartus named Pin Planner can be used.
Before this can be done the logical inputs and outputs needs to be present. These logical ports can be created easy by compiling the design. This first compilation will not output something that will work as at that moment the physical outputs are not included in the compilation.
However it will prepare the logical ports for the Pin Planner. In the Pin Planner these ports can be manual assigned to to physical ports.
After the assignment of the physical ports another compilation needs to be done to include information about the physical ports.

Compiling the created logic
Compiling is relative simple and can be started different ways:
Using the menu 
Processing - Start Compilation
Ctrl+L
The button with a triangle
The compilation can give Errors when the compilation was not successful. Otherwise there can (and will) be Warnings. 

Upload the project to the FPGA  (Program) 
To upload the result to the FPGA ("Programming") there are two options
Store it temporary 
Store it permanent
When storing it permanent it can be overwritten later by storing something else. The difference is that the settings are erased after powering the system down when storing it temporary. 

Test the project in the FPGA
Details how to test depends on the created logic.
It is also possible to test the created FPGA logic before uploading using a simulator.
This simulator requires some configuration.

Help
An important file with links to the software Handbook and other resources is can be found in Quartus ii under
  Help
     Readme File

During testing it you can easy change the displayed screen in Quartus II
It is possible to reset the windows to the setting during installation without repeating the installation process.
See https://www.intel.com/content/www/us/en/programmable/support/support-resources/knowledge-base/solutions/rd07092001_1535.html for two options to do this:

Using a menu option in the Quartus II Graphical User Interface (GUI):
Choose Tools and then select Toolbars.
Click the Toolbars tab.
Click Reset All.
Click OK.

Using a Windows Command (DOS) Prompt:
Close the Quartus II software.
Open a Windows command prompt or DOS window (Start -> Programs -> Command Prompt).
At a command prompt, change directory (using the cd command) to the Quartus installation directory/bin.
Type the following: quartus -reset_desktop

During my experiments/testing/learning i needed to use the second option (using the Windows Command prompt as i did not find another way to get the screen back in a reasonable status.

Thursday, February 6, 2020

FPGA first steps -1-

My last blog post was more than a month ago. However this does not mean that i did not projects or learned new things. For a long time i wanted to do something with FPGAs but never found a good way to start.
Recently i did some research how to start with board below 22 euro from AliExpress. I found some boards. e.g. the EP2C5T144 and EP4CE6E22C8N Altera FPGA Cyclone ii and iv development boards. These boards also need an USB blaster (that only a cost a few euros). They are not the newest boards but offer a cheap way to start.

Sooner than expected i received EP2C5T144 Altera Cyclone ii development board from China. This blog post is a short introduction also to log results of some of my experiments until now.
The Cylone ii is an older FPGA that is not supported anymore in the newest software only Quartus II version 13.1 (servicepack p1 version 13) or lower can be used. There is a free version of the software. Registration for download is required. The software can be a bit confusing as it has many options. The free version is sufficient to use the FPGA. Some options only work in the payed version.
There are warning not to use directory or file names with spaces.
The development board came together with an USB blaster. The 4 Dupont connectors 2*14 pin where not yet soldered.
On circuit diagram i found for this board is an IS61LV25616-10T memory chip. As mentioned in the text in the article i found this is more the explanation how to connect the chip as it is not on the development board. Perhaps if i ever make an expansion board ( JLCPB ) for this FPGA i will add this to the board as these chips are still available.
The board has two connection points for the USB blaster:
JTAG one close to the 2*14 pins for temporary programming using an *.sof file.
AS close to the edge of the PCB for more permanent programming using a *.pof file.
The board has a power led and 3 leds connected to the FPGA
Led D2 = PIN_3
Led D4 = PIN_7
Led D5 = PIN_9
For input there is one push button "key" connected to PIN144
Soon i discovered the FPGA is not powered over the USB blaster and needs a separate 5V power source. Fortunately i could temporary cannibalize a 5V power adapter with the right connection while waiting for a power adapter from China.
Replicating and adapting some simple experimenting with this FPGA i also discovered a little issue. Perhaps i do not configure the i/o the right way. Touching the push button with my finger (without really pushing) also had effect on the leds. I only could work reliable with the logic when using a pen or some other con conduction material to push the button This issue was not reported in the articles i read.
The one input pin also limits the possibilities for experiments so i decided to solder the Dupont pins. As i was soldering i also did put a 2 pin Dupont connector on P8 to easy access to the 5V power. I could resist my temptation to solder (more Arduino style) female in stead of male 2*14 pins. So i am still compatible with other FPGA owners.
This way it was easy to connect more buttons. Also input is more comfortable without issue when touching the button. I found a YouTube video with information where 5 buttons wired to pin 40 - 44 and the other side the button connected to ground. This is not explained in the video, however the next FPGA video of this YouTuber is explained that this connection to ground will give inverse logic (1 is default 0 = pushing the button). I did not repeated his experiment but used this configuration with graphical creating some logic in the Quartis ii. It did not work and i also could not find the setting for internally configuring a resistor for the input pin. Finally i changed the button connection from ground and connected it to VCC (3V3 pin 28 on P2). After this change my circuits did work.
However the leds also dimmed when i touched a ground connection with my hand. Even some times the leds reacted when moving my hand near the wires, especial when leds where not included in a circuit.
In an next blog post i will try to explain in more detail how to start using this interesting FPGA the software to create a project.
Summary:
It is possible to start cheap with FPGA using an EP2C5T144
You also need a USB blaster and a 5V power supply and perhaps a soldering iron if headers are not soldered yet.
Use the free software Quartus II version 13.1 (or below) as the higher versions do not support the Cyclone ii anymore. Do not use space character.
It is nice to also have some buttons and Dupont wires as this board only has one push button for input.