Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

EXPERIMENT- 7

NOR GATE WITH ARDUINO


Aim
To study the operation of NOR gate by using Arduino development board.

Electrical Components and Software


1. Arduino board
2. Two switches
3. Light Emitting Diode (LED)
4. Proteus Software
5. Arduino IDE

Theory
An NOR gate is a digital logic gate with two or more inputs and one output that performs
logical conjunction. The output of an NOR gate is LOW when one or more of its inputs are
HIGH. If all of an OR gate's inputs are LOW, then the output of the OR gate is HIGH.

int C=4; int A=2; int B=3; ARDUINO UNO V3


void setup()
{
pinMode(C, OUTPUT);
pinMode(A, INPUT);
Reset

USB
13
pinMode(B, INPUT); PB5/SCK
PB4/MISO
12
C
11
} ~ PB3/MOSI/OC2A
ARDUINO

10
~ PB2/OC1B
9
void loop() ~ PB1/OC1A
8
ATMEGA328P-PU

PB0/ICP1/CLKO
{ B
1121

7
PD7/AIN1
int A=digitalRead (A); int A0 ~ PD7/AIN1
6
5
PC0/ADC0
B=digitalRead (B); if(A==0 A1
PC1/ADC1
~ PD5/T1/OC0B
PD4/T0/XCK
4
A2 3
&& B==0) A3
PC2/ADC2
PC3/ADC3
~ PD3/INT1/OC2B
PD2/INT0
2
A4 1
{ A5
PC4/ADC4/SDA PD1/TXD
0
A(2)

PC5/ADC5/SCL PD0/RXD
digitalWrite(C, HIGH); } by TEP

else { A
digitalWrite(C, LOW); }}
Figure 1. Source Code Figure 2. Circuit diagram

Procedure
1. To download and installed Arduino IDE software which write C programming language.
2. To download and installed Proteus software which simulate the hardware components.
3. To add Arduino Library to Proteus software.
4. To draw circuit diagram on Proteus software.
5. To write the source code on Arduino IDE software.
6. To verify the source code and add hex file to upload hex file on Proteus software.
7. To run the connecting components.
8. To investigate the circuit how to stimulate the system.

Table 1. Measuring the output of the OR gate with Arduino board


INPUTS OUTPUT
A B C
HIGH HIGH
HIGH LOW
LOW HIGH
LOW LOW

You might also like