Embedded Systems

Like many who got onto the IT bandwagon, I never got to utilize what I was trained in – electrical engineering. After a career of high-level application development (i.e. in the IT Industry), I’ve taken the plunge, into the embedded world – back to my roots.

It really is an exciting and much more challenging area to be in – compared with drudgery of enterprise software development (“fatware”) – where you don’t care about efficiency, you just slap on more memory, disk, cpu’s.

I have to thank the Slug for getting me into the world of embedded systems: embedded Linux, embedded hardware, ARM processors, 8-bit microcontrollers.

Surprisingly very little has changed since the Zilog Z80 (years ago) in terms of how they work. What has changed is that the CPU and all its peripheral components (RAM, EEPROM, Flash, USART, ADC, DAC, clock circuitry) have been all compressed into a single unit – the microcontroller (uC or MCU), the size of thumbnail, less than $2, consuming less than 1W (compare that with $200 and 40W of CPU used in PCs – I know it’s an unfair comparison, but today’s MCUs (especially ARM chips) where like the CPUs of 15 years back).

ARM Processors

What is an ARM processor? For those of us who have been living under a rock… it stands for Advanced RISC Machine. In short, once upon a time microprocessor engineers (in particular at Intel) thought it was a great idea to have the CPU handle more and more complex instructions. In other words, as computer programs got more complex, so did the need for macro instructions (i.e. at the CPU level). This made the CPU (the number of components) ever increasing, in size, density, and power. Because of the focus being the server and gaming industry, power efficiency also often took back seat over raw computing power. It’s really the mobile industry that bought the computing and power efficiency of ARM to limelight (the ever increasing features of cell phones is bound to converge with computers/laptops).

The downside of CPU’s trying to implement larger and larger instructions in the hardware itself, is that it gave C compilers very little room for optimization – compilers found it hard to churn out optimized code. In contrast, RISC assembly language instructions are simple (the way microprocessor assembly languages started out to be), and easily optimized. See RISC vs CISC.

A word on C. It’s always surprising to hear IT folks (in particular those on the Java bandwagon) say that C is a dead language. Maybe for application development. Not only is the C language far from dead, everything is written in C – all your operating systems and programming languages. As for embedded systems go, C – is where the metal meets the road, the software meets the hardware. Most of what you can do in assembly language, you can do in C. One can view C as a portable high level assembly language (in fact back then that was the motive behind its creation).

The Slug

If I’m going to be running an Asterisk server 24×7, I shouldn’t really be needing a full blown PC or even a barebones PC costing at least $400 and burning at least 300-400W of power. I needed something which would consume less than 100W of power and cost less than $100.

My runner ups were the AMD Geode or the VIA C7 based boards. Both consume only about 40W of power (processor alone about 15-20W), and cost around $300. But after hours of reading up on Geode or C7 based boards – none of them satisfied me – each board had one peculiar problem or the other.

Then… I came across the Slug. In the same line as people hacked XBox’s to run Linux, a group of great folks have hacked the Linksys NSLU2 NAS to run Linux. At $70, consuming less than 10W, and solid state, the possibilities are endless: Asterisk, Internet Radio, File Sharing, Printer sharing, 24×7 web server, SSH, etc.

The heart of the Slug is an XScale IXP420 ARMv5TE processor, 133MHz, 32MB SDRAM, 8MB Flash, Linux firmware, Redboot bootloader.

More about the slug on the Slug Group.

Yummy Circuits

Take a look at these Yummy Circuits… the scary part is that I recognized the circuit in the first picture fromĀ  25 years ago. The LM555, aka “the triple-five-timer”, is just about every electronics hobbyist’s first exposure to integrate circuits. He’s even got the color codes on the resistors pretty reasonable (two 100K resistors and one 330ohm resistor and 0.1uF capacitors). Oh I feel so nerdy :).


If like me you’ve been desperately searching everywhere on how to get BSNL EDGE working, here it is:

First sign up for the service. This can be done over SMS. If you have a prepaid service, send an SMS to 53733 with the message “GPRSPRE”. I have no idea what it is for postpaid (maybe GPRSPOST?). I think it deducts an activation charge of around Rs. 200. After a few hours, you will get a message saying your service is activated. Then configure your phone with the settings below.


The following settings are for the Samsung SGH-J210. This setting works with Opera and the J210’s default browser OpenWave.

Proxy IP: (no proxy)
Proxy Port: (no proxy)
APN: gprssouth.cellone.in
Login ID: 91xxxxxxxxxx
Password: 91xxxxxxxxxx


I found this alternative configuration setting also works, but it works only with OpenWave, not with Opera:

Proxy IP:
Proxy Port: 9401
APN: wapsouth.cellone.in
Login ID: ppp
Password: ppp123

Depending on signal quality (distance from tower) you might not get EDGE speeds, and the connection will downgrade itself to GPRS. On my Samsung J210 a GPRS connection appears as a “G” icon, and EDGE as “E” icon.