Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[Moved] PIC 18F452 and MPLAB

Status
Not open for further replies.

shubham kumar

Member level 3
Joined
Sep 11, 2014
Messages
59
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Location
bangalore
Activity points
511
Please give me any code, any small MPLAB code for PIC18F452.
I am not able to blink a LED in MPLAB whereas I made some programs in MikroC and tested on kit.

May be I did not provided correct configurations or crystal values while creating the new project for PIC18F452.
Any working code (even blink of a led) will be very helpful.
 

Re: PIC 18F452 and MPLAB

Hi,

May be I did not provided correct configurations or crystal values while creating the new project for PIC18F452.
Any working code (even blink of a led) will be very helpful.

So show us what you did so far.
Sw and hw.

Blinking led code should be available, do a google search.

Klaus
 

Re: PIC 18F452 and MPLAB

Here is my code

Code:
#include "system.h"        /* System funct/params, like osc/peripheral config */
#include "schedule.h"
// #include "lcd.h"
#include "display.h"
#include "prim_io.h"
#include "delay.h"

void main(){
int i=5,p=3000 ;
// char ldg[]="MIkrOC",j,txt[16],txt1[16];
    TRISC=0X00;
    PORTC=0X00;
    LATC=0x00;
    
  

        while(1)
        {
        LATC =0xFF;
       DelayMs(100);DelayMs(100);DelayMs(100);DelayMs(100);
       DelayMs(100);DelayMs(100);DelayMs(100);DelayMs(100);
       LATC= 0x00;
       DelayMs(100);DelayMs(100);DelayMs(100);DelayMs(100);
       DelayMs(100);DelayMs(100);DelayMs(100);DelayMs(100);
        }
 
}
 

Re: PIC 18F452 and MPLAB

MPLAB is IDE. Which Compiler are you using ? C18, Hi-Tech PICC18, CCS C, XC8 ? Zip and post your complete MPLAB project files with all the necessary header files used.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top