Beginning the ATmega8
The 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.
A line following bot. Before you shun away, let me tell you. A full fledged line follower embodies true spirit of ingenuity and engineering. A true follower is small, agile and does the job clean and fast. I decided to implement one similar to ChaN’s. For a starter, I am not going to make my bot that small, but I wanted to implement the PI(D) controls that he used. I was never really into control systems, and this I believe is a great way to learn more on the topic.
Since I am doing a fast line follower, there should be microcontroller at the helm to do the job. During my engineering life, I have used a lot of 8051s and Microchip’s PIC. I am more familiar with the PIC controller, since I had been using it for almost two years now. The ideal engineer in me found this as the perfect way to do some bit of research. And I needed to setup GNU/Linux as my platform to develop the bot. Thus the equation GNU/Linux + Low Cost resulted in me selecting the AVR’s famed and praised ATmega8.
I was surprised to learn that Kerala Electricals, Trichur had been offering ATmega line of controllers for a long time. I never found the controller at Ronnie Electronics, M.G. Road, Ernakulam. I first needed to setup the toolchain to program the controller with. This excellent article by the Linux Guru Pramod C.E., former alumini of my college and lecturer at Govt. Engineering College, Trichur helped me a lot. I hit a snag when I was compiling the gcc-3.4.2 package. The avr archiver, avr-ar form binutils package would run, but report a buffer overflow error. Finding no help from forums and user groups, I called up Pramode Sir himself and I was slapped in the face. I mean, not literally, but figuratively speaking.
The toolchain was all the time residing in Ubuntu repos. It was just an apt-get install avr-gcc away. I installed avrlibc, and uisp the same away. With the tools ready, I needed the ATmega8 to do the testing. Away I went to Trichur. Two relatively short bus rides and the hellish long wait of my life, I was back home with the prized ATmega in my hand. Dusted up an old breadboard and wired up the circuit. The soldering iron I have at home is an ancient one. So special care had to be taken while soldering the DB25 connector. I needed to solder properly and at the same time, protect myself from electric shocks and burns.
Related
Comments
Leave a Reply
Part 1 | Wiring up the Hardware Programmer | | Over a Cup of Koffee on 07.24.2009
[...] 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 [...]
Saji on 09.23.2009
How much does the atmega8 cost in Kerala?
Do you know of any other place that stocks controllers?
If you could post the telephone number of the place you bought it from, that would be awesome.