<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8341031803567195527</id><updated>2024-10-07T08:53:41.265+03:00</updated><category term="microcontrolere"/><category term="electronica digitala"/><category term="microchip"/><category term="raspberrypi"/><category term="pic"/><category term="programare"/><category term="electronica analogica"/><title type='text'>Nedelcu Gheorghe</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-7616582076095663922</id><published>2019-10-22T22:52:00.000+03:00</published><updated>2019-10-26T12:17:09.904+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="raspberrypi"/><title type='text'>Life of RaspberryPI: Boost the frequency of Raspberry PI 4</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG5eZ2meGbAxJ2zaa2BibgookJVOscVdDRS3RneUmUw8s1CVFgXTVphg2HL9cgfXsy-scvaNtoJnHLyX0rk2a-LlpG6Mu2WnpXxjUt4mKPeBYRIcwcI1RqDeS188hoXUrKfUqYKEIUz2kF/s1600/raspberrypi-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1543&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG5eZ2meGbAxJ2zaa2BibgookJVOscVdDRS3RneUmUw8s1CVFgXTVphg2HL9cgfXsy-scvaNtoJnHLyX0rk2a-LlpG6Mu2WnpXxjUt4mKPeBYRIcwcI1RqDeS188hoXUrKfUqYKEIUz2kF/s200/raspberrypi-logo.png&quot; width=&quot;192&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I have bought recently the new RaspberryPI 4 and built a custom case for it.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVS38rdLyjGJgElJN-6nLvibHOd9begHkpzsB1yexwV-7bfDvyQoPCQHsdDSgoClCCUnWo7Na1N987sSzN6bT_sO1kml0F3hyphenhyphenkAKQlVm5lIbI3uAcMH9wmZEkuWr4BhP-iNCi2Q3MoEBJ1/s1600/IMG_20191020_202906.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1200&quot; data-original-width=&quot;1600&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVS38rdLyjGJgElJN-6nLvibHOd9begHkpzsB1yexwV-7bfDvyQoPCQHsdDSgoClCCUnWo7Na1N987sSzN6bT_sO1kml0F3hyphenhyphenkAKQlVm5lIbI3uAcMH9wmZEkuWr4BhP-iNCi2Q3MoEBJ1/s320/IMG_20191020_202906.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You can see that the fan is quite big, powered by a separate 12V power supply.&lt;br /&gt;
That means it will have no CPU temperature issues, in standby the temperature is about 33°C.&lt;br /&gt;
&lt;br /&gt;
Then, why not take full advantage of the quad core 1.5GHz processor?&lt;br /&gt;
By default, the PI 4 runs at 600MHz for low power consumption.&lt;br /&gt;
So, to change this, just edit the config file:&lt;br /&gt;
&lt;br /&gt;
root@raspberrypi:~# &lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;cd/boot&lt;/span&gt;&lt;br /&gt;
root@raspberrypi:~#&amp;nbsp;&lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;vi&amp;nbsp;config.txt&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Uncomment the line for below parameter and set it to 1500 MHz:&lt;br /&gt;
&lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;arm_freq=1500&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Under the [pi4] block, add a new line:&lt;br /&gt;
&lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;force_turbo=1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This will allow the PI to use a custom frequency, instead of the default 600MHz. (not 700MHz as it says in the config)&lt;br /&gt;
&lt;br /&gt;
Save the file and reboot the PI.&lt;br /&gt;
&lt;br /&gt;
After the system will be back online, you can check for the processor frequency:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;root@raspberrypi:~# &lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq&lt;/span&gt;&lt;br /&gt;
1500000&lt;br /&gt;
&lt;br /&gt;
Or you can issue the &lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;lscpu&lt;/span&gt; command, the CPU frequency should be the same.&lt;br /&gt;
&lt;br /&gt;
Also, the temperature didn&#39;t increase too much:&lt;br /&gt;
&lt;br /&gt;
root@raspberrypi:~# &lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;/opt/vc/bin/vcgencmd measure_temp&lt;/span&gt;&lt;br /&gt;
temp=36.0&#39;C&lt;br /&gt;
&lt;br /&gt;
I also made a stress test, and with a huge load, the temperature was about 48-49 degrees Celsius. And I didn&#39;t even use a heatsink, although I am planning to add one.&lt;br /&gt;
&lt;br /&gt;
root@raspberry:~# &lt;span style=&quot;background-color: white;&quot;&gt;w&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;11:58:43 up 16:25,&amp;nbsp; 2 users,&amp;nbsp; &lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;load average: 11.43,&lt;/span&gt; 11.03, 10.18&lt;br /&gt;
USER&amp;nbsp; &amp;nbsp; &amp;nbsp;TTY&amp;nbsp; &amp;nbsp; &amp;nbsp; FROM&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LOGIN@&amp;nbsp; &amp;nbsp;IDLE&amp;nbsp; &amp;nbsp;JCPU&amp;nbsp; &amp;nbsp;PCPU WHAT&lt;br /&gt;
pi&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tty1&amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fri10&amp;nbsp; &amp;nbsp;25:41m&amp;nbsp; 0.13s&amp;nbsp; 0.09s -bash&lt;br /&gt;
pi&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pts/0&amp;nbsp; &amp;nbsp; 192.168.100.13&amp;nbsp; &amp;nbsp;11:14&amp;nbsp; &amp;nbsp; 2.00s 24.60s&amp;nbsp; 0.07s sshd: pi [priv]&lt;br /&gt;
root@raspberry:~# /opt/vc/bin/vcgencmd measure_temp&lt;br /&gt;
&lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;temp=48.0&#39;C&lt;/span&gt;&lt;br /&gt;
root@raspberry:~# lscpu | grep -i hz&lt;br /&gt;
CPU max MHz:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;1500&lt;/span&gt;.0000&lt;br /&gt;
CPU min MHz:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;1500&lt;/span&gt;.0000&lt;br /&gt;
root@raspberry:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq&lt;br /&gt;
&lt;span style=&quot;background-color: #d0e0e3;&quot;&gt;1500000&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
So, with a good cooling system you can benefit from the maximum resources the PI has to offer.&lt;br /&gt;
&lt;br /&gt;
Of course, you can also &lt;a href=&quot;https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md&quot; target=&quot;_blank&quot;&gt;overclock&lt;/a&gt; the PI, using some other parameters such as over_voltage. I don&#39;t need to do it, not even experimentally, but maybe someone is willing to give it a try. I&#39;ve heard around the web that the frequency can be set up to 1750MHz, or even 2000MHz, but I wouldn&#39;t do it.&lt;br /&gt;
&lt;br /&gt;
Anyway, the PI 4 is just amazing and really worth the money. With 4GB of RAM and the quad core proc, it can be used as a mini home server for multiple purposes.&lt;br /&gt;
&lt;br /&gt;
Have fun!</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/7616582076095663922/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2019/10/life-of-raspberrypi-boost-frequency-of.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/7616582076095663922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/7616582076095663922'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2019/10/life-of-raspberrypi-boost-frequency-of.html' title='Life of RaspberryPI: Boost the frequency of Raspberry PI 4'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG5eZ2meGbAxJ2zaa2BibgookJVOscVdDRS3RneUmUw8s1CVFgXTVphg2HL9cgfXsy-scvaNtoJnHLyX0rk2a-LlpG6Mu2WnpXxjUt4mKPeBYRIcwcI1RqDeS188hoXUrKfUqYKEIUz2kF/s72-c/raspberrypi-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-5645065639901423751</id><published>2015-08-29T09:49:00.002+03:00</published><updated>2015-08-29T09:49:46.490+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="electronica analogica"/><category scheme="http://www.blogger.com/atom/ns#" term="electronica digitala"/><category scheme="http://www.blogger.com/atom/ns#" term="microcontrolere"/><title type='text'>Controlul unui motor folosind o punte H</title><content type='html'>Salut,&lt;br /&gt;
&lt;br /&gt;
In acest articol voi prezenta modul in care un motor poate fi controlat cu ajutorul unei punti H.&lt;br /&gt;
&lt;br /&gt;
O punte H este un circuit construit din 4 tranzistoare care actioneaza ca niste intrerupatoare, iar pozitia acestora determina sensul de rotire al motorului.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPED_QYPPKgetmrphydRO6GLjcVSkHgUYUsY8HM_fUHPJF7MoQJcymtnAG0B8G9qUeaxyfFWoNrpm8pFfV30T4J1Oc3gFXm03utomsqqUZj0TFhP6caSWOy5mo9WWfkuwXSIrLhEKxjSKq/s1600/punteH.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Punte H&quot; border=&quot;0&quot; height=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPED_QYPPKgetmrphydRO6GLjcVSkHgUYUsY8HM_fUHPJF7MoQJcymtnAG0B8G9qUeaxyfFWoNrpm8pFfV30T4J1Oc3gFXm03utomsqqUZj0TFhP6caSWOy5mo9WWfkuwXSIrLhEKxjSKq/s1600/punteH.png&quot; title=&quot;Punte H&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Punte H&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp; &lt;br /&gt;
In stanga figurii de mai sus comutatoarele A1 si A2 sunt inchise si curentul va trece prin ele iar sensul va fi prin A1-motor-A2 si motorul se va roti in sensul acelor de ceasornic.&lt;br /&gt;
&lt;br /&gt;
In dreapta figurii de mai sus celelalte doua comutatoare B1 si B2 sunt inchise si curentul va trece prin ele si prin motor iar motorul se va roti in sens invers acelor de ceasornic.&lt;br /&gt;
&lt;br /&gt;
In total exista 2^4=16 pozitii posibile ale comutatoarelor. In general se folosesc doar 4:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;toate deschise --&amp;gt; motorul este in standby&lt;/li&gt;
&lt;li&gt;A1,A2 inchise, B1,B2 deschise --&amp;gt; motorul se invarte in sensul acelor de ceas&lt;/li&gt;
&lt;li&gt;A1,A2 deschise, B1,B2 inchise --&amp;gt; motorul se invarte in sens invers acelor de ceas&lt;/li&gt;
&lt;li&gt;cele de sus inchise, cele de jos deschise sau invers --&amp;gt; motorul este franat&lt;/li&gt;
&lt;/ul&gt;
ATENTIE: Niciodata comutatoarele de pe o latura a puntii (A1+B1 sau A2+B2) nu trebuie inchise simultan deoarece se face scurtcircuit (curentul trece direct de la Vdd prin tranzistoare spre Gnd si se vor arde tranzistoarele).&lt;br /&gt;
Pentru a impiedica acest lucru, in practica se comuta tranzistoarele de pe o latura simultan (unul off si celalalt on), legand intrarile celor doua tranzistoare intre ele, de regula tranzistoarele de sus (high side) fiind PNP iar cele de jos (low side) fiind NPN. In figura de mai jos este exact invers. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTHijcyRVbnnK2h3nD4p7y1Npk6bvX7A3tZO1W-kyDW3XRjDJpnkJ2QczocwreF80JG3FMrfRRsrPz7DC0VF6_lrryou5V_NQluxemEKW7ubbqFWLYtbWzR45x3P6qb0IkCUj0J7Gt-QRS/s1600/H-Bridge-7%255B1%255D.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Punte H cu tranzistoare bipolare&quot; border=&quot;0&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTHijcyRVbnnK2h3nD4p7y1Npk6bvX7A3tZO1W-kyDW3XRjDJpnkJ2QczocwreF80JG3FMrfRRsrPz7DC0VF6_lrryou5V_NQluxemEKW7ubbqFWLYtbWzR45x3P6qb0IkCUj0J7Gt-QRS/s320/H-Bridge-7%255B1%255D.gif&quot; title=&quot;Punte H cu tranzistoare bipolare&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Punte H cu tranzistoare bipolare&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Legand intrarile de pe o parte si cealalta, lucrurile se simplifica, ramanand astfel 2 pini ce trebuie comutati on-off, avand doar cele 4 combinatii descrise mai sus.&lt;br /&gt;
&lt;br /&gt;
Acest design explica cel mai bine principiul de functionare al puntii H. In practica design-ul folosind componente discrete este destul de costisitor, si consuma foarte mult spatiu pe o placa PCB. De aceea se pot folosi circuite integrate specializate, ce pot oferi un curent de iesire destul de ridicat (de ordinul amperilor). Ex: &lt;a href=&quot;http://www.ti.com/lit/ds/symlink/l293.pdf&quot; target=&quot;_blank&quot;&gt;L293B/D&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi09socYD4KpLPD6-QE65MAyrOUF3ZQDkcmwfX5enuPof972tlr4kuOx3ZLmh9NsfCr2K4jB0B9xRVVeR4SJmLA2A3vmkmE2Z4kFaqRsgql7SmCyGmFtSPG5XzTPrKe2X5P4orqbL3sTOyH/s1600/Puntea+H.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Punte H L293&quot; border=&quot;0&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi09socYD4KpLPD6-QE65MAyrOUF3ZQDkcmwfX5enuPof972tlr4kuOx3ZLmh9NsfCr2K4jB0B9xRVVeR4SJmLA2A3vmkmE2Z4kFaqRsgql7SmCyGmFtSPG5XzTPrKe2X5P4orqbL3sTOyH/s400/Puntea+H.png&quot; title=&quot;Punte H L293&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Puntea H L293&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
In figura se observa ca integratul are 4 intrari (input) logice (0V sau 5V) si 4 iesiri (output) de putere (0V sau 12V).&lt;br /&gt;
Fiecare iesire corespunde fiecarei intrari. Astfel, daca Input_1 = 0V --&amp;gt; Output_1 = 0V, iar daca Input_1 = 5V --&amp;gt; Output_1 = 12V.&lt;br /&gt;
&lt;br /&gt;
Practic se obtine o translatare a nivelului logic 0-5V in nivelul logic 0-12V. Acesta din urma poate oferi atat o tensiune mai mare (12V), cat si un curent mai mare (0.6A---1A in functie de capsula).&lt;br /&gt;
&lt;br /&gt;
De asemenea, exista si doi pini de Enable (EN1 pentru Output1 si 2, EN2 pentru Output3 si 4) folositi pentru a valida cele 4 iesiri. Acesti 2 pini, impreuna cu cei 4 pini de Input se conecteaza la un microcontroller care gestioneaza actionarea acestora.&lt;br /&gt;
&lt;br /&gt;
Sunt doua modalitati de folosire:&lt;br /&gt;
&lt;br /&gt;
1. Pinii de ENable conectati fizic la +5V --&amp;gt; Iesirile sunt validate permanent si controlate doar prin cei 4 pini de input conectati la microcontroller.&lt;br /&gt;
&lt;br /&gt;
2. Pinii de ENable sunt conectati la microcontroller. Avantajul este ca prin acesti 2 pini se poate comanda turatia motoarelor prin &lt;span style=&quot;background-color: #cfe2f3;&quot;&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Pulse-width_modulation&quot; target=&quot;_blank&quot;&gt;PWM (Pulse Width Modulation)&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;
De obicei un microcontroller are un numar limitat de iesiri PWM.&lt;br /&gt;
&lt;br /&gt;
Astfel, variind factorul de umplere intre 0% si 100%, putem obtine orice tensiune intre 0 si 12V.&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFhhB8dOhWBP8mP8mKx19CLhduB4z0KU7lBvbtchbrBBEyGNQs_7GPg-YKmUN4EYDbGa-siSnDV5hLoli6hUDKgHPnioB6bl5b2UU4EmcSCAidMjgaBW6YToCZybBfuGTMo51RVonmWvXx/s1600/pwm1%255B1%255D.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Factor de umplere PWM&quot; border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFhhB8dOhWBP8mP8mKx19CLhduB4z0KU7lBvbtchbrBBEyGNQs_7GPg-YKmUN4EYDbGa-siSnDV5hLoli6hUDKgHPnioB6bl5b2UU4EmcSCAidMjgaBW6YToCZybBfuGTMo51RVonmWvXx/s320/pwm1%255B1%255D.png&quot; title=&quot;Factor de umplere PWM&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Factor de umplere PWM&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
In graficul de mai sus, se observa 3 cazuri, primul in care obtinem 25% din tensiunea de alimentare, adica 0.25*12V=3V. Pentru 50% obtinem 6V, pentru 75% obtinem 9V etc.&lt;br /&gt;
&lt;br /&gt;Pe langa factorul de umplere, trebuie sa folosim o frecventa care sa influenteze cat mai putin modul de lucru al motorului. De obicei, o frecventa de 25KHz este suficienta pentru un motor.&lt;br /&gt;
In graficul de mai sus, f=1/(Ton+Toff)=ct=25KHz, unde Ton este timpul in care EN este pe 1Logic=5V, iar Toff este timpul in care pinul de EN este pe 0Logic=0V.&lt;br /&gt;
&lt;br /&gt;
Spor la controlat motoare folosind o punte H, fie cu tranzistoare discrete, fie cu circuite integrate!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/5645065639901423751/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/08/controlul-unui-motor-folosind-o-punte-h.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/5645065639901423751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/5645065639901423751'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/08/controlul-unui-motor-folosind-o-punte-h.html' title='Controlul unui motor folosind o punte H'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPED_QYPPKgetmrphydRO6GLjcVSkHgUYUsY8HM_fUHPJF7MoQJcymtnAG0B8G9qUeaxyfFWoNrpm8pFfV30T4J1Oc3gFXm03utomsqqUZj0TFhP6caSWOy5mo9WWfkuwXSIrLhEKxjSKq/s72-c/punteH.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-7870580109468930154</id><published>2015-06-19T22:24:00.001+03:00</published><updated>2015-06-19T22:24:33.322+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="electronica analogica"/><category scheme="http://www.blogger.com/atom/ns#" term="microchip"/><category scheme="http://www.blogger.com/atom/ns#" term="microcontrolere"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><title type='text'>Controlul turatiei unui motor in functie de luminozitate folosind o fotodioda si un microcontroller</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;http://i.ebayimg.com/00/s/NzAwWDY4Ng==/z/83kAAOSwq7JT7I2E/$_35.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://i.ebayimg.com/00/s/NzAwWDY4Ng==/z/83kAAOSwq7JT7I2E/$_35.JPG&quot; height=&quot;200&quot; width=&quot;196&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Acesta este un proiect realizat in anul IV de facultate (2013) la cererea unor colegi mai neinitiati in ale electronicii.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Desi pe piata au aparut de ceva timp module de senzori (shield), am preferat la acel moment sa&amp;nbsp; construiesc unul propriu: preiau tensiunea captata de o fotodioda expusa luminii ambientale si o amplific cu un AO cu amplificare foarte mare (100.000).&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqAqUePMLgvrmky-pG7bSmqOopWYi-ObREk8Ss3Bt007B1-dA9xJ9pGT4uanC8D0PnbvIFeB1UWamvSk6EZYWvF0Z-DzHgvKQgQ069GarHT9uYoKr80L_sMCQ2GCGuQ4xxK-PdIzjB3Osc/s1600/senzorlumina.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Senzor de lumina&quot; border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqAqUePMLgvrmky-pG7bSmqOopWYi-ObREk8Ss3Bt007B1-dA9xJ9pGT4uanC8D0PnbvIFeB1UWamvSk6EZYWvF0Z-DzHgvKQgQ069GarHT9uYoKr80L_sMCQ2GCGuQ4xxK-PdIzjB3Osc/s400/senzorlumina.png&quot; title=&quot;Senzor de lumina&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Senzor de luminozitate + comanda motor&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Semnalul analogic furnizat de senzor este apoi citit cu un microcontroller (PIC de la Microchip, evident &lt;img alt=&quot;https://s.yimg.com/pu/emoticon/v2/4.gif&quot; class=&quot;transparent&quot; src=&quot;https://s.yimg.com/pu/emoticon/v2/4.gif&quot; /&gt;), scara de masurare fiind 0-5V folosind un ADC pe 10biti (1024 de valori intermediare intre 0-5V).&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pentru a controla turatia motorului am folosit un semnal PWM (Pulse Width Modulation) pe 10biti generat de microcontroller. Semnalul intra in baza unui tranzistor care are drept sarcina in emitor un motor de curent continuu cu perii (brushed DC motor).&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy6d7DFWaE23iOfiIym_2GxO_TMeiB92HbwvmF_V9o93VLsks9UMt_wVrrDFTnXvlXsuFoKMvMfT14MdbN93PvUYSHR0Qcp8v5-SP0aK6-G06f9cs0Q3tAcTVnFofxO4RrO5Y2-Ll5LqO7/s1600/pic16f887.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Programare PIC16f887&quot; border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy6d7DFWaE23iOfiIym_2GxO_TMeiB92HbwvmF_V9o93VLsks9UMt_wVrrDFTnXvlXsuFoKMvMfT14MdbN93PvUYSHR0Qcp8v5-SP0aK6-G06f9cs0Q3tAcTVnFofxO4RrO5Y2-Ll5LqO7/s320/pic16f887.png&quot; title=&quot;PIC16F887&quot; width=&quot;237&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;PIC16F887 - conexiuni&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Iesirea senzorului se conecteaza la unul din pinii GPIO analogici (RA2 de ex) iar semnalul PWM se obtine din pinul RC1 (CCP2).&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Atat semnalul analogic captat de microcontroller, cat si semnalul PWM generat sunt pe 10biti, astfel ca factorul de umplere al semnalului PWM este chiar valoarea numerica pe 10biti a semnalului analogic.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Programul a fost scris in mikroC for PIC si este extrem de simplu. Practic se foloseste o variabila pe 10 biti in care stocam tensiunea citita de la senzor si setam factorul de umplere al semnalului PWM cu acea valoare.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Pentru scrierea programului in microcontroller am folosit un PICkit2 (Microchip). &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rezultat:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW3OYcxMJ5bhvKAsSxWt3o2-vAa05-yb_SZZH_B6x-hqraHgrHJBakZ81Uqk9ZXA9E3gazbB3UGDzOpC3lWwZIVbXsIEf9Tecat1p2mAbSPnhyRrFxJ3tyrFuScuaNSc37JqtBPvfK8L8t/s1600/senzor+motor.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW3OYcxMJ5bhvKAsSxWt3o2-vAa05-yb_SZZH_B6x-hqraHgrHJBakZ81Uqk9ZXA9E3gazbB3UGDzOpC3lWwZIVbXsIEf9Tecat1p2mAbSPnhyRrFxJ3tyrFuScuaNSc37JqtBPvfK8L8t/s320/senzor+motor.png&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgACWUl7nSbuOdRjbENXtZ8jnC_KvCC-oMRzSHmHdL13znsIjuztTBE4KHtm8MfbgLVJvorCbdgJ9cprEfAOm397pa0MECSXHpwoYDmxYpjWb5CNk9PciTpZh6p0S-eNgrvca0IiyahwLvG/s1600/Video0014.3gp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgACWUl7nSbuOdRjbENXtZ8jnC_KvCC-oMRzSHmHdL13znsIjuztTBE4KHtm8MfbgLVJvorCbdgJ9cprEfAOm397pa0MECSXHpwoYDmxYpjWb5CNk9PciTpZh6p0S-eNgrvca0IiyahwLvG/s400/Video0014.3gp&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Este un proiect simplu dar din care am invatat cateva lucruri la vremea respectiva. Acesta era si motivul pentru care ma ofeream sa ajut colegii cu diverse proiecte, partea financiara fiind doar un detaliu minor &lt;img alt=&quot;https://s.yimg.com/pu/emoticon/v2/4.gif&quot; class=&quot;transparent&quot; src=&quot;https://s.yimg.com/pu/emoticon/v2/4.gif&quot; /&gt;. Cel mai important pentru mine era sa capat experienta si dexteritate.</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/7870580109468930154/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/06/controlul-turatiei-unui-motor-senzor-luminozitate.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/7870580109468930154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/7870580109468930154'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/06/controlul-turatiei-unui-motor-senzor-luminozitate.html' title='Controlul turatiei unui motor in functie de luminozitate folosind o fotodioda si un microcontroller'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqAqUePMLgvrmky-pG7bSmqOopWYi-ObREk8Ss3Bt007B1-dA9xJ9pGT4uanC8D0PnbvIFeB1UWamvSk6EZYWvF0Z-DzHgvKQgQ069GarHT9uYoKr80L_sMCQ2GCGuQ4xxK-PdIzjB3Osc/s72-c/senzorlumina.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-2641658987419365696</id><published>2015-02-14T17:43:00.002+02:00</published><updated>2015-02-14T17:43:54.449+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="raspberrypi"/><title type='text'>Life of RaspberryPI: Remote Desktop through VNCViewer</title><content type='html'>Hi everyone,&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjET98jrl6I9w3nSa2HAP5YYn9DGQo9cQGv4ycYurQVk9yLNbUD-tou_HQRfrboNS8NZlBamkzY2YaNq6QsK5f1oM8BD0dZST9y3k4A_AozdKlmKZBt3-Q_n44xWWa3JHo23xWhuMTgYZdf/s1600/raspberrypi-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjET98jrl6I9w3nSa2HAP5YYn9DGQo9cQGv4ycYurQVk9yLNbUD-tou_HQRfrboNS8NZlBamkzY2YaNq6QsK5f1oM8BD0dZST9y3k4A_AozdKlmKZBt3-Q_n44xWWa3JHo23xWhuMTgYZdf/s1600/raspberrypi-logo.png&quot; height=&quot;100&quot; width=&quot;96&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
If you run RaspberryPI headless because you don&#39;t have a monitor, you might want to see the RaspberryPI&#39;s Desktop remotely.&lt;br /&gt;
For this, you need to set up a VNC server on RaspberryPI and a VNC client on your laptop.&lt;br /&gt;
The connection will be made via LAN cable, the same you are using for SSH control.&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;color: magenta;&quot;&gt;
1. Set up VNC server on RaspberryPI&lt;/h4&gt;
Connect with Putty to your device and send this commands:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
root@raspberrypi:~# &lt;b&gt;sudo apt-get install tightvncserver&lt;/b&gt;&lt;/blockquote&gt;
Type &lt;b&gt;y &lt;/b&gt;and press &lt;b&gt;Enter &lt;/b&gt;in order to allow installation.&amp;nbsp; &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
root@raspberrypi:~# &lt;b&gt;tightvncserver&lt;/b&gt;&lt;/blockquote&gt;
Set up a password of 8 characters and an optional password for view only.&lt;br /&gt;
&lt;br /&gt;
root@raspberrypi:~# &lt;b&gt;vncserver :0 -geometry 1024x768 -depth 24&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Launch a Desktop with 1024x768 resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style=&quot;color: magenta;&quot;&gt;
2. Install VNC client on your laptop&lt;/h4&gt;
&lt;br /&gt;
Download &lt;a href=&quot;http://www.realvnc.com/download/vnc/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;VNC Viewer&lt;/a&gt; and install it.&lt;br /&gt;
Open the program, type the IP of RaspberryPI and click on Connect.&lt;br /&gt;
Type in the password you set above and you are ready to go!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0Y398s28sxh2r9APJfhkdmUaeEPXZ26xx-XJMfTWuxlwPXFcOkfb6JlCqpiSAD4_-xXuSCqkv0tBGnbOmao1mZ1yP5gPqWQRgHzDBVedkbf6Bw5Gy5TsHdGn09lTDMEZWagUo0iR4PKY/s1600/VNC+Viewer+RaspberryPI.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0Y398s28sxh2r9APJfhkdmUaeEPXZ26xx-XJMfTWuxlwPXFcOkfb6JlCqpiSAD4_-xXuSCqkv0tBGnbOmao1mZ1yP5gPqWQRgHzDBVedkbf6Bw5Gy5TsHdGn09lTDMEZWagUo0iR4PKY/s1600/VNC+Viewer+RaspberryPI.png&quot; height=&quot;280&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/2641658987419365696/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/02/life-of-raspberrypi-remote-desktop.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/2641658987419365696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/2641658987419365696'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/02/life-of-raspberrypi-remote-desktop.html' title='Life of RaspberryPI: Remote Desktop through VNCViewer'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjET98jrl6I9w3nSa2HAP5YYn9DGQo9cQGv4ycYurQVk9yLNbUD-tou_HQRfrboNS8NZlBamkzY2YaNq6QsK5f1oM8BD0dZST9y3k4A_AozdKlmKZBt3-Q_n44xWWa3JHo23xWhuMTgYZdf/s72-c/raspberrypi-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-7576258854853662008</id><published>2015-02-14T13:15:00.000+02:00</published><updated>2015-02-14T17:14:14.214+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="raspberrypi"/><title type='text'>Life of RaspberryPI: Connect the PI to the internet.</title><content type='html'>Hi everyone,&lt;br /&gt;
&lt;br /&gt;
In the &lt;a href=&quot;http://nedelcugheorghe.blogspot.ro/2015/02/life-of-raspberrypi-hello-world.html&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt; I showed you how to install Raspbian and how to connect to you Raspberry PI.&lt;br /&gt;
Now, you may want to connect it to the internet. There are many ways to do it.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyuifj07uPEDhE_r-ZbojOa3JoNe0lDzIerMAjgzwe2UjjQnsN3dIh0KgK03IPcSN4QgdRFDXgyhlOMD-tIAdAI_xhj9ZRLJIRSt8-UWDsyaaHqGCsNMBnsy8hWBcXcvqgYyV63fcjFX4c/s1600/raspberrypi-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyuifj07uPEDhE_r-ZbojOa3JoNe0lDzIerMAjgzwe2UjjQnsN3dIh0KgK03IPcSN4QgdRFDXgyhlOMD-tIAdAI_xhj9ZRLJIRSt8-UWDsyaaHqGCsNMBnsy8hWBcXcvqgYyV63fcjFX4c/s1600/raspberrypi-logo.png&quot; height=&quot;200&quot; width=&quot;192&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style=&quot;color: blue;&quot;&gt;
1. USB tethering from mobile phone&lt;/h3&gt;
This method saves your RJ-45 port which you can continue to use for SSH connection.&lt;br /&gt;
&lt;br /&gt;
First, you have to connect your mobile phone to one Raspberry PI USB port via microUSB cable.&lt;br /&gt;
In your phone go to Settings &amp;gt; Tethering &amp;gt; USB Tethering. Check the button to enable the connection.&lt;br /&gt;
&lt;br /&gt;
On RaspberryPI send the command:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
root@raspberrypi:~# &lt;b&gt;sudo dhclient usb0&lt;/b&gt;&lt;br /&gt;
root@raspberrypi:~# &lt;b&gt;ping google.com&lt;/b&gt;&lt;br /&gt;
PING google.com (80.97.208.35) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 80.97.208.35: icmp_req=1 ttl=53 time=49.6 ms&lt;/blockquote&gt;
Now you can see that the internet is working if you ping Google.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;color: blue;&quot;&gt;
2. Share your Wi-Fi through your LAN cable &lt;/h3&gt;
Let&#39;s say your laptop is connected to a Wi-Fi hotspot (e.g. your router).&lt;br /&gt;
The RaspberryPI is connected with your laptop through LAN cable.&lt;br /&gt;
&lt;br /&gt;
Go to Control Panel &amp;gt; Network and Internet &amp;gt; Network and Sharing Center&lt;br /&gt;
Click on Change Adapter Settings (left panel).&lt;br /&gt;
Right click on the &lt;b&gt;Wireless Network Connection &lt;/b&gt;&amp;gt; Properties &amp;gt; Share&lt;br /&gt;
Check Allow other network .... and select Local Area Connection. Press Ok.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5X9q_7ESQ-5lbEGI02OCLIKAaqaW7CJ997Pu5dH9wg-Tc2HJydhTPdzPDNM11a-_U8EUgPt7qJBt_B6Dne84j0zAhCzrGzONN-cmVEQ-1ccxYpGHgw4DLHRTnUfDPoSnFgzii9o3zkdCi/s1600/Share+Connection.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5X9q_7ESQ-5lbEGI02OCLIKAaqaW7CJ997Pu5dH9wg-Tc2HJydhTPdzPDNM11a-_U8EUgPt7qJBt_B6Dne84j0zAhCzrGzONN-cmVEQ-1ccxYpGHgw4DLHRTnUfDPoSnFgzii9o3zkdCi/s1600/Share+Connection.png&quot; height=&quot;320&quot; width=&quot;253&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now, click on Local Area Connection &amp;gt; Properties &amp;gt; IP v4 &amp;gt; Properties&lt;br /&gt;
and make sure it will take an IP automatically:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4tfZN13wE6_-sUcsdntJNkvV25MHA_32GGJYopb3xxDN3yN-_ckAxLspb0Cqrc2NWAZ2ZJmpTXQen1tnNGrmhkYJpdBVfaNuWyLQ7qdNGARw565uXCb6lz2gsOg6kLEs5MXYX2d8xPXiT/s1600/Local+Area+Connection.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4tfZN13wE6_-sUcsdntJNkvV25MHA_32GGJYopb3xxDN3yN-_ckAxLspb0Cqrc2NWAZ2ZJmpTXQen1tnNGrmhkYJpdBVfaNuWyLQ7qdNGARw565uXCb6lz2gsOg6kLEs5MXYX2d8xPXiT/s1600/Local+Area+Connection.png&quot; height=&quot;240&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;Start Menu &amp;gt; Run &amp;gt; cmd&lt;/b&gt;&amp;nbsp; and type &lt;b&gt;ipconfig&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE8YtM37jiJUN3A9bwYYCv9t7GGnAKio4gNo8Iu_jmzyqFhSg7o8lLAuxR1BDxPsopuWr7tpFVaq-Xx6KbTHQAsiPwuZVFR0b62Ql4-Eg-g8gxmtxWF6wmY7mQEm_vx8vuVtlIsa1mslqI/s1600/CMD+IPCONFIG.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE8YtM37jiJUN3A9bwYYCv9t7GGnAKio4gNo8Iu_jmzyqFhSg7o8lLAuxR1BDxPsopuWr7tpFVaq-Xx6KbTHQAsiPwuZVFR0b62Ql4-Eg-g8gxmtxWF6wmY7mQEm_vx8vuVtlIsa1mslqI/s1600/CMD+IPCONFIG.png&quot; height=&quot;200&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now, copy this IP and add it to &lt;b&gt;cmdline.txt&lt;/b&gt; located on the microSD card:&lt;br /&gt;
&lt;br /&gt;
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait ip=169.254.1.1&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;::169.254.165.161&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can do this by either plugging the microSD into the laptop and edit the file with Notepad, or you can edit the file through Putty:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
root@raspberrypi:/# &lt;b&gt;cd /boot&lt;/b&gt;&lt;br /&gt;
root@raspberrypi:/boot# &lt;b&gt;vi cmdline.txt&lt;/b&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSoWknkMvEMB5pDQ4z4bGulmJeG5O-InR2l-DJSvqb96ZVWcv5p23ST28JBy_Xs29NFf2hnUd2XWqN9DCOpA9oLU1Ea1mGTxAZX72lUUwKFoVdlKR1WueHzEOb66Vx-E7u6O5lftBZKq9k/s1600/vi+editor.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSoWknkMvEMB5pDQ4z4bGulmJeG5O-InR2l-DJSvqb96ZVWcv5p23ST28JBy_Xs29NFf2hnUd2XWqN9DCOpA9oLU1Ea1mGTxAZX72lUUwKFoVdlKR1WueHzEOb66Vx-E7u6O5lftBZKq9k/s1600/vi+editor.png&quot; height=&quot;251&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly, edit the file &lt;b&gt;/etc/resolv.conf&lt;/b&gt; to look like this:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
root@raspberrypi:~# &lt;b&gt;cat /etc/resolv.conf&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;nameserver 8.8.8.8&lt;br /&gt;nameserver 8.8.4.4&lt;/span&gt;&lt;/blockquote&gt;
These two lines are the Google DNS servers. It helps your device locate websites and hostnames.

