Circuit Negma

C++, C, VB.NET, PCB, Electronics, Circuit Design

PIC18F4520 :: Pyramid Animation [Part 1]

Posted by Circuit Negma on January 15, 2010


Created By: Hussein Nosair

The following is an animation of a costumed characters that make up the shape of pyramid.

Custom characters array:

   1: const unsigned char p2[8][8] = {{0,0,0,0,0,0,0,0x1F},

   2:                                  {0,0,0,0,0,0,0x1F,0x1F},

   3:                                  {0,0,0,0,0,0x1F,0x1F,0x1F},

   4:                                  {0,0,0,0,0x1F,0x1F,0x1F,0x1F},

   5:                                  {0,0,0,0x1F,0x1F,0x1F,0x1F,0x1F},

   6:                                  {0,0,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F},

   7:                                  {0,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F},

   8:                                  {0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F}};

Final Result of Pyramid:

Project Description:

This project will attempt to accomplish the following:

1. Utilize the LCD abilities of creating Custom Characters to build a customized Pyramid.

2. Create a code that will animate the custom characters

3. Move the animation across all 4 lines of the 20×4 LCD module.

Hardware:

1. uC : PIC18F4520 @ Microchip

2. External Clock (Oscillator) : 10MHz

3. Internal Clock (Oscillator) : 40MHz

4. LCD : 20×4 HDM20416L-1-YA0S

Software:

1. Editor IDE : MPLAB IDE v8.40

2. Compiler : MPLAB C18 v3.34

3. Internal clock is set to 4xPLL = 4×10MHz = 40MHz

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: