At my this post i will open a new area to my workings. From today on, i started to work about VDHL(1) language and FPGA(2) demo board. I took e lesson about VHDL language two years ago. We used Xilinx’s(3) program. Then i refreshed my knowledge about basics of digital computing. From now on i will use Altera’s (4) “Altera Quartus II”.
If u have no idea about usage of Quartus 2 and Modelsim just watch this video (5). This guys recounts well and it is gonna help you.
I designed this program to make the basic logic operations.
library ieee; use ieee.std_logic_1164.all; entity example is port ( A : in std_logic_vector (1 downto 0); B : out std_logic_vector (3 downto 0)); end example; architecture behavior of example is begin B(0) <= A(0) or A(1); B(1) <= A(0) and A(1); B(2) <= A(0) xor A(1); B(3) <= A(0) nand A(1); end behavior; --ozturkgokhan.com
Let us examine the output of program.
As you see A(0)=0, A(1)=1. By the varying yellow line you can see results of outputs at second column. B(0) is the output of or gate. '0' or '1' equals 1. B(1) is the output of and gate. '0' and '1' equals 0 B(2) is the output of xor gate. '0' xor'1' equals 1 B(3) is the output of nand gate. '0' nand '1' equals 1
Have a nice day, Gökhan Öztürk (1) https://en.wikipedia.org/wiki/VHDL (2) https://en.wikipedia.org/wiki/Field-programmable_gate_array (3) https://en.wikipedia.org/wiki/Xilinx (4) https://en.wikipedia.org/wiki/Altera (5) https://www.youtube.com/watch?v=9xr9ARUDxz4
At my this project i am going to make edge detection. I will use matlab’s built in functions.
This is my original photo. I will read it, convert to the gray, finally from the gray photo i will detect the edges. As you can see from the code below, i used sobel edge detection.
lena=imread('lena.jpg'); lena_gray=rgb2gray(lena); lena_gray_double=double(lena_gray); lena_gray_double=lena_gray_double/max(max(lena_gray_double)); figure; edge(lena_gray_double,'sobel') title('Built-in Edge Detected Image With Sobel'); %https://ozturkgokhan.com/
Hi, today i will try to plot poles and zeros of an parametric equation. A parametric equation type is given below b(n) and a(n) are the coefficients of the equation Assume we know the coefficients. Let's try to plot at z- plane.
b1=[1 -0.4944 0.64]; b2=[1 0.4944 0.64]; root_a1=roots(a1); root_b1=roots(b1); figure;zplane(root_b1,root_a1); title('Pole-Zero Diagram of a1-b1 System'); %http://ozturkgokhan.com
As u see we managed the process.
Now i will try to make downcounter at app inventor2.
At my first post about app inventor, i made button control.
In this application we will use it and we will create a downcounter.
We will use clock, button and label component.
When we push the start button, a counter will start to count from ten to zero..
I defined a variable named “value1” that has the value of ten. At the beginning -when screeen initialized- clock is disabled. When we push the button, value of the “value1” will decrease one-by-one until it reaches to zero. When the counter’s value is zero, button’s text will change to “finished”. Then it will wait for another input as pushing.