PIC12F675 triso question?


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2023
    Location
    Texas
    Posts
    2

    Default PIC12F675 triso question?

    Good day all
    I'm pretty new to the fancy PIC world and I feel that I'm understanding most of what I'm reading. One of the things that is confusing me is triso.
    For the PIC12F675 I have seen example code with triso=%00000000 and
    triso=%000000
    The code I'm playing with has outputs on gpio.0 and gpio.1, the rest are digital inputs.
    Would triso=%111100 be correct or am I missing the way 1's and 0's work.

    Thanks
    Last edited by Gruntus; - 12th May 2023 at 15:39.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: PIC12F675 triso question?

    First of all it is TRISIO and not TRISO. You missed the I.

    Then the general case is that registers are 8 bit wide. But in the 12F675 case you have access to only the least 5 bits.

    So the best way to define TRISIO is to use the 8 bit format, although 5 bits will work fine too like this:

    TRISIO=%00011100 is the same as TRISIO=%11100 and that would set GPIO.0 and GPIO.1 as outputs while GPIO.2, GPIO.3 and GPIO.4 as inputs.

    The rest does not matter since 675 does not have that pins I/O.

    It is like the numbers, 05 is the same as 5, right?

    Hope this is clear.

    Ioannis

  3. #3
    Join Date
    May 2023
    Location
    Texas
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: PIC12F675 triso question?

    That makes perfect sense, thank you.

Similar Threads

  1. PIC12F675 - config
    By Vezito in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th June 2011, 20:29
  2. Math question relating to AD input on PIC12F675
    By rfetech in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 9th November 2010, 03:35
  3. Pic12f675
    By Andre_Pretorius in forum Serial
    Replies: 1
    Last Post: - 6th April 2009, 00:27
  4. SERIN with a PIC12F675
    By ewandeur in forum Serial
    Replies: 4
    Last Post: - 30th July 2007, 15:04
  5. Pic12f675
    By perides in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th July 2007, 20:37

Members who have read this thread : 10

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