Sunday, 12 August 2012

Internet Connection Task

12 August 2012 

Assalamualaikum..


The new task is me and team member must do the connection of the keypad 4X3.
The 4x3 keypad connection also must be program with pic 16f877 to work with EM lock
for the door lock application.


As a leader, me give every person with the small task such as , faris go look for the connection of the keypad and hanif works on the EM lock working and the additional required component

to be work.

 As usually, the internet is the one of my group reference.

Firstly , we works on the basic coding of pic 16f877.


////////////The main header coding ////////
#include <16F877.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)

#include <lcd.c>                            ///////The function include /////
#include <kbd.c>                           ///////The function include /////

void main() {
   char k;

   lcd_init();                                     //////function calling//////
   kbd_init();                                   //////function  calling/////

   lcd_putc("\fReady...\n");              /////lcd on/////
//////main function///////
   while (TRUE) {
      k=kbd_getc();
      if(k!=0)
        if(k=='*')
          lcd_putc('\f');
        else
          lcd_putc(k);
   }
}

The step of the coding is the more important to know before get more on the hard coding because "Every Cloud Has A Silver Lining".  Although this must be have a practice and will became an easy.




No comments:

Post a Comment