Hello nice to meet.
Macnica 2022 new graduate employee, Ignorance-kun.
I have a degree in electrical and electronic engineering, but my initial state is that I can't read circuit diagrams, I'm afraid of soldering, and I can't program.
I, who is a complete beginner about FPGA, was able to successfully complete the production training for new employee training this summer.
Here, while looking back on the contents of the training, I would like to reconfirm what I should have known in advance, and make it a [lesson for my past self].
Please take a look at the three months of hard work.
Introduction
The thing that ignorance ignorance kun created using FPGA is"7 segment LED clock".
I think people have different opinions, such as "I made a mistake like this, it's nostalgic" or "I just didn't understand this part", but I hope you can see it.
By the way, in the first place FPGA What? For those who say, senior article “What is FPGA? Super Elementary Edition” Please refer to the.
▶ Related content: Getting started with Intel FPGA
table of contents
This time, First shot! What I thought was "I didn't know it was dangerous!" I will talk to you.
・ Parts used and development software
・ Practice assignments and plans
・ Things that were dangerous not to know
Introduction of products
First, please take a look at the completed 7-segment LED clock (hereafter referred to as 7seg clock).
Between 0 and 12 o'clock, the left face is displayed.
Press the button to the troubled face on the right.
At later times it is usually the left side of the face.
Smile when you press the button.
The 7-segment LED normally displays hours:minutes in four digits, such as 14:30.
As long as the push button is pressed, the last two digits will switch to display seconds.
And the face is displayed on the dot matrix LED, showing the expression according to the time of the 7 seg ❤
Components used and development software
The parts and development software that created the 7seg clock are as follows.
parts
Intel® Cyclone® 10 LP Evaluation Kit EK-10CL025U256 |
7-segment LED OSL-40562-IG |
dot matrix LED MOA20UB019GJ |
universal board PICOK 400A 94V-01521 |
push-button |
Connector (pitch: 2.54mm) resistor, transistor Such |
development software
Exercise assignments and plans
There were two issues that came up in this production practice.
① Operate in hardware language
② Use a Nios® II soft-core processor and run in a software language
The implementation was divided into steps as shown in the figure below.
Ignorance ignorance-kun thinks even though he doesn't understand,
I decided to let Nios® II handle the clock display in a hardware language and the dot-matrix LED control.
Then, we immediately started Step 1.Creating specifications, which will be the basis for the development of the 7seg watch.
Create specifications
In the specifications, I wrote an overview of the 7seg clock, details of the operation specifications, a parts list, a pin list, a connection diagram, etc.
Identify GPIO pin number
7seg and dot-matrix LED are mounted on the self-made expansion board,
Connects to the GPIO pin socket on the Cyclone® 10 LP Evaluation Kit.
Therefore, change the placement of "Cyclone® 10 LP User I/O Pins" and "GPIO Pin Socket Pins" to
I had to find out.
Hurry up, ignorant ignorant Get the schematic from Intel's official website Did.
I searched for GPIO from the pin layout written in the circuit diagram of the evaluation kit with ctrl key + F andfound out where it corresponds to on the header.
As a result of investigation, it turned out that there are 35 pins that can be used as GPIO of the GPIO pin socket.
If the number of pins of all the parts to be placed on the expansion board is 35 or less, it is OK, so let's start procuring parts!
Nowadays, it's easy to order online, but Ignorance ignorance-kun stepped into Akihabara, an uncharted territory, following an order, or rather, advice from his seniors, who told him to "see things in person and pick them up and study them." bottom.
Create a connection diagram
I thought about which pin of the GPIO pin socket to connect the parts I bought, and made a connection diagram.
soldering
I was scared and kept my distance from this person, but... our eyes met.
If you are locked on, you have no choice but to do it...
Yes!
As a result of thinking only about connecting, it became such a wiring! !
I wonder why they messed up the aerial wiring like this
I can think of it now.
But this time, I was filled with a sense of accomplishment.
That's it, you've completed Step 1.
in retrospect...
What I didn't know was crazy
1. Connection relationship between pins and parts
Actually, I didn't know the relationship between the Cyclone ® 10 LP I/O pins on the evaluation board and the pins on the GPIO pin socket, and the relationship between the pins on the GPIO socket and the components on my board....
GPIO, yes yes, you should find it → What are you going to do next...?
You decide where to connect the component pins and the I/O pins, right? → What are you going to do next...?
Ignorance ignorance-kun who has become "Man what to do next".
Because I didn't understand the fundamental part of "each I/O pin of Cyclone® 10 LP connects to each component just by wiring GPIO and components on the expansion board".
The Cyclone® 10 LP evaluation board has the FPGA and each pin of the GPIO pin socket already connected. All I had to do was decide. It took me some time there.
2. How to use parts
I managed to identify the location of the GPIO while looking at the schematic of the Cyclone® 10 LP.
Where should I connect...
Aw? There are not many parts pins! ? I thought.
Shirazu Shirazu's plan is that 7seg should have 28 pins (8 pins x 4 digits) and dot matrix should have 35 pins (7 rows x 5 columns)...
I seriously thought that 7seg and dot matrix had only 12 lines each, so it must be a defective product (laughs).
In order to grasp the lighting specifications of each LED with that assumption, I used a tester while looking at the specifications of the parts and made them light up one place at a time.
It turns out that the LED pins have an anode side and a cathode side.
Huh?? But I still don't have enough pins...
Isn't it impossible to make multiple places light up at the same time?
In order to dispel that doubt, I got hints from seniors and researched.
Then what
You need to use dynamic lighting! !
Hoho~, I see. That's how this is used.
To be honest, I just bought the parts I liked, but considering the number of GPIOs that can be used,
Ignorance Ignorance's selection of parts was the correct answer.
After this, in the next step, I didn't know that I would suffer from dynamic lighting,
"I can see the path to this training!"
Good point
There were a few things that made me realize that "this was the right thing to do" when creating the specifications and creating the board (Step 1).
It would have been better if I could have clarified as much as possible what I did not understand at the stage of the specification sheet.
I wish I knew what I was working on and what the end result would be.
Specifications should be written in a way that anyone can understand
I didn't do aerial wiring by soldering
Whether it's the wiring in the air or the soldering is loose,a slight impact on the expansion board will affect the lighting of the LED...
Next time preview
Ignorance ignorance-kun who thinks that he can do something despite the doubtful weather from step 1.
How did he go about writing the code!
Next time, on the verge of passing out? Hardware design!
Well, let's go (laughs)