Can't get example from melabs to run.

Discussion in 'Embedded Systems and Microcontrollers' started by mikejp56, Oct 9, 2015.

  1. mikejp56

    Thread Starter Member

    Jun 14, 2015
    Hi All,
    I am a brand newbie to PICs as far as software goes, but I have about 30 years experience on the hardware side. I am having a devil of a time just getting an LED to blink with a 16F887. The LED is connected to port D bit 0; pin 19. I am trying to run blinkx.pbp from the melabs website; I have MicroCode Studio 4 with PicBasicPro v2.6 compiler. Here is the code:

    ANSEL = %00000000
    ANSELH= %00000000
    LED var Portd.0
    High LED
    pause 500

    low led
    pause 500

    goto mainloop


    This gives syntax errors on lines 11 and 12 (ANSEL and ANSELH), and a bad data type error on line 13 (LED var Portd.0). I am really buffaloed by these errors. As I said, this example came right off of the microEngineering labs website. Any help would be appreciated.
    Thanks in advance.

    EDIT: Something wacky happened; I needed to uninstall MCS and PBP, and then reinstall them. Everything is now good.
    Last edited: Oct 9, 2015