Wednesday, March 6, 2013

Arduino : My Learning Journey




I have been using Arduino from the time it first appeared in the market. Before  that I was using AVR studio / stk500 with Atmega8 and Atmega168. Atmega328 had not arrived yet. STK500 was a good prototyping platform where most of the AVR features like fuses could be set or reset. My first trial was to make and download the Arduino bootloader into an Atmega8, but due to some issue it kept failing which I soon  realised was due to the code compiling into a size bigger than the Atmega8 bootloader. I had no choice but to go debug the code and remove some redundant commands and finally was able to squeze in the code. I got two additional benefits from this study first I was able to reduce the bootloader delay to 1 sec and second I could enable the watchdog timer handling in the bootloader....


Sponsor: www.avmicrotech.com/shop eshop for your electronic needs


Watchdog

A micro-controller latch-up (hang) on a production machine is biggest nightmare for any hardware designer as this small insignificant event can cause unnecessary stoppage and activation of technicians. I was also bitten by the same fear when adding a uC (micro-controller) to carry out BCD to serial conversion in one of my projects. The uC latch-up would have resulted in bad reputation. I found a very unconventional solution. A watchdog was setup for a few seconds and nothing was done to handle it. so the system would automatically reset after a few seconds which was seamless to the operation. The system worked so flawlessly and thanks to Cygnal (now Silicon Labs) uC reliability, I have system running untouched for over ten year!!


Sponsor: www.avmicrotech.com/shop eshop for your electronic needs


Wiring or C

Recently I was requested by one of the faculty member of an Engineering college in New Delhi to setup some experiment for their embedded lab around Arduino Hardware. They were very surprised and happy when I configured  AVR studio to download compiled C programs directly to an Arduino board. With this the students could learn to program in real C or C++ using winavr and later use rich Arduino Libary to interface complex hardware like SD card or Ethernet controller.
I am of the opinion that Engineering students should retain and develop their C skills and at the same time learn  ARM processor. The cost of  ARM devices have dropped and boards are available at prices slightly higher than Arduino. I am seeing that engineering students at NUS Singapore directly start hardware programming on NXP arm boards in C and assembly (inline).

......cont



No comments:

Post a Comment