Compile 16f629


Closed Thread
Results 1 to 12 of 12

Thread: Compile 16f629

  1. #1
    MICOCALI's Avatar
    MICOCALI Guest

    Default Compile 16f629

    i HAVE THIS PROBLEM

    DEFINE OSC 4

    ADCON1 = 7

    F VAR WORD



    LOOP:
    Count GPIO.5,1756,F
    IF F>1400 Then OK

    GoTo LOOP
    OK:
    High GPIO.4
    Pause 2000
    Low GPIO.4
    Pause 20000
    GoTo LOOP



    End
    i COMPILE THIS TEXT BUT THE COMPILER RESPOND WITH MOST ERROR WY?????????? FOR PIC 12F629

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    GPIO is used for 12 series PICs not for 16 series.

    There is no GPIO Port on a 16F629... go look in the Datasheet, come back and tell us what Port and Pin you're using.

    Also, 4MHz is the PICBasic default, and you don't actually need the DEFINE OSC 4 statement for this PIC.

  3. #3
    MICOCALI's Avatar
    MICOCALI Guest


    Did you find this post helpful? Yes | No

    Default

    the pic is 12F629

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Check what your compiler errors are telling you... if you don't tell us, we can only guess...

    For a start there is no ADCON1 register in a 12F629.

  5. #5
    MICOCALI's Avatar
    MICOCALI Guest


    Did you find this post helpful? Yes | No

    Default

    DEFINE OSC 4

    ADCON1 = 7

    F VAR WORD


    LOOP:
    Count GPIO.5,1756,F
    IF F>1400 Then OK

    GoTo LOOP
    OK:
    High GPIO.4
    Pause 2000
    Low GPIO.4
    Pause 20000
    GoTo LOOP

    End

    FOR 12F629

    THI IS ERROR

  6. #6
    MICOCALI's Avatar
    MICOCALI Guest


    Did you find this post helpful? Yes | No

    Default

    ERROR
    Attached Images Attached Images  

  7. #7
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    There is NOTHING WRONG with your posted code EXCEPT you shouldn't have ADCON1 in it. The compiler flags FIVE errors all to do with ADCON1 - and that should immediately cause to you think that there is a problem there. I refer you to the 12F629 Datasheet.

    If you are having other errors, then perhaps you should tell us what they are. You might be using the wrong line to compile, or a compiler that doesn't support that device. A statement that says "THIS IS ERROR" doesn't excatly tell us much.

  8. #8
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I do hope you haven't called your sample program 12F629.BAS and put it in your PBP directory. You would have destroyed the PBP support file with the same name.

  9. #9
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    H:\DATA-R~1\PIC\PBP244>pbp -p12f629 zd
    PicBasic Pro Compiler 2.44, (c) 1998, 2003 microEngineering Labs, Inc.
    All Rights Reserved.
    PM Assembler 4.06, Copyright (c) 1995, 2003 microEngineering Labs, Inc.
    Error H:\DATA-R~1\PIC\PBP244\ZD.ASM 44 : [225] Undefined Symbol 'ADCON1'
    Error H:\DATA-R~1\PIC\PBP244\ZD.ASM 44 : [225] Undefined Symbol 'ADCON1'
    Error H:\DATA-R~1\PIC\PBP244\ZD.ASM 44 : [225] Undefined Symbol 'ADCON1'
    Error H:\DATA-R~1\PIC\PBP244\ZD.ASM 44 : [225] Undefined Symbol 'ADCON1'
    Error H:\DATA-R~1\PIC\PBP244\ZD.ASM 44 : [225] Undefined Symbol 'ADCON1'
    *** 5 Errors ***

    H:\DATA-R~1\PIC\PBP244>

    zd.bas is the source file I pasted your code into.

  10. #10
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Unable to open PBPMAC.INC is also a clue...

    You either have PBP support files missing, corrupted (or overwritten as in my previous posting) or an incorrect PATH to your PBP directory.

  11. #11
    MICOCALI's Avatar
    MICOCALI Guest


    Did you find this post helpful? Yes | No

    Default

    I HAVE COMPILE THE FILE FOR PIC 12F675 AND ALL OK I WILL START THIS HEX FILE INTO 12F629 ? WY WITH 12F629 THE COMPILER SEND MOST ERROR AND WITH 12F675 NO ERROR?

  12. #12
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Micocali,

    M>WY WITH 12F629 THE COMPILER SEND MOST ERROR AND WITH 12F675 NO ERROR?<<

    As Melanie said before, the 12F675 is completely different that the 12F629.

    the 629 doesn't use ADCON1

    Each chip is different...just because they show two or three different chips for one data sheet, does not mean they are "compatible". It means the basics of the layout is the same, and one may have different amounds of RAM, ROM, and other charactoristics.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

Similar Threads

  1. Unable to pass a variable to LCDOUT without getting compile errors
    By Ferroto Baggins in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th February 2010, 16:43
  2. Compile and Program help using PICKit2
    By ozarkshermit in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th March 2009, 14:51
  3. USB PBPL Compile errors
    By Rob in forum USB
    Replies: 11
    Last Post: - 7th April 2008, 08:18
  4. Cannot compile for 40MHz 4 x pll
    By passion1 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 21st October 2007, 17:50
  5. Replies: 2
    Last Post: - 9th February 2006, 22:03

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