PIC16F886 not running.


Results 1 to 20 of 20

Threaded View

  1. #15
    Join Date
    Jan 2015
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: PIC16F886 not running.

    YEAH!!!, almost.....
    The config statement helped a bit, now the LEDs on PORTC blinks. But nothing on PORTB.
    I set MCLRE_OFF instead of MCLRE_ON and now I even can have the programmer connected and the chip works.
    I have a pull-up resistor on MCLR also, but it works without it too. And current limiting resistors on the LEDs.
    Now all I want is to get PORB to blink, then im up and running. I really want to migrate to PBP. GCB was great, but a little too many bugs for me.

    PORTB.6 and PROB.7 is always connected to the programmer circuit (a homemade AN589 programmer).

    The thing is that when I used the original circuit and wrote the code in GCB, everything worked...

    New code...
    _______________________________________
    #config
    __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
    #endconfig

    DEFINE OSC 4

    OSCCON = %01100001

    PORTB = 0
    PORTC = 1
    TRISB = %00000000
    TRISC = %00000000

    ADCON0 = %00000000

    ANSEL = %00000000 ' Make AN0-AN7 digital
    ANSELH= %00000000 ' Make AN8-AN13 digital

    WHILE 1
    TOGGLE PortB.0

    toggle portc.0
    toggle portc.1


    pause 300 ' just to see something ...
    WEND

    END
    _____________________________
    Last edited by Lilleljung; - 6th January 2015 at 10:19.

Similar Threads

  1. Replies: 8
    Last Post: - 28th January 2014, 14:21
  2. Config problem PIC16F886
    By Bosse in forum mel PIC BASIC Pro
    Replies: 55
    Last Post: - 2nd January 2014, 06:24
  3. pic16f886
    By NURULHAIZA in forum General
    Replies: 5
    Last Post: - 21st May 2010, 08:09
  4. PIC16F886 Register Settings
    By aherrera in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th July 2009, 17:52
  5. Pic16f886
    By Larry in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th October 2008, 22:40

Members who have read this thread : 1

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