Programming Problem PIC12F683


Closed Thread
Results 1 to 14 of 14

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    GPIO.3 is an input only, it just can't be configured as an output. Check your datasheet under TRISIO register, you'll discover that BIT3 is a read only bit... so whatever value you put there... it will always be set as an input.
    Steve

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

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e View Post
    GPIO.3 is an input only, it just can't be configured as an output. Check your datasheet under TRISIO register, you'll discover that BIT3 is a read only bit... so whatever value you put there... it will always be set as an input.
    I understand that. What I don't understand is how the digits in the positions that they are in relate to their respective pins.

    ~ Dave

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


    Did you find this post helpful? Yes | No

    Default

    i'm not sure to follow you then... let's see if the following lines could give you some lights
    Code:
    'GPIO Bits 76543210
    TRISIO  = %00001010
            '  xx------- Not implemented, don't care
            '  --0------ GP5 = output
            '  ---0----- GP4 = Output
            '  ----1---- GP3 = Input, Read only bit, input only, regardless to what you write here       
            '  -----0--- GP2 = Output
            '  ------1-- GP1 = input
            '  -------0- GP0 = Output
    Steve

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

  4. #4


    Did you find this post helpful? Yes | No

    Default

    OK, now I get it; I have to look at the table in the data sheet. I had copied that code from the following string:

    http://www.picbasic.co.uk/forum/show...ight=pic12f683

    So, I was correct that TRISIO = %00010000 makes GP4 an input.

    ~ Dave

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


    Did you find this post helpful? Yes | No

    Default

    Yup GP4 AND GP3
    Steve

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

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Thank you very much!

    ~ Dave

Similar Threads

  1. 16F676 programming problem
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th May 2009, 17:39
  2. PIC18F4620 Programming problem
    By JavPar in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 6th December 2008, 04:21
  3. RFID medicine teller!! problem with programming
    By sknee8787 in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 18th November 2008, 17:31
  4. Programming Problem with PIC16F819
    By Dick Ivers in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 24th July 2007, 18:42
  5. Problem programming the PIC16F648A
    By Edgardo_2 in forum General
    Replies: 2
    Last Post: - 29th December 2006, 00:02

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