how to make inputs toggle


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Posts
    23


    Did you find this post helpful? Yes | No

    Red face One more thing

    Steve,
    I have since tried another 12F675 and now I'm really baffled!!
    I thought MPLAB IDE (release 7.51) was supposed to erase a flash chip! In fact, I checked it afterward and it said "chip is blank". Now, I reprogrammed the other one and it still was flashing gpio.0. The new chip (same hex file) flashes gpio.5! Go figure. I haven't a clue.
    Ron

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    In MicroCodeStudio, make sure you have selected MPASM as assembler.

    Now, those
    Code:
    INTRC_OSC_NOCLKOUT
    WDT_ON
    PWRTE_ON
    MCLRE_ON
    BODEN_OFF
    don't do anything else than creating Labels.. to bad. So i guess you got the Overwriting previous... MPASM message right?

    have a look at the following...
    http://www.picbasic.co.uk/forum/show...75&postcount=5
    this will cure the problem

    NOW, if your PIC programmer have erased the OSCCAL value one day or another, your example will NEVER work.. or with some trouble. remove the following
    Code:
    DEFINE OSCAL_1K_1
    Bah.. anyways, you're lucky, the way you wrote it is bad.. hence it do nothing. DEFINE OSCCAL_1K 1

    Using your code with my config fuse line, it's working as it suppose to.

    Last thing, make sure you have a pull-down resistor on GPIO.1.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Toggle command
    By mr.sneezy in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2011, 02:07
  2. How come they make electronics hard as poss
    By George in forum Off Topic
    Replies: 9
    Last Post: - 13th July 2007, 23:54
  3. TOGGLE code space and ICD
    By duncan303 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th October 2006, 16:08
  4. dip switchs & inputs
    By grounded in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th September 2006, 13:37
  5. Using portb as inputs PIC goes crazy
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th November 2005, 14:15

Members who have read this thread : 0

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