Counting the Unique Elements in a MATLAB Array

November 12th, 2011

I was looking for a way to count the number of unique values of an array as part of an assignment. Google turned up with some ideas, but no definite answers. Then I came to know of two functions unique and histc. Here is the code to count the unique elements

Read the full content

Return of the blogger

October 21st, 2011

My, my !! How time flies. I was a college graduate, awaiting a fulltime job to “polish and build upon my skills” (or whatever it is in your resume!) when I began this blog. I guess, I posted regularly for about a month or two, before vanishing from the screen.

Read the full content

Getting the ATmega8 to run our Program

July 29th, 2009

We saw in our earlier posts, how to wire up the programmer and how to write a C Program. Now, let us see how to compile and download the program onto the device. gcc, as most of you may know, is a cross compiler. A cross compiler is usually used for off target compiling. Thus, a program can be compiled by gcc targeting any platform, not just the host platform. In short, eventhough gcc runs and compiles on a PC, it can be asked to compile for ATmega8. Thus, effectively, we can generate a hex file readable by the device; but not by the PC.

Read the full content

A 101 on avr-gcc

July 25th, 2009

The GNU/Linux offers a plethora of tools to program the ATmega8 efficiently and quickly. avr-gcc provides a port of the popular gcc compiler. This enables a newbie with basic knowledge in C to program the controller easily without the hassle of learning assembly instructions. Moreover, programming the controller in a middle-level language as opposed to assembly gives higher command over the code, but at a higher program size.

Read the full content

Programming ATmega8

July 24th, 2009

Its been almost a month since I last visited the ATmega8 I bought the other day. Yet, there it was sitting nicely beneath my PC stand, a bit dusty though. With renewed interest and vigor, I rebooted my attempts. This time, I was ready with all the required components. I left you in the previous article stating that I wired up the programming circuit; but I failed to mention the circuit used. Without further ado, here’s my programmer circuit.

Read the full content

Eclipse

July 21st, 2009

As even the most ignorant, illiterate creature may have known by now, we have a solar eclipse coming up tomorrow morning. The eclipse will begin in India from approximately, 05:31:13.6 AM and will last upto 07:14:12.6 AM. As we all know, the eclipse is making a buzz around the country; but we, keralites are not so lucky.

Read the full content

Where was I ?

July 20th, 2009

I think I owe my readers an apology. I was completely, totally absent for about a month in blogosphere and partially in twitterverse. There were abrupt and sometimes odd tweets flying apart from me. And, obviously, something big was happening. It has passed and I am back.

Read the full content

Beginning the ATmega8

June 22nd, 2009

ATmega8The other day, I decided it was time enough that I loitered around, doing nothing to improve my knowledge or skills at what I am supposed to be good at, Electronics. Oh, well, thats what the world supposes you to be, right ? You know, after getting a B.Tech degree in Electronics, you should at the very least be able to implement a comparator properly. I can, and I have. But thats not the point. I’ve done nothing related to electronics after I completed my degree. So, on the day of WordPress disaster, I bought all the components required to make my perfect dream.

Read the full content

A Day without WordPress

June 21st, 2009

Blank DocumentSometimes the most unfortunate of the events fall upon at the most ill deserved of the times. Frustrated with the waiting, I set out on a maiden voyage to brush up my skills as an Electronics Engineer and pick up quite a few new things along the way. Except for the fact that I had to wait at Kerala Electronics, Trichur for almost a full hour to buy the components during which time, I heard enough of the old Trichur slang, the purchase was fruitful. I even got to spend some quality time over a juice of fresh pineapple with an old, close friend of mine.

Read the full content

Packing and Unpacking in Perl

June 19th, 2009

This post is more to serve as a reminder to myself. Perl has a handy keyword called pack which helps to store a variable in the template specified. pack thus takes two arguments. The first argument is the template and the second argument is the string to be packed according to the template.

Read the full content