Pin assignment of PWM buzzer driver

1PlanAead pin assignment

There are three interfaces in the top level source of this routine, namely:

Input ext_clk_25m, // external input 25MHz clock signal

Input ext_rst_n, // external input reset signal, active low

Output reg beep //Buzzer control signal, 1-- ringing, 0--not ringing

These three signals are signals that are defined on the FPGA pins and connected to external devices, so we need to map these signals to the pins of the FPGA.

As shown in Figure 7.5, click on the “Assignments à Pin Planner” option on the Quartus II menu.

Figure 7.5 Pin Planner menu

As shown in Figure 7.6, in the “Node Name” column at the bottom of the Pin Planner interface, there are three signal interfaces. Here, the “Location” column can input their corresponding FPGA pins; the “I/O Standard” column I/O level standard can be input. Although the default is 2.5V, since we have connected VCCIO to 3.3V on our schematic, the output is actually 3.3V. We can't set it.

Figure 7.6 Pin Assignment

View the schematic diagram of the SF-CY4 development board, as shown in Figure 7.7 and Figure 7.8. Here, the BEEP corresponds to the FPGA pin number of 38, then we enter PIN_38 in the Location column; RST_N and CLK_25M are 24 and 23 respectively, then input PIN_24 and PIN_23.

Figure 7.7 Clock and Reset Signal Schematic

Figure 7.8 Buzzer Signal Schematic

2 script direct pin assignment

Tcl (Tool Command Language), the tool command language. It is a easy to learn programming language. Widely used in EDA tools, almost all FPGA development tools support this language for assisted design. For example, here we will try to use the tcl script for FPGA pin assignment.

The previous pin assignment to ext_clk_25m can be implemented with the following statement.

Set_location_assignment PIN_23 -to ext_clk_25m

The syntax "set_location_assignment PIN_A –to B" is a fixed format, A represents the FPGA pin number, and B represents the signal name inside the FPGA. It's that simple. Where should this script be written? As shown in Figure 7.9, click on the menu bar "ViewàUtility WindowsàTcl Console".

Figure 7.9 Tcl Console menu

Then, as shown in Figure 7.10, we enter the following three pin assignment scripts in the “Tcl Console” and finally click “Enter”.

Figure 7.10 tcl script input

At this point, we return to the "Pin Planner" and we can see that all pins are automatically assigned.

Others Etching Products

We custom Etching Cutting Die, Etching Metal Crafts, Etching Eyeglass Frames, Etching Plate Heat Exchanger Sheet with drawings provided by customers. We are equipped with professional metal etching equipment and exposure development equipment. The raw material we more use for these products is stainless-steel, brass, titanium and titanium-palladium. We can guarantee that our half etching plate heat exchanger sheet have straight surface line, and have no burr, high product accuracy.



Etching Cutting Die,Etching Metal Crafts,Etching Eyeglass Frames,Etching Plate Heat Exchanger Sheet

SHAOXING HUALI ELECTRONICS CO., LTD. , https://www.cnsxhuali.com