introduction to using mplab and hi tide n.
Download
Skip this Video
Download Presentation
Introduction to Using MPLAB and Hi-tide

Loading in 2 Seconds...

play fullscreen
1 / 11

Introduction to Using MPLAB and Hi-tide - PowerPoint PPT Presentation


  • 87 Views
  • Uploaded on

Introduction to Using MPLAB and Hi-tide. Group #9 Jose Alex Mike Roberto Goto http://www.alexhan.net/senior.html and print the file. Purpose of Programs. Cgywin is to emulate Linux to run the other programs

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Introduction to Using MPLAB and Hi-tide' - perrin


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction to using mplab and hi tide

Introduction to Using MPLAB and Hi-tide

Group #9

Jose Alex

Mike Roberto

Goto http://www.alexhan.net/senior.html and print the file

purpose of programs
Purpose of Programs
  • Cgywin is to emulate Linux to run the other programs
  • Picc lite and Hi-tide are the environment to write your code for programming the microcontroller and converts to Hex
  • MPLAB is software that allows the codes to be transferred to the microcontroller
program code
Program Code
  • Motor Control
  • IR Sensor
  • Key Debouncer
led on
LED On

#include "init.h"// included by C-Wiz

#include <htc.h>

void

main(void)

{

init();// Function call inserted by C-Wiz

while (1){

RA0=1;

//TODO Auto-generated main function

}

}

led flashing 5 sec
LED flashing 5 sec

int i,k;

void

main(void)

{

init();// Function call inserted by C-Wiz

while (1){

k=0;

while (k<1000){

i=0;

k++;

while (i<1500){

i++;}

}

RA0=RA0^1;

}

}

led flashing w interrupts
LED Flashing w / Interrupts

// Interrupt service routines

#include <htc.h>

externint k;

void interrupt my_isr(void){

/***** Timer 1 Code *****/

if((TMR1IE)&&(TMR1IF)){

if(k>50)

{

k=0;

RA0=RA0^1;

}

else

k++;

TMR1IF=0;// clear event flag

}

}

conflict with loop
Conflict With Loop

5 Second LED flip-flop

And Key Debouncer running in main.c

key debouncer
Key Debouncer

i = 0; // Wait 20 ms for Button Down

while (i < Twentyms)

if (1 == RA3) // Button Up / Start over

i = 0;

else // Button Down /Increment Count

i = i + 1;

motor control
Motor Control

main(void)

{

init();// Function call inserted by C-Wiz

while (1){

RA0=RA0^1;

i=0;

while(i<10)

{

i++;

k=0;

while(k<3000)

{k++;}}

//CCPR1L= 0b01111111;

A=A+1;

CCPR2L= A;

if(CCPR2L==0XFF)

CCPR1L=~CCPR1L;

ir sensor
IR Sensor

#include "init.h"// included by C-Wiz

#include <htc.h>

void

main(void)

{

init();// Function call inserted by C-Wiz

while (1){

if(RB2==1)

RA0=0;

else

RA0=1;

//TODO Auto-generated main function

}

}

the end
The End

Thanks Ya’ll

Email or get in touch with us for more information or questions.

ad