EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
You are here: Home / Topics / Hello, I am using PIC18F4550, PIC18F452 how to program a simple blinking LED please tell me any one……

Hello, I am using PIC18F4550, PIC18F452 how to program a simple blinking LED please tell me any one……

|

Microcontroller › PIC › Hello, I am using PIC18F4550, PIC18F452 how to program a simple blinking LED please tell me any one……

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 7 months ago by AJISH ALFRED.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 25, 2012 at 5:33 am #2035
    P.Maaligai Parai Karuppa Samy
    Participant

    which IDE has choose to use very simple PIC program …..method 

     

    but i am using MPLAB, HITECH compiler…

     

     

    please tell me… any one i am wait for u r reply 

     

     

     

    January 3, 2013 at 5:03 pm #8898
    AJISH ALFRED
    Participant

    Hi,

    I think MPLAB itself is the best IDE for beginners.

    January 3, 2013 at 5:35 pm #8901
    P.Maaligai Parai Karuppa Samy
    Participant

    thank u for u r reply 

     

    please post 18f4550 PIC simple led blinking program…

    and how to connect the hardware connection….

    January 10, 2013 at 3:20 pm #8928
    AJISH ALFRED
    Participant
    #include <p18f4550.h>
    #include <delays.h>

    #pragma config FOSC = INTOSCIO_EC //Internal oscillator, port function on RA6, EC used by USB
    #pragma config WDT = OFF //Disable watchdog timer

    #define LEDPin LATDbits.LATD1 //Define LEDPin as PORT D Pin 1
    #define LEDTris TRISDbits.TRISD1 //Define LEDTris as TRISD Pin 1

    void main()
    {
    LEDTris = 0;//Set LED Pin data direction to OUTPUT
    LEDPin = 1;//Set LED Pin

    while(1)
    {
    LEDPin = ~LEDPin;//Toggle LED Pin
    Delay10KTCYx(25);//Delay 250K cycles (1 second at 1MHz since each instruction takes 4 cycles)
    }

    }


    Connect an LED in series with a resitor towards ground from the pin number 1
    of the port D of the PIC.

     

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Can I use an SPDT 5 wire Relay in reverse? August 9, 2022
  • Basic questions about MOSFETS, Gate Drivers and Diodes August 9, 2022
  • LTSpice DC-AC August 9, 2022
  • Circuit Problem August 8, 2022
  • Google translate suggest "device sheet" or "apparatus sheet" but that cannot be ? August 8, 2022

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools