AVR Programmer pin configuration and AVRDude and Atmel Studio

Programmer Pin Diagram and Configuration

This post is more for me to remember and access easily in the future since I’ve spent a considerable amount of time doing this (for the second time!).

I have 2 AVR programmers and after a lot of trial and error, I realised that the pinout is different for each of them. Also, the datasheets for both the programmers are hopelessly unclear and show the pinout for the pins on the programmer. When you plug in a ribbon cable and turn it around to face you, the pin configuration becomes a mirror image and it’s quite taxing on the brain to correlate the pin config from the board to the cable. Hence the images below for reference!

Continue reading

Intro – Getting started with a 128×64 Graphics LCD Display

This is going to be a mini-series on how to get started with a 128×64 LCD display. I’ll be going through all the steps that are involved in getting one of these damned things to work and I’ll post links and references wherever necessary.

“But”, you argue, “why do I need to learn this stuff? I can just whip out my Arduino and use the GLCD library and be just as cool!” Well, definitely. The purpose of doing this is not to be “cool”, but to gain an understanding into how this works and what kinds of problems you may face when working on something like this.

I won’t go too much into the pros and cons of which is a better approach. Obviously, libraries are there for a reason and if you’re using a specific development platform/board (Arduino, EasyPic) or a specific compiler for a certain project (AVR-GCC, MikroC, XC8) and you’re on a deadline and have a fairly straightforward task to accomplish, you should go ahead with that.

On the other hand, if LCD.Write(“Hello, World!”) doesn’t cut it anymore and you want to have complete control on a pixel to pixel basis, and/or be able to churn out your own library for a specific microcontroller that you’re currently using (8051, PIC, AVR, MSP) then you should read these series of posts.

On the whole, I will try to keep this series largely microcontroller agnostic. You should be able to read whatever is given here and transfer the learning to any microcontroller or development platform with a small amount of effort.

But for the sake of demonstration, I will be using a PIC16F886 microcontroller here. I have used both AVR and PIC and they’re both excellent microcontrollers in terms of performance, price and availability. But I’m going with a PIC here because I’m trying to learn more about these microcontrollers.

Here’s the table of contents. I will keep updating the links as I push content out:

  1. Intro – Getting started with a 128×64 Graphics LCD Display
  2. Part 1 – Getting started with a 128×64 Graphics LCD Display – JHD12864E (KS0108 family)
  3. Part 2 – Getting started with a 128×64 Graphics LCD Display – Screen resolution and locating pixels
  4. Part 3 – Getting started with a 128×64 Graphics LCD Display – Passing instructions
  5. Part 4 – Getting started with a 128×64 Graphics LCD Display – Pin configuration
  6. Part 5 – Getting started with a 128×64 Graphics LCD Display – Putting it together
  7. Part 6 – Getting started with a 128×64 Graphics LCD Display – Hello World!
  8. Part 7 – Getting started with a 128×64 Graphics LCD Display – Porting a bitmap to the GLCD
  9. Part 8 – Getting started with a 128×64 Graphics LCD Display – Fonts! Fonts! Fonts!
  10. Part 9 – Getting started with a 128×64 Graphics LCD Display – Pitfalls, debugging and troubleshooting

Android and Arduino Serial Bluetooth App – BlueSerial

I’ve finally been able to figure out the entire Bluetooth API of Android and I felt it was more difficult than writing Arduino code in Assembly. In it’s current avatar, I think it’s ready for a Beta release. Based on the feedback I receive, I’ll make a few changes and release the code and put it on the Android Play Store (for which I still need to register a developer account).

A quick how-to about the app – The app can be used to communicate with serial (RX-TX/UART) bluetooth devices. This largely includes devices that are used to control microcontrollers and other electronic projects which use bluetooth to send and receive information. I developed this app to use with a bluetooth enabled robot that I had been dying to build for quite some time now. I think it’s pretty self-explanatory and if it’s not, then I need to work a bit more on it. Continue reading

LED Sequencing using Arduino Uno

I’ve recently taken an interest in Hobby Electronics after reading a lot about Arduino. Being a software guy, I’ve always had difficulty getting my head around practical electronics. But after searching a bit around, I came across these two lecture series on Youtube:

Jeremy Blum’s Arduino tutorials

Prof. T S Natarajan’s Basic Electronics tutorials

And bit-by-bit I’m able to make sense of electronics.

Anyways, the best part of Arduino is that is very programmer friendly. Easier to program all this stuff than to do it using hardware components. Here’s a video of LED Sequencing using Arduino Uno. It consists of 12 LEDs connected to 1K/220 Ohm resistors to pins 1-12 on the Arduino. Setting up the breadboard and connections is very straightforward.

You can download the Arduino source code from here: View/Download code for LED Sequencing