Now, reboot your device:
&lt;br /&gt;
&lt;blockquote&gt;
root@raspberrypi:/boot# &lt;b&gt;reboot&lt;/b&gt;&lt;br /&gt;
Broadcast message from root@raspberrypi (pts/1) (Sat Feb 14 11:02:52 2015):&lt;br /&gt;
The system is going down for reboot NOW!&lt;/blockquote&gt;
After reboot: &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
root@raspberrypi:~# &lt;b&gt;ping google.com&lt;/b&gt;&lt;br /&gt;
PING google.com (80.97.208.24) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 80.97.208.24: icmp_req=1 ttl=53 time=598 ms&lt;br /&gt;
64 bytes from 80.97.208.24: icmp_req=2 ttl=53 time=34.3 ms&lt;/blockquote&gt;
So it works!</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/7576258854853662008/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/02/life-of-raspberrypi-connect-pi-to.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/7576258854853662008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/7576258854853662008'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/02/life-of-raspberrypi-connect-pi-to.html' title='Life of RaspberryPI: Connect the PI to the internet.'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyuifj07uPEDhE_r-ZbojOa3JoNe0lDzIerMAjgzwe2UjjQnsN3dIh0KgK03IPcSN4QgdRFDXgyhlOMD-tIAdAI_xhj9ZRLJIRSt8-UWDsyaaHqGCsNMBnsy8hWBcXcvqgYyV63fcjFX4c/s72-c/raspberrypi-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-501978022381009264</id><published>2015-02-14T00:14:00.004+02:00</published><updated>2015-02-14T11:45:54.607+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="raspberrypi"/><title type='text'>Life of RaspberryPI. Hello World!</title><content type='html'>Hi everyone,&lt;br /&gt;
&lt;br /&gt;
So far I have only been using microcontrollers in my projects. They were doing fine the tasks they were supposed to (usually one), but had their limitations such as low clock speed (20MHz) and more important, it was extremely hard to implement a real time operating system and to run parallel tasks.&lt;br /&gt;
&lt;br /&gt;
A RaspberryPI microcomputer is a tiny board that offers both the performances of a real computer and the features of a microcontroller: IO pins, small dimensions and programmability.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj009_N4P1xNj2rIIMvxtAqBHtgRQPUW8jvsMiBJ-WuDvj-3CgMLRkWDG2JHm8xOveJ6bSsAgSp5jmBqfOitYTSgIzAtmN4reaGyZ_ULeSKSDtxW_FfbK-QhrteCFkuuRFEZolx2iaXNptW/s1600/Raspberry_Pi_B+_top%5B1%5D.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj009_N4P1xNj2rIIMvxtAqBHtgRQPUW8jvsMiBJ-WuDvj-3CgMLRkWDG2JHm8xOveJ6bSsAgSp5jmBqfOitYTSgIzAtmN4reaGyZ_ULeSKSDtxW_FfbK-QhrteCFkuuRFEZolx2iaXNptW/s1600/Raspberry_Pi_B+_top%5B1%5D.jpg&quot; height=&quot;214&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
RaspberryPI B+&lt;/div&gt;
&lt;br /&gt;
I bought this from a local store in Bucharest and I was so excited that this little toy will run Linux for me!&lt;br /&gt;
&lt;br /&gt;
They recommend us all to use the NOOBS installer. But if you don&#39;t have a monitor available, it&#39;s an impossible mission to have it running. So what I will show you next, is how to run the RaspberryPI headless (no monitor, no keyboard, no mouse).&lt;br /&gt;
&lt;h3 style=&quot;color: magenta;&quot;&gt;
Run headless RaspberryPI&lt;/h3&gt;
RaspberryPI boots from a microSD card. To install an operating system on it, you have to download the latest Raspbian image: &lt;a href=&quot;http://downloads.raspberrypi.org/raspbian_latest.torrent&quot;&gt;via torrent&lt;/a&gt; or &lt;a href=&quot;http://downloads.raspberrypi.org/raspbian_latest&quot;&gt;direct link&lt;/a&gt;.&lt;br /&gt;
Unzip it and you will obtain a .img file, such as: &lt;b&gt;2015-01-31-raspbian.img&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Download &lt;a href=&quot;http://sourceforge.net/projects/win32diskimager/&quot;&gt;Win32 Disk Image&lt;/a&gt;, install it and &lt;b&gt;Write &lt;/b&gt;the image to a microSD card (4GB or above).&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgltfG6ct7DXpYKuelOS-SOrKlVCqiexbkWeg9d1Yli5P8uijW1cH3Uk5BKl9UzJycWvLfByLBJeN_4u78A6Kq54Khgc1iktK-_xDs0U8qU2xyAXscIlSmZ5Kzr_AaG89NJQnBDEWyY-P__/s1600/Win32DiskImager.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgltfG6ct7DXpYKuelOS-SOrKlVCqiexbkWeg9d1Yli5P8uijW1cH3Uk5BKl9UzJycWvLfByLBJeN_4u78A6Kq54Khgc1iktK-_xDs0U8qU2xyAXscIlSmZ5Kzr_AaG89NJQnBDEWyY-P__/s1600/Win32DiskImager.png&quot; height=&quot;161&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Make sure you select the right device. Check My Computer for your microSD letter assigned.&lt;br /&gt;
&lt;br /&gt;
Once the process completes, edit the file &lt;b&gt;cmdline.txt&lt;/b&gt; located on the microSD card and assign an IP to your RaspberryPI:&lt;br /&gt;
&lt;br /&gt;
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait &lt;b style=&quot;color: red;&quot;&gt;ip=169.254.1.1&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can eject the microSD card from your computer and plug it into your RaspberryPI.&lt;br /&gt;
&lt;br /&gt;
Now, connect a LAN cable between the RaspberryPI &lt;u&gt;RJ-45&lt;/u&gt; port to your laptop&#39;s &lt;u&gt;RJ-45&lt;/u&gt; port.&lt;br /&gt;
Power on the device via microUSB port. You should see the LEDs flickering. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqbyC8Z5LAjIb__tidLuUJ95-dYaAEbqzGaYp0HUV5xXy0aUNVqJx8EYolwhTJ1glYaZJLnPPQCPQU-w6MN7DvrXkev-JWGdL9IvXq3Dentqs_XCjJEc1noos0KkouJKBdbFw5SagelrCw/s1600/IMG_20150214_000721.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqbyC8Z5LAjIb__tidLuUJ95-dYaAEbqzGaYp0HUV5xXy0aUNVqJx8EYolwhTJ1glYaZJLnPPQCPQU-w6MN7DvrXkev-JWGdL9IvXq3Dentqs_XCjJEc1noos0KkouJKBdbFw5SagelrCw/s1600/IMG_20150214_000721.jpg&quot; height=&quot;320&quot; width=&quot;278&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
You can now connect to your Raspberry PI using &lt;a href=&quot;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&quot; target=&quot;_blank&quot;&gt;Putty&lt;/a&gt;.&lt;br /&gt;
Just type in the IP you set above and click on open:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHJ-7ETNvogrb23fNg6OXutzr5YP4shyphenhyphenbnc99wo4geRnDdCZfqv2QOVB-xGyHU7uAB9CdLe0aw2lnnoL1I87Y1nR5t8hkysrQnFoGiu34S9Hqybh8zE3Vol3x6y-572hAjZymyR14L6z_j/s1600/Putty.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHJ-7ETNvogrb23fNg6OXutzr5YP4shyphenhyphenbnc99wo4geRnDdCZfqv2QOVB-xGyHU7uAB9CdLe0aw2lnnoL1I87Y1nR5t8hkysrQnFoGiu34S9Hqybh8zE3Vol3x6y-572hAjZymyR14L6z_j/s1600/Putty.png&quot; height=&quot;308&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You will be asked for your credentials:&lt;br /&gt;
login as: &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;pi&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
pi@169.254.1.1&#39;s password: &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;raspberry&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVlVVGk2SQaOGQHSCqEptigiTpgYJdUGAzdL03pDD-E4EK0Ns8939FQP5WXgmB0BKkHjblnuUOHvIoas4HXSMWV__t4bes_sJBAUbC__-2p9-gnt7pV12ftBjdqChTo_O_seaTfoVtXeOB/s1600/raspberrypiconsole.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVlVVGk2SQaOGQHSCqEptigiTpgYJdUGAzdL03pDD-E4EK0Ns8939FQP5WXgmB0BKkHjblnuUOHvIoas4HXSMWV__t4bes_sJBAUbC__-2p9-gnt7pV12ftBjdqChTo_O_seaTfoVtXeOB/s1600/raspberrypiconsole.png&quot; height=&quot;251&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now you can administer the PI as you want! Have fun!</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/501978022381009264/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/02/life-of-raspberrypi-hello-world.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/501978022381009264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/501978022381009264'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2015/02/life-of-raspberrypi-hello-world.html' title='Life of RaspberryPI. Hello World!'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj009_N4P1xNj2rIIMvxtAqBHtgRQPUW8jvsMiBJ-WuDvj-3CgMLRkWDG2JHm8xOveJ6bSsAgSp5jmBqfOitYTSgIzAtmN4reaGyZ_ULeSKSDtxW_FfbK-QhrteCFkuuRFEZolx2iaXNptW/s72-c/Raspberry_Pi_B+_top%5B1%5D.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-2577447702416916392</id><published>2014-09-15T08:41:00.000+03:00</published><updated>2015-08-29T08:57:26.634+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="electronica digitala"/><category scheme="http://www.blogger.com/atom/ns#" term="microchip"/><category scheme="http://www.blogger.com/atom/ns#" term="microcontrolere"/><category scheme="http://www.blogger.com/atom/ns#" term="pic"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><title type='text'>Conectarea unui microcontroler la o tastatura si un ecran LCD</title><content type='html'>Salut,&lt;br /&gt;
&lt;br /&gt;
In acest articol voi prezenta cum putem citi o tasta apasata a unei tastaturi si afisarea acesteia pe un ecran.&lt;br /&gt;
Am scris programul in &lt;a href=&quot;http://www.mikroe.com/mikroc/pic/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;mikroC PRO for PIC&lt;/a&gt; pentru microcontrollerul PIC16F887 care foloseste oscilatorul intern de 8MHz.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;1. Tastatura&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Tastatura este practic o matrice compusa din M linii x N coloane. La intersectia unei linii cu o coloana se afla un intrerupator care odata apasat face contact intre linia si coloana respectiva. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr__8Bao1qT5uI3tykdMyQVNZl2pceyDT3izA4GjvlpzszsgNAKWsUYbEjkZspkDaKk6M0o347_WtMRRNPdIpYxE1U0xsRywplTyNwYzYr1ncMRkWSCWnNXWi7sWCMeEZw1M_2TCKEKRL6/s1600/Tastatura.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr__8Bao1qT5uI3tykdMyQVNZl2pceyDT3izA4GjvlpzszsgNAKWsUYbEjkZspkDaKk6M0o347_WtMRRNPdIpYxE1U0xsRywplTyNwYzYr1ncMRkWSCWnNXWi7sWCMeEZw1M_2TCKEKRL6/s1600/Tastatura.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Pentru a vedea care buton este apasat, punem pe rand fiecare &lt;b&gt;coloana pe 1Logic&lt;/b&gt; si citim valoarea de pe linii. Daca avem &lt;b&gt;1Logic pe una din linii&lt;/b&gt; inseamna ca la intersectia dintre coloana pusa pe 1Logic si linia citita ca 1Logic butonul este apasat.&lt;br /&gt;
&lt;br /&gt;
Practic conectam coloanele la pini de iesire si liniile la pini de intrare.&lt;br /&gt;
Pe rand, punem fiecare coloana pe 1Logic si celelalte pe 0Logic.&lt;br /&gt;
Apoi citim valorile pinilor de intrare. Daca vreunul din ei este pe 1Logic inseamna ca avem o tasta apasata.&lt;br /&gt;
Se repeta procedeul pentru celelalte coloane.&amp;nbsp; &lt;br /&gt;
Daca s-a gasit o tasta apasata se poate pune un flag pentru a opri scanarea inutila a celorlalte taste.&lt;br /&gt;
&lt;br /&gt;
Eu personal am folosit 2 variabile X si Y care retin coordonatele tastei apasate. Initial X si Y sunt 0.&lt;br /&gt;
Apoi am inceput sa scanez intersectiile liniilor si coloanele iar in momentul in care gaseam o tasta apasata alocam lui X si Y coordonatele coloanei puse pe 1Logic si linia citita ca 1Logic.&lt;br /&gt;
&lt;br /&gt;
Tastatura poate fi cumparata sau realizata acasa folosind intrerupatoare microcontact (pushbutton). &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnOANptOs-BzB_Q6vVMV8QlS46tDGPBoKqZ5u848L2fMd0-6AReaHS53w8R9HqHdNUAZtdUY7bzgBlZgz0dpX8Wkom9NGgEVqKHGg25dSUe28WZkYLnYoeo5GiUGiAZ07f6kHFUinxMAGa/s1600/tastatura2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;167&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnOANptOs-BzB_Q6vVMV8QlS46tDGPBoKqZ5u848L2fMd0-6AReaHS53w8R9HqHdNUAZtdUY7bzgBlZgz0dpX8Wkom9NGgEVqKHGg25dSUe28WZkYLnYoeo5GiUGiAZ07f6kHFUinxMAGa/s1600/tastatura2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;2. Afisarea pe ecran LCD&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Am folosit un ecran LCD 16x2 compatibil cu cele din seria Hitachi HD44780.&lt;br /&gt;
Acesta are 16 pini iar simbolurile pinilor pot fi gasite pe net. Nu voi intra in detalii intrucat am folosit libraria din MikroC iar acesta explica foarte bine in Help conexiunile, functiile si pinii declarati.&lt;br /&gt;
La unele ecrane cumparate ordinea pinilor difera. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuoggu6bnXBVDg75Ql2HD4zjU0NNRMqcRNF3eFrzRftsQHZ1Ebvm9D8pY8sZDYHZMt3XUzZTYC7XGFuZnuX5yJu_9YcWoOl8ymS5z9sHPNhk54OnZtJDLeaevfz6xKb6RYYGsYH2P8_nSA/s1600/lcd+16x2+display.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;174&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuoggu6bnXBVDg75Ql2HD4zjU0NNRMqcRNF3eFrzRftsQHZ1Ebvm9D8pY8sZDYHZMt3XUzZTYC7XGFuZnuX5yJu_9YcWoOl8ymS5z9sHPNhk54OnZtJDLeaevfz6xKb6RYYGsYH2P8_nSA/s1600/lcd+16x2+display.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In final, iata simularea in Proteus:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/9swVXgPYlmA&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
Codul sursa nu il voi pune . Este destul de lung iar un inginer/programator adevarat trebuie sa-si scrie singur programele. Mult succes!</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/2577447702416916392/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2014/09/microcontroller-tastatura-ecran-lcd.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/2577447702416916392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/2577447702416916392'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2014/09/microcontroller-tastatura-ecran-lcd.html' title='Conectarea unui microcontroler la o tastatura si un ecran LCD'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr__8Bao1qT5uI3tykdMyQVNZl2pceyDT3izA4GjvlpzszsgNAKWsUYbEjkZspkDaKk6M0o347_WtMRRNPdIpYxE1U0xsRywplTyNwYzYr1ncMRkWSCWnNXWi7sWCMeEZw1M_2TCKEKRL6/s72-c/Tastatura.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-3588945113994889308</id><published>2013-05-09T09:50:00.001+03:00</published><updated>2013-05-09T09:51:49.314+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="electronica digitala"/><category scheme="http://www.blogger.com/atom/ns#" term="microchip"/><category scheme="http://www.blogger.com/atom/ns#" term="microcontrolere"/><category scheme="http://www.blogger.com/atom/ns#" term="pic"/><title type='text'>Conectarea PICkit2 la un microcontroler PIC oarecare</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho2vADWpZbQ-GE6dG9sis4W-GsdOHIJvac7tNENSPde6MwQBE0k8dBN-M1EUDmC2_5WnTAKG9KP8rrz7evSY_r0TPXHPi34E7FR1AEnaa7efn3Wj1g0lUPWHz412eFM6yMBKA-SbZdAobZ/s1600/PICkit2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;144&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho2vADWpZbQ-GE6dG9sis4W-GsdOHIJvac7tNENSPde6MwQBE0k8dBN-M1EUDmC2_5WnTAKG9KP8rrz7evSY_r0TPXHPi34E7FR1AEnaa7efn3Wj1g0lUPWHz412eFM6yMBKA-SbZdAobZ/s320/PICkit2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In &lt;a href=&quot;http://nedelcugheorghe.blogspot.ro/2013/05/cum-programam-un-microcontroler-pic.html&quot; target=&quot;_blank&quot;&gt;articolul precedent&lt;/a&gt; scriam despre programarea unui microcontroler PIC conectat la o placa de dezvoltare care are deja conexiunile realizate pentru conectarea PICkit2 printr-un soclu ICSP (In-Circuit Serial Programming).&lt;br /&gt;
&lt;br /&gt;
Totusi, nu vom lucra mereu doar cu placi de dezvoltare in care microcontrolerele sunt de tip SMD si lipite pe placa, fara posibilitatea inlocuirii.&lt;br /&gt;
&lt;br /&gt;
Asadar, avem un programator PICkit2 si un microcontroler oarecare. Se pune problema conexiunilor dintre cele doua dispozitive.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
PICkit2 are un soclu cu 6 pini, pinul 1 fiind marcat de un triunghi. Pinul 6 este nefolosit (lasat in aer).&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.ianstedman.co.uk/Projects/TK3_PICKit2_adaptor/Pickit2_pinout.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; src=&quot;http://www.ianstedman.co.uk/Projects/TK3_PICKit2_adaptor/Pickit2_pinout.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Primii 5 pini se regasesc si la microcontrolere, nu mereu pe aceleasi pozitii.&lt;br /&gt;
De exemplu, la PIC16F88 avem urmatorii pini:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://www.futurlec.com/Pictures/PIC16F88.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;185&quot; src=&quot;http://www.futurlec.com/Pictures/PIC16F88.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
/MCLR - Pin 4&lt;br /&gt;
Vdd - Pin 14&lt;br /&gt;
Vss - Pin 5&lt;br /&gt;
PGD - Pin 13 &lt;br /&gt;
PGC - Pin 12&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaZJfeyo61EPanmxzWGb_GGfH5r_VdtUp2mHAMdiRd4Y2F7DDfdPYPM-eQPX2m4X3-FyuA44K6hzZDhJcOcUhygLIsYdvevqCU5dmJmdQ0XRbJReao0btLq4lmlr9Lvmlm6m5N_T0fj8z1/s1600/PICkit2+PIC16F88.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;schema conexiuni pickit2 pic16f88&quot; border=&quot;0&quot; height=&quot;245&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaZJfeyo61EPanmxzWGb_GGfH5r_VdtUp2mHAMdiRd4Y2F7DDfdPYPM-eQPX2m4X3-FyuA44K6hzZDhJcOcUhygLIsYdvevqCU5dmJmdQ0XRbJReao0btLq4lmlr9Lvmlm6m5N_T0fj8z1/s400/PICkit2+PIC16F88.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Indiferent de microcontrolerul pe care il aveti, tot ce trebuie sa faceti este sa identificati pinii &lt;b&gt;/MCLR&lt;/b&gt;,&lt;b&gt; Vdd&lt;/b&gt;,&lt;b&gt; Vss&lt;/b&gt;,&lt;b&gt; PGD &lt;/b&gt;si&lt;b&gt; PGC&lt;/b&gt;. &lt;br /&gt;
&lt;br /&gt;
In loc sa lipiti pinii microcontrolerului in circuit, puteti folosi un soclu pentru circuite integrate si puteti refolosi circuitul pentru a reprograma acelasi tip de microcontroler de cate ori doriti.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/3588945113994889308/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2013/05/conectarea-pickit2-la-un-microcontroler.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/3588945113994889308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/3588945113994889308'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2013/05/conectarea-pickit2-la-un-microcontroler.html' title='Conectarea PICkit2 la un microcontroler PIC oarecare'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho2vADWpZbQ-GE6dG9sis4W-GsdOHIJvac7tNENSPde6MwQBE0k8dBN-M1EUDmC2_5WnTAKG9KP8rrz7evSY_r0TPXHPi34E7FR1AEnaa7efn3Wj1g0lUPWHz412eFM6yMBKA-SbZdAobZ/s72-c/PICkit2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-7535037080972019722</id><published>2013-05-08T09:14:00.000+03:00</published><updated>2013-05-08T09:19:18.515+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="electronica digitala"/><category scheme="http://www.blogger.com/atom/ns#" term="microchip"/><category scheme="http://www.blogger.com/atom/ns#" term="microcontrolere"/><category scheme="http://www.blogger.com/atom/ns#" term="pic"/><category scheme="http://www.blogger.com/atom/ns#" term="programare"/><title type='text'>Cum programam un microcontroler PIC</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXyLcjrB9zRteFjtrPRsu_dnzj13clom8VhKg4h3UeT7tJzbqYZAuim7l38NUaM9-XMP1Hq4yRc0LQDcKS3V_8Bdfe8ULJ5Kkc6VjRD-IyfxlNA-zL5akH3oDCHHVFIF8EQKqBnZt7zPV-/s320/microcontroller.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot;alt=&quot;microcontroler PIC&quot; height=&quot;109&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXyLcjrB9zRteFjtrPRsu_dnzj13clom8VhKg4h3UeT7tJzbqYZAuim7l38NUaM9-XMP1Hq4yRc0LQDcKS3V_8Bdfe8ULJ5Kkc6VjRD-IyfxlNA-zL5akH3oDCHHVFIF8EQKqBnZt7zPV-/s200/microcontroller.jpg&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;/span&gt;Microcontrolerele PIC de la &lt;a href=&quot;http://www.blogger.com/www.microchip.com&quot; target=&quot;_blank&quot;&gt;Microchip&lt;/a&gt;® sunt poate cele mai utilizate microcontrolere de pe piata. Conform &lt;a href=&quot;http://en.wikipedia.org/wiki/Microchip_Technology&quot; target=&quot;_blank&quot;&gt;Wikipedia,&lt;/a&gt; din 2011 compania vinde anual 1 miliard de procesoare. Asadar, daca doriti sa programati un microcontroler, cele de la Microchip sunt o alegere foarte buna.&lt;br /&gt;
&lt;br /&gt;
Pentru a programa un microcontroler aveti nevoie de minim 3 lucruri:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;programator: &lt;a href=&quot;http://www.microchipdirect.com/productsearch.aspx?Keywords=PG164120&quot; target=&quot;_blank&quot;&gt;PICkit2&lt;/a&gt; sau &lt;a href=&quot;http://www.microchipdirect.com/ProductSearch.aspx?Keywords=PG164130&quot; target=&quot;_blank&quot;&gt;PICkit3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;microcontroler PIC: &lt;a href=&quot;http://www.microchip.com/pagehandler/en-us/products/picmicrocontrollers&quot; target=&quot;_blank&quot;&gt;oricare&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;program (fisier executabil .hex)&lt;/li&gt;
&lt;/ul&gt;
Recomandabil este sa achizitionati un programator impreuna cu o placa de dezvoltare. Eu am achizitionat acum 2 ani pachetul &lt;a href=&quot;http://www.microchipdirect.com/productsearch.aspx?Keywords=DV164121&quot; target=&quot;_blank&quot;&gt;DV164121&lt;/a&gt; care contine programatorul PICkit2 si o mini-placa de dezvoltare cu PIC16F887.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Este important ca sa va realizati propriile programe!&lt;/b&gt; Desi puteti lua cu usurinta programe de pe net gata compilate, eu va recomand sa invatati sa programati microcontrolerele folosind un mediu de dezvoltare precum MPLAB de la Microchip sau de la terte parti: &lt;a href=&quot;http://www.mikroe.com/mikroc/pic/&quot; target=&quot;_blank&quot;&gt;mikroC&lt;/a&gt;/&lt;a href=&quot;http://www.mikroe.com/mikropascal/pic/&quot; target=&quot;_blank&quot;&gt;mikroPascal&lt;/a&gt; sau &lt;a href=&quot;http://www.ccsinfo.com/content.php?page=compilers&quot; target=&quot;_blank&quot;&gt;CCS PIC Compiler&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Dupa ce ati obtinut fisierul .hex, trebuie sa conectati microcontrolerul la programator si acesta la computer.&lt;br /&gt;
&lt;br /&gt;
Porniti softul PICkit2:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJw4z0lhUN0teiFRROjcL2D1Iq1EgiLOu6zmRoiWyeCToeVBh6Dxqs5CUm5CtHIYyhVwACuV2kskPzjEyBehEmmUMOjj7v_dcxNURLMhWj9lgfFMfFPqMLUwPnKrlxHVtIUxs4z7WbtruC/s1600/PICkit2+programator.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;programator pickit2&quot; border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJw4z0lhUN0teiFRROjcL2D1Iq1EgiLOu6zmRoiWyeCToeVBh6Dxqs5CUm5CtHIYyhVwACuV2kskPzjEyBehEmmUMOjj7v_dcxNURLMhWj9lgfFMfFPqMLUwPnKrlxHVtIUxs4z7WbtruC/s400/PICkit2+programator.png&quot; width=&quot;328&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Se observa ca a fost detectat microcontrolerul PIC16F887 si programatorul PICkit2.&lt;br /&gt;
In dreapta, sub sigla Microchip, aveti o casuta &lt;b&gt;On&lt;/b&gt; cu ajutorul careia puteti alimenta circuitul in care se afla microcontrolerul (placa de dezvoltare).&lt;br /&gt;
Pentru a programa microcontrolerul apasati butonul &lt;i&gt;Auto Import Hex + Write Device&lt;/i&gt; si selectati fisierul .hex:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCP4wdjfarNkGY4Hi4_8YJ1dn_INU_cF7ZgGVXvJ9J2y6XDFVcUlZTn6jUo8ZowlxcsG4GI8iXECtm74W-gRwGcVjqfR3pAWOyvzu-vzfTfVDHVSCmXRg3qXpPoaXpIhooyhLTpuGdHFwN/s1600/Programare+Microcontroler+PIC.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;programare microcontrolere pic&quot; border=&quot;0&quot; height=&quot;393&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCP4wdjfarNkGY4Hi4_8YJ1dn_INU_cF7ZgGVXvJ9J2y6XDFVcUlZTn6jUo8ZowlxcsG4GI8iXECtm74W-gRwGcVjqfR3pAWOyvzu-vzfTfVDHVSCmXRg3qXpPoaXpIhooyhLTpuGdHFwN/s400/Programare+Microcontroler+PIC.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Asteptati 2 secunde si veti primi mesajul de confirmare &quot;Programming Successful.&quot;&lt;br /&gt;
Apoi puteti urmari pe placa de dezvoltare daca programul face ceea ce trebuie.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3k1P0YsY8WvmxbEF0Me6MzniXIrch0_O9-zmeA4_9pjPcUtwKyndCCi_QjiYsoD2dO9E-N29HVu3TdNSnJIHL2o6LIkdCDgHguC_YJNAzGvWryKkWthe8Hd6W_0Qbq4HSVHT-g0dMs13u/s1600/Programare+Microcontroler+PIC+2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;programare pickit2&quot; border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3k1P0YsY8WvmxbEF0Me6MzniXIrch0_O9-zmeA4_9pjPcUtwKyndCCi_QjiYsoD2dO9E-N29HVu3TdNSnJIHL2o6LIkdCDgHguC_YJNAzGvWryKkWthe8Hd6W_0Qbq4HSVHT-g0dMs13u/s320/Programare+Microcontroler+PIC+2.png&quot; width=&quot;262&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Mai jos am scris un mic program care clipeste 8 leduri conectate la portul D al microcontrolerului PIC. Programul a fost scris in PIC C Compiler de la CCS.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: #cfe2f3;&quot;&gt;#include &amp;lt;16f887.h&amp;gt;&lt;br /&gt;#fuses NOMCLR, INTRC_IO, NOBROWNOUT&lt;br /&gt;#use delay(clock=8M)&lt;br /&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; while(1)&lt;br /&gt;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp; OUTPUT_D(0xFF);&lt;br /&gt;&amp;nbsp;&amp;nbsp; delay_ms(200);&lt;br /&gt;&amp;nbsp;&amp;nbsp; OUTPUT_D(0x00);&lt;br /&gt;&amp;nbsp;&amp;nbsp; delay_ms(200);&lt;br /&gt;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;
Iata mai jos rezultatul:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dxsM7TKU34TO2BURd9OIru8r4_8Jw9M6SojKyiauqtYlRwFfPTX3ZZOcSEqIVHErKxTq4Zwcge0XuUVmDcn&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
Va doresc programare placuta!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/7535037080972019722/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2013/05/cum-programam-un-microcontroler-pic.html#comment-form' title='1 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/7535037080972019722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/7535037080972019722'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2013/05/cum-programam-un-microcontroler-pic.html' title='Cum programam un microcontroler PIC'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXyLcjrB9zRteFjtrPRsu_dnzj13clom8VhKg4h3UeT7tJzbqYZAuim7l38NUaM9-XMP1Hq4yRc0LQDcKS3V_8Bdfe8ULJ5Kkc6VjRD-IyfxlNA-zL5akH3oDCHHVFIF8EQKqBnZt7zPV-/s72-c/microcontroller.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8341031803567195527.post-6167737363343707418</id><published>2013-04-23T11:59:00.002+03:00</published><updated>2014-09-15T08:46:20.197+03:00</updated><title type='text'>Primul articol</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/RBG-LED.jpg/235px-RBG-LED.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/RBG-LED.jpg/235px-RBG-LED.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Salut! &lt;br /&gt;
Acesta este primul articol de pe blog.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://nedelcugheorghe.blogspot.com/feeds/6167737363343707418/comments/default' title='Postare comentarii'/><link rel='replies' type='text/html' href='http://nedelcugheorghe.blogspot.com/2013/04/primul-articol.html#comment-form' title='0 comentarii'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/6167737363343707418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8341031803567195527/posts/default/6167737363343707418'/><link rel='alternate' type='text/html' href='http://nedelcugheorghe.blogspot.com/2013/04/primul-articol.html' title='Primul articol'/><author><name>Nedelcu Gheorghe</name><uri>http://www.blogger.com/profile/01533988905383558313</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>