Professional Documents
Culture Documents
AP4111 Manual
AIM:
To design an Instrumentation amplifier with the bridge type transducer and
convert the amplified voltage from the instrumentation amplifier to 4 – 20 mA current
using op-amp.
APPARATUS REQUIRED:
S.No Name of the Apparatus Range Quantity
1 Operational Amplifier IC741 4
10KΩ 10
2 Resistor 1kΩ 4
150Ω 1
3 DRB - 1
4 Dual Power Supply (0-24V) 1
5 Rheostat (0-100Ω) 1
6 Ammeter (0-250µA) 1
7 Multimeter - 1
THEORY:
INSTUMENTATION AMPLIFIER:
Low input impedance may load the signal source heavily. Therefore high
resistance buffer is used preceding each input to avoid this loading effect. For V1 =V2
under common mode condition. If V’2 =V2 and V’1 =V1 both the operational amplifiers
act as voltage follower. If V1 V2 the circuit has differential gain by the formula VO/ (V2-
V1)=1+(2R/R‘).
CIRCUIT DIAGRAM:
BRIDGE CIRCUIT:
INSTRUMENTATION AMPLIFIER:
DESIGN:
Output voltage VO = (1 + ( 2R / R‘)) (V2 -V1)
Differential gain Ad = VO / (V2 - V1)
= 1 + (2R / R‘)
Choose R = 10kΩ
For Ad max = 100
100 = 1 + (20k/R‘)
R’ = 20K Ω / 99
R’ max = 200Ω.
For Ad min = 10
10 = 1 + (20k/R‘)
R’ min = 2.2KΩ.
IL = I1+I2
I1 = (V-(V0/2)) / R
I2 = (V0-(V0/2)) / R
IL = (V-(V0/2) + (V0-(V0/2)) / R
= (V-V0+V0) / R = V/R
PROCEDURE:
1. The connections are made as per the circuit diagram.
2. The bridge circuit was balanced by varying 100Ω Rheostat.
3. The output voltage V1 and V2 of balanced circuit were given as input to the op-amp
A1 and A2.
4. Varying the resistance R1 the bridge circuit the voltage V1 and V2 were varied.
5. Varying the R’ the output voltage was measured then the differential gain was
calculated using formula,
=20 log (VO/(V2 -V1)).
V to I CONVERTER:
PIN DIAGRAM:
MODEL GRAPH:
TABULAR COLUMN:
Displacement
Output Voltage Output Voltage
from initial Gain (dB)
(V) (mA)
place (cm)
RESULT:
Thus the Instrumentation amplifier was designed with the bridge type transducer and
the output was verified successfully.
DATE :
AIM:
APPARATUS REQUIRED:
AC VOLTAGE REGULATOR:
DC VOLTAGE REGULATOR:
CIRCUIT DIAGRAM:
AC VOLTAGE REGULATOR:
DC VOLTAGE REGULATOR:
THEORY:
The SCR is switched ON and OFF to regulate the output voltage in AC and DC voltage
regulator.
AC VOLTAGE REGULATOR:
If the SCR is connected to AC supply and load, the power flow can be controlled
by varying the RMS value of AC voltage applied to the load and this type of power circuit
is caused as AC voltage regulator. Applications of AC voltage regulator are in heating on
load transformers for changing light controls, speed controls and polyphase controls,
induction motors and AC magnet controls for power transfer. Two types of power control
are normally used.
i)ON-OFF control
ii)Polyphase Angle control
In this circuit SCR1 is forward biased during positive half cycle and SCR2 is
forward biased during negative half cycle. SCR1 is triggered at the firing angle ωt=α and
supply voltage is impressed on the load resistance(RL). It conducts from the remaining
positive half cycle, turning OFF when the anode voltage becomes zero at ωt=π.
SCR2 is triggered at the firing angle ωt=α+π and conducts till ωt=2π. Hence the
load is alternating in polarity and is part of sine wave. The firing angle of both SCRs is
controlled by gate circuit. The conduction period of SCR is controlled by varying gate
signals within specified values of maximum and minimum gate currents.
For gate triggering, a signal is applied between the gate and cathode of the device.
AC sources are normally used as gate signals. This provides proper isolation
between power.
PIN DETAILS:
AC VOLTAGE REGULATOR:
DC VOLTAGE REGULATOR:
MODEL GRAPH:
AC VOLTAGE REGULATOR:
DC VOLTAGE REGULATOR:
If SCR’s are used to convert an AC voltage into DC voltage then they are known
as DC voltage regulators. Eg. Battery changes for high current capacity batteries in DC
voltage control only phase control is used. The transformer is used to step down the
voltage from 230V to 24V. This is given as input to bridge rectifier. The bridge rectifier
converts incoming ac signal to unidirectional wave. Therefore we get full wave rectifier
output at the output of bridge rectifier. This is given as input to SCR. The gate of SCR
is triggered with firing angle of α. During positive half cycle, diode D1 and D2 conducts
and during negative half cycle, diode D3 and D4 conducts. The full wave rectified output
is given to capacitive filter. The output of capacitor is dc that it eliminates ripple contents
of bridge rectifier output. The dc input is given to regulator IC. The unregulated output
must be 2V greater than regulated output voltage. The load current may vary from 0 to
rated maximum output current. The output voltage is regulated dc.
DESIGN:
PROCEDURE:
TABULAR COLUMN:
AC VOLTAGE REGULATOR:
DC VOLTAGE REGULATOR:
RESULT:
Thus AC and DC voltage regulators were designed, constructed and the output
waveforms were drawn.
CIRCUIT DIAGRAM:
DATE :
AIM:
To design a PCB layout using CAD software for a Simple Electronic Circuit.
COMPONENTS REQUIRED:
1. Personal Computer
2. NI Multisim Software
PROCEDURE:
Steps:
1. In this exercise, you will place and wire the components in the circuit
2. Double click on the component and select ‘Edit footprint’.
3. Then click on ‘Select from Data base’.
4. Now Select the footprint [RES1300 – 7000C2500], and click [Select].
5. Transfer the schematic design to Ultiboard 10 by selecting Transfer » Transfer
to Ultiboard 10.
6. Select [Transfer] / [Transfer to Ultiboard 10]. A standard Windows Save As
dialog box appears. Specify the name and location of the files to be created and
click [Save]. Multisim creates files that can then be loaded into Ultiboard.
7. Enter the desired parameters and click [OK].
8. After click [OK] new window will pop-up
9. The dialog should appear after select [Transfer] / [Transfer to Ultiboard 10].
Change the width to 10 mils, and the clearance to 10 mils. Click [OK] to close
dialog box.
10. Make sure all fields are selected in Import Netlist Action selection and click
[OK].
11. A board outline (a yellow rectangular) is placed on the workplace with the
components (above the board outline) ready to be placed
12. Working with the Board Outline. Right-click the edge of yellow rectangle
and select Properties from the menu. This launch a Rectangular Properties
dialog.
13. Under the rectangular tab, set the Units to mil, the Width to 1000 and the
Height to 900. Click OK to close the dialog box and the board outline becomes
much smaller
14. Now u can see the board outline becomes much smaller
15. Select the components and drag them until they are above the board
outline.
16. Select ‘view’ and click on ‘3D preview’.
17. Now you can see the 3D view dialog box
18. Select ‘Auto route’ and then select ‘Start/Resume Auto router’
19. Now the circuit become auto routed.
20. Place the components in preferred location and then check the design rule.
21. Select ‘start auto router trace optimisation’
22. After ‘start auto router trace optimisation’ the board will appear
23. Ultiboard Configuration. Select [Options] >> [Global Preferences], and then
select the General Settings tab. Make sure it matches below settings.
24. Select PCB Design tab and make sure you choose Auto trace narrowing and
Auto add teardrop. Click OK to close the dialog box.
25. Select [Options] >> [PCB Properties], and then go to Copper Layers tab.
Change Board thickness to 59.00 mil.
26. Next, go to the Pad/Vias tab, and modify the settings as shown. How to
calculate annular ring? For example, a 50 mil drill hole (radius of 25 mils) with
a relative value of .6 (60%) will create an annular ring of 15 mils (60% of 25
mils).
27. Go to Design Rules tab, and the “Use multiple clearances” checkbox must
be selected. Otherwise, only clearance to traces will be operational. Set the
“Clearance to Traces” parameter to 40.000000 mils; “Clearance to Pads”,
“Clearances to Vias” and Clearance to” Copper Areas” parameters to
32.000000 mils. Click OK to close dialog box.
28. Power and Ground Planes. Select [Place] >> [Power plane]. Select net 0 for
Copper Bottom Layer. Click [OK] to close the dialog box. The bottom layer fills
in red color plane.
29. Now select ‘File’» ‘Print’ and then this dialog window will pop-up
30. Select ‘copper top’ alone then select ‘preview’.
31. Select ‘Tool’» view 3D. Then select full screen option.
RESULT:
Thus the schematic of simple electronic circuit and design of PCB layout using
CAD was done successfully.
AIM:
To design and verify its output of 4-bit Counter in Verilog HDL Code.
TOOLS REQUIRED:
i) PC
ii) Xilinx ISE 9.1i
PROCEDURE:
COUNTER DIAGRAM:
PROGRAM CODING:
module cnt
(
input clk,
input rst,
output reg [3:0] count
);
always @ (posedge clk)
begin
if (rst)
count <= "0000";
else
count <=count+1;
end
endmodule
SIMULATION GRAPH:
RESULT:
Thus the design of 4-bit counter in Verilog HDL Code is done and its output is
verified successfully.
AIM:
TOOLS REQUIRED:
i) PC
ii) Xilinx ISE 9.1i
PROCEDURE:
THEORY:
Universal shift register is capable of converting input data to parallel or
serial which also does shifting of data bidirectional, unibirectional (SISO, SIPO,
PISO, PIPO) and also parallel load this is called Universal shift register.
Shift Register are used as: Data storage device, Delay element,
Communication lines, Digital Electronics devices (Temporary data storage, data
transfer, data manipulation, counter), etc.
PROCEDURE:
The ALU circuit is designed and the Boolean function is found out.
The Verilog Module Source for the circuit is written.
It is implemented in Model Sim and Simulated.
Signals are provided and Output Waveforms are viewed.
CIRCUIT DIAGRAM
TABLE:
MODE CONTROL REGISTER
S1 S0 OPERATION
0 0 NO CHANGE
0 1 SHIFT LEFT
1 0 SHIFT RIGHT
PARALLEL
1 1
LOAD
PROGRAM
reg [7:0]temp;
OUTPUT
RESULT
Thus the Verilog programs for universal shift register were written,
synthesized, simulated and implemented using Xilinx tools and FPGA.
AIM:
TOOLS REQUIRED:
iii) PC
iv) Xilinx ISE 9.1i
PROCEDURE:
PROGRAM CODING:
SIMULATION OUTPUT:
RESULT:
Thus the design of finite state machine in Verilog HDL Code is done and its
output is verified successfully.
AIM:
To design and verify its output of a 8-bit adder in Verilog HDL Code.
TOOLS REQUIRED:
i) PC
ii) Xilinx ISE 9.1i
PROCEDURE:
8-BIT ADDER:
PROGRAM CODING:
SIMULATION OUTPUT:
RESULT:
Thus the design of 8-bit adder in Verilog HDL Code is done and its output is
verified successfully.
AIM:
TOOLS REQUIRED:
i) PC
ii) Xilinx ISE 9.1i
PROCEDURE:
BLOCK DIAGRAM:
TRUTH TABLE:
PROGRAM CODING:
SIMULATION OUTPUT:
RESULT:
Thus the simulation of 4 –bit Multiplier is done and the output is verified.
EXP. NO: 5 HDL based design entry and simulation of Parameterizable cores
on the simple Distributed Arithmetic system. Test vector
generation and timing analysis.
DATE :
AIM:
To design and implement HDL based Distributed Arithmetic System using
Verilog and to obtain timing analysis report.
TOOLS REQUIRED:
i) PC
ii) Xilinx ISE 9.1i
PROCEDURE:
Program:
//LookUp Table
lut l3
(.in_80({x5_80[3],x4_80[3],x3_80[3],x2_80[3],x1_80[3],x0_80[3]}),.out_80(a3));
lut l2
(.in_80({x5_80[2],x4_80[2],x3_80[2],x2_80[2],x1_80[2],x0_80[2]}),.out_80(a2));
lut l1
(.in_80({x5_80[1],x4_80[1],x3_80[1],x2_80[1],x1_80[1],x0_80[1]}),.out_80(a1));
lut l0
(.in_80({x5_80[0],x4_80[0],x3_80[0],x2_80[0],x1_80[0],x0_80[0]}),.out_80(a0));
//Saturation Logic
saturation_logic s0 ( .sum_saturated_80(sat_result0_80), .sum_80(result0_80),
.carry_80(cout0_80), .oflow_80(oflow0_80) );
saturation_logic s00 ( .sum_saturated_80(a3_sat_80),
.sum_80({(rst_80)?7'b0:a3_comp_80}), .carry_80(cout00_80), .oflow_80(oflow00_80) );
saturation_logic s1 ( .sum_saturated_80(sat_result1_80), .sum_80(result1_80),
.carry_80(cout1_80), .oflow_80(oflow1_80) );
saturation_logic s2 ( .sum_saturated_80(sat_result2_80), .sum_80(result2_80),
.carry_80(cout2_80), .oflow_80(oflow2_80) );
defparam
s0.WIDTH_SUM = 7;
defparam
s00.WIDTH_SUM = 7;
defparam
s1.WIDTH_SUM = 7;
defparam
s2.WIDTH_SUM = 9;
defparam
r1.WIDTH_PROD = 9,
r1.WIDTH_PROD_ROUNDED = 6;
always @(posedge clk_80 or posedge rst_80)
begin
if (rst_80) begin
y_out_80 <= 0;
end
else begin
y_out_80 <= y_rounded_80;
end
end
endmodule
Result:
Thus the design and implementation of HDL based Distributed Arithmetic
System using Verilog was done and iming analysis was done successfully. .
AIM:
To design and implement FPGA based ALU using Verilog and to obtain
Synthesis, P&R and post P&R simulation, Critical paths and static timing
analysis synthesis report.
APPARATUS REQUIRED:
Synthesis Tools : Xilinx ISE.
Simulation Tools : Model sim Simulator.
Kit : FPGA Board- Spartan 3E
General : Personal Computer (PC).
THEORY:
It is a digital circuit that performs arithmetic and logical operations. The
ALU is a fundamental building block of the CPU of a computer and even the
simplest microprocessors contain of for purposes such as maintaining timers.
The processors found inside modern CPU’s and graphic processing units
accommodate very powerful and very complex ALU’s.
PROCEDURE:
Go to xilinx ISE 9.1i software
Go to File New project -> Project name-> next -> New source -> Verilog
module -> File name -> next -> set i/p & o/p ports -> Finish
Type the program in the space
After the program is written go to Synthesis XST -> Check Syntax
If the syntax is correct, proceed
Go to Project -> New source -> Test bench waveform -> Save
Click on combinational internal clock -> Set the input -> Save
Towards left hand side change the source for behavioral simulation -> Click
on the file name which you saved for test bench waveform
Go to Processes -> Xilinx ISE simulator -> Simulator behavioral mode ->
Generate Self checking test bench
Go to (or) click on Simulate Behavioral mode
Now the output waveform is displayed in the simulation dialog box
CIRCUIT DIAGRAM
OUTPUT
PROGRAM
module alu(y,a,b,cin,s);
output [7:0]y;
input [7:0]a,b;
input cin;
input [3:0]s;
reg [7:0]y;
always@(a,b,s)
begin
case(s)
4'b0000:y=a;
4'b0001:y=a+1;
4'b0010:y=a-1;
4'b0011:y=b;
4'b0100:y=b+1;
4'b0101:y=b-1;
4'b0110:y=a+b;
4'b0111:y=a+b+cin;
4'b1000:y=~a;
4'b1001:y=~b;
4'b1010:y=a&b;
4'b1011:y=a/b;
4'b1100:y=~(a&b);
4'b1101:y=~(a/b);
4'b1110:y=a^b;
4'b1111:y=~(a^b);
endcase
end
endmodule
SYNTHESIS REPORT:
====================================================
* Final Report *
====================================================
Final Results
RTL Top Level Output File Name : alu.ngr
Top Level Output File Name : alu
Output Format : NGC
Optimization Goal : Speed
Keep Hierarchy : NO
Design Statistics
# IOs : 29
Cell Usage :
# BELS : 208
# GND :1
# INV :1
# LUT1 :7
# LUT2 : 27
# LUT3 : 41
# LUT4 : 28
# MUXCY : 21
# MUXF5 : 34
# MUXF6 : 16
# MUXF7 :8
# VCC :1
# XORCY : 23
# IO Buffers : 29
# IBUF : 21
# OBUF :8
====================================================
Device utilization summary:
---------------------------
Selected Device : 3s250epq208-4
Number of Slices : 54 out of 2448 2%
Number of 4 input LUTs : 104 out of 4896 2%
Number of IOs : 29
Number of bonded IOBs : 29 out of 158 18%
---------------------------
Partition Resource Summary:
---------------------------
No Partitions were found in this design.
---------------------------
====================================================
TIMING REPORT
Clock Information:
------------------
Timing Detail:
--------------
All values displayed in nanoseconds (ns)
====================================================
Timing constraint: Default path analysis
Total number of paths / destination ports: 708 / 8
-------------------------------------------------------------------------
Delay : 11.772ns (Levels of Logic = 9)
Source : b<1> (PAD)
Destination: y<7> (PAD)
Data Path : b<1> to y<7>
Gate Net
Cell : in->out fanout Delay Delay Logical Name (Net Name)
---------------------------------------- ------------
IBUF : I->O 12 1.218 1.136 b_1_IBUF
(Madd_y_addsub00022)
LUT4 : I0->O 3 0.704 0.566
Madd_y_addsub0002_xor<4>111 (N172)
LUT3 : I2->O 2 0.704 0.482
Madd_y_addsub0002_xor<6>111 (N6)
LUT3 : I2->O 1 0.704 0.499 Madd_y_addsub0002_xor<7>11
LUT3 : I1->O 1 0.704 0.000 Mmux_y_722 (N55)
MUXF5 : I0->O 1 0.321 0.000 Mmux_y_5_f5_14
(Mmux_y_5_f515)
MUXF6 : I1->O 1 0.521 0.000 Mmux_y_4_f6_6
(Mmux_y_4_f67)
MUXF7 : I0->O 1 0.521 0.420 Mmux_y_2_f7_6 (y_7_OBUF)
OBUF : I->O 3.272 y_7_OBUF (y<7>)
----------------------------------------
Total 11.772ns (8.669ns logic, 3.103ns route)
(73.6% logic, 26.4% route)
====================================================
CPU : 5.67 / 6.31 s | Elapsed : 5.00 / 6.00 s
POWER ANALYSIS:
Thermal summary:
----------------------------------------------------------------
Estimated junction temperature : 27C
Ambient temp : 25C
Case temp : 26C
Theta J-A : 37C/W
Pad to Pad
---------------+---------------+---------+
Source Pad |Destination Pad| Delay |
---------------+---------------+---------+
a<0> |y<0> | 12.114|
a<0> |y<1> | 13.434|
a<0> |y<2> | 13.182|
a<0> |y<3> | 13.898|
a<0> |y<4> | 13.927|
a<0> |y<5> | 13.342|
a<0> |y<6> | 13.354|
a<0> |y<7> | 14.080|
a<1> |y<1> | 12.826|
a<1> |y<2> | 12.811|
a<1> |y<3> | 13.524|
RESULT
Thus the design and implement FPGA based ALU using VHDL was done
successfully and Synthesis, P&R and post P&R simulation, Critical paths and
static timing analysis synthesis report was obtained.
AIM
To design and implement FPGA based memories (RAM) using Verilog.
APPARATUS REQUIRED
Synthesis Tools : Xilinx ISE.
Simulation Tools : Model sim Simulator.
Kit : FPGA Board- Spartan 3E
General : Personal Computer (PC) with Parallel to JTAG
cable.
THEORY
Random Access Memory (RAM) is a type of computer data storage. Its
mainly used as main memory of a computer. RAM allows to access the data
in any order, i.e random. The word random thus refers to the fact that any
piece of data can be returned in a constant time, regardless of its physical
location and whether or not it is related to the previous piece of data. You
can access any memory cell directly if you know the row and column that
intersect at that cell. Most of the RAM chips are volatile types of memory,
where the information is lost after the power is switched off. There are some
non-volatile types such as, ROM, NOR-Flash.
PROCEDURE
Go to xilinx ISE 9.1i software
Go to File New project -> Project name-> next -> New source -> Verilog
module -> File name -> next -> set i/p & o/p ports -> Finish
Type the program in the space
After the program is written go to Synthesis XST -> Check Syntax
If the syntax is correct, proceed
Go to Project -> New source -> Test bench waveform -> Save
Click on combinational internal clock -> Set the input -> Save
Towards left hand side change the source for behavioral simulation ->
Click on the file name which you saved for test bench waveform
Go to Processes -> Xilinx ISE simulator -> Simulator behavioral mode ->
Generate Self checking test bench
Go to (or) click on Simulate Behavioral mode
Now the output waveform is displayed in the simulation dialog box
CIRCUIT DIAGRAM
PROGRAM
module rammod (clk, we, addr, din, dout);
input clk;
input we;
input [4:0] addr;
input [3:0] din;
output [3:0] dout;
reg [3:0] ram [31:0];
reg [3:0] dout;
always @(clk)
begin
if (we)
ram[addr] <= din;
else
dout <= ram[addr];
end
endmodule
OUTPUT
RESULT
Thus the Verilog programs for memories (RAM) were written, synthesized,
simulated and implemented using Xilinx tools and FPGA.
AIM:
To realize a Fast Fourier Transform algorithm in HDL and observe the spectrum
in simulation.
TOOLS REQUIRED:
iii) PC
iv) Xilinx ISE 9.1i
PROCEDURE:
The FFT is a fast algorithm for computing the DFT. If we take the 2-point DFT and 4-
point DFT and generalize them to 8-point, 16-point, ..., 2r -point, we get the FFT
algorithm. To compute the DFT of an N-point sequence using equation (1) would take
O(N2 ) multiplies and adds. The FFT algorithm computes the DFT using O(N log N)
multiplies and adds.
PROGRAM:
WAVEFORM:
RESULT:
Thus a Fast Fourier Transform algorithm in HDL was realized and the spectrum
was observed successfully.
Program:
EXP. NO: 9 Invoke PLL module and demonstrate the use of the PLL for clock
generation in FPGAs. Verify design functionality implemented in
FPGA by capturing the signal in Oscilloscope
DATE :
AIM:
To Invoke PLL module and demonstrate the use of the PLL for clock generation in
FPGAs
TOOLS REQUIRED:
PC
Xilinx ISE 9.1i
FPGA Kit
CRO
PROCEDURE:
The main goal of a PLL is to synchronize the output oscillator signal with a
reference signal. Even if the two signals have the same frequency, their peaks and
troughs may not occur in the same place.
Output Waveform:
A PLL reduces phase errors between output and input frequencies. When the
phase difference between these signals is zero, the system is said to be "locked." And
this locking action depends on the PLL's ability to provide negative feedback
Results:
Thus the PLL module designed and use of the PLL for clock generation in FPGAs
was demonstrated successfully.
Flowchart:
START
EXECUTE
NO
If LED turns
on when
switch on
YE
END
DATE:
Aim:
To write an embedded C program for interfacing DIP switch with ARM Processor
using Keil-C.
Apparatus Required:
1. PC
2. Keil – C Software
3. Flash Magic Software
4. ARM Processor Kit
Algorithm:
1. Start the program.
2. Include LPC2148 header file.
3. Define GPIO
4. Define DIP Switch
5. Define Delay
6. Execute the program
7. End the program.
Program:
#include<LPC214x.h> // Define LPC2148 Header File
#define LED 16 // Define LED to Port1 // LED start @ p1.16 ( total led -> 8 no.
#define Switch 24 // Define SWITCH TO Port1 // SWITCH start @ p1.23 (total switch -> 8 no.
Void delay (int x);
int main(void)
{
unsigned char Status=1;
PINSEL2 = 0x00000FF0; // Define p1.16... P1.31 port lines as GPIO (DIP SW - I/O))
IO1DIR = 0x00 << Switch; //Configure P1.24 - P1.31 as Input -> (0)
IO1DIR|= 0xFF << LED; //Configure P1.16 - P1.23 as Output -> (1)
While (1) // Loop forever
{
Status = 1;
IOSET1 = 0xFF << LED;
delay (10);
IOCLR1 = 0xFF << LED;
delay (30);
while (~Status)
{
Status = ((IO1PIN & (0xFF << Switch)) >> Switch);
IO1PIN = ((~Status) << LED);
}
}
}
Void delay (int x) // Delay function
{
Unsigned int y, z;
For(y = x; y > 0; y--)
For (z = 0; z < x; z++);
}
PIN DETAILS:
Connect J15 & J16 using 10 pin FRC cable
SWITCH PORT PIN CONFIGURATION
Sw 1 P1.24 uC PIN -> 32
Sw 2 P1.25 uC PIN -> 28
Sw 3 P1.26 uC PIN -> 24
Sw 4 P1.27 uC PIN -> 64
Sw 5 P1.28 uC PIN -> 60
Sw 6 P1.29 uC PIN -> 56
Sw 7 P1.30 uC PIN -> 52
Sw 8 P1.31 uC PIN -> 20
OUTPUT:
Inference:
With this experiment, concept of interfacing the DIP Switch with LPC 2148
ARM Processor kit can be understood.
Result:
Thus embedded C program for interfacing of Buzzer were written and it was
executed in LPC2148 ARM Processor and its output was verified successfully.
Flowchart:
START
Define Buzzer
Set Delay
EXECUTE
NO
If motor
rotates
YE
END
DATE:
Aim:
To write an embedded C program for interfacing Buzzer with ARM Processor using
Keil-C.
Apparatus Required:
1. PC
2. Keil – C Software
3. Flash Magic Software
4. ARM Processor Kit
Algorithm:
1. Start the program.
2. Include LPC2148 header file.
3. Define GPIO
4. Define Buzzer pin
5. Execute the program
6. End the program.
PROGRAM:
#include<LPC214x.h> // Define LPC2148 Header File
void delay(int x);
int main(void)
{
PINSEL0 = 0x00021000; // Define port lines as GPIO
IO0DIR = 0x00000400; // IOPIN0 Define P0.10 as dirction -> o/p
IOPIN0 = 0x00000000; // IOPIN0 Define P0.10 as zero
while(1) // Loop forever
{
IOPIN0 = 0x00000400; // Turn ON P0.10
delay(2000); // delay(2000) ; 2000 -> means delay time, if you want you have to change delay
time
IOPIN0 = 0x00000000; // Turn OFF P0.10
delay(2000); // delay(2000) ; 2000 -> means delay time, if you want you have to change
delay time
}
}
void delay(int x) // Delay function
{
unsigned int y,z;
for(y = x;y > 0;y--)
for(z = 0;z < x;z++);
}
PIN DETAILS:
PIN DETAILS: connect J17 & J19 using 10 pin FRC cable
PORT PIN CONFIGURATION
Buzzer P0.10 uC PIN -> 35
OUTPUT:
Inference:
With this experiment, concept of interfacing the Buzzer with LPC 2148 ARM
Processor kit can be understood.
Result:
Thus embedded C program for interfacing of DIP Switch were written and
it was executed in LPC2148 ARM Processor and its output was verified successfully.
Flowchart:
START
YES
If DELAY
value is set
EXECUTION
END
Aim:
To write an embedded C program for Blinking LED in LPC2148 ARM Processor using
Keil-C.
Apparatus Required:
1. PC
2. Keil – C Software
3. Flash Magic Software
4. ARM Processor Kit
Algorithm:
1. Start the program.
2. Include LPC2148 header file.
3. Define GPIO pins
4. Define port lines
5. Set delay value for ON and OFF.
6. Execute the program
7. End the program.
Program:
#include<LPC214x.h> // Define LPC2148 Header File
void delay(int x);
int main (void)
{
PINSEL2 = 0x00000000; // Define port lines as GPIO
IO1DIR = 0x00FF0000; // Define P1.16 - P1.23 as O/P
IOPIN1 = 0x00000000; // Define P1.16 - P1.23 as zero
While (1) // Loop forever
{
IOPIN1 = 0x000FF000; // Turn ON P1.16 - P1.23
Delay (2000); // delay (2000); 2000 -> means delay time, if you want
you have to change delay time
IOPIN1 = 0x00000000; // Turn OFF P1.16 - P1.23
Delay (2000); // delay (2000); 2000 -> means delay time, if you want you
have to change delay time
}
}
PIN DETAILS:
PIN DETAILS: connect J8 & J9 using 10 pin FRC cable
LED PORT PIN CONFIGURATION
LED1 P1.16 uC PIN -> 16
LED2 P1.17 uC PIN -> 12
LED3 P1.18 uC PIN -> 8
LED4 P1.19 uC PIN -> 4
LED5 P1.20 uC PIN -> 48
LED6 P1.21 uC PIN -> 44
LED7 P1.22 uC PIN -> 40
LED8 P1.23 uC PIN -> 36
Output:
Inference:
With this basic LED Blinking experiments, basic steps in LPC2148 ARM
Processor can be understood easily. And concept of setting delay value for blinking LED
can be understood.
Result:
Thus embedded C program for Blinking LED were written and it was
executed in LPC2148 ARM Processor and its output was verified successfully.