0% found this document useful (0 votes)
157 views

How To Create An and Logic Circuit Using The Arduino UNO Microcontroller

The document describes how to create an AND logic circuit using an Arduino UNO microcontroller. The steps include: 1. Downloading and installing the Arduino IDE software. 2. Creating a circuit schematic in TINA including a voltage source, resistors, LED, switches and jumpers connected to an Arduino UNO macro. 3. Writing Arduino code for an AND gate logic and loading it onto the Arduino UNO microcontroller in the schematic. 4. Simulating the circuit where closing both switches causes the LED to light up, demonstrating AND logic functionality.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
157 views

How To Create An and Logic Circuit Using The Arduino UNO Microcontroller

The document describes how to create an AND logic circuit using an Arduino UNO microcontroller. The steps include: 1. Downloading and installing the Arduino IDE software. 2. Creating a circuit schematic in TINA including a voltage source, resistors, LED, switches and jumpers connected to an Arduino UNO macro. 3. Writing Arduino code for an AND gate logic and loading it onto the Arduino UNO microcontroller in the schematic. 4. Simulating the circuit where closing both switches causes the LED to light up, demonstrating AND logic functionality.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 42

How to create an AND logic circuit using

the Arduino UNO microcontroller?


Arduino is an open-source platform for building electronics
projects. It consists of an open source hardware called
Arduino board

and an Integrated Development Environment (IDE)


software to write the MCU control code in a simplified version
of C++, then compile and upload the code to the board.
You can simulate, debug and bring your design to life in a
TINA andcircuit
mixed TINACloud providebefore
environment an extensive support
uploading for board.
it to the Arduino.
Now let's see the steps of creating an AND logic circuit
using the Arduino UNO microcontroller.

First download & install the latest Arduino program


from the Arduino website:

https://www.arduino.cc/en/Main/Software
SetClick
the Arduino path in TINA
on the Analysis menuasonfollows
the
before using Arduino
Toolbar for
& the first time.

Select Options...
Press the Advanced... Button
in the Analysis Options
Window
Next, click the "Select Arduino path" button in the
Advanced Options Window
and select Arduino
Press the OK button
(in our case: C:\Program Files (x86)\Arduino)
Press OK again to close the
Advanced Options Display window
Now click OK to close the
Analysis Options Window
Click the File menu then select New

Now lets create a new schematic diagram.


Select theMacro...
Select “Insert” menu.
Select the Macrolib folder of TINA and double-click the
Arduino folder
Open the Arduino Uno.TSM
The Macro will be attached to your cursor, you can
place it wherever you wish on the workspace.
Let’s create the following circuit:
Select a “Voltage Source” from the “Basic” Toolbar and
place it on the workspace.
Set its “Voltage” parameter to 5V.
Select and place a Ground from the “Basic” Toolbar.
Next, select and place 3 Resistors
Double-click the Resistors and set their
“Resistance” values to 220, 10K and 10K.
Select and place an “LED” from the “Semiconductors” Toolbar.
Select and place 2 Switches from the “Switches” Toolbar.
Select and place 4 Jumpers from the “Special” Toolbar
and change their labels to 5V.
then select and place 5 more jumpers &
change their labels to GND.
Finally connect the components.
Load the
Double-click on controlling program
the Arduino UNO, theninto thethemicrocontroller
press “Enter Macro” button.
The ATMEGA328P MCU used in Aurdino UNO appears
Click the 3 dots button
in the “C-code” field
Next, click the “C Code”
in the MCU Input File
Selection window
Click the “Project” button in
the MCU IDE window and
select Compiler Options.
In the C Compiler Settings
window make sure
Arduino....is
then Clickselected.
OK
Click the "Add existing file
to Project" icon in the MCU
IDE window.
Select the AND_gate.ino file, then click Open.
Next click on the "Make Project" button.
When thepress
Close
"Compile
the
the"Save
MCU
succesful"
Project"
IDE window,
message
button. appears,
then press “OK” to close
the MCU Input File
Selection window as
well.
Click OK to close the
“Enter Macro”window.
Click the left (SPST3) and right (SPST4) switches to close both
Finally press the “TR” buttonswitches.
to start the Interactive Simulation.
When both switches are closed, the LED lights up.
For more information visit our website at

www.tina www.tinacloud.com
.com
Visit our YouTube channel at

https://www.youtube.com/user/TinaDesignSuite

You might also like