tag:blogger.com,1999:blog-44672209884074447162024-02-19T17:30:01.620+01:00Forge of StuffSome random projectsEmanuelehttp://www.blogger.com/profile/03502340784177714238noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-4467220988407444716.post-29795303439887978102017-03-21T00:41:00.000+01:002017-03-21T00:43:08.096+01:00Istruzioni per il corso "Workshop: Robot quadrupede con Arduino"Guida per <b><span style="color: red;">WINDOWS</span></b><br />
<div>
<b><span style="color: red;"><br /></span></b></div>
<div>
1) Scaricare Arduino IDE:<br />
dalla pagina <a href="https://www.arduino.cc/en/main/software" target="_blank">https://www.arduino.cc/en/main/software</a>, cliccate sulla scritta "<b>Windows installer</b>"<b> </b>e nella pagina seguente cliccate sulla scritta "<b>just download</b>". Installate il programma facendo doppio click nel file appena scaricato<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0qDGdURK9A9hSoBKu0qn230qvXAzTnLglMGDj430vTIokw4ZnvL723HrW_9UT3lGOYy1ZZc1p4CPQ3bc33AVo6b31pSRbm_DL-7afKCCcDL6gIO8f9xrm9nQRm7sESIDP6A5cUWF7K0Ie/s1600/arduino+ide.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0qDGdURK9A9hSoBKu0qn230qvXAzTnLglMGDj430vTIokw4ZnvL723HrW_9UT3lGOYy1ZZc1p4CPQ3bc33AVo6b31pSRbm_DL-7afKCCcDL6gIO8f9xrm9nQRm7sESIDP6A5cUWF7K0Ie/s320/arduino+ide.png" width="320" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
2) Scaricare i driver da <a href="http://www.arduined.eu/files/CH341SER.zip" target="_blank">http://www.arduined.eu/files/CH341SER.zip</a><br />
Cliccare con il tasto destro nel file appena scaricato e dal menu a tendina scegliere estrai tutto.<br />
All'interno della cartella appena estratta troverete le due cartelle seguenti:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF4K-inRefuBtDB-6Qh8vaS8StabLxbhvlucMbDDFomM_d6yrthzrtWNYCFN5lx7sifhfVrQpQ3FPjlf9aKJ9544009TqafeTU1YEkq1atBoK1Vv7CSywGyt2v4we_QEMOzQGbFsWcEMER/s1600/driver.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="135" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF4K-inRefuBtDB-6Qh8vaS8StabLxbhvlucMbDDFomM_d6yrthzrtWNYCFN5lx7sifhfVrQpQ3FPjlf9aKJ9544009TqafeTU1YEkq1atBoK1Vv7CSywGyt2v4we_QEMOzQGbFsWcEMER/s400/driver.png" width="400" /></a></div>
<div class="separator" style="clear: both;">
Aprite la cartella CH341SER e fate doppio click sul file SETUP che troverete all'interno, si aprirà questa mascherina</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV09dFizQOZKcwpZy-CdvFshsW1F1n5QQQn7immZ7GtnJmPT0V5lfADCBWJp63536j5U7_f7lelppSw3vqm1K2JbDzeSBs4nLhjFUnGeQ5HenOFt-rK2PmQUs5FhzYfkWVIZPW7NWroHLc/s1600/driver2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV09dFizQOZKcwpZy-CdvFshsW1F1n5QQQn7immZ7GtnJmPT0V5lfADCBWJp63536j5U7_f7lelppSw3vqm1K2JbDzeSBs4nLhjFUnGeQ5HenOFt-rK2PmQUs5FhzYfkWVIZPW7NWroHLc/s320/driver2.png" width="320" /></a></div>
<div class="separator" style="clear: both;">
Cliccare sul pulsante INSTALL</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
3) Aspettate che manchi una settimana al corso prima di eseguire questo punto, perchè il programma scaricato durerà 30 giorni.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Scaricate il free trial del programma FUSION 360 dal link <a href="http://www.autodesk.com/products/fusion-360/free-trial" target="_blank">http://www.autodesk.com/products/fusion-360/free-trial</a> cliccando sul tasto arancione "DOWNLOAD FREE TRIAL" e successivamente inserite la vostra mail e scaricate il programma.</div>
<div class="separator" style="clear: both;">
Fate partire l'installazione ed una volta installato nella schermata seguente</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh48WWPoiwVVFVuclXVM11iDwGZ246TXkP4tIrIta-KOFl9G6wLKpdoKDKlVoHEKhrd070lax3WlyNaO6S4xjef4QcVzCe4Xz63azkTjP_2vnEBHaVogEg92k9V48nzi35FtGXwmHMQ_RMj/s1600/fusion+360+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh48WWPoiwVVFVuclXVM11iDwGZ246TXkP4tIrIta-KOFl9G6wLKpdoKDKlVoHEKhrd070lax3WlyNaO6S4xjef4QcVzCe4Xz63azkTjP_2vnEBHaVogEg92k9V48nzi35FtGXwmHMQ_RMj/s320/fusion+360+2.png" width="320" /></a></div>
<div class="separator" style="clear: both;">
Cliccate su "<b>CREATE ACCOUNT</b>"</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Compilate la pagina sucessiva con i vostri dati, spuntate la casella "I agree ..." e cliccate su "CREATE ACCOUNT". La vostra mail e password serviranno per accedere al programma, scrivetele da qualche parte per non dimenticarle.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Finito :)</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Guida per <span style="color: red;"><b>IOS</b></span></div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
1) Scaricare Arduino IDE:</div>
dalla pagina <a href="https://www.arduino.cc/en/main/software" target="_blank">https://www.arduino.cc/en/main/software</a> cliccate sulla scritta "<b>MAC OS X</b>"<b> </b>e nella pagina seguente cliccate sulla scritta "<b>just download</b>". Installate il programma facendo doppio click nel file appena scaricato<br />
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
2) I driver li installiamo direttamente durante il corso</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
3) Aspettate che manchi una settimana al corso prima di eseguire questo punto, perchè il programma scaricato durerà 30 giorni.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Scaricate il free trial del programma FUSION 360 dal link <a href="http://www.autodesk.com/products/fusion-360/free-trial" target="_blank">http://www.autodesk.com/products/fusion-360/free-trial</a> cliccando sul tasto arancione "DOWNLOAD FREE TRIAL" e successivamente inserite la vostra mail e scaricate il programma.</div>
<div class="separator" style="clear: both;">
Fate partire l'installazione ed una volta installato nella schermata seguente</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh48WWPoiwVVFVuclXVM11iDwGZ246TXkP4tIrIta-KOFl9G6wLKpdoKDKlVoHEKhrd070lax3WlyNaO6S4xjef4QcVzCe4Xz63azkTjP_2vnEBHaVogEg92k9V48nzi35FtGXwmHMQ_RMj/s1600/fusion+360+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh48WWPoiwVVFVuclXVM11iDwGZ246TXkP4tIrIta-KOFl9G6wLKpdoKDKlVoHEKhrd070lax3WlyNaO6S4xjef4QcVzCe4Xz63azkTjP_2vnEBHaVogEg92k9V48nzi35FtGXwmHMQ_RMj/s320/fusion+360+2.png" width="320" /></a></div>
<div class="separator" style="clear: both;">
Cliccate su "<b>CREATE ACCOUNT</b>"</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Compilate la pagina sucessiva con i vostri dati, spuntate la casella "I agree ..." e cliccate su "CREATE ACCOUNT". La vostra mail e password serviranno per accedere al programma, scrivetele da qualche parte per non dimenticarle.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
Finito :)</div>
</div>
Emanuelehttp://www.blogger.com/profile/03502340784177714238noreply@blogger.com0tag:blogger.com,1999:blog-4467220988407444716.post-39540008671697595882017-03-20T23:33:00.000+01:002017-03-21T00:12:14.453+01:00Istruzioni per il corso "Workshop: Braccio robotico con Arduino"Guida per <b><span style="color: red;">WINDOWS</span></b><br />
<div>
<b><span style="color: red;"><br /></span></b></div>
<div>
1) Scaricare Arduino IDE:<br />
dalla pagina <a href="https://www.arduino.cc/en/main/software" target="_blank">https://www.arduino.cc/en/main/software</a>, cliccate sulla scritta "<b>Windows installer</b>"<b> </b>e nella pagina seguente cliccate sulla scritta "<b>just download</b>". Installate il programma facendo doppio click nel file appena scaricato<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0qDGdURK9A9hSoBKu0qn230qvXAzTnLglMGDj430vTIokw4ZnvL723HrW_9UT3lGOYy1ZZc1p4CPQ3bc33AVo6b31pSRbm_DL-7afKCCcDL6gIO8f9xrm9nQRm7sESIDP6A5cUWF7K0Ie/s1600/arduino+ide.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="141" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0qDGdURK9A9hSoBKu0qn230qvXAzTnLglMGDj430vTIokw4ZnvL723HrW_9UT3lGOYy1ZZc1p4CPQ3bc33AVo6b31pSRbm_DL-7afKCCcDL6gIO8f9xrm9nQRm7sESIDP6A5cUWF7K0Ie/s320/arduino+ide.png" width="320" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
2) Scaricare S4A dal link <a href="http://vps34736.ovh.net/S4A/S4A16.zip" target="_blank">http://vps34736.ovh.net/S4A/S4A16.zip</a> </div>
<div>
Cliccare con il tasto destro nel file appena scaricato e dal menu a tendina scegliere estrai tutto.</div>
<div>
Installare il programma facendo doppio click nel file S4A16 che troverete all'interno della cartella appena estratta</div>
<div>
<br /></div>
<div>
3) Scaricare i driver da <a href="http://www.arduined.eu/files/CH341SER.zip" target="_blank">http://www.arduined.eu/files/CH341SER.zip</a><br />
Cliccare con il tasto destro nel file appena scaricato e dal menu a tendina scegliere estrai tutto.<br />
All'interno della cartella appena estratta troverete le due cartelle seguenti:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF4K-inRefuBtDB-6Qh8vaS8StabLxbhvlucMbDDFomM_d6yrthzrtWNYCFN5lx7sifhfVrQpQ3FPjlf9aKJ9544009TqafeTU1YEkq1atBoK1Vv7CSywGyt2v4we_QEMOzQGbFsWcEMER/s1600/driver.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="135" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiF4K-inRefuBtDB-6Qh8vaS8StabLxbhvlucMbDDFomM_d6yrthzrtWNYCFN5lx7sifhfVrQpQ3FPjlf9aKJ9544009TqafeTU1YEkq1atBoK1Vv7CSywGyt2v4we_QEMOzQGbFsWcEMER/s400/driver.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Aprite la cartella CH341SER e fate doppio click sul file SETUP che troverete all'interno, si aprirà questa mascherina</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV09dFizQOZKcwpZy-CdvFshsW1F1n5QQQn7immZ7GtnJmPT0V5lfADCBWJp63536j5U7_f7lelppSw3vqm1K2JbDzeSBs4nLhjFUnGeQ5HenOFt-rK2PmQUs5FhzYfkWVIZPW7NWroHLc/s1600/driver2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV09dFizQOZKcwpZy-CdvFshsW1F1n5QQQn7immZ7GtnJmPT0V5lfADCBWJp63536j5U7_f7lelppSw3vqm1K2JbDzeSBs4nLhjFUnGeQ5HenOFt-rK2PmQUs5FhzYfkWVIZPW7NWroHLc/s320/driver2.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Cliccare sul pulsante INSTALL</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Finito :)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Guida per <span style="color: red;"><b>IOS</b></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
1) Scaricare Arduino IDE:</div>
dalla pagina <a href="https://www.arduino.cc/en/main/software" target="_blank">https://www.arduino.cc/en/main/software</a> cliccate sulla scritta "<b>MAC OS X</b>"<b> </b>e nella pagina seguente cliccate sulla scritta "<b>just download</b>". Installate il programma facendo doppio click nel file appena scaricato<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
2) Scaricare e installare S4A <a href="http://vps34736.ovh.net/S4A/S4A16.dmg" target="_blank">http://vps34736.ovh.net/S4A/S4A16.dmg</a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
3) I driver li installiamo direttamente durante il corso</div>
</div>
Emanuelehttp://www.blogger.com/profile/03502340784177714238noreply@blogger.com0tag:blogger.com,1999:blog-4467220988407444716.post-20622617637511903882015-02-16T16:27:00.001+01:002015-02-16T16:27:20.200+01:00Custom font in Eagle Cad gerber fileIf you want to export your Eagle Cad design to gerber file all the text is automatically converted to VECTOR font.<div>
Normally that's ok because the text is only needed to mount the pcb, once it is done it will be hidden at the user, in my case (the smarzlogio) the text are visible to the user and the vector font is orrible.</div>
<div>
After serching in the web I didn't find any easy and quick solution, and after some time on the program I found a way to do is, and it's very simple.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMCsvbL4Q9alQsrSIx_O6MK141yvJAdPeTUprBFlAMT5kQaui1eqcVBb-0IVe6cppPHyo5C7LHEbJYtO2THJjy8NyYTMA74iv0rWvITR_8KwXkeWG7twwAVLc4y6zdUFw_YKAWYAPCMcy4/s1600/smarzlogio+top.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMCsvbL4Q9alQsrSIx_O6MK141yvJAdPeTUprBFlAMT5kQaui1eqcVBb-0IVe6cppPHyo5C7LHEbJYtO2THJjy8NyYTMA74iv0rWvITR_8KwXkeWG7twwAVLc4y6zdUFw_YKAWYAPCMcy4/s1600/smarzlogio+top.png" height="249" width="320" /></a></div>
<div>
<br /></div>
<div>
As you can see the font I'm using is the PROPORTIONAL</div>
<div>
<br /></div>
<div>
To preserve this fon on the gerber all you need to do is:</div>
<div>
<br /></div>
<div>
1) Make visible only the text layer you need </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqdZ4ePDIYiIxVK-suTIYynr33nBTLJREQX6vG2GA1OEo54crHNnKmYIrFA_XSn5VtIeomIt7R6KAK-CxSwNDfwWzU1vGkEGAACzGvWT_vVS_-mllTyp3MZzfOl-jmZNTtXbvoSiREpOmy/s1600/smarzlogio+scritte.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqdZ4ePDIYiIxVK-suTIYynr33nBTLJREQX6vG2GA1OEo54crHNnKmYIrFA_XSn5VtIeomIt7R6KAK-CxSwNDfwWzU1vGkEGAACzGvWT_vVS_-mllTyp3MZzfOl-jmZNTtXbvoSiREpOmy/s1600/smarzlogio+scritte.png" height="274" width="320" /></a></div>
<div>
2) File -> Export -> Immage </div>
<div>
Now select MONOCHROME and use the resolution you want (2400 dpi is the highest resolution disponible)</div>
<div>
Click BROWSE and save the immage as BMP.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzG2GFYtItA68WIr8X0fsA4_SN-RZb54chMQ8ElDfVUL4C-vCTIJY9nJ_We6budaHiIv1zxq49Z7bkmNt-rD3PpLLzuFsYZYCu8TrpGq6dO5qXc5mR-8S39tOgtpBOaK55K9Go8TcDheTm/s1600/smarzlogio+export+immage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzG2GFYtItA68WIr8X0fsA4_SN-RZb54chMQ8ElDfVUL4C-vCTIJY9nJ_We6budaHiIv1zxq49Z7bkmNt-rD3PpLLzuFsYZYCu8TrpGq6dO5qXc5mR-8S39tOgtpBOaK55K9Go8TcDheTm/s1600/smarzlogio+export+immage.png" height="221" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
3)File -> Import -> Bitmap, open you immage and select the black color</div>
<div>
Now you have to switch to dpi mode (insert the dpi you used before) and chose the layer where the text will be placed, press ok and the script will run, when it ends press run script.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-ZmSrWr5anuW_yTQICWmJi7DOxZTJ9HLzlu5fWiNA6oa-0R8vMf5EAPDL7d7eOGkDFtkq9fd480rI5A-Y2Qbsh1j6zJSP0iCj2xBVbTBJYMb7YRFBzqnkiq4wxvlqvph2i0zYrSMVM9p6/s1600/smarzlogio+import+immage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-ZmSrWr5anuW_yTQICWmJi7DOxZTJ9HLzlu5fWiNA6oa-0R8vMf5EAPDL7d7eOGkDFtkq9fd480rI5A-Y2Qbsh1j6zJSP0iCj2xBVbTBJYMb7YRFBzqnkiq4wxvlqvph2i0zYrSMVM9p6/s1600/smarzlogio+import+immage.png" height="320" width="184" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
4) Now you have only to move the text in the place you want.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3NaRerh_fK9vwAGQoGfWo39cbPWB5m83EmnocqaWJRN2pVtz4Z1Cxbd7itig-QLWQcEnBo1TKuoYrU8CBCVeeYauIbeavuKtVLuc8nwP4H5f-9mLpUB5syEtLyTAO4qu_FJCcFMO82j1j/s1600/scritta+finale.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3NaRerh_fK9vwAGQoGfWo39cbPWB5m83EmnocqaWJRN2pVtz4Z1Cxbd7itig-QLWQcEnBo1TKuoYrU8CBCVeeYauIbeavuKtVLuc8nwP4H5f-9mLpUB5syEtLyTAO4qu_FJCcFMO82j1j/s1600/scritta+finale.png" height="278" width="320" /></a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
5) When exporting gerber, select the layer where you placed the immage as the silk layer.</div>
<div>
<br /></div>
<div>
</div>
<div>
</div>
<div>
<br /></div>
<div>
<br /></div>
Emanuelehttp://www.blogger.com/profile/03502340784177714238noreply@blogger.com0tag:blogger.com,1999:blog-4467220988407444716.post-7212884724054623112013-07-07T21:53:00.001+02:002013-07-07T21:59:44.880+02:00Cnc milled iphone 5A friend of mine ask me to shape some wood into an iphone 5 because he wanted sew some covers made of felt and he needed a model for the measures.<br />
So I modelled the iphone and milled it into a scrap from a old door.<br />
<br />
This is what came out<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmJJ-mBW0NzLIw3qx3k51t3J3RyzfKnI9oVrXeontOpSQPpSZQK46ULEUNiqBRoQTxuE0icizppr3vW0_UlMIQrYeSyYnyB66pcEAnv0z1hcLXvUVwtq7WeW_CgmsYMZllnIb3yF7uZO8i/s1600/foto+iphone+legno.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="" border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmJJ-mBW0NzLIw3qx3k51t3J3RyzfKnI9oVrXeontOpSQPpSZQK46ULEUNiqBRoQTxuE0icizppr3vW0_UlMIQrYeSyYnyB66pcEAnv0z1hcLXvUVwtq7WeW_CgmsYMZllnIb3yF7uZO8i/s400/foto+iphone+legno.jpg" title="wooden iphone 5" width="400" /></a></div>
<br />
After giving him the model, I milled an other for me, so now I own an iphone 5 too ;)Emanuelehttp://www.blogger.com/profile/03502340784177714238noreply@blogger.com0tag:blogger.com,1999:blog-4467220988407444716.post-87375141090756311112013-04-04T22:41:00.000+02:002013-07-07T22:00:08.776+02:00Weekend project - CNC wooden rubik cube-In these last few month I had to travel by train 3 hours a day, so I've learnt how to solve rubik cube and I bought one designed for speed cubing.<br />
When the cube arrived I found out, to my great joy, it wasn't already mounted!!<br />
I spent some time to build it, the speed-cubing cube are very different internally from the "normal" rubik cube, they don't have sharp edge as the other version, they have some strange 3D curves instead<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8552CApAUVzDOA3wX4JKEVUcw1O2iW-vsHjnSvMtOg9_1PflljANG0XV9XBbMfZbuKrwTZB3iAEjdj-fg4-qKy9qMi0Nt6weziaawnx9KRQFhWZTCHH6p7qUYjQuUM7MvX39mMJ1oO4lp/s1600/viewThumb1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8552CApAUVzDOA3wX4JKEVUcw1O2iW-vsHjnSvMtOg9_1PflljANG0XV9XBbMfZbuKrwTZB3iAEjdj-fg4-qKy9qMi0Nt6weziaawnx9KRQFhWZTCHH6p7qUYjQuUM7MvX39mMJ1oO4lp/s1600/viewThumb1.jpg" width="320" /></a></div>
<div style="text-align: center;">
dayan cube</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Since this model is too much complex to mill with a normal 3-axis milling machine, i decided to try milling the normal and easier cube</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwIDWnCH_TVkyCh0sZUUviC5-zmk-0IbG7JlQ1xPtd5qdABrc0K84pePFa5_O3wN-JJzVQb7kwDPI_hqGd3Dyqtyph_ZVVZVXCz9BiIrwgQjW-ZdR2x-ixD63CuPyfffFILQDwPAkvXkyT/s1600/Rubiks+Cube+Pieces.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwIDWnCH_TVkyCh0sZUUviC5-zmk-0IbG7JlQ1xPtd5qdABrc0K84pePFa5_O3wN-JJzVQb7kwDPI_hqGd3Dyqtyph_ZVVZVXCz9BiIrwgQjW-ZdR2x-ixD63CuPyfffFILQDwPAkvXkyT/s1600/Rubiks+Cube+Pieces.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
normal cube</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
This will be the project pipeline:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
-Create the 3D model</div>
<div class="separator" style="clear: both; text-align: left;">
-Find how to mill it (it can't be milled in a single step)</div>
<div class="separator" style="clear: both; text-align: left;">
-Create the CNC file</div>
<div class="separator" style="clear: both; text-align: left;">
-Find how to put all the pieces together</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
3D MODEL done</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI7_8Lk8TCpG24TiePR81tnL3U9YJKPdeO86T8HTuGYmpGAlqQdvcetPB0AMD6fVfQYceEg4oME_h6Q7u8mpSp6MdvFcyF38SKqzscRndMVtvStcWKj8WyQAhxu8g9uaqRIkOf32GQSHzc/s1600/cubo3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI7_8Lk8TCpG24TiePR81tnL3U9YJKPdeO86T8HTuGYmpGAlqQdvcetPB0AMD6fVfQYceEg4oME_h6Q7u8mpSp6MdvFcyF38SKqzscRndMVtvStcWKj8WyQAhxu8g9uaqRIkOf32GQSHzc/s1600/cubo3.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
central piece (need 6 of them)</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjG7zFuwAh9JE5hEdOyWM45cPEXWLBK32CM_WWtHH1t_OIxIf22yzLRNOSigLUvvaRZ2aFuAUmBLYNsAxZyeaDTywkslyUr-h2_31-U0PlB_L-VoAIWxGJCn4DI_PngXVvK_A57zPcoMTe/s1600/cubo2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjG7zFuwAh9JE5hEdOyWM45cPEXWLBK32CM_WWtHH1t_OIxIf22yzLRNOSigLUvvaRZ2aFuAUmBLYNsAxZyeaDTywkslyUr-h2_31-U0PlB_L-VoAIWxGJCn4DI_PngXVvK_A57zPcoMTe/s1600/cubo2.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
testing in the 3D model if the piece match</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghsvgYpKiwj3ryd13JGwxsy5gp-87DkwdV18sPzWKmGK7XR9lfMv_OgsA_-y9mTH6MXRH2S42EZi5muA9Xt1bsWvL0klD6ys6mIOgQi5oXB7nVAqR1oEjQmrbFPrC_ruIerrYV1A12wfJr/s1600/cubo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghsvgYpKiwj3ryd13JGwxsy5gp-87DkwdV18sPzWKmGK7XR9lfMv_OgsA_-y9mTH6MXRH2S42EZi5muA9Xt1bsWvL0klD6ys6mIOgQi5oXB7nVAqR1oEjQmrbFPrC_ruIerrYV1A12wfJr/s1600/cubo.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
some piece together</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisI0XapZjxeG0v41Zh5GsztZEfW0LKpsGVyCZSh_-jvwObj8GiDejVRcK57JQgqPGukeg5iO8CK1hc5jTUQCfE7ntNacBPyRS_IkxC0rCovGWu0vULypHtW1WplfB3EVq09J5pI3P1q4UU/s1600/cubo3.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisI0XapZjxeG0v41Zh5GsztZEfW0LKpsGVyCZSh_-jvwObj8GiDejVRcK57JQgqPGukeg5iO8CK1hc5jTUQCfE7ntNacBPyRS_IkxC0rCovGWu0vULypHtW1WplfB3EVq09J5pI3P1q4UU/s1600/cubo3.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><br /></a></div>
<br />
<br />
<br />
First milling test<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY5a65oVmrBtCztwnSXXR_QMYEQa64btXyz2JbfMJQAAyj1dEgLiFlUZTWh0GQyV_JGNKwZRlJJkbzn74MmH07tE9iPjUGECaMu24iQvIT-Uf4ygYqT2lH4wWU-SrAw5kKIbF3fNR7xqFI/s1600/foto3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY5a65oVmrBtCztwnSXXR_QMYEQa64btXyz2JbfMJQAAyj1dEgLiFlUZTWh0GQyV_JGNKwZRlJJkbzn74MmH07tE9iPjUGECaMu24iQvIT-Uf4ygYqT2lH4wWU-SrAw5kKIbF3fNR7xqFI/s1600/foto3.jpg" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi40mKij9fHZJIm8KdMDztI-XuGsq3yoNzhmZMUtU7G6smSsSjwmFAMkXxx8CUCRrzvfM8tiWRz8UwUAdyqVzNlguhY4tJae5h2XptxSWfjVTDnZ2OxNgYMFhrCRAZ3M6dJoVhUVkthssC_/s1600/foto1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi40mKij9fHZJIm8KdMDztI-XuGsq3yoNzhmZMUtU7G6smSsSjwmFAMkXxx8CUCRrzvfM8tiWRz8UwUAdyqVzNlguhY4tJae5h2XptxSWfjVTDnZ2OxNgYMFhrCRAZ3M6dJoVhUVkthssC_/s1600/foto1.jpg" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVXUqTMy3xbwRJLnRamlfyaYvMe6Br3tU0AeQeb8dqQiEpFPqglX6o9nqwhw2Mpevzw1KMwsM0ocDsMmmldsuyrYC2Uhy5N6fuCnB_Z9ywfLLMCFCDv2XZ4Pb9mK7BdRyoU_qAbCIOvWJa/s1600/foto2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVXUqTMy3xbwRJLnRamlfyaYvMe6Br3tU0AeQeb8dqQiEpFPqglX6o9nqwhw2Mpevzw1KMwsM0ocDsMmmldsuyrYC2Uhy5N6fuCnB_Z9ywfLLMCFCDv2XZ4Pb9mK7BdRyoU_qAbCIOvWJa/s1600/foto2.jpg" width="240" /></a></div>
<br />
This lateral piece was made milling in two sides, top and bottom face.<br />
The results are good, not amazing, but good, you can see a light division line. Next time I'll use a longer drill and do a top-to-bottom first milling step to remove this problem.<br />
Milling this was relatively simple, the hard part will be mill the angle pieces, because they can't be made in two step, they need three.<br />
I'm planning to build an array of square holes from a thick wood piece where to fix the cube pieces and do the second and third milling phases.<br />
<br />
First test done, milled the first part end then the hole where the piece will be fixed.<br />
After a coordinate problem (as you can see in the picture) i milled the two remaining sides.<br />
The result is not so good, so next time instead of drill a hole and then fix the part there I'll build a sort of clap where the piece can be hold<br />
<br />
<br />
I will update you on how things are going as soon as possible :)<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<br /></div>
Emanuelehttp://www.blogger.com/profile/03502340784177714238noreply@blogger.com2tag:blogger.com,1999:blog-4467220988407444716.post-59612040135535761192013-03-15T11:58:00.002+01:002014-06-23T13:46:09.122+02:00Binary clock <div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6AQ3EqfMd-fd0O8DEKDSi-49Au-__5YsnUD3kiiZqNWAwRppfTdARZgitqwZQPzR6zvj2nRLlFcGZb23auy6xfyAgnRYXNmBnic4Y01_EVvmsatxsT3xIo0n9fVT_ijXrDNP-wpDFSMoZ/s1600/2013-03-15+12.02.522.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6AQ3EqfMd-fd0O8DEKDSi-49Au-__5YsnUD3kiiZqNWAwRppfTdARZgitqwZQPzR6zvj2nRLlFcGZb23auy6xfyAgnRYXNmBnic4Y01_EVvmsatxsT3xIo0n9fVT_ijXrDNP-wpDFSMoZ/s1600/2013-03-15+12.02.522.jpg" height="279" width="320" /></a></div>
<br />
<br />
Make a binary clock is the dream of all NERD on the world right? (mmm.. or maybe build a lightsaber :) ).<br />
I got this idea while I was attending my last year of school, and i decide to design and build a binary <span class="short_text" id="result_box" lang="en"><span class="hps">wristwatch.<br /><br />I was studing pic's at the moment so, for the brain I chose a everyone-known PIC16F628.</span></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg3LetDyIP2WzUmVN002N8IEyQSgtHWnTcAppQ9MzzlZqBi3KbMQCYEkXJOE5AIBnZrndHfltSYuWLllZdnppdn_6GBuUeCvW7DBDPeDwKfWt0hKKGsQmW9eCXpNGXGvv6FQwGs3ZPOzg2/s1600/16F628.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg3LetDyIP2WzUmVN002N8IEyQSgtHWnTcAppQ9MzzlZqBi3KbMQCYEkXJOE5AIBnZrndHfltSYuWLllZdnppdn_6GBuUeCvW7DBDPeDwKfWt0hKKGsQmW9eCXpNGXGvv6FQwGs3ZPOzg2/s1600/16F628.jpg" height="182" width="320" /></a></div>
<span class="short_text" id="result_box" lang="en"><span class="hps"><br />For the time display </span></span><span class="short_text" id="result_box" lang="en"><span class="hps">I thought of using 4 led's for the hours and 6 led for the minutes following this scheme:</span></span><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjosG9DhWyBvzAhmyX8Q6SBBcQDDPB2MaNSpeVZ8dKnzkZx6XbB4l6kVccPCTVK3dT-k9dTEc8hm_FwO5wybyVDmpsRraIPtEd99yr2_BTiPoTCPhlxgl7h2c3jDUHl0A0ux0BaXmz5J7vk/s1600/orologio_binario_tempo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjosG9DhWyBvzAhmyX8Q6SBBcQDDPB2MaNSpeVZ8dKnzkZx6XbB4l6kVccPCTVK3dT-k9dTEc8hm_FwO5wybyVDmpsRraIPtEd99yr2_BTiPoTCPhlxgl7h2c3jDUHl0A0ux0BaXmz5J7vk/s1600/orologio_binario_tempo.jpg" title="Binary time" /></a> </div>
<div class="separator" style="clear: both; text-align: left;">
You can get the hours by adding the value of ON green leds, and the same process for the minutes with red leds.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
HOW TO MISURE THE CORRECT TIME? </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To keep the correct timing i used Timer1 operating in asynchronous counter mode, the idea is this: </div>
to save battery life the pic will be on sleep-mode when the time is not displayed, and the led will be ON only for a few second after one of the 2 buttons is being pressed. While in sleep-mode the pic shut-down almost all of his feature, but the TMR1 counter mode still stays on, so you can count the time while the pic is sleeping.<br />
When the TMR1 16-bit-register overflow, a interrupt signal wake up the pic, in this case the second's are updated and the pic returns at bed.<br />
To use TMR1 as external counter, you have to give him something to count, this is made by adding a 32.768 Hz quarz oscillator between pins RB7 and RB6.<br />
The pic will be running with internal oscillator clock at 32 khz instead of 4 Mhz to save additional current.<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
HOW TO DISPLAY TIME?<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The time is displayed when one of the 2 buttons is pressed. The question now is: how can the pic read the button if it's on sleep-mode? Well, for that I used interrupt-on-change feature for RB4 and RB5, when the state of these pins change the pic is waked up.</div>
<div class="separator" style="clear: both; text-align: left;">
When a button is pressed, TMR0 is also load with a value and TMR0 interrupt is enabled, this is used to measure the time the leds will be on, when TMR0 overflow, all the leds are tuned OFF and the pic return in sleep-mode.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
SUMMARIZING ALL THE LOGIC BEHIND THIS CLOCK</div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">-start of the program (</span></span><span class="short_text" id="result_box" lang="en"><span class="hps">initialization)</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">-pic go on sleep</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> </span></span><span class="short_text" id="result_box" lang="en"><span class="hps">IF TMR1 go on overflow</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> -wake up pic</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> -update time</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> -return on sleep</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">IF PORB-interrupt</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> -wake the pic</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> -turn on leds displaying time</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> -wait for a while (with TMR0 overflow)</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> -turn off all leds</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"> -return on sleep</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">HOW TO SET TIME?</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">Well, in this case i have to updade the program, now you can set the time only the first time you boot the clock.</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps"><br /></span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">SCHEMATICS</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiwiGTBH9k8xmKanyjTzvxaZY236l6zWr1WMZeZEEi_eg-YEAHBEZ55a7QcOE3er4GOREGsSy4vz2g4yEkAy6Z44ZteVcKwYnvl3kex88fEcd_c1g7xPetc_IcpZB-0UGlBU3WHTcy0RYa/s1600/shematics.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiwiGTBH9k8xmKanyjTzvxaZY236l6zWr1WMZeZEEi_eg-YEAHBEZ55a7QcOE3er4GOREGsSy4vz2g4yEkAy6Z44ZteVcKwYnvl3kex88fEcd_c1g7xPetc_IcpZB-0UGlBU3WHTcy0RYa/s1600/shematics.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSeWXpn5gKek4BEQwm6EDR512_8L4rPg-rtBuOkhBy1EQukvffCeCWg282Wh200lDSV45ObO7NHApP8bbpi7CPuGkcVNPKUbkB4D5Xrb0H4opb3tgnk3EZGo1HTKQyY3MXOntErE9Uxice/s1600/shematics.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">(the strip is for pic-kit programmer)</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">(there is one more led used for MODE-led)</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">SOME PHOTOS</span></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhShvKrXj1a0RRNPC-Ao6lKq3aqWl8HvseV_gsrFtJRQ-PS3ykK61nTgMgrqo5SPy24pwV6zy_D94YtMBo11ZL7ZkEPy3az1XRv3QBz3L0OeBWqu3h04mr7MDXa1LYgjpbN8RY8I-UFyTAc/s1600/2013-03-15+12.03.19.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhShvKrXj1a0RRNPC-Ao6lKq3aqWl8HvseV_gsrFtJRQ-PS3ykK61nTgMgrqo5SPy24pwV6zy_D94YtMBo11ZL7ZkEPy3az1XRv3QBz3L0OeBWqu3h04mr7MDXa1LYgjpbN8RY8I-UFyTAc/s1600/2013-03-15+12.03.19.jpg" height="320" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPhmSLWsDqyatHXs6oxxb7nuARXLfGcYsiv9QCYgFcL5PJWz8zgEfAR9S1oIMIp02mYI75vInnIQyfjHAtc2GJ26R3DBw2P8UPb3HkcHAqrVeLFrX58Su71odaigPT4HgdQXv4mvAjkFh_/s1600/2013-03-15+12.03.33.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPhmSLWsDqyatHXs6oxxb7nuARXLfGcYsiv9QCYgFcL5PJWz8zgEfAR9S1oIMIp02mYI75vInnIQyfjHAtc2GJ26R3DBw2P8UPb3HkcHAqrVeLFrX58Su71odaigPT4HgdQXv4mvAjkFh_/s1600/2013-03-15+12.03.33.jpg" height="320" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI__LorBwnu90pAheJydXwPsMppZ7r_-x1zxtQpC7mAmqMu3mBpiArpdskTApbdYzj1wDXM5qyV4x9epLw5ALvPNzwFfZtiNmYzoKiXlx-2mdGbp4ZqploN6TjKkAAPwjcmruNqb5UHVge/s1600/2013-03-15+12.02.52.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI__LorBwnu90pAheJydXwPsMppZ7r_-x1zxtQpC7mAmqMu3mBpiArpdskTApbdYzj1wDXM5qyV4x9epLw5ALvPNzwFfZtiNmYzoKiXlx-2mdGbp4ZqploN6TjKkAAPwjcmruNqb5UHVge/s1600/2013-03-15+12.02.52.jpg" height="320" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCBu3BdcIYYjfsf_5fqLr5tByY8Riva7vUESm0HCi8UDCpse55IF0LvS9brzcv78uzDvI0R_5U1OeHK_ZeVIEPrRI8S1fYf72hf_TIp0KQ-vFg2FHkcL_L1p7KSzZMz0K5OWTJK-wiQqP/s1600/2013-03-15+12.03.39.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCBu3BdcIYYjfsf_5fqLr5tByY8Riva7vUESm0HCi8UDCpse55IF0LvS9brzcv78uzDvI0R_5U1OeHK_ZeVIEPrRI8S1fYf72hf_TIp0KQ-vFg2FHkcL_L1p7KSzZMz0K5OWTJK-wiQqP/s1600/2013-03-15+12.03.39.jpg" height="320" width="240" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdr2iu4z7MuHwZ1j0qVi6Ov0N9iWjd2cn7B-7ZdvjtFvpzZ4GKzhus9CXT15wy6MUe4sCBPqozCGaU5cKI2YS8E1Z9XQNGBTd5TBiiOT2cfFOLkvQP4VcXZzmgKQPyhvLIiJgA9HJ76_LF/s1600/2013-03-15+12.03.55.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdr2iu4z7MuHwZ1j0qVi6Ov0N9iWjd2cn7B-7ZdvjtFvpzZ4GKzhus9CXT15wy6MUe4sCBPqozCGaU5cKI2YS8E1Z9XQNGBTd5TBiiOT2cfFOLkvQP4VcXZzmgKQPyhvLIiJgA9HJ76_LF/s1600/2013-03-15+12.03.55.jpg" height="320" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span class="short_text" id="result_box" lang="en"><span class="hps">the body is made of PVC, the battery I'm using is a CR2032, </span></span><span class="short_text" id="result_box" lang="en"><span class="hps">the</span> <span class="hps">battery compartment is milled in the body by a CNC machine.</span></span></div>
<span class="short_text" id="result_box" lang="en"><span class="hps">The strap is simply glued to the bottom of the body, in 1mm-deep recess.</span></span>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-39715338-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script><br />
<span class="short_text" lang="en"><span class="hps"><br /></span></span>
<span class="short_text" lang="en"><span class="hps">here is the asm code</span></span><br />
<span class="short_text" lang="en"><span class="hps"><br /></span></span>
<br />
list p=16F628<br />
include <P16F628.INC><br />
<br />
;TITLE "Smazlogio v1.7"<br />
;AUTHOR Santelelle<br />
<br />
<br />
;min 1 porta.2<br />
;min 2 porta.3<br />
;min 4 porta.4<br />
;min 8 portb.0<br />
;min 16 portb.1<br />
;min 32 portb.3<br />
<br />
;portb minutes b'00001011'<br />
;porta minutes b'00011100'<br />
<br />
;ore 1 porta.1<br />
;ore 2 porta.0<br />
;ore 4 porta.7<br />
;ore 8 porta.6<br />
<br />
;portb hours b'00000000'<br />
;porta hours b'11000011'<br />
<br />
;pulsante sinistro portb.4<br />
;pulsante destro portb.5<br />
<br />
;led MODE portb.3<br />
<br />
SEC EQU 0x20<br />
MIN EQU 0x21<br />
ORE EQU 0x22<br />
W_TEMP EQU 0x23<br />
S_TEMP EQU 0x24<br />
TMR1_INTERRUPT_FLAG EQU 0x25<br />
LED_ON EQU 0x26<br />
CONTATORE_PULSANTE1 EQU 0x27<br />
PROGRAM EQU 0x28<br />
DELAY_COUNTER EQU 0x29<br />
TMR0_INTERRUPT_FLAG EQU 0x2A<br />
CONTATORE EQU 0x2B<br />
PORTB_INTERRUPT_FLAG EQU 0x2C<br />
CONTATORE_PULSANTE2 EQU 0x2D<br />
<br />
ORG 0000H<br />
goto START<br />
;<br />
<br />
ORG 0004H ;interrupt occurred<br />
BTFSC PIR1, TMR1IF ;Timer1 overflowed?<br />
call T1_OVERFL ;YES, Service the Timer1 Overflow Interrupt<br />
BTFSC INTCON,RBIF ;portb changed?<br />
call PORTB_INTERRUPT ;goto portb_interrupt routine<br />
BTFSC INTCON,TMR0IF ;portb changed?<br />
call TMR0_INTERRUPT ;goto portb_interrupt routine<br />
retfie<br />
;<br />
; Should NEVER get here<br />
;<br />
ERROR1 ; NO, Unknown Interrupt Source<br />
BSF PORTA , 4 ; Toggle a port pin to indicate error<br />
BCF PORTA , 4<br />
GOTO ERROR1<br />
<br />
START<br />
<br />
;inizializzazione variabili<br />
bcf INTCON,GIE ;global interrupt enable<br />
<br />
clrf SEC<br />
clrf MIN<br />
clrf ORE<br />
clrf TMR1_INTERRUPT_FLAG<br />
clrf LED_ON<br />
clrf PROGRAM<br />
clrf TMR0_INTERRUPT_FLAG<br />
clrf CONTATORE<br />
clrf PORTB_INTERRUPT_FLAG<br />
clrf DELAY_COUNTER<br />
<br />
;fine inizializzazione variabili<br />
<br />
;settaggio registri<br />
bcf STATUS,RP0 ; select bank0<br />
clrf PORTA<br />
bsf STATUS,RP0 ; select bank1<br />
movlw b'00100000'<br />
movwf TRISA<br />
<br />
bcf STATUS,RP0 ; select bank0<br />
clrf PORTB<br />
bsf STATUS,RP0 ; select bank1<br />
movlw b'11110000'<br />
movwf TRISB<br />
<br />
<br />
bsf STATUS,RP0 ; select bank1<br />
movlw b'00000111'<br />
movwf OPTION_REG <br />
<br />
movlw b'00000001' ; enable TMR1 overflow<br />
movwf PIE1<br />
<br />
movlw b'00000011'<br />
movwf PCON<br />
<br />
bcf STATUS,RP0 ; select bank0<br />
<br />
movlw b'00000111'<br />
movwf CMCON <br />
<br />
clrf PORTA ; accende tutti i led<br />
clrf PORTB ; accende tutti i led<br />
;fine settaggio registri<br />
<br />
<br />
ASPETTA_PULS ;until the button isn't pushed the program doesn't start<br />
btfsc PORTB,4 ;<br />
goto ASPETTA_PULS ;<br />
<br />
movlw b'11111111' ;turn off all portb<br />
movwf PORTA ;<br />
movlw b'11111111' ;turn off all portb<br />
movwf PORTB ;<br />
<br />
;movlw b'00001111' ;set timer1 as external asyncronous counter<br />
movlw b'00111111' ;16 seconds<br />
movwf T1CON ;<br />
<br />
goto PROGRAMMING_MODE<br />
<br />
<br />
<br />
m_cicle ;main cicle<br />
<br />
btfsc TMR1_INTERRUPT_FLAG,0 ;if an interrupt occurred<br />
call AGGIORNA_ORA ;upgrade time<br />
<br />
btfss TMR0_INTERRUPT_FLAG,0<br />
goto NO_TMR0_INTERRUPT<br />
bcf TMR0_INTERRUPT_FLAG,0<br />
clrf CONTATORE<br />
bcf LED_ON,0<br />
clrf CONTATORE<br />
NO_TMR0_INTERRUPT<br />
<br />
<br />
btfss PORTB_INTERRUPT_FLAG,0 <br />
goto NO_PORTB_INTERRUPT<br />
bcf PORTB_INTERRUPT_FLAG,0 <br />
<br />
btfss PORTB,4<br />
incf CONTATORE<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> bsf LED_ON,0<br />
clrf TMR0<br />
bcf INTCON,T0IF ;clear the interrupt TMR0 flag<br />
bsf INTCON,T0IE ;activate timer0 interrupt<br />
NO_PORTB_INTERRUPT<br />
<br />
<br />
movlw b'00001000'<br />
subwf CONTATORE,0<br />
btfsc STATUS,Z<br />
goto PROGRAMMING_MODE<br />
<br />
btfss LED_ON,0 ;se è attivo il flag accende i led<br />
goto NO_OUTPUT<br />
call OUTPUT_MINUTI<br />
call OUTPUT_ORE<br />
goto m_cicle<br />
<br />
NO_OUTPUT<br />
<br />
call ALL_LED_OFF<br />
<br />
sleep;<br />
<br />
goto m_cicle ;end main cicle<br />
<br />
<br />
PROGRAMMING_MODE<br />
<br />
bcf INTCON,GIE ;disables interrupt<br />
<br />
bcf INTCON,RBIF<br />
bcf INTCON,TMR0IF<br />
bcf PIR1, TMR1IF<br />
<br />
call ALL_LED_OFF<br />
bcf PORTB,2 ;turn on blue led<br />
clrf MIN<br />
clrf ORE<br />
call DELAY<br />
<br />
clrf CONTATORE_PULSANTE1<br />
clrf CONTATORE_PULSANTE2<br />
clrf CONTATORE<br />
<br />
PROG_MINUTI<br />
;<br />
btfss PORTB,4<br />
incf CONTATORE_PULSANTE1<br />
btfsc PORTB,4<br />
clrf CONTATORE_PULSANTE1<br />
movlw b'00001110'<br />
subwf CONTATORE_PULSANTE1,w<br />
btfsc STATUS,Z<br />
goto RELASE_CYCLE1R_<br />
;<br />
btfss PORTB,5<br />
incf CONTATORE_PULSANTE2<br />
btfsc PORTB,5<br />
clrf CONTATORE_PULSANTE2 <br />
movlw b'00001110'<br />
subwf CONTATORE_PULSANTE2,w<br />
btfsc STATUS,Z<br />
goto RELASE_CYCLE1L_<br />
<br />
goto PROG_MINUTI<br />
;<br />
RELASE_CYCLE1R_<br />
incf MIN<br />
call OUTPUT_MINUTI<br />
clrf CONTATORE_PULSANTE1<br />
clrf CONTATORE_PULSANTE2<br />
RELASE_CYCLE1R<br />
btfss PORTB,4<br />
clrf CONTATORE_PULSANTE1<br />
btfsc PORTB,4<br />
incf CONTATORE_PULSANTE1<br />
movlw b'00001110'<br />
subwf CONTATORE_PULSANTE1,w<br />
btfsc STATUS,Z<br />
goto PROG_MINUTI<br />
goto RELASE_CYCLE1R<br />
;<br />
<br />
RELASE_CYCLE1L_<br />
clrf CONTATORE_PULSANTE1<br />
clrf CONTATORE_PULSANTE2<br />
RELASE_CYCLE1L<br />
btfss PORTB,5<br />
clrf CONTATORE_PULSANTE2<br />
btfsc PORTB,5<br />
incf CONTATORE_PULSANTE2<br />
movlw b'00001110'<br />
subwf CONTATORE_PULSANTE2,w<br />
btfsc STATUS,Z<br />
goto PROG_HOUR_<br />
goto RELASE_CYCLE1L<br />
;;<br />
PROG_HOUR_<br />
clrf CONTATORE_PULSANTE1<br />
clrf CONTATORE_PULSANTE2<br />
PROG_HOUR<br />
btfss PORTB,4<br />
incf CONTATORE_PULSANTE1<br />
btfsc PORTB,4<br />
clrf CONTATORE_PULSANTE1<br />
movlw b'00001110'<br />
subwf CONTATORE_PULSANTE1,w<br />
btfsc STATUS,Z<br />
goto RELASE_CYCLE2R_<br />
<br />
btfss PORTB,5<br />
incf CONTATORE_PULSANTE2<br />
btfsc PORTB,5<br />
clrf CONTATORE_PULSANTE2 <br />
movlw b'00001110'<br />
subwf CONTATORE_PULSANTE2,w<br />
btfsc STATUS,Z<br />
goto RELASE_CYCLE2L_<br />
goto PROG_HOUR<br />
<br />
RELASE_CYCLE2R_<br />
incf ORE<br />
call OUTPUT_ORE<br />
clrf CONTATORE_PULSANTE1<br />
clrf CONTATORE_PULSANTE2<br />
RELASE_CYCLE2R<br />
btfss PORTB,4<br />
clrf CONTATORE_PULSANTE1<br />
btfsc PORTB,4<br />
incf CONTATORE_PULSANTE1<br />
movlw b'00001110'<br />
subwf CONTATORE_PULSANTE1,w<br />
btfsc STATUS,Z<br />
goto PROG_HOUR<br />
goto RELASE_CYCLE2R<br />
<br />
<br />
RELASE_CYCLE2L_<br />
clrf CONTATORE_PULSANTE1<br />
clrf CONTATORE_PULSANTE2<br />
RELASE_CYCLE2L<br />
btfss PORTB,5<br />
clrf CONTATORE_PULSANTE2<br />
btfsc PORTB,5<br />
incf CONTATORE_PULSANTE2<br />
movlw b'00001110'<br />
subwf CONTATORE_PULSANTE2,w<br />
btfsc STATUS,Z<br />
goto END_PROGRAMMING<br />
goto RELASE_CYCLE2L<br />
<br />
END_PROGRAMMING<br />
<br />
call ALL_LED_OFF<br />
bcf T1CON,T1OSCEN<br />
clrf TMR1H<br />
clrf TMR1L<br />
bsf T1CON,T1OSCEN<br />
<br />
bsf INTCON,RBIE ;portb interrupt on change enable<br />
bsf INTCON,PEIE ;peripheral interrupt enable<br />
bsf INTCON,GIE ;global interrupt enable<br />
<br />
goto m_cicle<br />
<br />
<br />
ALL_LED_OFF<br />
movlw b'11111111'<br />
movwf PORTA<br />
movwf PORTB<br />
return<br />
<br />
<br />
OUTPUT_MINUTI<br />
<br />
movlw b'00001011'<br />
iorwf PORTB,f<br />
movlw b'00011100'<br />
iorwf PORTA,f<br />
<br />
btfsc MIN,0<br />
bcf PORTA,2<br />
btfsc MIN,1<br />
bcf PORTA,3<br />
btfsc MIN,2<br />
bcf PORTA,4<br />
btfsc MIN,3<br />
bcf PORTB,0<br />
btfsc MIN,4<br />
bcf PORTB,1<br />
btfsc MIN,5<br />
bcf PORTB,3<br />
return<br />
<br />
OUTPUT_ORE<br />
<br />
movlw b'11000011'<br />
iorwf PORTA,f<br />
<br />
btfsc ORE,0<br />
bcf PORTA,1<br />
btfsc ORE,1<br />
bcf PORTA,0<br />
btfsc ORE,2<br />
bcf PORTA,7<br />
btfsc ORE,3<br />
bcf PORTA,6<br />
<br />
return<br />
<br />
<br />
AGGIORNA_ORA<br />
<br />
bcf TMR1_INTERRUPT_FLAG,0 ;clear interrupt TMR1 flag<br />
<br />
;incf SEC ;inc seconds<br />
;incf SEC ;inc seconds<br />
<br />
movlw b'00010000'<br />
addwf SEC,f<br />
<br />
movlw b'00111100' ;are seconds >= 60?<br />
subwf SEC,W ;<br />
btfsc STATUS,C ;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> call INC_MIN ; call the function that increment minutes<br />
<br />
movlw b'00111100' ;are minutes >= 60?<br />
subwf MIN,W ;<br />
btfsc STATUS,Z ;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> call INC_ORE ; call the function that increment hours<br />
movlw b'11111111'<br />
<br />
return ;return to main<br />
<br />
INC_MIN ;increment minutes<br />
incf MIN,f <br />
movlw b'00111100' ;seconds = seconds - 60 <br />
subwf SEC , f ;<br />
return<br />
<br />
INC_ORE ;increment minutes<br />
incf ORE ;inc ore<br />
movlw b'00111100' ;minutes = minutes - 60 <br />
subwf MIN , f ;<br />
<br />
movlw b'00001100' ;are hours = 12?<br />
subwf ORE,W ;<br />
btfsc STATUS,Z ;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> clrf ORE ; if hours=12 then hours=0<br />
return<br />
<br />
<br />
TMR0_INTERRUPT<br />
bsf TMR0_INTERRUPT_FLAG,0<br />
bcf INTCON,T0IF<br />
bcf INTCON,T0IE<br />
bsf INTCON,7 ;enable interrupt<br />
return<br />
<br />
PORTB_INTERRUPT<br />
movf PORTB,w<br />
bcf INTCON,RBIF<br />
<br />
btfss PORTB,4<br />
goto SET_PORTB_FLAG<br />
btfss PORTB,5<br />
goto SET_PORTB_FLAG<br />
bsf INTCON,7 ;enable interrupt<br />
return<br />
<br />
SET_PORTB_FLAG<br />
bsf PORTB_INTERRUPT_FLAG,0 <br />
bsf INTCON,7 ;enable interrupt<br />
return<br />
<br />
T1_OVERFL ;TMR1 overflowed<br />
bsf TMR1_INTERRUPT_FLAG,0<br />
bcf PIR1, TMR1IF ; Clear Timer1 Interrupt Flag<br />
bsf INTCON,7 ;enable interrupt<br />
return<br />
<br />
DELAY<br />
clrf DELAY_COUNTER<br />
DELAY_CYCLE<br />
incf DELAY_COUNTER<br />
btfss STATUS,Z<br />
goto DELAY_CYCLE<br />
return<br />
<br />
<br />
<span class="short_text" lang="en"><span class="hps"></span></span><br />
end <br />
<br />
<br />
Edit: I'm really sorry, I forgot the configuration bits.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyFN79wVAvO3iK7P7J7rTMlpe5oCYDeumkXFgjfAXlcrz0nvVk8eYSwiOVlGzO4UK3gqoBMWiHRSYxZfKidOJAhLL9RrSCUSdYm9Y8QqfGrzybllIbSadGA1hVL9IgXCQfwZkFZS3hbKJs/s1600/config_bits.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyFN79wVAvO3iK7P7J7rTMlpe5oCYDeumkXFgjfAXlcrz0nvVk8eYSwiOVlGzO4UK3gqoBMWiHRSYxZfKidOJAhLL9RrSCUSdYm9Y8QqfGrzybllIbSadGA1hVL9IgXCQfwZkFZS3hbKJs/s1600/config_bits.jpg" /></a></div>
<br />Emanuelehttp://www.blogger.com/profile/03502340784177714238noreply@blogger.com20