www.eXtremeElectronics.co.in

Writing Your Name In LCD.

xBoard MINI v2.0

Easy to Use learning and development tool for Atmel AVR family of MCUs.

 

<< Return To Help Index

This is a very exciting project for a very beginner. Here I will show you how easy it is to do things with the xAPI and the xBoard. I will show you how to write your name in the inbuilt LCD module.

Pre Requirement.

  1. Knowledge of the parts of xBoard MINI.
  2. You must know how to upload a HEX file to the board.
  3. AVR Studio Must be installed.
  4. WinAVR must be installed.
  5. Basic Knowledge of working with AVR Studio.

Lets Do it !

Step I : Create a New AVR Studio Project, name it "Name".

Step II: Copy the following files from the Folder LCD inside the folder xAPI on Support Disk.

lcd.c,lcd.h,myutils.h

Place them in the new project folder.

Step III: Now add the files you just copied to your project. In the left part of AVR Studio there is the Project display.

Adding a Source file to project.

Right Click On the Source File And Select Add Existing Source File(s) ... Option and select the lcd.c file.

Similarly add "lcd.h" and "myutils.h" in the Header File Section.

Step IV: Open the file "Name.c" (created automatically by AVR Studio), this file should be blank. Now type the following program in it.


/*

             Simple Program to write your name in LCD

*/

#include "lcd.h"

void main()
{
   //Initialize the LCD Module.
   //This line is required in all application that uses LCD
   LCDInit(LS_BLINK|LS_ULINE);

   //Clear the Screen.

   LCDClear();

   //Write Your Name
   LCDWriteString("Avinash Gupta"); //  <-Put your name here
}

Just replace the name "Avinash Gupta" by your name!

Configure the project for the IC ATmega8 and CPU speed as 16000000Hz as described here. Note if your board is based on ATmega168 select that in place of ATmega8.

Now Compile the code. If every thing was all right you will get the "Name.HEX" file. Where this HEX file is located? Find Out here.

Program the HEX file to the board using the steps described here.

Now you can see your name in the LCD Module.

Note:

Your Name on LCD !

 

<< Return To Help Index