KiCAD – Creating a custom component with the same name as an existing component

Short Answer – change the name to be unique!

Long Answer – I was creating my own version of the 74HC595 shift register in KiCad and named it exactly that. When adding it to my own library, and using it in my schema, it kept showing me the stock version. So the fix to this was to right-click on the name in the component editor and change it to something else – “MY74HC595” and save. Hey presto! Problem solved 🙂

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

Part 4 – Getting started with a 128×64 Graphics LCD Display – Pin configuration

In the previous part, we saw how to instruction set works and how the different pins fit together to make the GLCD work. In this part, we’ll pick a particular microcontroller and try to work out how to configure the pins.

The JHD12864E works in a parallel mode. By parallel, I mean that the data is passed in one shot which is by the data pins D0-D7 on the display. There are other GLCDs which pass data in serial i.e. one instruction at a time. In this case, we don’t need so many pins but there will be other considerations that we will need to … uh … consider.

Continue reading

Part 7 – Getting started with a 128×64 Graphics LCD Display – Porting an image to a 128×64 monochrome display

Now that you’ve got the GLCD up and running and probably tried a few things, you’d like to put a picture of your cat on the display and see if he/she can recognise it right? It’s okay, you can admit it, I’m not judging.

This can be broken down into 2 steps:

1. Convert an existing image into a 1-bit black or white bitmap (BMP) image

2. Convert the bitmap from the previous step into an array for use with your microcontroller

Step 1 – Convert an existing image into a 1-bit black or white bitmap (BMP) image

Continue reading

Part 3 – Getting started with a 128×64 Graphics LCD Display – Passing instructions

This part explains how to pass instructions/commands to the GLCD. On a high level, these are the steps:

  1. Select the GLCD half-section
  2. Put the Enable Pin LOW
  3. Put RS, RW and Data pins HIGH or LOW based on your command
  4. Put the Enable Pin HIGH
  5. Wait 2 milliseconds
  6. Put the Enable Pin LOW
  7. Wait 2 milliseconds
  8. GLCD responds

And you’re done! Easy-peasy!

Well, not quite. Let’s look into each of these steps in a little more detail. Here’s an image from the last part for quick reference:

Continue reading

Part 2 – Getting started with a 128×64 Graphics LCD Display – Screen resolution and locating pixels

The GLCD has a 128×64 resolution. This equals about 8192 individual pixels that you can control as you wish. But how is this done? Let’s see how we reach a particular pixel on the screen.

The LCD screen is actually divided into 2 halves with one KS0108 IC for each half. Each KS0108 IC has the ability to control 64×64 pixels, so both of them side-by-side should be able to give you the complete resolution of 128×64. So, by choosing which one of the two ICs, you can narrow your pixel down to one of the two halves.

Next, each half containing 64×64 pixels has an addressing scheme using the Y address and X address as follows. Lets start with the columns. Each half has 64 columns numbered from 0 to 63. Straightforward enough, not too much to get confused about, each column is addressed using the Y address which ranges from 0 to 63. Continue reading

Part 1 – Getting started with a 128×64 Graphics LCD Display – JHD12864E (KS0108 family)

The GLCD (Graphics LCD) display that I’ll be using in this series is the JHD12864E. Here’s a picture of what it looks like (image stolen from http://extremeelectronics.co.in):

clip_image001

It’s a fairly standard 128×64 pixels display with a backlight. The part number aside, what really matters is the IC driver that is used in this display. The datasheet shows (more on this in a few mins) that it uses the S6B0108 display driver. After looking around on the net, I realised that this is similar to the KS0108 family display driver. So the general method of operation should be similar to the KS0108 but with a few minor differences here and there. Continue reading