Thursday, June 12, 2008

Home

SIMPLE LCD USAGE THROUGH PIC C

PIC C is a c compiler for pic microcontrollers (described earlier for my iROOM)

Here is a simple "hello world" fprogram for the pic 16f877A

#include <16f877a.h> //Must be included
#use delay(clock=16000000) //for specifying the clock frequency in Hz

#include


void main()
{
lcd_init();


/*******************************************************************************/
//PRINTING "HELLO WORLD" IN LCD
/*******************************************************************************/


lcd_putc("\f HELLO WORLD \n");




// \f Clear display
// \n Go to start of second line
// \b Move back one position


}

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


-->

StatCount - Traffic counter

Add to Technorati Favorites