ET-AVR Stamp Module and Stamp Board

IndexReturn to index

ET-AVR Stamp Module and Stamp Board

I wanted to try out one of the bigger versions of the AVR family since the smaller ones don't really have that much memory. Unfortunately the bigger ATmega's are only in SMD or PLCC versions and this is not so handy for experiments. So looking around the web I found an ATmega128 stamp with everything on board. For the board they also had a start kit, all very good priced. Of course I had to buy the ISP programmer too, since it fits with the AVR stamp.

3 weeks later the package arrived and the content was all very secure wrapped up. Together with the board I also ordered an KS0108/KS0107 compatible 128x64 LCD display. This display is blue with white pixels with build in background light (Led). After I wanted to hook up the LCD screen to the on board LCD connecter I discovered that it only supports 4 bit screens, while the KS0108 is a 8 bits screen.I solved the problem to use the Port C as the data port for the display and the LCD port for the control signals. Check out the diagram.

Assembly of the LCD screen to the AVR board.

Next fase is to find some software for the AVR processor that can control the display. I found a workable driver in the Procyon AVRlib from Pascal Stang. Extract the files and make a new project with AVR studio. Make sure that Avrstudio can find the include files from the new library and that the following files are added into the project.

Edit ks0108conf.h and change the values to the list below

#define GLCD_CTRL_PORT PORTE // PORT for LCD control signals
#define GLCD_CTRL_DDR DDRE // DDR register of LCD_CTRL_PORT
#define GLCD_CTRL_RS PE2 // pin for LCD Register Select
#define GLCD_CTRL_RW PE3 // pin for LCD Read/Write
#define GLCD_CTRL_E PE4 // pin for LCD Enable
#define GLCD_CTRL_CS0 PE5 // pin for LCD Controller 0 Chip Select
#define GLCD_CTRL_CS1 PE6 // pin for LCD Controller 1 Chip Select(*)
#define GLCD_CTRL_CS2 PE7 // pin for LCD Controller 2 Chip Select(*)
#define GLCD_CTRL_CS3 PE7 // pin for LCD Controller 3 Chip Select(*)
#define GLCD_CTRL_RESET PE7 // pin for LCD Reset
#define GLCD_DATA_PORT PORTC // PORT for LCD data signals
#define GLCD_DATA_DDR DDRC // DDR register of LCD_DATA_PORT
#define GLCD_DATA_PIN PINC // PIN register of LCD_DATA_PORT

In global.h the speed of the AVR processor needs to be change to 16 Mhz.Compile the program and use Ponyprog to upload the program to the chip. If you did everything right you should see something like this

Of course our board doesn't have any buttons connected to Port A, so there is nothing we can press, but we know our screen is functioning.

IndexReturn to index

AVR
AVR
[ Join Now | Ring Hub | Random | << Prev | Next >> ]
Embedded Technology
Embedded Technology
[ Join Now | Ring Hub | Random | << Prev | Next >> ]

This site is brought to you by the "slug".