Atmel AT89S8253 based microcontroller | school project

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@flash4yard·
0.000 HBD
Atmel AT89S8253 based microcontroller | school project
<html>
<p>Hello. Here is my new post!</p>
<p>Today I wanna show you my microcontroller I have build one year ago in school.</p>
<p>It looks like this:&nbsp;</p>
<p><img src="http://gdurl.com/lIV5" width="719" height="865"/></p>
<p><em>Ignore the yellow piece of paper ^-^</em></p>
<p>The PCB was made by a company and the layout was made by my teacher. The soldering was my part xD.<br>
I know some parts are not in perfect position.</p>
<h3>The next picture shows three areas which have different tasks</h3>
<p><img src="http://gdurl.com/5sRe" width="719" height="865"/></p>
<p>Area 1 shows the voltage regulation. It converts the input voltage to 5V</p>
<p>Area 2 shows the outputs. Two ribbon cables at the right and at the top there is a brown plug strip. It is used for the I2C bus-system.</p>
<p>Area 3 shows the processor itself and all necessary components to make it work. There is also a D-Sub plug to programm the processor.</p>
<h3>The ribbon cables are connected to this IO-card</h3>
<p><img src="http://gdurl.com/dMkm" width="1055" height="719"/></p>
<p>There are three times 8 LEDs, 4 push buttons and 2x8 DIP switches. Why always 8 LEDs and 8 DIP switches together. Because you can control one byte at a time (8 Bits) because it is a 8 Bit processor.</p>
<h2>Programming</h2>
<p>The processor is programmed with the software "keil" <a href="http://www.keil.com/">Website&nbsp;</a></p>
<p>The language is Assembler (it is difficult and not easy to understand)</p>
<h3>Here is a little programm:</h3>
<pre><code>cseg at 0<br>
mov P3, #255<br>
mov P1, #255</code></pre>
<pre><code>main:<br>
 mov A, P3<br>
 rr A<br>
 rr A<br>
 mov P1, A<br>
 ljmp main<br>
end</code></pre>
<p>The first line says that the processor should start at the beginning of the memory.<br>
The next two lines write the decimal value 255 -&gt; 1111111 in binary into the port 1 and 3</p>
<p><em><strong>Notice: This is a low active microprocessor (1 = low, 0 = high signal)</strong></em></p>
<p>Now the two ports are completely off!<br>
After that we set a jumppoint (main)<br>
In main we now read from port 3 (the 4 buttons on the IO card) and write the value in the accumulator (1 Byte memory)</p>
<p><strong>The processor can only do operations with values in the accumulator</strong>!</p>
<p>Now it gets tricky. <br>
The value from the red button is: 1111011&lt;- thats the value in the accumulator. If we know write this value to port 1 this LED lights up:&nbsp;</p>
<p><img src="http://gdurl.com/id37" width="834" height="263"/></p>
<p>But we want the far right LED to light up when we press the red button.</p>
<h3>Rotation!</h3>
<p>with <code>rr A</code> we shift the byte one to the right:<br>
11111011 -&gt; 11111101<br>
and another time:<br>
11111101 -&gt; 11111110</p>
<h3>Now we can write to port 1</h3>
<p>Because now the right LED lights up!</p>
<h3>Just loop it!</h3>
<p>after that the programm &nbsp;jumps back to main and the process starts over again.</p>
<h3>Notice:</h3>
<p>If you release the button the value is: 11111111 so the LED turns off!</p>
<h2>Write the programm to the controller:</h2>
<p>I am using the software AtmelISP and a USB to Serial converter to programm it.</p>
<p><br></p>
<h2>I hope you liked my little presentation about the microcontroller! <br>
If you have a question just write a comment!<br>
Have a nice day!</h2>
</html>
👍 , , , , , , , ,