tag:blogger.com,1999:blog-86677896835560030072023-11-16T15:27:33.457+01:00TMuelIts about playing with electronics.TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-8667789683556003007.post-10039915032414721402016-07-24T23:34:00.000+02:002018-07-06T08:54:48.823+02:00Countdown timer for a PhotoBoxOne day a colleague from our Laser department (YES we have Lasers!) stood next to my desk and started to ask some suspicious questions about 7-Segment displays and how to control them with an Arduino.<br />
<br />
In general its not a problem, I like to share my knowledge about electronics and programming etc., but I hate it to answer questions without knowing the circumstances. So I asked him what the target of the project would be and he said he wanted to program a countdown timer and that he also has not really the time to do it. He also told ne that the project is not for him, its for Murat (Also a guy from the Laser department).<br />
<br />
Later that day I went to Murat and asked him about the details of the project and what the main goal would be. He told me that he want to build a PhotoBox for his sisters wedding. I told him that if it is for his sisters wedding it should not only be some 7-Segment displays. He would need something which looks much fancier with more animation and special effects than a 7-Segment display is able to provide, and I showed him my work that I have done with the 3208 lattice clock and that something similar could be done for a countdown display.<br />
<br />
He said he would like to have something that does the following:<br />
<br />
<ul>
<li>Push a button</li>
<li>Countdown starts</li>
<li>End of the countdown a Relay is triggered</li>
</ul>
<div>
On that evening I went home and started to dig out my spare 3208 Lattice Clock module and a relay board. I soldered some connectors for power supply, relay output and programming to the board, and started to play with it. After some hours I came up with the following animation:</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/NKR9I4rvw7g/0.jpg" src="https://www.youtube.com/embed/NKR9I4rvw7g?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div>
<br /></div>
<div>
In the video itself it is not very clear, but the sequence is as follows:</div>
<div>
<ul>
<li>Press RESET or reconnect the power to start</li>
<li>Dim up the first number in the middle of the screen</li>
<li>Shift the number out to the left while the new number comes from the right</li>
<li>When the 0 is reached then dim it out</li>
<li>Actuate the relay output for one second</li>
<li>Wait in idle until RESET or re-power</li>
</ul>
<div>
The complete code including the control for the HT1632C is in one single Arduino sketch with less than 300 lines of code. I apologize for the German comments in the code But it was quick and dirty written. The code can be found in my <a href="https://github.com/TMuel1123/3208clock/tree/master/ArduinoSketches/CountDown" target="_blank">GitHub repository</a>. </div>
</div>
<div>
<br /></div>
<div>
So far my work was done for this project. Murat also sent me some pictures of the finished project where he put it all together into a nice box with a tablet as picture preview.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimouu4DUawNdFErnmm40cqusuc_xPAu8_NYEJ_X0UGytoEkZ0lI6fZLfxmWcZbE5qAR2gKxyGT0ICCKwIZfP4Jb78xOpokM01nK_CX7Lhius0NnM6TcE6SrpBmBZhHrjvH1SoCX2JUVKQ/s1600/IMG_20160610_112634_2.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimouu4DUawNdFErnmm40cqusuc_xPAu8_NYEJ_X0UGytoEkZ0lI6fZLfxmWcZbE5qAR2gKxyGT0ICCKwIZfP4Jb78xOpokM01nK_CX7Lhius0NnM6TcE6SrpBmBZhHrjvH1SoCX2JUVKQ/s320/IMG_20160610_112634_2.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sadly Instagram changed their logo recently.</td></tr>
</tbody></table>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-68816826164985190722016-07-24T19:54:00.003+02:002016-07-24T19:54:56.403+02:00HotKey 3<h2>
Building and Programming a prototype</h2>
<div>
<br /></div>
<h3>
Wiring up the Keypad to the Arduino Leonardo</h3>
<div>
To wire up the Keypad to the Arduino Leonardo I've soldered some thin copper wire to the connector of the PCB and connected it to an external proto board as you can see in the picture below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI6VsvmVyHLwFB3vqCRCGMy-SgMcbdsYistk9s7NTre3oTC3jpAVGsJSTVQ7aKAqiDLJ4BRcpeSe2SLjpDpWjsT8oDsScBOLhgfeLVtunYudTZhUsYoesUCYodw7Vnjt-8hmm3RV4bN2U/s1600/DSC_0067_Reseize.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI6VsvmVyHLwFB3vqCRCGMy-SgMcbdsYistk9s7NTre3oTC3jpAVGsJSTVQ7aKAqiDLJ4BRcpeSe2SLjpDpWjsT8oDsScBOLhgfeLVtunYudTZhUsYoesUCYodw7Vnjt-8hmm3RV4bN2U/s320/DSC_0067_Reseize.jpg" width="296" /></a></div>
<br />
After that was done I wired up a simple adapter board for the Arduino Leonardo.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijY3vsUBRdxz0aqI80aOsYHVSq7-_Ln2-71sPmsM5-q96yNOy1bwA7z1v-XUuQc-4_85alhjY1gOOu9fmXR9dFfv9lejrMSliKtYjpwu-uR7aeFngiQ1qnLQHm1huF-v4MCJaZwEICPC0/s1600/DSC_0075_Resize.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijY3vsUBRdxz0aqI80aOsYHVSq7-_Ln2-71sPmsM5-q96yNOy1bwA7z1v-XUuQc-4_85alhjY1gOOu9fmXR9dFfv9lejrMSliKtYjpwu-uR7aeFngiQ1qnLQHm1huF-v4MCJaZwEICPC0/s320/DSC_0075_Resize.jpg" width="257" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAncVW0pF0AIF-5J1fDhMFw7CV4Y5-16VGW0yQWoC0Aiqkxdj8riTMrPryZaIq0XiBkhFJSXYJLHbVTadE3skvcaRWRnVc6WN5XAIswG3LvjdXkxmBGjsyYQkEzZQgK7cMaon7QfOT65w/s1600/DSC_0077_Resize.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAncVW0pF0AIF-5J1fDhMFw7CV4Y5-16VGW0yQWoC0Aiqkxdj8riTMrPryZaIq0XiBkhFJSXYJLHbVTadE3skvcaRWRnVc6WN5XAIswG3LvjdXkxmBGjsyYQkEzZQgK7cMaon7QfOT65w/s320/DSC_0077_Resize.jpg" width="256" /></a></div>
<br />
The schematic for this board is quite simple. It just consists of a 10Pin connector for the keypad, an RGB LED and two connectors for the LC-Diaplay and the Serial debug connection.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiWMp7hdu1jjt9zN3SjmH-BHKg3dMC49lg1VeP_H-MALZa1vYLeFrrD_E8AsLcGrRgi2ySNd8w7Vf8UNiDdzGpfhmuCoTXAQZejn7Jvz31j_pNhggQ4eF1DMopNrLpXqMXUaRdNZB1GF4/s1600/Prototype.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="363" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiWMp7hdu1jjt9zN3SjmH-BHKg3dMC49lg1VeP_H-MALZa1vYLeFrrD_E8AsLcGrRgi2ySNd8w7Vf8UNiDdzGpfhmuCoTXAQZejn7Jvz31j_pNhggQ4eF1DMopNrLpXqMXUaRdNZB1GF4/s640/Prototype.png" width="640" /></a></div>
<br /></div>
<h3>
Creating the Program / Sketch</h3>
<div>
After the Keypad was wired up to the Leonardo I had to figure out a way to find get the key presses properly into the Arduino. THANKFULLY there was already a <a href="http://playground.arduino.cc/Code/Keypad" target="_blank">library on the Arduino page</a> which does exactly THAT. I've played around a little bit with it and it seem to work properly.<br />
<br />
I've created some test sketches and uploaded them into my <a href="https://github.com/TMuel1123/HotKey" target="_blank">GitHub repository</a>.<br />
<br />
Now I will need to find a way to replace the original PCB of the Keypad.<br />
<br />
<br />
<br />
<br /></div>
TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-8235889797702015862016-03-29T09:27:00.001+02:002016-03-29T09:27:27.427+02:00HotKey 2<h2>
The day after the proof of concept</h2>
<div>
I'm using my Hotkey device now since some days and it is pretty practical for the daily workflow. So I've decided to make a more clean or professional version of the HotKey device.</div>
<div>
<br />
<h3>
The surprise</h3>
<br /></div>
<div>
I've ordered one of these external USB number pads for notebooks just to have a look inside if there would be enough space to replace the electronics and maybe reuse the keypad matrix. </div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh083_yBQKjBpN_XNk5Bvro6ZgkFGZuO732Zehp3yUVX6nG43sgqDxlLJMqQ9A44JgpjdQwB2zXM4jBYk7MAckPqMnrKG92ghytWbHLnR3-8wgq0JfQBUCl47l7xhpbvIFd3Sj2-islvHs/s1600/DSC_0057_Resize.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh083_yBQKjBpN_XNk5Bvro6ZgkFGZuO732Zehp3yUVX6nG43sgqDxlLJMqQ9A44JgpjdQwB2zXM4jBYk7MAckPqMnrKG92ghytWbHLnR3-8wgq0JfQBUCl47l7xhpbvIFd3Sj2-islvHs/s320/DSC_0057_Resize.jpg" width="218" /></a></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/AVvXsEjRJvNheyPbFkdIxz76uuFgkiLIEBAvt641kW6MT3m93hpj140BAO35B-IFd3m2kYVQmkuezMfWL5ZRQL-rbXduLgrWJk4YQZMEg392_AoM2RZwbZPSa3uZdVC-iR870p3HhnQfykkwbS4/s1600/DSC_0058_Resize.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRJvNheyPbFkdIxz76uuFgkiLIEBAvt641kW6MT3m93hpj140BAO35B-IFd3m2kYVQmkuezMfWL5ZRQL-rbXduLgrWJk4YQZMEg392_AoM2RZwbZPSa3uZdVC-iR870p3HhnQfykkwbS4/s320/DSC_0058_Resize.jpg" width="206" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
JACKPOT! After I have opened it I figured out that there is plenty of space for my upcoming PCB design and also the Keypad Matrix is not glued to the PCB its connected by a flat flex connector, so that it could be reused completely.<br />
<br />
<h3>
Some reverse engineering </h3>
<br />
A closer look to the area above the connector of the keypad shows us that the designer of the PCB was so kind to add some labelled test points for me.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYIXILKR01lhroUlzsXAlm6J4KC5gWKj54TLRKJYUIZx2_NqRy2_KGHNRFPP8z3sRmlbG9Yq28TruC0pHHoWaom1gl_Syt_gTfZ3rPfzicQScpDmUyvjZeFTJn6KG2doGmipe96BmnYC4/s1600/DSC_0054_Resize.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYIXILKR01lhroUlzsXAlm6J4KC5gWKj54TLRKJYUIZx2_NqRy2_KGHNRFPP8z3sRmlbG9Yq28TruC0pHHoWaom1gl_Syt_gTfZ3rPfzicQScpDmUyvjZeFTJn6KG2doGmipe96BmnYC4/s400/DSC_0054_Resize.jpg" width="400" /></a></div>
<br />
<br />
This gave me the ability to quickly figure out which button triggers which row and column.<br />
<br />
Ordered by key:<br />
<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: 1px solid #ccc; font-family: arial,sans,sans-serif; font-size: 13px; table-layout: fixed;"><colgroup><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col></colgroup><tbody>
<tr style="height: 21px;"><td style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td><td style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td><td style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td><td style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td><td style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td><td style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td><td data-sheets-value="[null,2,"NUM"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">NUM</td><td data-sheets-value="[null,2,"C1 R1"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R1</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"TAB"]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">TAB</td><td data-sheets-value="[null,2,"C5 R4"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C5 R4</td><td data-sheets-value="[null,2,"/"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">/</td><td data-sheets-value="[null,2,"C4 R1"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R1</td><td data-sheets-value="[null,2,"*"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">*</td><td data-sheets-value="[null,2,"C3 R1"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R1</td><td data-sheets-value="[null,2,"BCKSPC"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">BCKSPC</td><td data-sheets-value="[null,2,"C4 R2"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R2</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,3,null,7]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">7</td><td data-sheets-value="[null,2,"C1 R2"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R2</td><td data-sheets-value="[null,3,null,8]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">8</td><td data-sheets-value="[null,2,"C2 R2"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R2</td><td data-sheets-value="[null,3,null,9]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">9</td><td data-sheets-value="[null,2,"C3 R2"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R2</td><td data-sheets-value="[null,2,"\"-\""]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">"-"</td><td data-sheets-value="[null,2,"C2 R1"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R1</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,3,null,4]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">4</td><td data-sheets-value="[null,2,"C1 R3"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R3</td><td data-sheets-value="[null,3,null,5]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">5</td><td data-sheets-value="[null,2,"C2 R3"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R3</td><td data-sheets-value="[null,3,null,6]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">6</td><td data-sheets-value="[null,2,"C3 R3"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R3</td><td data-sheets-value="[null,2,"\"+\""]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">"+"</td><td data-sheets-value="[null,2,"C4 R3"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R3</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,3,null,1]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">1</td><td data-sheets-value="[null,2,"C1 R4"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R4</td><td data-sheets-value="[null,3,null,2]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">2</td><td data-sheets-value="[null,2,"C2 R4"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R4</td><td data-sheets-value="[null,3,null,3]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">3</td><td data-sheets-value="[null,2,"C3 R4"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R4</td><td colspan="1" data-sheets-value="[null,2,"Enter"]" rowspan="2" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;"><div style="max-height: 41px;">
Enter</div>
</td><td colspan="1" data-sheets-value="[null,2,"C4 R4"]" rowspan="2" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;"><div style="max-height: 41px;">
C4 R4</div>
</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,3,null,0]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">0</td><td data-sheets-value="[null,2,"C1 R5"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R5</td><td data-sheets-value="[null,2,"00",null,null,null,1]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">00</td><td data-sheets-value="[null,2,"C2 R5"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R5</td><td data-sheets-value="[null,2,"."]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">.</td><td data-sheets-value="[null,2,"C4 R5"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R5</td></tr>
</tbody></table>
<br />
<br />
Ordered by column and row:<br />
<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: 1px solid #ccc; font-family: arial,sans,sans-serif; font-size: 13px; table-layout: fixed;"><colgroup><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col><col width="65"></col></colgroup><tbody>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"C1 R1"]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R1</td><td data-sheets-value="[null,2,"NUM"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">NUM</td><td data-sheets-value="[null,2,"C2 R1"]" style="border-bottom: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R1</td><td data-sheets-value="[null,2,"-"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">-</td><td data-sheets-value="[null,2,"C3 R1"]" style="border-bottom: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R1</td><td data-sheets-value="[null,2,"*"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">*</td><td data-sheets-value="[null,2,"C4 R1"]" style="border-bottom: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R1</td><td data-sheets-value="[null,2,"/"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">/</td><td data-sheets-value="[null,2,"C5 R1"]" style="border-bottom: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C5 R1</td><td style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"C1 R2"]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R2</td><td data-sheets-value="[null,3,null,7]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">7</td><td data-sheets-value="[null,2,"C2 R2"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R2</td><td data-sheets-value="[null,3,null,8]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">8</td><td data-sheets-value="[null,2,"C3 R2"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R2</td><td data-sheets-value="[null,3,null,9]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">9</td><td data-sheets-value="[null,2,"C4 R2"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R2</td><td data-sheets-value="[null,2,"BCKSPC"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">BCKSPC</td><td data-sheets-value="[null,2,"C5 R2"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C5 R2</td><td style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"C1 R3"]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R3</td><td data-sheets-value="[null,3,null,4]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">4</td><td data-sheets-value="[null,2,"C2 R3"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R3</td><td data-sheets-value="[null,3,null,5]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">5</td><td data-sheets-value="[null,2,"C3 R3"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R3</td><td data-sheets-value="[null,3,null,6]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">6</td><td data-sheets-value="[null,2,"C4 R3"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R3</td><td data-sheets-value="[null,2,"+",null,null,null,1]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">+</td><td data-sheets-value="[null,2,"C5 R3"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C5 R3</td><td style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"C1 R4"]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R4</td><td data-sheets-value="[null,3,null,1]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">1</td><td data-sheets-value="[null,2,"C2 R4"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R4</td><td data-sheets-value="[null,3,null,2]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">2</td><td data-sheets-value="[null,2,"C3 R4"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R4</td><td data-sheets-value="[null,3,null,3]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">3</td><td data-sheets-value="[null,2,"C4 R4"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R4</td><td data-sheets-value="[null,2,"ENTER"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">ENTER</td><td data-sheets-value="[null,2,"C5 R4"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C5 R4</td><td data-sheets-value="[null,2,"TAB"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">TAB</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"C1 R5"]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1 R5</td><td data-sheets-value="[null,3,null,0]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">0</td><td data-sheets-value="[null,2,"C2 R5"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2 R5</td><td data-sheets-value="[null,2,"00",null,null,null,1]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">00</td><td data-sheets-value="[null,2,"C3 R5"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3 R5</td><td style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td><td data-sheets-value="[null,2,"C4 R5"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4 R5</td><td data-sheets-value="[null,2,"."]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">.</td><td data-sheets-value="[null,2,"C5 R5"]" style="border-bottom: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C5 R5</td><td style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; vertical-align: bottom;"></td></tr>
</tbody></table>
<br /></div>
<div>
Then it was quite easy to also figure out the pin out of the connector:<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: 1px solid #ccc; font-family: arial,sans,sans-serif; font-size: 13px; table-layout: fixed;"><colgroup><col width="33"></col><col width="33"></col><col width="33"></col><col width="33"></col><col width="33"></col><col width="33"></col><col width="33"></col><col width="33"></col><col width="33"></col><col width="33"></col><col width="33"></col></colgroup><tbody>
<tr style="height: 21px;"><td data-sheets-value="[null,3,null,1]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">1</td><td data-sheets-value="[null,3,null,2]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">2</td><td data-sheets-value="[null,3,null,3]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">3</td><td data-sheets-value="[null,3,null,4]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">4</td><td data-sheets-value="[null,3,null,5]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">5</td><td data-sheets-value="[null,3,null,6]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">6</td><td data-sheets-value="[null,3,null,7]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">7</td><td data-sheets-value="[null,3,null,8]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">8</td><td data-sheets-value="[null,3,null,9]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">9</td><td data-sheets-value="[null,3,null,10]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">10</td><td data-sheets-value="[null,3,null,11]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">11</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"C1"]" style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C1</td><td data-sheets-value="[null,2,"C2"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C2</td><td data-sheets-value="[null,2,"C3"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C3</td><td data-sheets-value="[null,2,"C4"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C4</td><td data-sheets-value="[null,2,"NC"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">NC</td><td data-sheets-value="[null,2,"R1"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">R1</td><td data-sheets-value="[null,2,"R2"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">R2</td><td data-sheets-value="[null,2,"R3"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">R3</td><td data-sheets-value="[null,2,"R4"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">R4</td><td data-sheets-value="[null,2,"R5"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">R5</td><td data-sheets-value="[null,2,"C5"]" style="border-bottom: 1px solid #000000; border-right: 1px solid #000000; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">C5</td></tr>
</tbody></table>
<br />
<h3>
What's Next?</h3>
<div>
The next step would be to wire up the keypad matrix to the Arduino Leonardo and figure out a proper algorithm to read the key presses from the matrix.</div>
<div>
<br /></div>
</div>
TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-56014624140007452312016-03-25T20:28:00.000+01:002016-03-25T22:21:24.898+01:00HotKey<h2>
The idea and the proof of concept</h2>
<div>
I use EAGLE, LTspice and a lot of other programs which gain a lot of more power an usability if the commands of the Hotkeys are known. But the main problem is that these program have all different Hotkeys/Commands which will vary from [CTRL]+C over the command "copy" to [F6] for copy something.</div>
<div>
<br /></div>
<div>
Even though I know most of the Hotkeys for each program I have often the problem to mistake them when I quickly switch between the different programs. So I thought about that problem and how I could get rid of it. I saw an Arduino sitting on one of my shelfs collecting some dust and I came to my mind that this litte device can "fake" the behaviour of mouse and keyboard on a computer.</div>
<div>
<br /></div>
<div>
I used this feature of the Leonardo before as it can be seen in one of my <a href="http://tmuel1123.blogspot.de/2013/09/this-is-not-oscilloscope.html" target="_blank">previous articles</a>. So I've decided to give it a chance to solve my problem.</div>
<div>
<br /></div>
<h3>
The proof of concept</h3>
<div>
I wired up a "shield" with some buttons for my Arduino Leonardo to test the concept and how I would like it.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0SsgM0vbL6NBxME-xflWNiRPotfuTD_uA92rdFXEDavduh6KIZqpp0QOhH1M69WubIPg6Wp13Z3alzff__C4yPBvDcGFZCZCtelXIhuPkNmT5KRQWUMWoXFuJXwDhJjqy-98BJA7yU3E/s1600/DSC_0062_Resize.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0SsgM0vbL6NBxME-xflWNiRPotfuTD_uA92rdFXEDavduh6KIZqpp0QOhH1M69WubIPg6Wp13Z3alzff__C4yPBvDcGFZCZCtelXIhuPkNmT5KRQWUMWoXFuJXwDhJjqy-98BJA7yU3E/s320/DSC_0062_Resize.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4aRQOoFBlTYr1nV2L3hgqK8cEKNYpkq6K53D5sfOkzFbABMub8kW8E87TUxj8TifaD1tHJ3Jo4uUZ3MgpZOYsty51d44Dp1U7wexTnZtsgOQu7CyJksVwsqXbfJanB1Z0HyfAtu9ndYE/s1600/DSC_0063_Resize.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4aRQOoFBlTYr1nV2L3hgqK8cEKNYpkq6K53D5sfOkzFbABMub8kW8E87TUxj8TifaD1tHJ3Jo4uUZ3MgpZOYsty51d44Dp1U7wexTnZtsgOQu7CyJksVwsqXbfJanB1Z0HyfAtu9ndYE/s320/DSC_0063_Resize.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I Know it looks ugly but it has worked quite well. Below I prepared the schematic for this shield to get a quick overview over the wiring.</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/AVvXsEiDWKrQ6ZGtOi47Gzu8ZQCqb5f6rWPh0c24ZuYVn_OT-gVAZeJWmgaiCp9Ti75Td9pV4d2XlvwV5BNG5ME4aT2CwQ6fZfcS5yhSfI_fWsNEUp29eCnzx2sc0UwYKHfFt1gzPuDIH3JDoJA/s1600/ProfOfConcept.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDWKrQ6ZGtOi47Gzu8ZQCqb5f6rWPh0c24ZuYVn_OT-gVAZeJWmgaiCp9Ti75Td9pV4d2XlvwV5BNG5ME4aT2CwQ6fZfcS5yhSfI_fWsNEUp29eCnzx2sc0UwYKHfFt1gzPuDIH3JDoJA/s640/ProfOfConcept.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
The Shield has nine buttons for the Hotkeys and two to select the current configuration. I also added a RGB LED and a 16x2 LC-Display through the I2C connection to show additional information on the currently active configuration. It also got a connector for the serial output for debugging purposes.</div>
<div>
<br /></div>
<div>
All buttons are biased trough the internal pull up resistors of the MCU so that they switch to ground when they are pushed. This saved me 11 Resistors of wiring effort for the board.</div>
<div>
<br /></div>
<div>
I've added the corresponding Arduino sketch to my <a href="https://github.com/TMuel1123/HotKey/tree/master/ProofOfConcept" target="_blank">github repository</a>. You will need a library for the I2C connection of a LC-Display or just comment the line with the definition of LCD_I2C_ACTIVE out.</div>
<div>
<br /></div>
<div>
<div>
<pre></pre>
</div>
<div>
<span style="color: #5e6d03;">#define</span> <span style="color: black;">LCD_I2C_ACTIVE</span> <span style="color: #434f54;">// Uncomment to activate the LCD Output</span></div>
<div>
<br /></div>
<div>
</div>
</div>
<div>
<br /></div>
<h3>
After some tests...</h3>
<div>
... I decided that I should follow the idea with a HotKey pad to increase the usability of my favourite programs. So stay tuned for the upcoming articles if you want further information about the HotKey pad.</div>
<div>
<br /></div>
<div>
<br /></div>
TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-16479801926623269472015-08-21T19:53:00.000+02:002015-08-21T19:53:18.725+02:00It's been a while......since my last post. And NO I'm not dead!<br />
<br />
And there are not really any big news, except that I started to play wit the STM32 ARM Cortex controllers from ST. And yes they are definitely different to 8bit AVR controllers.<br />
<br />
<a href="http://knowyourmeme.com/memes/with-great-power-comes-great-responsibility" target="_blank">Spidermans uncle</a> once said: "With great power comes great responsibility", and that's almost true with these (for me) new controllers. You have to take much more care for the configuration of the I/O, the clocks and the Interrupts.<br />
<br />
So my next posts will take a closer look about how to setup the Eclipse IDE under Linux for the ARMs and take a look on the programming of these powerful controllers.<br />
<br />
The upcoming posts will be more or less a notebook for me to get these things organized and documented.<br />
<br />
TMuel<br />
<br />TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-72866189298172153502014-01-09T23:54:00.003+01:002019-09-19T13:05:48.292+02:00FastPins.h or a way to realize really fast IO pin response on the ArduinoDuring my investigations for <a href="http://tmuel1123.blogspot.de/2013/12/3208clock-part-4-get-started-with.html" target="_blank">the last post</a> I have discovered that there is massive difference in the execution time between the "Arduino way" and the "AVR-GCC way" of setting an output pin.<br />
<br />
The result of method 1<br />
<br />
<pre> <span style="color: #cc6600;">digitalWrite</span>(13,<span style="color: #006699;">HIGH</span>);
<span style="color: #cc6600;">digitalWrite</span>(13,<span style="color: #006699;">LOW</span>);
</pre>
<br />
and method 2<br />
<br />
<pre> <span style="color: black;">PORTB</span> |= (1<<5);
<span style="color: black;">PORTB</span> &= ~(1<<5);
</pre>
<br />
is the same, PIN13 with the LED will be switched on and off, except that the first one generates a high pulse of 3.95µs and the second statement gets that handled in just 170ns (0.17µs) on an Arduino with 16MHz. The two pictures below show a comparison of both methods.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTGQrk6pK-Kpdya1MRQl8UGJrmETs8TYTh1B9KH_l6kY66h1iIrCd4XAwAXgl_4KU10lQE_pZCxUwMb9YN7CJ0ypjQ1Zz4I7zY3ejrK_v07x2kvtavVKAdoWnkzzb3ygtrlMnRX4D7R80/s1600/NewFile11.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTGQrk6pK-Kpdya1MRQl8UGJrmETs8TYTh1B9KH_l6kY66h1iIrCd4XAwAXgl_4KU10lQE_pZCxUwMb9YN7CJ0ypjQ1Zz4I7zY3ejrK_v07x2kvtavVKAdoWnkzzb3ygtrlMnRX4D7R80/s1600/NewFile11.png" /></a></td></tr>
<tr align="left"><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Yellow: Original Arduino style</div>
<div style="text-align: left;">
Blue: AVR-GCC style</div>
</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjLiceegXXeKOzMtW5R1IypfAUvUC06wIbgprJW980wsk5o_KLT32VQMuQ3MXchjg66N-0E2sdD1CHdAS8w4jLmQNcbewLXZC9USZvA_v9ADZo1OPIJOM7k2RKM5A9QmfazsGhrJaB3jg/s1600/NewFile12.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjLiceegXXeKOzMtW5R1IypfAUvUC06wIbgprJW980wsk5o_KLT32VQMuQ3MXchjg66N-0E2sdD1CHdAS8w4jLmQNcbewLXZC9USZvA_v9ADZo1OPIJOM7k2RKM5A9QmfazsGhrJaB3jg/s1600/NewFile12.png" /></a></td></tr>
<tr align="left"><td class="tr-caption" style="text-align: center;">Zoom of the previous picture</td></tr>
</tbody></table>
<div style="text-align: left;">
<br /></div>
<h3>
Lets take a look to the pros and cons of both methods</h3>
<h4>
Method 1:</h4>
Pro:<br />
<div>
<ul>
<li>Super easy just take the original Arduino pin number and set the pin either HIGH or LOW</li>
<li>Works on all Arduinos e.g. PIN13 will always be on the same place of the board (UNO, MEGA, Leonardo) </li>
</ul>
Con:<br />
<div>
<ul>
<li>Slow, it takes 3.95µs to set a pin twice (LOW --> HIGH --> LOW)</li>
</ul>
</div>
</div>
<br />
<h4>
Method 2</h4>
Pro:<br />
<div>
<ul>
<li>Fast, it only takes 0.17µs (32 times faster) to set a pin twice (LOW --> HIGH --> LOW)</li>
<li>It could be set more than one pin at a time as long as they are on the same port</li>
</ul>
Con:<br />
<ul>
<li>Its ugly and cryptic to type</li>
<li>The port and the pin number must be known</li>
<li>Port and pin number are varying between different boards e.g. PIN13 (LED) is PORTB Pin5 on the UNO, PORTB Pin7 on the MEGA and PORTC Pin7 On the Leonardo</li>
<li>Usage makes the Arduino sketch fixed to one board due to different pin assignment</li>
</ul>
</div>
But I still wanted an easy AND fast way to set the output pins. So I figured out that there is something called "<a href="http://gcc.gnu.org/onlinedocs/cpp/Macros.html" target="_blank">preprocessor macros</a>" and to be exact something called "<a href="http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html" target="_blank">Variadic Macros</a>" which looked like it could be the solution but I didn't understood the documentation until I found <a href="http://stackoverflow.com/questions/11761703/overloading-macro-on-number-of-arguments" target="_blank">this question at stackoverflow.com</a> which brought me on the right way for my solution to make the AVR-GCC code look nice.<br />
<br />
Preprocessor macros are text/code snippets which will replace parts of your written program code during the compile cycle of the code, and if possible the calculations are done in the preprocessor during compiling and not at runtime on the Arduino. For example they can be used to make ugly code parts look more readable, and that was exactly that what I wanted.<br />
<br />
<h3>
The Results</h3>
I have prepared an include file for the Arduino IDE so that the macros are included into the IDE and I also have written an <i>keywords.txt</i> to highlight the corresponding functions and keywords. It can be downloaded <a href="https://github.com/TMuel1123/Arduino/tree/master/FastPins" target="_blank">here</a>. Both files must be copied into a sub folder of the Arduino libraries folder.<br />
<br />
Due to the disadvantage that the port and the pin number must be known I can highly recommend the <a href="http://www.pighixxx.com/downloads/the-definitive-arduino-pinout-diagram/" target="_blank">homepage of Alberto Piganti</a> to figure out the correct ports and pin numbers. He has prepared a lot of very good pin out diagrams various kinds of Arduinos etc.<br />
<br />
<h3>
Usage of the Library/Include File</h3>
The usage is quite easy and more or less self explaining. The first parameter which is given to the function is always the port. If the function only gets two parameters then it sets the complete port to the second value.<br />
<br />
<pre> <span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,150);
</pre>
<br />
Sets PORTD to 0b10010110<br />
<br />
If the function gets three or more parameters then the first parameter is always the port and the last parameter can either be 1 or 0 (HIGH or LOW). This works with up to 8 pins at the same time. All outputs will be set at the same time no matter if only 1 pin is set or if all pins of a port are set.<br />
<br />
<pre> <span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,<span style="color: #006699;">HIGH</span>);
<span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,<span style="color: #006699;">LOW</span>);
</pre>
<br />
Creates a HIGH LOW pulse on pin 0 of PORTD<br />
<br />
<pre> <span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,1,<span style="color: #006699;">HIGH</span>);
<span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,1,<span style="color: #006699;">LOW</span>);
</pre>
<br />
Does the same with pin 0&1 of PORTD<br />
<br />
Here are some examples to set multiple pins at the same time.<br />
<br />
<pre> <span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,1,2,<span style="color: #006699;">HIGH</span>);
<span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,1,2,<span style="color: #006699;">LOW</span>);
<span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,1,2,3,<span style="color: #006699;">HIGH</span>);
<span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,1,2,3,<span style="color: #006699;">LOW</span>);
<span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,1,2,3,4,5,6,7,<span style="color: #006699;">HIGH</span>);
<span style="color: #cc6600;">digitalFastWrite</span>(<span style="color: #006699;">PD</span>,0,1,2,3,4,5,6,7,<span style="color: #006699;">LOW</span>);</pre>
<br />
It is also possible to quickly read an digital input. The input and output registers are at different addresses. For this reason use PINx instead of PORTx or Px. If readed from the address of PORTx the status of the internal pullup resistors is read which could be different form the real input state<br />
The following example reads the value of pin 0 from PORTD and copies it into the variable pinState.<br />
<br />
<pre> pinState = <span style="color: #cc6600;">digitalFastRead</span>(<span style="color: #006699;">PIND</span>,0);
</pre>
<br />
Until now it is still necessary to use the pinMode() function to set if the pin is an input or an output. But I'm working on it to create something which will be compatible with the above examples so stay tuned.<br />
<br />
<br />
<br />
For further questions just ask it in the comments and I will try to answer them as soon as possible.<br />
<pre></pre>
TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-48008264933902809012013-12-23T19:12:00.000+01:002013-12-23T19:12:45.010+01:003208Clock Part 4: Get started with the HT1632C display driver<div class="separator" style="clear: both; text-align: left;">
There are several ways to get started with the HT1632C display driver. One attempt, and this was also my first step, is to check on Google if someone has already written a driver or a library for the HT1632C. And yes, there are a lot of them.</div>
<div style="text-align: left;">
<br /></div>
At first I was playing around with the Arduino library from Adafruit. After some modifications I was able to write something to the display.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody></tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-HFWsbu7YpQZ1ZewSWxmmpyhdhm-bOeYibcK3BJin4jBt19PN6-30MDACY6_Y2OFT6iuojCt64gcLtXy-hLhILAKsM_kU1StEYpsvqwGUxrA4BeusPjWLVMygceFK3v3h7AlEzKuuH_k/s1600/SetupDetail.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-HFWsbu7YpQZ1ZewSWxmmpyhdhm-bOeYibcK3BJin4jBt19PN6-30MDACY6_Y2OFT6iuojCt64gcLtXy-hLhILAKsM_kU1StEYpsvqwGUxrA4BeusPjWLVMygceFK3v3h7AlEzKuuH_k/s1600/SetupDetail.jpg" height="191" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A Picture from one my first tests with the Adafruit lib</td></tr>
</tbody></table>
<br />
I also figured out that an update of the complete display (from the frame buffer into the HT1632C display driver) took 8.3ms and was only done with a clock speed of approx 35kHz. <b>Please keep in mind that the ATmega8 of the 3208Clock is running at only 8MHz.</b><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3zwaDUFffmGcv-GPqO4YsPJNDk6tsQXTx9fC14cqxKFEhAfAE0JBdbHa6v66P7t0lI6Quh-XOQBvMY_eY1rzHGEVkjbsZQ7_l1vNXnW8tB-dkrhETNFhmsQ1q7cpDR5qzu1i4MI_Kc7I/s1600/NewFile0.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3zwaDUFffmGcv-GPqO4YsPJNDk6tsQXTx9fC14cqxKFEhAfAE0JBdbHa6v66P7t0lI6Quh-XOQBvMY_eY1rzHGEVkjbsZQ7_l1vNXnW8tB-dkrhETNFhmsQ1q7cpDR5qzu1i4MI_Kc7I/s1600/NewFile0.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Yellow: Chip Select (CS)</div>
<div style="text-align: left;">
Blue: Clock (WR)</div>
</td></tr>
</tbody></table>
<br />
A closer look also showed that the duration of the clock cycles is not equal during the transmission. The frequency of the clock is increasing which means that the time for one period of the clock cycle decreases during the transmission of a 16bit value from 33.6µs to 24.8µs.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbBIV8B7JaTwYntDXU4CExnd13ywTUepx9Whg1QWVQ9c0GbdPGWBYhdKBf7_3ISnw1NhaE5rZRiyy359dDpJD3lbRMrjJwZlagpf7jdI2glEucMh-bEDtecYF9qseniqhFcyPL1hijhlQ/s1600/NewFile5.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbBIV8B7JaTwYntDXU4CExnd13ywTUepx9Whg1QWVQ9c0GbdPGWBYhdKBf7_3ISnw1NhaE5rZRiyy359dDpJD3lbRMrjJwZlagpf7jdI2glEucMh-bEDtecYF9qseniqhFcyPL1hijhlQ/s1600/NewFile5.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Yellow: Chip Select (CS)</div>
<div style="text-align: left;">
Blue: Clock (WR)</div>
</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDtuTi5daYX7A3KHs5P-EAQ5nv40uQSWB4EAczJzGX4PWsxSG2b6PpCHLoCuapucB5PkxhT8eRcigfXEn6pwgvZqlK6aAXWdYkfMnoZSKgpShOaA5dgMRj_rrpbySvlLsnWWHcespFwys/s1600/2und3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDtuTi5daYX7A3KHs5P-EAQ5nv40uQSWB4EAczJzGX4PWsxSG2b6PpCHLoCuapucB5PkxhT8eRcigfXEn6pwgvZqlK6aAXWdYkfMnoZSKgpShOaA5dgMRj_rrpbySvlLsnWWHcespFwys/s1600/2und3.png" height="145" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Yellow: Chip Select (CS)</div>
<div style="text-align: left;">
Blue: Clock (WR)</div>
</td></tr>
</tbody></table>
<br />
At this point I wanted to know 2 things.<br />
<div>
<ol>
<li>Why is the duration of the clock cycles not constant during the transmission?</li>
<li>Why is there only a clock frequency of approx 35 kHz (<a href="http://www.holtek.com/pdf/consumer/ht1632cv120.pdf" target="_blank">Datasheet says</a> on page 4 1MHz is ok) which causes a update time for the entire display of 8.3ms?</li>
</ol>
</div>
<h3>
Investigations and benchmarks</h3>
At first I figured out that <span style="font-family: "Courier New", Courier, monospace;"><b>HT1632::writeScreen()</b> </span>and <span style="font-family: "Courier New", Courier, monospace;"><b>HT1632::writedata(uint16_t d, uint8_t bits)</b></span> are the functions of the Adafruit library which take care for the transmission. To have something which makes it easier to investigate I have prepared <a href="https://github.com/TMuel1123/3208clock/tree/master/ArduinoSketches/Benchmark" target="_blank">some small Arduino sketches</a> where I only implemented the corresponding functions.<br />
<br />
<h3>
writedata(uint16_t d, uint8_t bits)</h3>
In this function the bit banging except the selection of the chip (CS) is done.<br />
<br />
<pre><span style="color: #cc6600;">void</span> writedata(uint16_t d, uint8_t bits)
{
<span style="color: #cc6600;">pinMode</span>(_data, <span style="color: #006699;">OUTPUT</span>);
<span style="color: #cc6600;">for</span> (uint8_t i=bits; i > 0; i--) {
<span style="color: #cc6600;">digitalWrite</span>(_wr, <span style="color: #006699;">LOW</span>);
<span style="color: #cc6600;">if</span> (d & _BV(i-1)) { <span style="color: #cc6600;">digitalWrite</span>(_data, <span style="color: #006699;">HIGH</span>); }
<span style="color: #cc6600;">else</span> { <span style="color: #cc6600;">digitalWrite</span>(_data, <span style="color: #006699;">LOW</span>); }
<span style="color: #cc6600;">digitalWrite</span>(_wr, <span style="color: #006699;">HIGH</span>);
}
<span style="color: #cc6600;">pinMode</span>(_data, <span style="color: #006699;">INPUT</span>);
}
</pre>
<br />
<h4>
Answer for Question No 1</h4>
In the line "<span style="font-family: "Courier New", Courier, monospace;">if (d & _BV(i-1))</span>" happens the magic which causes that the clock cycles are varying during the transmission.<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;">_BV(i-1)</span> is the same like <span style="font-family: "Courier New", Courier, monospace;">(1<<(i-1))</span><span style="font-family: inherit;">, i is the iterator of the for-loop which is initialized with the number of bits. In the worst case the the iterator i is initialized with 16 which causes that in the check for the if-statement a "left shift operation" is executed 15 times. Because that i gets smaller every bit it has to do less and less shift operations to check the if-statement. And this causes that the clock cycle is not equal over the transmission of multiple bits.</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">I have fixed the problem with the clock speed by the following code modification:</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<pre><span style="color: #cc6600;">void</span> writedata(uint16_t d, uint8_t bits)
{
uint16_t compareBit = 0;
<span style="color: #7e7e7e;">// 0x8000 -> set MSB</span>
compareBit = bits == 16 ? 0x8000 : compareBit |= (1<<(bits-1));
<span style="color: #cc6600;">pinMode</span>(_data, <span style="color: #006699;">OUTPUT</span>);
<span style="color: #cc6600;">for</span> (uint8_t i=bits; i > 0; i--)
{
<span style="color: #cc6600;">digitalWrite</span>(_wr, <span style="color: #006699;">LOW</span>);
<span style="color: #cc6600;">if</span> (d & compareBit) { <span style="color: #cc6600;">digitalWrite</span>(_data, <span style="color: #006699;">HIGH</span>); } <span style="color: #7e7e7e;">// 1</span>
<span style="color: #cc6600;">else</span> { <span style="color: #cc6600;">digitalWrite</span>(_data, <span style="color: #006699;">LOW</span>); } <span style="color: #7e7e7e;">// 0</span>
compareBit = compareBit >> 1;
<span style="color: #cc6600;">digitalWrite</span>(_wr, <span style="color: #006699;">HIGH</span>);
}
<span style="color: #cc6600;">pinMode</span>(_data, <span style="color: #006699;">INPUT</span>);
}</pre>
<br />
At the beginning of the function I have made a new variable for the comparison if the DATA pin has to be set. These are some lines more code but in this case the bit shift is only executed once in the for-loop. I also set the <span style="font-family: "Courier New", Courier, monospace;">compareBit</span><span style="font-family: inherit;"> variable in a clever way because the most data packages are 16bit in this case the variable is preset with 0x8000 which is nothing else than setting the MSB true. Otherwise we have a repetitive shift operation for the amount of bits that have to be sent.</span><span style="font-family: inherit;"><br /></span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">After this modification the frequency of the clock has been increased to approx 41.5kHz and the duration for a complete screen refresh is now 6.9ms this is 83% of the time it took before the modification.</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNGAWuDcyxfzL0rjo69KMhsuwvZqU9eFtmDNBCkyCnnW0nGzThc7wJYdGAdArRa6wm3itg9Xk4LMsUFtYIDo6z8l08v19SqADoanyBUgdYE7d_HBFG0j4b1sTrxx5p__B94qHUjaQJBOQ/s1600/NewFile6.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNGAWuDcyxfzL0rjo69KMhsuwvZqU9eFtmDNBCkyCnnW0nGzThc7wJYdGAdArRa6wm3itg9Xk4LMsUFtYIDo6z8l08v19SqADoanyBUgdYE7d_HBFG0j4b1sTrxx5p__B94qHUjaQJBOQ/s1600/NewFile6.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Yellow: Chip Select (CS)</div>
<div style="text-align: left;">
Blue: Clock (WR)</div>
</td></tr>
</tbody></table>
<span style="font-family: inherit;"><br /></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWS7aVo1xyGQLA5J_6zutt7DQw0Igvu5VC97Fn8IvbpOCiVyjG4JXJUVTtE5lQv4HMmJRqRBYSxHULFPaK2BlrnXpiaDMtsWOJ3oQnbiHywSvg_L7iaiyYjTP32TmT9I14-jycgHa336Q/s1600/NewFile8.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWS7aVo1xyGQLA5J_6zutt7DQw0Igvu5VC97Fn8IvbpOCiVyjG4JXJUVTtE5lQv4HMmJRqRBYSxHULFPaK2BlrnXpiaDMtsWOJ3oQnbiHywSvg_L7iaiyYjTP32TmT9I14-jycgHa336Q/s1600/NewFile8.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Yellow: Chip Select (CS)</div>
<div style="text-align: left;">
Blue: Clock (WR)</div>
</td></tr>
</tbody></table>
<span style="font-family: inherit;"><br /></span>
<br />
<h3>
<span style="font-family: inherit;">Answer for Question No 2</span></h3>
<span style="font-family: inherit;">After the initial improvement of the clock speed to 41.5kHz it</span><span style="font-family: inherit;"> still felt to slow for me. So I have removed all the Arduino specific stuff from the corresponding functions and replaced it by native "avr gcc" code.</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<pre><span style="color: #cc6600;">void</span> writedata(uint16_t d, uint8_t bits)
{
uint16_t compareBit = 0;
<span style="color: #7e7e7e;">// 0x8000 -> set MSB</span>
compareBit = bits == 16 ? 0x8000 : compareBit |= (1<<(bits-1));
DDRB |= (1<<DATA);
<span style="color: #cc6600;">for</span> (uint8_t i=bits; i > 0; i--)
{
PORTB &= ~(1<<WR);
<span style="color: #cc6600;">if</span> (d & compareBit) { PORTB |= (1<<DATA); } <span style="color: #7e7e7e;">// 1</span>
<span style="color: #cc6600;">else</span> { PORTB &= ~(1<<DATA); } <span style="color: #7e7e7e;">// 0</span>
compareBit = compareBit >> 1;
PORTB |= (1<<WR);
}
DDRB &= ~(1<<DATA);
}
</pre>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">I was not aware that the speed improvement would be factor 10!</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlHWLRxttgY_Li_dCJVsmRIHSwn0xv6PVdiwYC4nbfADFkJgl-qRu_vrySyzqpbzmanTeLIZFbsV4ObdIn8wKcjTJ6SGLxQ7G0E1iYV5fG3SQYixLLHMpeOnV4HE-myabKSuQhF9drvv4/s1600/NewFile9.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlHWLRxttgY_Li_dCJVsmRIHSwn0xv6PVdiwYC4nbfADFkJgl-qRu_vrySyzqpbzmanTeLIZFbsV4ObdIn8wKcjTJ6SGLxQ7G0E1iYV5fG3SQYixLLHMpeOnV4HE-myabKSuQhF9drvv4/s1600/NewFile9.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Yellow: Chip Select (CS)</div>
<div style="text-align: left;">
Blue: Clock (WR)</div>
</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEholCyAbGjgbrrmmu5LvVeFE7mIj9IhdaJbiJ6p6PgmF7GawpaOTcRCYfhtbmR4VfPW6dNRu-X_Ha-xxYinMP6i1WMsi7KeiOAHc0ZXP212sso9YoH9f6OoTJ1Nck2USEDST2wbidFTMug/s1600/NewFile10.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEholCyAbGjgbrrmmu5LvVeFE7mIj9IhdaJbiJ6p6PgmF7GawpaOTcRCYfhtbmR4VfPW6dNRu-X_Ha-xxYinMP6i1WMsi7KeiOAHc0ZXP212sso9YoH9f6OoTJ1Nck2USEDST2wbidFTMug/s1600/NewFile10.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><div style="text-align: left;">
Yellow: Chip Select (CS)</div>
<div style="text-align: left;">
Blue: Clock (WR)</div>
</td></tr>
</tbody></table>
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;">All three sketches can be downloaded from my <a href="https://github.com/TMuel1123/3208clock/tree/master/ArduinoSketches/Benchmark" target="_blank">GitHub repository</a>.</span><br />
<span style="font-family: inherit;">Slow is the original code, medium is the code with the bugfix for the varying clock cycle and fast is the code for with all improvements.</span>
<br />
<pre>
</pre>
TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-53987493313081571302013-12-20T23:59:00.000+01:002013-12-20T23:59:16.910+01:00The Idea, the Design, the MistakeI know, it's been a long time since my last post. But I was busy with other stuff and also my laziness (a skill which I have trained close to perfection) has prevent me from doing a new post.<br />
<br />
This time I want to write about <strike>the good, the bad and the ugly</strike> the idea, the design and the mistake.<br />
<br />
<h3>
The Idea</h3>
While using an Arduino MEGA 2560 with the Ethernet shield I've discovered that there are still a lot of unused and free pins available.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX-539yHdZLED8Y0JRcJhVXmiLztfsfHe2RmbL-4VuIafPzrboZyIktqcsD1M3RqkGMktkWfSaOUiwFQkXKD0lb2eYYnlYthdV1KBXLIKmDknD3iPoqW5zPnf-ik8seB3kzGEiWgnJqZ8/s1600/Mega+Ethernet.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX-539yHdZLED8Y0JRcJhVXmiLztfsfHe2RmbL-4VuIafPzrboZyIktqcsD1M3RqkGMktkWfSaOUiwFQkXKD0lb2eYYnlYthdV1KBXLIKmDknD3iPoqW5zPnf-ik8seB3kzGEiWgnJqZ8/s1600/Mega+Ethernet.jpg" height="237" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
It covers the pins 14-53 and A8-A15 (A6,A7 are also free but difficult to reach with a additional board).<br />
<br />
These pins include:<br />
<ul>
<li>USART 1-3 (14-19)</li>
<li>I2C (20,21)</li>
<li>PWM (44-46)</li>
<li>SPI (50-53)</li>
<li>ATmega2560 external memory interface (22-37, 39-41)</li>
<li>+5V and GND</li>
</ul>
This brought me to the idea to make a small prototyping shield for these pins.<br />
<br />
<h3>
The Design</h3>
For aesthetic reasons I wanted to make a *duino shaped board so I've downloaded the <a href="http://arduino.cc/en/uploads/Main/arduino-mega2560_R3-ref-design.zip" target="_blank">Arduino Mega 2560 reference design</a> form the <a href="http://www.arduino.cc/" target="_blank">Arduino homepage</a> to get the exact measurements for the pins and the board outline. Based on that I was able to create a <a href="https://github.com/TMuel1123/EagleLibraries" target="_blank">EAGLE library</a> with some templates (board outlines and connectors) to create own shields for the Arduino Mega.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNa2unwXd5qPHugd2b5tVskuRPvzdRRmlkcZW0ZtbvRgbSskXugWSctfrX7GsWELIBhewmdTooJi6SqF_i9HA7I9-uE0CcITsipT-TbVfk-RWkEEINdOG4Mrwy1avAmSKv9PnMSWe5eAg/s1600/img.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNa2unwXd5qPHugd2b5tVskuRPvzdRRmlkcZW0ZtbvRgbSskXugWSctfrX7GsWELIBhewmdTooJi6SqF_i9HA7I9-uE0CcITsipT-TbVfk-RWkEEINdOG4Mrwy1avAmSKv9PnMSWe5eAg/s1600/img.png" height="320" width="216" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBfkGDWop7gMp0w2IPJbxj8-KNA6mXRUfWIC_P905SwEleGIo6W9oK_KbiW_EcUgTHr1mUyFWzURO38rMZRTPnalee3FGkR4UJiAoLDEz3eNjlBbV3I_8_d2cb389I2AROVnyzX91AwHA/s1600/IMAG0158.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBfkGDWop7gMp0w2IPJbxj8-KNA6mXRUfWIC_P905SwEleGIo6W9oK_KbiW_EcUgTHr1mUyFWzURO38rMZRTPnalee3FGkR4UJiAoLDEz3eNjlBbV3I_8_d2cb389I2AROVnyzX91AwHA/s1600/IMAG0158.jpg" height="219" width="320" /></a></div>
<br />
<h3>
The Mistake</h3>
After a lot of checks of the EAGLE *.brd file and additional checks of each of the Gerber layers I've ordered the the PCB at <a href="http://oshpark.com/" target="_blank">OSH Park</a>. 24 Days later I've found the boards in a nice purple envelope in my mailbox.<br />
<br />
I quickly unpacked the PCBs, fired up my soldering station and searched for some pin headers in my assortment boxes. Just some seconds after I have found the pin headers I have discovered that they do not fit trough the holes of the vias - I experienced a strong feeling of disappointment/frustration :-(<br />
<br />
A cigarette later I decided to investigate what went wrong. I have discovered that the drilling of all vias in my design of the board where only 0.8mm and a diameter of at least 1.0mm is necessary to put pin header trough the holes. I've decided to make the holes of the vias for the connectors to the Arduino 1.2mm and the rest of the holes of the prototyping area 1.1mm.<br />
I also have updated all packages in my EAGLE Arduino library<br />
<br />
But even if the pin headers do not fit to the board I was able to see that it would fit nicely. So I have ordered the <a href="https://github.com/TMuel1123/MiniProjects/tree/master/MegaMiniProto" target="_blank">updated revision of the board</a> directly again at OSH Park. In 3-4 weeks I will see the final result.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwLL9hyphenhyphen_ZVl3-JD9YzSyEBtDe4z7UBB0J2KmCqU7JbZwukeyxEo5HTv8Xkg7f-TRjw5mHn7Up1Z0EHYEyORaMDqMxSlbThx3Hm2ZAjzBZI5CrSXaLkwMWqNZCt_blgPJFA2FzAAdcHquo/s1600/Mega+Ethernet+Board.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwLL9hyphenhyphen_ZVl3-JD9YzSyEBtDe4z7UBB0J2KmCqU7JbZwukeyxEo5HTv8Xkg7f-TRjw5mHn7Up1Z0EHYEyORaMDqMxSlbThx3Hm2ZAjzBZI5CrSXaLkwMWqNZCt_blgPJFA2FzAAdcHquo/s1600/Mega+Ethernet+Board.jpg" height="204" width="320" /></a></div>
<br /><br />
<br />
<br />TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-40399134967308697532013-09-03T00:45:00.000+02:002013-09-03T22:00:00.395+02:00This is NOT an Oscilloscope!<h2>
What has happened?</h2>
At the moment I'm playing around with a <a href="http://en.wikipedia.org/wiki/Wien_bridge_oscillator" target="_blank">Wien Bridge Oscillator</a>, or to say it better I have tried the last two days to get it working.<br />
<br />
I have found an application note from Analog Devices (AN580) which describes an circuit of the Wien Bridge Oscillator with two diodes for the stabilization of the output swing. In the schematic of the application note are also two digital potentiometers used to set the frequency and to manipulate the size of the output swing. This two potentiometers could be replaced by common potentiometers.<br />
<br />
<a href="http://www.learnabout-electronics.org/Oscillators/osc34.php" target="_blank">On this page</a> I have found additional informations about this circuit which also helped me to finally get it run.<br />
<br />
<h2>
The Circuit</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNvFw3f8FMWgKf0F8yQQlsRa8hzVoH-yguL2IIIb_oOlsofCpIicaEsJ3b1QvTbbOfFnFz7DCKW2h76tv7Rh3KjNGcLGPnO-1APdZ07tmpAmuNmjgoLO1FCUFmnnQjoCcKavxDbP2HoDk/s1600/Arduino+Connection150.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNvFw3f8FMWgKf0F8yQQlsRa8hzVoH-yguL2IIIb_oOlsofCpIicaEsJ3b1QvTbbOfFnFz7DCKW2h76tv7Rh3KjNGcLGPnO-1APdZ07tmpAmuNmjgoLO1FCUFmnnQjoCcKavxDbP2HoDk/s1600/Arduino+Connection150.png" /></a></div>
Some notes for the schematic:<br />
<div>
<ul>
<li>The values for R1 and R2 must be equal and also the values for C1 and C2.</li>
<li>By increasing or decreasing the values of C1,C2 or R1, R2 the frequency can be changed. I would recommend a linear stereo potentiometer for R1 and R2 this makes it easy to change the values simultaneously.</li>
<li>If the capacitance or the resistance gets larger the frequency becomes slower.</li>
<li>LED1 and LED2 control the amplitude of the output swing. As higher the forward voltage of the LEDs the higher the amplitude of the output swing.</li>
<li>Set the gain with the potentiometer R4 so that the LEDs (both) just begin to light up. If the gain is to large the distortion will be very high.</li>
</ul>
<span style="color: red;">IMPORTANT!!!</span><br />
In the schematic I also have implemented a voltage divider to connect my Arduino Leonardo. ATTENTION both, the Arduino and the Wien Bridge Oscillator are powered form independent and insulated power sources. Only in this case it is possible to connect the negative 12V to the GND of the Arduino.<br />
<span style="color: red;"><br /></span>
<span style="color: red;">YOU CAN KILL YOUR USB PORT AND/OR YOUR COMPLETE PC !!!</span><br />
<br />
To make sure that both power supplies are independent from each other Measure the voltage between the GND pin of the Arduino while it is connected to its power source (USB-Port) and the three supply rails (+12V GND -12V) of the Wien Bridge Oscillator. The Voltage in this case should be very close to 0 (I have measured values below 20mV for each line).<br />
<br />
<span style="color: red;">DO !NOT! CONNECT THE GND OF THE ARDUINO TO THE GND OF THE WIEN BRIDGE OSCILLATOR. THE ARDUINO IS GOING TO BE KILLED!!</span><br />
<br />
The next important part is to make sure that the output of the voltage divider (R6, R7) never can have more than 5V otherwise you are going to kill the Arduino.<br />
<br />
The calculation for the voltage divider is quite simple. To calculate the voltage divider the maximum possible voltage (even in a case of failure) between the GND of the Arduino and the the OUT of the Oscillator must be known. In this case the GND of the Arduino is connected to the -12V of the Oscillator. The maximum positive voltage is +12V both together have 24V.<br />
<br />
Vmax / (R6+R7) * R7<br />
24V / (39k+10k) * 10k = <span style="color: red;">4.9V</span><br />
<br />
With a maximum output voltage of 4.9V after the voltage divider it would be no problem to connect the Arduino.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyWMOmY_SfcaDddCwlrCOx5vKAdhBN-UelxmNlB8P4I9pB5bAtG8oEiOmcEAE4haDjREy8UiLBFOUXQ4cE6S2Zv9dHcJ2l9fklxasHX2aWbqQFIan1j82oO5y7FGhGlJx7XnEIG65qAE0/s1600/Setup_Small.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyWMOmY_SfcaDddCwlrCOx5vKAdhBN-UelxmNlB8P4I9pB5bAtG8oEiOmcEAE4haDjREy8UiLBFOUXQ4cE6S2Zv9dHcJ2l9fklxasHX2aWbqQFIan1j82oO5y7FGhGlJx7XnEIG65qAE0/s1600/Setup_Small.jpg" height="225" width="400" /></a></div>
<br /></div>
<h2>
The Problem</h2>
The main problem was that I was not able to see the waveform of the output, which makes it more or less impossible to see if the output swing of the OPAMP goes to its positive or negative maximum values so that the result is more like a square wave with sinus parts at the rise and fall.<br />
<br />
Due to the fact that I only want to use very low frequencies (<500Hz and in this sample approximately 160Hz) I thought it could be possible that the analog inputs of an AVR are fast enough to get a rough look at the waveform.<br />
<br />
After first tests I have figured out that I'm able to measure approximately 8 times per ms (each 120ns) which is a sampling rate of 8330 kHz. For me it would be OK to use this for frequencies below 500Hz because at 500Hz we still have more than 10 Measure points per period. With 10 measured points per period a sinus signal does not look very beautiful but it could be identified as a sinus signal.<br />
<br />
I assume that the speed could be increased if the analog value is measured directly without the Arduino libraries. The datasheet of the ATmega32U4 says that a sample rate of up to 15k samples per second is possible at full resolution (10Bit). And in the datasheet of the ATmega328 is the same statement for the full 10Bit measurements.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/50KuNPUkUAM?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<h2>
The Waveform Viewer</h2>
To make it short: <a href="https://github.com/TMuel1123/Arduino/tree/master/_8BitAnalogReadBurst" target="_blank">Here is the code</a> it can be downloaded from my Github repository.<br />
<br />
The code itself is quite simple. My first attempt was to sample 255 times the analog value into an array and then send the array formatted to the Arduino serial monitor so that I only have to make copy and paste into the spreadsheet.<br />
<br />
This has worked very well but I am lazy. So I remembered that I have an Arduino Leonardo in the drawer which could type the values directly into the spreadsheet.<br />
I've added the <a href="http://arduino.cc/en/Reference/MouseKeyboard" target="_blank">keyboard code</a> to the sketch and programmed it to my Arduino Leonardo and it worked more or less instantly.<br />
<br />
Now the life got very easy, I only have to push one button to get all the values including the time stamp into the spreadsheet. The next step would be to just look onto the Arduino to start the sampling :-)<br />
<br />
After the values have been entered into the spreadsheet I have made a graph from the values to watch the waveform.<br />
<br />
<a href="https://docs.google.com/file/d/0B8546hZ3ig4nVFpCZDhFc3RPZXM/edit?usp=sharing" target="_blank">Here I have the OpenOffice file</a> which I have used to show the graph. To let the Arduino enter the values into the sheet just select the box A1 and press the startButton (pull pin 7 to GND). You can repeat this as often as you want because the graph automatically changes after the values have been entered, just push the button again.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-1119551904823484022013-08-19T22:21:00.001+02:002016-07-24T20:20:10.501+02:003208Clock Part 3: Implement the board into the Arduino IDE<h2>
General overview</h2>
In this post we take a closer look into the configuration of the Arduino IDE and we also upload the first test sketch to the 3208Clock.<br />
<br />
<h2>
UPDATE:</h2>
<div>
24. Jul.2016:</div>
<div>
I figured out that the following descriptions does not work anymore for the actual Arduino IDEs (> 1.5.x). I have no clue how its done now and i assume its a similar way to implement the new board but at the moment i dont have the time to do it.</div>
<h2>
Add the new board to the configuration files of the Arduino IDE</h2>
There is a configuration file called b<i>oards.txt</i> in the program folder of the Arduino IDE. It can be found here .../arduino-1.0.5/hardware/arduino/boards.txt. Open this file in a text editor and add the following lines at the end of the file and save the file. Then start/restart the Arduino IDE. Now there is an entry called "<i>Lattice Clock w/ ATmega8</i>" in the Arduino IDE which can be found in the menu <i>Tools - Boards.</i><br />
<br />
<pre>atmega8.name=Lattice Clock w/ ATmega8
atmega8.upload.maximum_size=8192
atmega8.bootloader.low_fuses=0xe4
atmega8.bootloader.high_fuses=0xc9
atmega8.build.mcu=atmega8
atmega8.build.f_cpu=8000000L
atmega8.build.core=arduino
atmega8.build.variant=standard
</pre>
The entries in the boards.txt are more or less self explaining but we still want to venture a further look on the parameters.<br />
<br />
<h4>
atmega8.name=Lattice Clock w/ ATmega8</h4>
With this parameter the name which will be shown in the Arduino IDE under the boards section can be set. In this case its "<i>Lattice Clock w/ ATmega8</i>"<br />
<br />
<h4>
atmega8.upload.maximum_size=8192</h4>
This parameter sets the maximum upload size of the hex-file. in this case we can use the complete 8192 bytes (8kB) of the ATmega8L program space. It is not necessary to install a boot loader on the device because the ICSP connection will be used.<br />
<br />
<h4>
atmega8.bootloader.low_fuses=0xe4<br />atmega8.bootloader.high_fuses=0xc9</h4>
With this two parameters the two bytes of the fuses will be set. The fuses are the internal configuration of the Atmel chips.<br />
With this fuse settings the reservation for the boot loader in the flash space is disabled and it is also set to a clock frequency of 8MHz from the internal oscillator.<br />
<br />
<span style="color: red;"><b>IMPORTANT! </b>If you don't know exactly what you are doing with the fuse settings then it is very easy to reduce the usage of the device to a paperweight. Changes are at your own risk.</span><br />
<br />
<h4>
atmega8.build.mcu=atmega8</h4>
This parameter tells the compiler of the Arduino IDE which micro controller is used.<br />
<br />
<h4>
atmega8.build.f_cpu=8000000L</h4>
This parameter sets the information of the clock speed (in this case 8000000Hz or 8MHz). This parameter is used by the compiler to calculate some constants which will be used by some of the internal hardware of the ATmega e.g. usart / serial connection.<br />
<br />
<h4>
atmega8.build.core=arduino<br />atmega8.build.variant=standard</h4>
I'm not sure what this two parameters are doing. If someone has an idea please leave me a message in the comments.<br />
<br />
<h2>
Burn the fuses</h2>
Select the board "<i>Lattice Clock w/ ATmega8</i>" in the boards menu and select the programmer (If you use an Arduino as a programmer then select ArduinoISP). Both can be found in the Tools menu.<br />
<br />
<span style="color: red;"><strong>IMPORTANT!</strong> If the wrong board is selected for example the <em>Arduino NG or older w/ ATmega8</em> then you will brick the 3208Clock because the fuses for this board configure the clock source to external 16MHz quartz. The 3208Clock does not have an external 16MHz quartz.</span><br />
<br />
After the correct programmer and board has been selected go again to the tool menu and click on <em>Burn Bootloader</em>. In our case it only flashes the fuses and erases the chip.<br />
<br />
<h2>
Build a "Test LED" and flash the test sketch to the device</h2>
I guess a picture says more than thousand words. I have used a 1kOhm resistor. Everything between 330 and 1000 Ohm will be fine. Also the selection of the LED is not critical any common LED which emits visible light will fit. It is also not necessary to solder the LED to the board for the first test it only needs to be plugged through the holes of the DS18x20 footprint.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdP9C4BFklD1Ly2_7yAdRBagk_7fARFb5p9re_mTkXdBrLx2QMnz6qcGGMvThxWkxSU0cHVhqrNaP3QrWH_WEngUJdhWAxk9yOHtNXaHwufoUHDPSvjseJSNQzTO4OFNlB1a_nXpvl48U/s1600/ManualTestHardwareSmall.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdP9C4BFklD1Ly2_7yAdRBagk_7fARFb5p9re_mTkXdBrLx2QMnz6qcGGMvThxWkxSU0cHVhqrNaP3QrWH_WEngUJdhWAxk9yOHtNXaHwufoUHDPSvjseJSNQzTO4OFNlB1a_nXpvl48U/s1600/ManualTestHardwareSmall.jpg" width="400" /></a></div>
<br />
If the LED is prepared so far then please download the test sketch from my <a href="https://github.com/TMuel1123/3208clock/tree/master/ArduinoSketches/FirstTest" target="_blank">github repository</a> or use the blink sketch from the examples and change the ledPin from 13 to 15.<br />
<br />
To burn the test sketch to the 3208Clock <strong>you must hold the shift key while clicking the upload button</strong>. Otherwise the Arduino IDE tries to use the serial connection to upload the sketch which will cause an error message.<br />
<br />
<br />
In the next posts we will take a closer look on how to get in contact with the Holtec HT1632C display driver to get something shown on the display.TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-35626646063967604632013-08-18T17:01:00.001+02:002013-08-18T17:01:08.830+02:003208Clock Part 2: Prepare the Hardware to get connected with the Arduino IDE <h2>
Hardware connection</h2>
The 3208Clock has of cause no Arduino boot loader installed and it also has no serial or USB connection on pin headers. For this reason it is only possible to program the device over the ICSP connector with an programmer like an AVR ISPmk2.<br />
<br />
Don't be scared. If you have an Arduino (I only tested it with the UNO but it should also work with older versions) then you also have an ISP Programmer. Just flash the <a href="http://arduino.cc/en/Tutorial/ArduinoISP" target="_blank">ArduinoISP sketch</a> which is delivered with the examples of the Arduino IDE to your Arduino.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPDVnIY6YoEWPzaFkKB_dFaj2K9TY0zrp3uxVJypK-UEPWJiU0qQwrRKSVwgWiAGa7iRGqLQDN0J9cZ1WV7lG4MNJBoGH7_eC5UirCtdm8epMqZYpN-cqpykb0RxFO2JfxmorJivfPHf8/s1600/ArduinoISP.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPDVnIY6YoEWPzaFkKB_dFaj2K9TY0zrp3uxVJypK-UEPWJiU0qQwrRKSVwgWiAGa7iRGqLQDN0J9cZ1WV7lG4MNJBoGH7_eC5UirCtdm8epMqZYpN-cqpykb0RxFO2JfxmorJivfPHf8/s1600/ArduinoISP.png" height="380" width="400" /></a></div>
<br />
Here are the parts that are needed to make the connection.<br />
<div>
<ul>
<li>1 Arduino (in this case its an Arduino UNO others should work as well)</li>
<li>6 Jumper wires female to male</li>
<li>1 2*3 pin header <strong>OR</strong> I would recommend a boxed header</li>
</ul>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGVxPUJ_Tuf7vnTebgfrINddpCckQkP6FqUc1xno3LKdKPbUNaFI3EHQtE2wqGfdSlivmcyrEoQofcz5SZzTUUoq6mq8Oo0dlHuE_hE82CvaeZthxy1OpdtETA-ZoFeuyj4wHCdM3xmAA/s1600/HardwareForProgrammingComment.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGVxPUJ_Tuf7vnTebgfrINddpCckQkP6FqUc1xno3LKdKPbUNaFI3EHQtE2wqGfdSlivmcyrEoQofcz5SZzTUUoq6mq8Oo0dlHuE_hE82CvaeZthxy1OpdtETA-ZoFeuyj4wHCdM3xmAA/s1600/HardwareForProgrammingComment.jpg" height="175" width="400" /></a></div>
<br />
The pin header / boxed header must be soldered to the 3208Clock board. To make sure that the boxed header is mounted in the correct direction take a closer look on the picture below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJp63QR0kZogz7dIDe6xLatpfUdeXQOFbDoJ_nQMcl-S4TMFw2XiPwbSJn0_F9NmbfHVo-GLanosspx-wyKRrMuLKOX9mJdSw837RPS447wnrK7maj1v3_8XdkL1hXSDuDsO-x4VMlwgA/s1600/ICSP.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJp63QR0kZogz7dIDe6xLatpfUdeXQOFbDoJ_nQMcl-S4TMFw2XiPwbSJn0_F9NmbfHVo-GLanosspx-wyKRrMuLKOX9mJdSw837RPS447wnrK7maj1v3_8XdkL1hXSDuDsO-x4VMlwgA/s1600/ICSP.jpg" height="270" width="400" /></a></div>
<br />
And here is a picture with the finished setup. Please double check the connections before you power on the Arduino programmer just to make sure that the Arduino and the 3208Clock is still alive after our first try.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6-12Lo081virQHylcbQOSGQmIQIkmO9Lr2uSgFdQZVgnBcfYRhmR2Gy7lDL1A3QNGT8XwH0znGPbUWPDrtbMOAtXiDhUwSVcdx6Iw_97rFC2EY6NleUU5sOgJq2Ccc1keT8iqU_qy67E/s1600/ConnectedProgrammer.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6-12Lo081virQHylcbQOSGQmIQIkmO9Lr2uSgFdQZVgnBcfYRhmR2Gy7lDL1A3QNGT8XwH0znGPbUWPDrtbMOAtXiDhUwSVcdx6Iw_97rFC2EY6NleUU5sOgJq2Ccc1keT8iqU_qy67E/s1600/ConnectedProgrammer.jpg" height="300" width="400" /></a></div>
<br />
If there is already an ISP programmer by hand then of cause this can be used. I personally use a USBprog which works as an AVR ISPmkII clone.<br />
<br />
In the next post I will show a closer look into the configuration of the Arduino IDE. Especially the way how a new device can be added so that it can be selected under <i>Tools - Board</i> in the Arduino IDE.TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-77480446198413828242013-08-13T23:39:00.002+02:002013-08-17T23:56:59.733+02:00The modified 3208Clock Part 1 the beginningI stumbled upon this<a href="http://www.fasttech.com/products/0/10002377/1174201-jy-mcu-3208-clock-pro-328-programmable-lattice-clo" target="_blank"> lattice clock</a> while I was surfing through the products of one of this <a href="http://www.fasttech.com/" target="_blank">Chinese Internet sellers</a> with worldwide free shipping. I thought "OK, 12$ (~9,0 EUR) what can I loose?" So I've ordered one of this devices.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi84cfhXBaj9YQiMl6qjkDZ1errXjPm-DEcYg4KJTrpYjoX7YPq3UWn3ZaWN5pNRhpOWuPY7LXJLeOK-rIu9cYpY931suncrQjkORlfEzZPAgakkvHpkBM_Ph9C3c0lVAsfC_GC_zJo9k0/s1600/1174201-3.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi84cfhXBaj9YQiMl6qjkDZ1errXjPm-DEcYg4KJTrpYjoX7YPq3UWn3ZaWN5pNRhpOWuPY7LXJLeOK-rIu9cYpY931suncrQjkORlfEzZPAgakkvHpkBM_Ph9C3c0lVAsfC_GC_zJo9k0/s1600/1174201-3.jpg" height="93" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">I have stolen this Picture from www.FastTech.com</td></tr>
</tbody></table>
<br />
After <strike>only</strike> four weeks the package has arrived. My first thought was to quickly unwrap it and connect it to power to see what it is doing...<br />
<br />
...BÄÄM! INSTANT KILL!<br />
It took me $12.30 and a lot of patience (waiting for delivery) to learn that this device can not be powered directly by 12V DC. After the <a href="http://en.wikipedia.org/wiki/Magic_smoke" target="_blank">magic smoke</a> has disappeared and I have turned the PCB I have seen that this device is labeled with DC 5V<br />
<br />
From this setback, I did not let me discourage and I ordered a new unit. During the delivery time for the new device I had some time to do some reverse engineering. So I unmounted all the parts which hide the direct view to the PCB.<br />
<br />
<h2>
The contents of the 3208Clock</h2>
This device consists of an ATmega8L which is the brain of the Clock and a Holtec HT1632C Display controller paired with four 8x8 LED segments.<br />
<br />
<h2>
Optional components</h2>
During my investigation I have discovered that the PCB was in general developed in a very clever way. The following parts can be retrofitted to the board.<br />
<div>
<ul>
<li>
Mini USB port
</li>
<li>TSOP infrared receiver</li>
<li>DS18x20 1-Wire temperature sensor / LM35 temperature sensor</li>
<li>Bi-color LED (color changing by reversing polarity)</li>
<li>6-Pin ICSP header to reprogram the ATmega8L</li>
<li>Buzzer/Speaker (can not be mounted if ICSP header is mounted)</li>
<li>On the backside is a place to mount a RTC IC and a coin cell battery to power the clock IC if the main power is not connected.</li>
</ul>
But due to the Problem that the ATmega8L has only 8KB of program space I'm not sure if all of the above components can be implemented into the software.<br />
<br />
<ul>
</ul>
</div>
<h2>
PCB Overview</h2>
The most interesting part seems to be the right part of the front side. Here are a lot of footprints of the unpopulated optional parts which can be used to interact with the real world.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfkYn-6xtDr8rm8Fm-SdDxGh_37AjlnfLCpwrdSbwf04DjZYQJ9STDMWqlnGiDQebbI_Rzctz_Z6dikE_JRYUBfPs4plJLb7Cj16iomYshA4Qs9bCOMtIMrPE-oaTUz_8OeYG2AsfyGk/s1600/front.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkfkYn-6xtDr8rm8Fm-SdDxGh_37AjlnfLCpwrdSbwf04DjZYQJ9STDMWqlnGiDQebbI_Rzctz_Z6dikE_JRYUBfPs4plJLb7Cj16iomYshA4Qs9bCOMtIMrPE-oaTUz_8OeYG2AsfyGk/s1600/front.jpg" height="88" width="400" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGpsajX-C4CCgFhmB653P-tNwJkgOtOcnWcJQ7qUE2M3UDKidQa6Y5SV5V55cYNUoSSzq3cj4WNc-w5jeKvsy8wQz40lo3e1LLHu5bSY1AxC58tT9bG-udhEdeJmiCWT1x-MSAb4CpHNk/s1600/frontDetail.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<div class="separator" style="clear: both; text-align: left;">
I have prepared a picture which shows which pins of the ATmega8L are connected to the footprints. The numbers are the Arduino pin numbers. I was to lazy to also write the original port pin numbers like "PB3" to the Picture. But here you can see a very good <a href="http://www.pighixxx.com/2013/03/atmega168-pinout/" target="_blank">pinout diagram</a> made by Pighixxx. I know its for a ATmega168 but the Pinout is more or less compatible.</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/AVvXsEhaXTNdhLifXvn7jjac62MvREG6qNIX9RCGLRblBFSBC23tQNXkfxz2VqciSWulqqHgs4NZAi2ggDnNmVZMCsm4w3zMI2XfApx3HcVzP9PSMy12CkffUhhULCcMq1F8JqEQ6i6mY5mWjAc/s1600/frontDetail.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaXTNdhLifXvn7jjac62MvREG6qNIX9RCGLRblBFSBC23tQNXkfxz2VqciSWulqqHgs4NZAi2ggDnNmVZMCsm4w3zMI2XfApx3HcVzP9PSMy12CkffUhhULCcMq1F8JqEQ6i6mY5mWjAc/s1600/frontDetail.jpg" height="254" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: center;">
<div style="text-align: left;">
Here is a picture of the backside of the PCB. We see here that three ICs can be mounted to the board. From left to right we have at first the footprint for the ATmega8L with its TQFP32 package. The next ones are the footprint for a battery and a SO16 IC where a RTC can be mounted.</div>
<div style="text-align: left;">
The last one is the Footprint 52 pin QFP footprint for the Holtec HT1632C driver IC for the 8x8 LED displays.</div>
<div style="text-align: left;">
<br /></div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqnd6LyBBChe0eUlQAUJ8JD5ROXqMH4MUfVrmG5pfX7COoO14_WqSZy4k7OE6ANX5jVbbI_XFwpVF_sGRLEyJErQpACk0dk_IjpkUO9tPLJuD9WTV5Cow6LjXY8ljyj1D-I39wVhxq7iM/s1600/back.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqnd6LyBBChe0eUlQAUJ8JD5ROXqMH4MUfVrmG5pfX7COoO14_WqSZy4k7OE6ANX5jVbbI_XFwpVF_sGRLEyJErQpACk0dk_IjpkUO9tPLJuD9WTV5Cow6LjXY8ljyj1D-I39wVhxq7iM/s1600/back.jpg" height="70" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I also have made a picture with some additional descriptions for some pins. During my reverse engineering I also painted some pads red to make it easier for me to track the +5V line. Also take a look at the top left of the picture there is a very important information written which I have ignored at my first try.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGLJlpQdzMt3nWq0-lFlM17QFzCzk3BQMZEzou21Cc_ScGuDBJv_6KXXaUls1Ycbc-wQ_AmG7zQ4ourMqGJnRWum77Bg4icpIDU1lotTrKM56QpDCE0F0ED-WOEZS4dq17Khb-Mc3dPgo/s1600/backDetail.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGLJlpQdzMt3nWq0-lFlM17QFzCzk3BQMZEzou21Cc_ScGuDBJv_6KXXaUls1Ycbc-wQ_AmG7zQ4ourMqGJnRWum77Bg4icpIDU1lotTrKM56QpDCE0F0ED-WOEZS4dq17Khb-Mc3dPgo/s1600/backDetail.jpg" height="287" width="320" /></a></div>
<br />
<br />
<div>
<ul>
</ul>
</div>
<h2>
My actual setup</h2>
The only parts from the optional components which I have installed are the ICSP header for programming the device and a bi-color LED which was laying around for debugging purposes.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYXOT86nqyaEIToTxVpFXWuUFZOu5t-y-VEvgFfTDHyFVAx8vbwRVVpRDuLrETqX8rg047qSLSJv5oZqi-9bNHXWVHD9APYpYmCXA61juaQkD1FORK-5CAh_VhL3BsJUgUKrRr3yU_de4/s1600/SetupDetail.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYXOT86nqyaEIToTxVpFXWuUFZOu5t-y-VEvgFfTDHyFVAx8vbwRVVpRDuLrETqX8rg047qSLSJv5oZqi-9bNHXWVHD9APYpYmCXA61juaQkD1FORK-5CAh_VhL3BsJUgUKrRr3yU_de4/s1600/SetupDetail.jpg" height="191" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
With the Setup in the picture above I'm now able to send a zero terminated string to the device over Bluetooth which will then scroll through the display. Here is a short video which I have made.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/eiMDquihxCA?feature=player_embedded' frameborder='0'></iframe></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<h2>
The next steps</h2>
In the next posts I will show a more insight view about the single steps which I have made to get this device up and running with the Arduino IDE and a couple of libraries. I also want to upload a well commented version the code to GitHub so that everyone can get started with playing around with this cheap and versatile device.<br />
<br />
I'm not sure which topic the next posts will have but they will be more or less related to the 3208Clock device. It is also possible to post requests for additional informations of specific parts of this device or the procedure of hacking it to the comments.<br />
<br />
<br />
<br />
<div>
<ul>
</ul>
<br />
<ul>
</ul>
</div>
TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-7274687611643627782013-08-13T23:37:00.001+02:002013-08-13T23:37:55.374+02:00Just some info about me and how do I got addicted to playing with electronics<h2>
The early days</h2>
I was born in the early 80s in the near of Frankfurt Germany and I soon have discovered that it is very interesting to disassemble things to more or less (more less than more) understand how they are working.<br />
<br />
I guess I was 10 as I got my first own IBM compatible PC. This device laid the foundation stone for my later life.<br />
<br />
<h2>
The youth / I survived the 90s</h2>
It was a hard time. At the beginning of the 90s there was no Internet, no smart phones and even no cell phone. (OK, there were cell phones but they where not affordable to common people, you also have needed a briefcase or a car to transport them) We have used phones which where connected with a cable to a special outlet on the wall in our house.<br />
<br />
At the mid of the 90s I gained access to the Internet. At this time the Internet looked like an <a href="http://www.webpagesthatsuck.com/gorgeous-websites-from-the-late-90s-to-inspire-you-if-you-have-no-taste.html" target="_blank">LSD</a> trip. Especially under some enthusiasts which have created their own private pages. There where some unwritten rules to design private web pages. I just want to point out some of these rules here:<br />
<div>
<ol>
<li>Use as many different colors as possible. <a href="http://de.selfhtml.org/diverses/anzeige/farbnamen_16.htm" target="_blank">There where 16 different colors</a>. With some patience and training you where able to implement all of them into one page.</li>
<li>Try to bring some harmony into your page. E.g. Blue text on green background. Yellow text on blue background was also very popular.</li>
<li>Use frames, at least three.</li>
<li>Use plenty of animated GIFs which do not belong to the topic of the page. (If there was a topic) </li>
<li>The last but also one of the most important point was to upload a lot of large pictures to show the visitor that you either have a lot of patience to upload the pictures or to blame all your visitors which where visiting your page with an <a href="http://hackaday.com/2013/01/31/how-a-dial-up-modem-handshake-works/" target="_blank">28.8kbps modem</a> which was pretty slow.</li>
</ol>
During this time I also played a lot of computer games and also played with some electronic kits.<br />
<ol>
</ol>
</div>
<h2>
The first decade of the new century</h2>
School was finished and I had to start with working / learning a job. I my case I have learned electrician at construction sites. I general I would say that working is a nice activity but you definitely loose to much leisure time.<br />
<br />
I've done this job until the mid of this decade. Then I have decided to go back to school for two years to improve my skills and to rise my value to the job marked.<br />
<br />
One of the teachers has developed the <a href="http://www.elektor.com/magazines/2002/february/picee-development-system.55581.lynkx" target="_blank">PICee development and learning platform for PIC microcontrollers</a>. This was also part of the lessons, so I got the first contact to <a href="http://en.wikipedia.org/wiki/C_(programming_language)" target="_blank">C</a> and the world of programmable micro controllers. I was interested in electronics for a long time but I have not got the final push into this topic until the beginning of this lessons.<br />
<br />
And today its a hobby for me which is inevitable.<br />
<br />
<h2>
Until today</h2>
Since this time I'm playing with micro controllers. The first time I used the PIC16Fxxx from Microchip but then I switched to Atmel because they have full support for Linux. And about a year ago I have discovered the <a href="http://arduino.cc/en/" target="_blank">Arduino plattform</a> which makes my life a lot easier.<br />
<br />
Here is a short list about my skills (or things which I believe I'm skilled at)<br />
<br />
German, English, Perl, C, HTML, Linux, Arduino, Electronics (More the digital part, for the analog stuff I would need better math skills), Eagle CAD Software, Beckhoff PLC, CNC-Programming (DIN code)<br />
<br />
<br />
Hope that was enough info about meTMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com0tag:blogger.com,1999:blog-8667789683556003007.post-23241834923867557322013-08-11T20:24:00.000+02:002014-01-10T00:02:23.748+01:00The first test entry<h2>
</h2>
So this is just the first test entry to get some look and feel of this Blogger engine.<br />
<a href="https://github.com/TMuel1123/RaspberryPi/tree/master/MAX7219">A RaspberryPi project</a> which I already have published on Github.<br />
<br />
And here is a Picture of this Project:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwBOnDZVR3NpvS_9i4MIAhNPOHzClIMaAHfP7ka6M-kkLsfcewV-wqRedvCprs1BXtgY-Gq9yiwuoQ6utP4pHh74LNphBISEAl-oycntL9e-9KimV3eUuA1hvgt6wPqCzNuQW-30XcjnY/s1600/20130513_230642.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwBOnDZVR3NpvS_9i4MIAhNPOHzClIMaAHfP7ka6M-kkLsfcewV-wqRedvCprs1BXtgY-Gq9yiwuoQ6utP4pHh74LNphBISEAl-oycntL9e-9KimV3eUuA1hvgt6wPqCzNuQW-30XcjnY/s1600/20130513_230642.jpg" height="300" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />TMuelhttp://www.blogger.com/profile/04937555494789182611noreply@blogger.com2