Archive

Posts Tagged ‘Arduino’

Embedded development platforms I own

April 21st, 2009

I started creating small embedded projects for fun about a year and a half back. Since then I have been hooked into it and today it takes the entirety of my free time. I started out with the humble 8051 and along the way have had the fortune of laying my eyes on the sexy Arduino, the powerful AVR and even the austere MSP430. A list of my embedded projects can be accessed here.

Here is a brief overview of the platforms that I own, as of this writing. By platform, I mean a hardware and software setup that allows me to write code in C or assembly, compile/assemble that code, ‘burn’ that binary into the target microcontroller and then possibly debug that ‘burned’ code.

1. AT89S52 development platform: This is the very first platform I ever owned. I purchased this from a company in Gujarat (a western province in India) called Sunrom. I am very satisfied with their product although a bit disappointed with the company for the lack of Linux support for its flashing software. I chose this as my first platform since I was most familiar with the architecture of the ATMEL AT89S52. AT89S52 has a 8-bit CISC architecture.

AT89S52 Development Platform

My AT89S52 Development Platform

Type: Purchased
Approximate cost2250 INR (2006)
On Chip Debug support: No
Linux support: No. But I created a ‘reverse-engineered’  linux port for its flashing software. Look here.
Cons: Lack of Linux support from Sunrom and on chip debug.
Pros: Availability of some very good development tools like SDCC, ASEM51 etc.
My Comments: Best system to start embedded development at a minimum cost. Good value for money.
Overall Rating: 4.0/5

2. MSP430 EZ430-RF2500 USB development tool: I went to attend the MSP430 day conducted by Texas Instruments all over the globe and they gave this USB development tool as a free sample. This tool can be programmed via the IAR IDE that runs on windows through the PC USB. For the unitiatiated, MSP430 is a range of ultra low power microcontrollers from Texas Instruments. It has a 16-bit RISC architecture. Frankly speaking, I have never created any big project with the MSP430. Main reason being that for it to work, a separate 3.7 V power supply is needed for this ultra low power beast. Normal 5 volts that we use usually for other micros would fry it. But the circuit components would still need 3.7 volts. Thus, a kind of isolation would be needed to make sure that the 5V does not flow into the MSP430. This is one reason, I have never tried making anything with this platform. It just lies in my shelf, gathering dust till the moment of its beckoning comes.

A plus point however is that Texas Instruments have also created DIP version of this microcontroller which helps the hobbiyst who is occasional not well equipped to perform SMD soldering.

MSP430 Development Platform

My MSP430 Development Platform

Type: Free Sample given by Texas Instruments for MSP430 day attendees.
Approximate cost: 40 USD, if I remember correctly.
On Chip Debug support: Yes
Linux support: GCC port of MSP430 seems to work in Linux, but have heard horror stories from people trying to make the USB tool which I have work in Linux. Problem is compounded by Texas Instruments not releasing the sources for the DLL needed to talk with the USB stick tool.
Cons: Lack of proper Linux support. IAR compiler does not work beyond 4k code size.
Pros: DIP version is hobbyist friendly and availability of MSP-GCC is a boon for those who cannot afford the IAR C compiler.
My Comments: Not recommended for newcomers.
Overall Rating: 2.5/5

3. Arduino: This tiny physical computing platform has taken the embedded hobby world by storm. There are thousands of websites all over the web with thousands of cool arduino projects. Arduino is easy to learn and easy to program. But while many people would recommend it for newcomers, I would really not do so. Arduino lets users program at a somewhat abstract level using its IDE which is based on processing. I firmly believe that someone should start with embedded development with the guts-first approach, i.e. learn the architecture from inside out and start programming in assembly language before graduating to high level languages like C or processing/wiring.

Arduino Development Platform

My Arduino Development Platform

Type: Purchased
Approximate cost: 35 USD, back in 2008.
On Chip Debug support: No
Linux support: Yes. Arduino works out of the box with my laptop which has Ubuntu Intrepid Ibex.
Cons: Lack of on chip debug really makes creating complex stuff a pain in the butt.
Pros: Lots of sites on the web to start development.
My Comments: Not recommended for newcomers. But would readily recommend for experienced developers.
Overall Rating: 4.0/5

4. AVR ATmega: This is my latest acquisition in the world of embedded platforms. I hand made this myself after hours of backbreaking soldering sessions. But every minute of those sessions was wortwhile when I was able to use plain old GDB to perform hardware debugging of my target board. And did I mention, it works in windows too ? You just need to install win-avr and avr studio :-) .

