Menu

Internal Oscillator for a 12F629?

2023-05-02
2023-05-02
  • mikmikmikmik

    mikmikmikmik - 2023-05-02

    Hi, using the older GCB@Syn IDE cos the videos that I am interested in use that.

    I have a PICkit2, haven't used it in many years, or GCBASIC for that matter.

    With the Demo led program, I changed the code to say this at the start.

    CHIP 12f629

    config OSC = INT

    When I make the hex, I get this.

    Compiler Version: 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073 Program Memory: 39/1024 words (3.81%) RAM: 1/64 bytes (1.56%) OSC: INTRC_OSC_NOCLKOUT, 4Mhz (Internal oscillator) Chip: 12F629

    but when I flash, I keep getting this and I don;t know how to change it.

    I have tried using the pickit2 OSCAL and the PICKIT2 in the F4 menu, no difference.

    Compiler Version: 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073 Program Memory: 0/1024 words (0.0%) RAM: 0/64 bytes (0.0%) OSC: , 4Mhz (Clock source is not a primary internal oscillator. Ensure the clock source is correctly setup) Chip: 12F629

    Please tell me what I am doing wrong?

    Thank you.

     

    Last edit: mikmikmikmik 2023-05-02
  • Anobium

    Anobium - 2023-05-02

    I am assuming that you are selected 'Make Hex and Flash' from the IDE.

    Do you have the PICKit attached and the chip recognised? Therefore, can you open the PICKit2 GUI software and does the software find your chip?

     
  • mikmikmikmik

    mikmikmikmik - 2023-05-02

    YES, PICKIT2 is working OK.
    Earlier this morning, the config word was 1FF, but now it is 1D4, with bit 2-0 = 100, which the datasheet says is

    100 = INTOSC oscillator: I/O function on GP4/T1G/OSC2/CLKOUT, I/O function on GP5/T1CKI/OSC1/CLKIN

    But GCBASIC is still saying it is not using the internal OSC when I flash it.

     

    Last edit: mikmikmikmik 2023-05-02
  • Anobium

    Anobium - 2023-05-02

    I think I need to step back to understand.

    but when I flash, I keep getting this and I don;t know how to change it.

    What are you trying to change ? I am guessing the config.

    Have you looked at PICInfo? This will create a valid set of config statements for PICs. PICInfo is available from <f4> menus within GCCode, but, for the old IDE it is in the folder called PICINFO.</f4>

    Example

    #CONFIG CPD=OFF
    #CONFIG MCLRE=OFF
    #CONFIG OSC=INTRC_OSC_CLKOUT
    #CONFIG WDTE=OFF
    #CONFIG CP=OFF
    
     
  • mikmikmikmik

    mikmikmikmik - 2023-05-02

    Even though GC says about that internal oscillator issue on flashing, this program seems to work OK, so the Chip must be using its internal oscillator.

    'This program flashes an LED on GPIO.0 using PulseOut
    #chip 12F629, 4

    'The DIRection of the port is set to show the command.  It is not required to set the DIRection when using the PulseOut command.
    Dir GPIO.0 Out
    Do
        PulseOut GPIO.0, 5 sec 'Turn LED on for 5 sec
        Wait 10 sec             'Wait 10 sec with LED off
    Loop
    
     

    Last edit: mikmikmikmik 2023-05-02
  • Anobium

    Anobium - 2023-05-02

    The latest compiler resolves this warning. The osc selection has been improved.

    :-)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.