<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Arduino%2FC3%2FDigital-Logic-Design-with-Arduino%2FEnglish-timed</id>
		<title>Arduino/C3/Digital-Logic-Design-with-Arduino/English-timed - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Arduino%2FC3%2FDigital-Logic-Design-with-Arduino%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Arduino/C3/Digital-Logic-Design-with-Arduino/English-timed&amp;action=history"/>
		<updated>2026-04-08T20:00:23Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Arduino/C3/Digital-Logic-Design-with-Arduino/English-timed&amp;diff=44934&amp;oldid=prev</id>
		<title>Sandhya.np14 at 09:19, 26 October 2018</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Arduino/C3/Digital-Logic-Design-with-Arduino/English-timed&amp;diff=44934&amp;oldid=prev"/>
				<updated>2018-10-26T09:19:17Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=Arduino/C3/Digital-Logic-Design-with-Arduino/English-timed&amp;amp;diff=44934&amp;amp;oldid=44911&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Sandhya.np14</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Arduino/C3/Digital-Logic-Design-with-Arduino/English-timed&amp;diff=44911&amp;oldid=prev</id>
		<title>PoojaMoolya: Created page with &quot; {| border=1 |  '''Time''' |  '''Narration'''  |- |00:01 |Welcome to the''' Spoken Tutorial''' on '''Digital Logic Design with Arduino. '''  |- |00:07 |In this tutorial, we wi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Arduino/C3/Digital-Logic-Design-with-Arduino/English-timed&amp;diff=44911&amp;oldid=prev"/>
				<updated>2018-10-25T09:42:30Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; {| border=1 |  &amp;#039;&amp;#039;&amp;#039;Time&amp;#039;&amp;#039;&amp;#039; |  &amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;  |- |00:01 |Welcome to the&amp;#039;&amp;#039;&amp;#039; Spoken Tutorial&amp;#039;&amp;#039;&amp;#039; on &amp;#039;&amp;#039;&amp;#039;Digital Logic Design with Arduino. &amp;#039;&amp;#039;&amp;#039;  |- |00:07 |In this tutorial, we wi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
{| border=1&lt;br /&gt;
|  '''Time'''&lt;br /&gt;
|  '''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:01&lt;br /&gt;
|Welcome to the''' Spoken Tutorial''' on '''Digital Logic Design with Arduino. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:07&lt;br /&gt;
|In this tutorial, we will learn to: Implement and verify the '''AND, OR '''and''' XOR operations''' in '''assembly'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:17&lt;br /&gt;
| Implement and verify simple '''Combinational Logic'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:21&lt;br /&gt;
|To follow this tutorial, you should have basic knowledge of:&lt;br /&gt;
&lt;br /&gt;
'''Electronics '''and '''Assembly language'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:31&lt;br /&gt;
|To record this tutorial, I am using: '''Arduino UNO Board'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:38&lt;br /&gt;
|And '''Ubuntu Linux '''operating system version 14.04&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:44&lt;br /&gt;
|We also require some external devices such as: '''Breadboard'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:51&lt;br /&gt;
| '''Arduino UNO Board'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:54&lt;br /&gt;
| '''Seven Segment Display'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|00:57&lt;br /&gt;
| '''220-ohm Resistor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:00&lt;br /&gt;
| '''Decoder (7447 IC) '''and  '''Jumper Wires'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:07&lt;br /&gt;
|We will use the same circuit setup as we did for the '''decoder''' in the earlier tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:14&lt;br /&gt;
|Let us see the live connection setup. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:17&lt;br /&gt;
|Now we will write an '''assembly program''' to verify the''' logical AND operations'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:24&lt;br /&gt;
|Open any '''text editor''' and type the following '''program'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:29&lt;br /&gt;
|'''m328Pdef.inc''' file and the source code are available in the code files link of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:38&lt;br /&gt;
|You can download and use it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:41&lt;br /&gt;
|The highlighted code configures '''pins 2, 3, 4''' and '''5 '''of the '''Arduino '''as '''output pins.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|01:49&lt;br /&gt;
|We are considering only the first '''bit '''of '''r16 '''and '''r17 '''for our '''boolean operations'''. Here, both are '''1'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:00&lt;br /&gt;
|This line performs '''bitwise AND operation '''on the '''bits '''of '''r16 '''and '''r17'''. The result is stored in '''r16.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:12&lt;br /&gt;
|The rest of the '''program '''takes care of displaying this output. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:17&lt;br /&gt;
|The '''LSB''' of '''r16''' has our result. This has to be shifted by two positions to the left.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:26&lt;br /&gt;
|This line of code calls the '''loop '''named '''loopw'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:31&lt;br /&gt;
|This '''loop''' takes care of shifting the '''LSB''' of '''r16''' twice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:38&lt;br /&gt;
|The value in '''r16''' is sent to '''PORTD'''. This displays either 0 or 1 on the '''Seven segment display.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:48&lt;br /&gt;
|Here, contents of '''r16 '''are left shifted once. Then the value of '''r20''' is decremented by 1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|02:58&lt;br /&gt;
|If the value of '''r20''' is not equal to zero, the '''loop''' is repeated again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:05&lt;br /&gt;
|I’ll save the code as '''boolean.asm''' in the '''home slash spoken slash Assembly''' folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:15&lt;br /&gt;
|Switch to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:18&lt;br /&gt;
|Go to the folder where '''boolean.asm '''file is saved. Type, '''avra boolean.asm''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:29&lt;br /&gt;
|This will assemble the code and create a file '''boolean.hex'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:34&lt;br /&gt;
|Let us clear the screen.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:36&lt;br /&gt;
|Next we need to upload the code to the '''Arduino'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|03:41&lt;br /&gt;
|For this, type '''avrdude space hyphen p space atmega328p space hyphen c space arduino space hyphen b space 115200 space hyphen capital P space forward slash dev forward slash ttyACM0 space hyphen capital U space flash colon wcolon boolean dot hex'''&lt;br /&gt;
&lt;br /&gt;
and press''' Enter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:17&lt;br /&gt;
|Now you can see that''' '''the digit '''one '''on the '''seven segment display '''is glowing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:23&lt;br /&gt;
|Pause the tutorial and do the below assignment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:27&lt;br /&gt;
|Modify the values of''' r16''' and '''r17''' to verify the rest of the '''truth table''' of '''AND'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:35&lt;br /&gt;
|Replace the keyword '''and''' in the program with '''or''' to perform '''logical OR operation'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:42&lt;br /&gt;
|Replace the keyword '''and''' in the program with''' xor''' to perform '''logical XOR operation'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:49&lt;br /&gt;
|Next, we will implement and verify few simple '''combinational logics.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:55&lt;br /&gt;
|Let us see the live connection setup. It will be the same as the previous setup.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:02&lt;br /&gt;
|We are going to implement these equations in our program and verify their '''truth table'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:09&lt;br /&gt;
|This is the''' truth table''' for the equations shown above. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:14&lt;br /&gt;
|Here '''W, X, Y '''and '''Z''' are the inputs. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:19&lt;br /&gt;
|'''A, B, C''' and '''D''' are the outputs. Let us consider the first row of the '''truth table'''. Thus, all the inputs will be zeros.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:31&lt;br /&gt;
|As per the '''truth table, '''we can expect the output as 1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:36&lt;br /&gt;
|We will display the output on the '''seven segment display.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:40&lt;br /&gt;
|Let us write an '''assembly''' program to implement and verify these equations.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:46&lt;br /&gt;
|Open any '''text editor''' and type the following '''program'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:50&lt;br /&gt;
|Let me explain the '''program'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|05:53&lt;br /&gt;
|This line configures '''pins 2,3,4''' and '''5''' of the '''Arduino '''as '''output pins'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:00&lt;br /&gt;
|'''r30 '''is a '''dummy variable '''for storing the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:05&lt;br /&gt;
|The values of '''input variables W, X, Y '''and '''Z '''are stored in '''registers r17, r18, r19 '''and '''r20 '''respectively.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:16&lt;br /&gt;
|The values of '''r17, r18, r19 '''and '''r20 '''are stored in the '''dummy variables r0, r1, r2 '''and '''r3'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:27&lt;br /&gt;
|These values are used to restore the '''original registers '''after performing '''operations. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:35&lt;br /&gt;
|The '''comp subroutine '''is used to find the '''complement '''of a '''variable'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:41&lt;br /&gt;
|The '''complement '''of '''W, X, Y '''and '''Z '''are calculated and stored in '''r21, r22, r23 '''and '''r24 '''respectively. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|06:52&lt;br /&gt;
|The values of '''r21, r22, r23 '''and '''r24 '''are stored in the '''dummy variables r4, r5, r6 '''and '''r7'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:04&lt;br /&gt;
|Note that '''A '''is nothing but the '''complement '''of '''W'''. &lt;br /&gt;
&lt;br /&gt;
Now, we have implemented the first equation. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:12&lt;br /&gt;
|Next, we perform two left '''shift operations '''and store the value in '''r30'''. &lt;br /&gt;
&lt;br /&gt;
Thus, the third '''bit '''of the '''r30 '''has the value of '''A'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:24&lt;br /&gt;
|The '''reload subroutine '''reloads the values '''r0, r1, r2, r3, r4, r5, r6 '''and '''r7 '''from its copies.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:36&lt;br /&gt;
|They might have changed during previous '''operations.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:41&lt;br /&gt;
|The '''logic''' for '''B''' is implemented and the result is stored in '''r0'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:47&lt;br /&gt;
|The value in '''r0''' is left shifted thrice and stored in '''r30'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|07:54&lt;br /&gt;
|Now, the fourth '''bit''' of '''r30''' holds the result of '''B'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:00&lt;br /&gt;
|The '''logic''' for '''C''' is implemented and the result is stored in '''r0'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:06&lt;br /&gt;
|The value in '''r0''' is left shifted four times and stored in '''r30'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:13&lt;br /&gt;
|Now, the fifth '''bit''' of '''r30''' holds the result of '''C'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:19&lt;br /&gt;
|The '''logic''' for '''D''' is implemented and the result is stored in '''r0'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:25&lt;br /&gt;
|The value in '''r0''' is left shifted five times and stored in '''r30'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:32&lt;br /&gt;
|Now, the sixth '''bit''' of '''r30''' holds the result of '''D'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:38&lt;br /&gt;
|Finally, the value stored in '''r30''' is sent to '''PORTD''' to be displayed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:46&lt;br /&gt;
|Save the code as '''combination.asm''' in the '''home slash spoken slash Assembly''' folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:55&lt;br /&gt;
|Switch to the '''terminal'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|08:58&lt;br /&gt;
|Type, '''avra space combination.asm''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:05&lt;br /&gt;
|This will assemble the code and create a file '''combination.hex'''.&lt;br /&gt;
&lt;br /&gt;
Let us clear the terminal&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:14&lt;br /&gt;
| To upload, press the up arrow to get the previous command. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:19&lt;br /&gt;
| Now change the filename as shown and press Enter.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:26&lt;br /&gt;
|Now you can verify the '''truth table''' with the output shown on the seven-segment display.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:34&lt;br /&gt;
|Pause the tutorial and do the below assignment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:38&lt;br /&gt;
|Change the values of '''W, X, Y '''and''' Z''' and verify different rows of the''' truth table'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:46&lt;br /&gt;
|This brings us to the end of this tutorial. Let us summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|09:52&lt;br /&gt;
|In this tutorial, we learnt to: Implement and verify the '''AND, OR '''and''' XOR''' operations in '''assembly'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:01&lt;br /&gt;
| Implement and verify simple '''Combinational Logic'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:05&lt;br /&gt;
|The video at the following link summarizes the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 10:13&lt;br /&gt;
| The''' Spoken Tutorial Project''' Team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:23&lt;br /&gt;
|  Please post your timed queries in this forum.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:27&lt;br /&gt;
| Spoken Tutorial project is funded by NMEICT, MHRD, Government of India.&lt;br /&gt;
&lt;br /&gt;
More information on this mission is available at this link.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|10:38&lt;br /&gt;
|This tutorial has been contributed by FOSSEE and Spoken Tutorial Project, '''IIT Bombay'''. &amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
This is Priya from IIT Bombay signing off. Thanks for watching.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	</feed>