For the uninitiated, AVR is a RISC architecture from ATMEL and is wildly popular among hobbyists. The best thing about AVR is the availability of the completely free GNU tool chain for this arcthitecture which is why is it so much popular among students and hobbyists.

AVR ATMega Development Platform

My AVR ATMega Development Platform

Type: Hand made
Approximate cost: 300 INR or 7.5 USD (Believe me !!)
On Chip Debug support: Yes.
Linux support: Yes. AVR ATmega is fully supported on Linux through AVaRice and the AVR port of the GNU toolchain.
Cons: Might be a bit daunting for the absolute noob to make this with bare hands, but then it can be also purchased from ATMEL but be ready to shell out in the range of 100 USD.
Pros: Very hacker friendly, and GNU/Linux friendly too. Works on windows along with win-avr and avr studio.
My Comments: Excellent  for newcomers. Also a great way to learn basics of soldering and embedded development.
Overall Rating: 4.5/5

So this completes my review. And no prizes for guessing who the winner is!. It is no doubt the AVR platform that steals the show. And why not? With its powerful on chip debug, 100% free GNU tool chain, GDB compatible software, Windows plus Linux compatibility, AVR really does steal the show.

That is all the time I have this time. Happy embedding!!
With this thought, I now take your leave and would see you all in my next post!

regards,
Seemanta

admin Embedded Hobbyist , , , , , , ,

Reading/Writing a Serial EEPROM chip using Arduino

November 20th, 2008

A few months ago, I had got myself some samples of serial EEPROMs. In case you are wondering what they are, the name says it all. They are Serial EEPROMs(Serial Electrically Erasable Programmable Read Only Memory). By serial I mean is that they don’t have a parallel data or address bus that we normally associate with EEPROMS. Instead, they have a serial interface and protocol to read/write data onto them.

Two of the most popular serial protocols associated with serial EEPROMs are the SPI (standing for Serial Peripheral Interface) and the I2C (Or Inter-Integrated Circuit). ( The latter is by Philips and the former is by Motorola, in case you are curious).

Anyway, the Serial EEPROM I had was as SPI one, a 25AA256 from Microchip, to be precise. Before I dived headlong into anything, I wanted to first test my EEPROM chip. So what better way than to quickly connect it with my Arduino and check.

So that is what I did. And let me tell you that I cannot take credit for any of the code this time. I found the code completely in the Arduino website. But anyway, below is a photo I took of the system.

img_0375

Readind/Writing an SPI Serial EEPROM using an Arduino. Ignore the red LEDs on the breadboard. They are from a previous project and have nothing to do with this particular demonstration.

The code for the above can be found here. I had to change a few parameters in the code for make it to work with my EEPROM. The EEPROM used in the link above had a page boudnary of 128 bytes, while the EEPROM which I had, had a page boundary of 64.  So, I did a minor change to my program by replacing ‘128′ by ‘64′.

That’s it ! It worked ! I was able to read and write into my EEPROM and it was great fun! Now with the assurance that my EEPROM was ok, I would be safely able to create my own software to read/write my EPROM.

But that’s the topic of another post. My next post would be a demonstration of my very own software to read/write into the EEPROM. Something, which I have dubbed ‘SEAShell - Serial EEPROM Access Shell’. Some slick naming, eh ? Stay tuned!

seemanta Embedded Hobbyist, My Creations, Tech , ,

Interfacing an LCD with Arduino

September 25th, 2008

I used my recently purchased Arduino board to interface a Hitachi HD44780 compatible LCD. With Arduino, as usual the code was quite simple. In fact, I spent more time building the circuit than in writing the code.

The only disadvantage I found in the Arduino board was that the PORTD and PORTB sockets have a small gap in between them. Because of this gap, I am not able to evenly fit male-female socket pairs. As a result, I cannot make small home-made Arduino shields using general purpose PCBs.

The result? I had to cut pieces of a circuit board with a hack saw, make 2 thin strips, and then had to solder my connectors over it. Anyway, here it is, a picture of it I took after making it.

LCD interfaced with Arduino

LCD interfaced with Arduino

P.S. I am trying to learn how to post normal text files into wordpress. Seems like wordpress accepts only pdf and doc files. Once I figure out how, I shall post the source code to all my projects here.

admin Embedded Hobbyist, My Creations, Tech , ,