0% found this document useful (0 votes)
31 views5 pages

Beginning FPGA Programming - Partie54

This chapter discusses using light sensors to create a tripwire by turning a laser pointer into a hi-tech sensor. It describes programming an FPGA board to use two Altera IPs - an ADC IP and PLL IP. The document then explains how to set up the tripwire using a laser pointer and light sensor, with the sensor connected to the FPGA board. When the laser is broken by someone passing through, it will trigger a counter. Finally, it summarizes the chapter, including using the IPs and creating simple state machines and counters in Verilog.

Uploaded by

ali alilou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

Beginning FPGA Programming - Partie54

This chapter discusses using light sensors to create a tripwire by turning a laser pointer into a hi-tech sensor. It describes programming an FPGA board to use two Altera IPs - an ADC IP and PLL IP. The document then explains how to set up the tripwire using a laser pointer and light sensor, with the sensor connected to the FPGA board. When the laser is broken by someone passing through, it will trigger a counter. Finally, it summarizes the chapter, including using the IPs and creating simple state machines and counters in Verilog.

Uploaded by

ali alilou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire

Figure 12-47.  Start programming the design

Step 4: If you want to make the design able to reload after power is lost on the board, you need to select
light_sensor.pof file. This file will ask the programmer to program the file to the flash memory which is
nonvolatile. Figure 12-48 shows the difference when you select a .pof file. I suggest you use the .sof file to
try out a couple of times and tune the high boundary and low boundary values. You can use the .pof file
to program the FPGA when it is close to the final design. Remember to check the Program/configure box
before you click the Start button.

261
Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire

Figure 12-48.  Start to program the design with the .pof file

12.6.5.1 My Tripwire Setup


I use masking tape to stick my BeMicro Max10 on one side and a laser pointer on another side. Anyone
passing through my door will trigger the counter and I will know many people go into (or leave) my room.
Figure 12-49 is what my setup looks like and Figure 12-50 is a close look on the BeMicro MAX10 with a laser
beam on the photo resistor.

262
Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire

Figure 12-49.  My tripwire setup

263
Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire

Figure 12-50.  Close look at the BeMicro MAX10

264
Chapter 12 ■ Light Sensors: Turning a Laser Pointer into a Hi-Tech Tripwire

12.7 Summary
This chapter shows you how to configure and generate two Altera IPs—ADC IP and PLL IP. You know
how easy it is to employ something useful without knowing how it really works (like driving a car without
knowing how an engine moves your car forward or backward). We only need to know the interface to the IPs
and how to handle it. These two IPs are very useful for the next chapter because we will reuse all of them and
add more fun (design) to them.
The light sensor ADC sequencer shows you a simple FSM. It only has two states and every clock cycle
the state changes to another state.
We demo one more time how to create a counter and flip-flop in the light sensor counter led module
with generic settings. The top-level design (light_sensor_top.vhd) is a good top module example. It should
only have connections and instantiation designs. You should minimize putting combination logic and
sequential logic in the top-level file.
We hope you enjoyed this tripwire design and we will use a third-party IP and add more interesting
designs in the next chapter.

■■Note  Due to an ADC offset issue, the ADC output always has an offset 0.8V, which is around 1300 from the
ADC output value. That is the reason my low boundary value is set to higher than the value 1300.

"Projects we have completed demonstrate what we know—future projects decide what we


will learn."
—Dr. Mohsin Tiwana

265

You might also like