Sunday, 22 July 2012

WEEK 4 - 1st Day (15 July 2012 )

Assalamualaikum and Salam satu Malaysia.

Today we learn about PIC complier.

Why use C ?
  • Portable language intended to have minimal modification when transferring to another uC.
  • Easier to understand.
  • Efficiency not efficient for small basic program but very efficient for complicated program.
Basic C structure for PIC

Pro processor directives :

  • calling associated files
  • setting the oscillator files
  • fuse setting for microcontroller
  • function declaration
Main program :

  •  This is where your main program code is written
  • Every program must have a main function
  • Appear only once in a Program
  • May use " void " to indicated that  it does not return any value
  • Classed as a function
Function :

  • The function are the subroutines written to perform certain task and may be called more then once.

No comments:

Post a Comment