Thanks to a wonderful fellow engineer, Mr. Shabaz, I now have a KNJN.com Pluto II FPGA board with an Altera Cyclone installed to experiment with. It seems to offer the same kind of fun exploration and experimentation as many of the microcontroller boards do. The web site, http://www.fpga4fun.com/, is a very useful site that I am working through while testing these unknown waters. The first project I undertook was one to blink the LED on the Pluto II: http://www.fpga4fun.com/QuartusQuickStart.html. By following the instructions given and taking care to note which pin (PIN_10) has the clock0 signal available on this particular FPGA chip (EP1C3T100C8) and which pin (PIN_25) is connected to the LED, I managed a achieve the desired result of getting Altera's Quartus II to sucessfully compile the simple Verilog HDL file named ledblink.v. The next step will be to actually flash the raw binary file, ledblink.rbf, into the onboard boot rom using my older Dell Lattitude D630 laptop which has the required RS-232 port available since the TXDI serial interface uses that DB-9 to communicate to and from the FPGA. Interesting to note that the compiler creates 70+ small files all sharing the ledblink name prefix.
reg [23:0] count; // declares a 24 bit variable named 'count'
always @(posedge clk) // Procedure occurs only when trailing 'post' edge of clock is detected
count <= count + 24'd1; // the constant being added is 24 bit decimal whose value is 1
end // it will rollover and reset to zero after 2^24 clock cycles
assign LED = count ; // the LED is controlled by the high order bit of the variable 'count'
// the LED is off for 'count' < 2^23 and is on for 'count' >= 2^23; gives 50% duty cycle
// AND continous evaluation of control bit and update of output register
EP1C3T100C8 Datasheet: http://www.altera.com/literature/hb/cyc/cyc_c5v1.pdf
Post blog trivia questions:
Q1: What single parameter can be altered to either increase or decrease the period of the LED's blinking?
Q2: What other parameter can be altered to decrease the period of the LED's blinking?
Happy Trails to you!