0% found this document useful (0 votes)
58 views2 pages

MPLAB Tutorial - Hi-Tech C Programming (Programming A Microcontroller)

This document provides instructions for programming a microcontroller using MPLAB IDE and Hi-Tech C. It outlines the steps to open MPLAB IDE, create a new project for a PIC16F877 microcontroller using the Hi-Tech C compiler, add and build a sample C program that toggles an output pin, and program the microcontroller using a PICKit 2 programmer. The 15 step process guides the user through configuring the development environment, writing code, and programming a device.

Uploaded by

Eduardo Zimmer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views2 pages

MPLAB Tutorial - Hi-Tech C Programming (Programming A Microcontroller)

This document provides instructions for programming a microcontroller using MPLAB IDE and Hi-Tech C. It outlines the steps to open MPLAB IDE, create a new project for a PIC16F877 microcontroller using the Hi-Tech C compiler, add and build a sample C program that toggles an output pin, and program the microcontroller using a PICKit 2 programmer. The 15 step process guides the user through configuring the development environment, writing code, and programming a device.

Uploaded by

Eduardo Zimmer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

MPLAB Tutorial – Hi-Tech C Programming (Programming a microcontroller)

1. Open MPLAB IDE by selecting [Start -> All Toolsuite’, check the checkbox ‘Show all
Programs -> Microchip -> MPLAB IDE v8.70 -> installed toolsuites in the bottom right).
MPLAB IDE]
2. In the MPLAB IDE toolbar, select [Project ->
Project Wizard...]

6. Use the [Browse] button and navigate to a


new folder to store this project and click
[Next>] to continue
3. Click [Next>] to proceed at Welcome dialog
box

7. Click [Finish] to exit the Project Wizard


4. Select the [PIC16F877] from the Device
menu and click [Next>] to continue

5. Select the [HI TECH Universal 8. The MPLAB IDE Workspace should now be
ToolSuite] from the Active Toolsuite drop open.
down menu and click [Next>] to continue (If
‘Hi-TECH Universal Toolsuite’ is not in the ‘Active

Tutor: Latha Karthigaa Murugesan Page 1


9. Create a C file. File -> New. New file would 12. Connect the microcontroller kit to the
open. Save the file as sample.c computer using USB cable and connect the
10. Type the following program in the new file programmer to the kit.
and save it.
13. Click Programmer -> Select Programmer ->
PICKit 2
#include <htc.h>
__CONFIG (LVP_OFF & WDTE_OFF & CP_OFF &
MCLRE_OFF);
//__CONFIG (LVPDIS & WDTDIS & UNPROTECT &
MCLRDIS);
void main ()
{
 ANSEL= 0x0; 
 ANSELH= 0x0;
 TRISB= 0x0;
 PORTB= ~0b11111111; 
}

11. In the configure window, right click ‘Source


Files’ -> ‘Add Files…’ and add the file sample.c 14. Click to build the project.
15. Click the button marked below to write the
program on to the device. Output could be viewed
in the microcontroller kit.

Tutor: Latha Karthigaa Murugesan Page 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy