Using GPIO.3 as input on 12F629


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Location
    Denmark
    Posts
    31

    Question Using GPIO.3 as input on 12F629

    Hi,

    I would like to use GPIO.3 as an input on the 12F629.
    But how do I do that in the right way?
    Is this the right way?
    Code:
    @ DEVICE pic16F628, INTRC_OSC_NOCLKOUT, NO_MCLR
    
    DEFINE OSCCAL_1K 1     ' Load factory value into OSCCAL 
    CMCON=7                    ' Turn analog comparators off
    TRISIO = %11001111     ' Set GPIO 0-3 as inputs 5-6 as outputs
    I have to use NO_MCLR right?

    If I look on page 54 in the datasheet, the CONFIG word bit 5 sould be set to 0, does NO_MCLR do that?

    There is a note (note 5) that says: When MCLR is asserted in INTOSC or RC mode , the internal clock oscillator is disabled.
    What dose that mean?

    Kind regards
    Sharky
    *Let's do it*

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


    Did you find this post helpful? Yes | No

    Default

    At least choose the right processor But anyway, open the m12F629 .INC file in your PBP\INC folder, there you'll se your config fuses.

    So i bet it should look like
    Code:
    @ DEVICE 12F629, INTRC_OSC_NOCLKOUT, MCLR_OFF
    Steve

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

  3. #3
    Join Date
    Mar 2005
    Location
    Denmark
    Posts
    31


    Did you find this post helpful? Yes | No

    Default

    Hi mister_e,

    Dooh, yes of course it's: @DEVICE 12F629

    Thanks!

    Sharky
    *Let's do it*

Similar Threads

  1. Input problems with 12F629?
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 24th April 2018, 06:25
  2. Sony LanC Program
    By l_gaminde in forum Code Examples
    Replies: 2
    Last Post: - 25th September 2009, 18:51
  3. 12F629 Strange interupt behavior
    By BGreen in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 25th May 2007, 15:35
  4. Timing input pulses and re-outputting them
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2007, 01:50
  5. Input on 12F629
    By BGreen in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th March 2005, 11:14

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