PIC 16F1613 progam not working


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2025
    Posts
    1

    Default PIC 16F1613 progam not working

    I am new to PICS. I am using MPLAB with a PICKT 3 programmer. I have wrote a simple program to blink a LED, it complies OK and appears to successfully load to my PIC. The LED comes on but does to blink. It appears to me that the program is not stepping through. I would appreciate some help please. This is my code while(1)
    LATAbits.LATA4=1;
    _delay(1000000);
    LATAbits.LATA4=0;
    _delay(1000000);

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,641


    Did you find this post helpful? Yes | No

    Default Re: PIC 16F1613 progam not working

    Did you see here it is PicBasic pro forum ???

    I bet you didn't ...

    Looks to be written with XC8, the C compiler from Microchip ...

    Am I right ?

    One sure thing: LOTS are missing ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,624


    Did you find this post helpful? Yes | No

    Default Re: PIC 16F1613 progam not working

    maybe you mean

    while(1){
    LATAbits.LATA4=1;
    _delay(1000000);
    LATAbits.LATA4=0;
    _delay(1000000);
    }

    while(1)
    LATAbits.LATA4=1;
    _delay(1000000);
    LATAbits.LATA4=0;
    _delay(1000000);

    would not compile

    and

    while(1);
    LATAbits.LATA4=1;
    _delay(1000000);
    LATAbits.LATA4=0;
    _delay(1000000);
    would stop pgm in its tracks at the while
    Warning I'm not a teacher

Similar Threads

  1. Unchanged progam does not compile today??
    By Gerald in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 29th March 2023, 06:11
  2. Working PIC with Frequencies
    By camilollanom in forum General
    Replies: 6
    Last Post: - 5th April 2011, 18:04
  3. Pic 16 F628A not working
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th March 2009, 13:26
  4. PIC to PC not working
    By The Master in forum Serial
    Replies: 5
    Last Post: - 30th October 2007, 05:34
  5. Stop the pic working
    By sgufa in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 9th July 2007, 01:38

Members who have read this thread : 6

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts