12629 ?'s


Closed Thread
Results 1 to 6 of 6

Thread: 12629 ?'s

  1. #1
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96

    Default 12629 ?'s

    Hello, before you turn your nose at my silly question, please know that I have read the manual several times and searched and searched the forum before asking my question.

    that said.....

    Why is only one of my GPIO's working??

    I am attempting to use the internal oscillator without using CMCON register.

    Are my fuse settings wrong?

    Code:
    'DEFINE OSCCAL_1K 1
    'DEFINE OSC 4
    CMCON = 7
    TRISIO = %000000
    
    MAIN:
    PAUSE 200
    HIGH GPIO.0
    HIGH GPIO.1
    HIGH GPIO.2
    HIGH GPIO.3
    PAUSE 200
    LOW GPIO.0
    LOW GPIO.1
    LOW GPIO.2
    LOW GPIO.3
    GOTO MAIN
    GPIO.0 is the only one that blinks...The timing looks right but no output from any of the other pins with my scope.

    You can see that I have commented out the OSCCAL lines for now, I am not sure if it is necessary to mess with the RC oscillator settings or not???

    The data sheet says the chipset comes with a .....

    "Precision Internal 4 MHz oscillator factory calibrated to ±1%"

    Does this mean it is an RC oscillator???

    I have selected the following drop down under OSCILLATOR [INTOSC IOGP4 IOGP5]

    Is this wrong?

    I know this chipset gets alot of the same questions about it, I just hope I have asked some new ones...
    Padawan-78

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by earltyso View Post
    Are my fuse settings wrong?
    There are no fuse settings in your code...
    Therefore, GPIO4 and 5 might be being being used by the external crystal, which if you don't have one attached, the program won't run unless it is in fact being run by an internal clock. But you said that GPIO.0 blinks, so it must be running from something.

    GPIO.3 is input only...Can't get an output on that even if everything was correct. (HINT: look at the little arrows on the pins in the datasheet.)

    The data sheet says the chipset comes with a .....
    "Precision Internal 4 MHz oscillator factory calibrated to ±1%"
    Does this mean it is an RC oscillator???
    No, it means exactly what it says. The PIC contains an internal 4Mhz +/-1% internal oscillator, not an external R/C oscillator.

    GPIO.1 and .2 are comparator inputs, but you've set CMCON to the right value...

    Are you sure you are actually compiled/assembling the correct file? And actually programming a new file each time you reprogram the chip instead of an older file from way back when?

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by earltyso View Post

    Are my fuse settings wrong?
    You have not posted any. Datasheet says you must configure the ANSEL or no Digital I/O, try ANSEL = 0
    EDIT: Darn Skimask, I'm going to start calling you Quick Draw.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Got it figured out,
    just a wrong fuse setting in my K-149 drop down menu.
    I have never tried including fuses in my code as I have always had this option in my GUI, could someone give me a tutorial on say a PIC12F629 OR 16F628A?
    Padawan-78

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Also,

    GP3 is INPUT ONLY.
    HIGH GPIO.3 won't work.
    <br>
    EDIT: Dang it, skimask already said that.
    go back to sleep darrel.
    Last edited by Darrel Taylor; - 8th August 2008 at 23:15. Reason: skimask
    DT

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