GPS Project: PIC18F26K22 or PIC18F46K22


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

    Default Re: GPS Project: PIC18F26K22 or PIC18F46K22

    My question is, what do we do with the rest of the TRISB and TRISC bits apart from the RX/TX
    .
    that would depend entirely on what you want do with each pin , if and only if you need it to be an output clear the corresponding tris bit
    Warning I'm not a teacher

  2. #2
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: GPS Project: PIC18F26K22 or PIC18F46K22

    Quote Originally Posted by richard View Post
    .
    that would depend entirely on what you want do with each pin , if and only if you need it to be an output clear the corresponding tris bit
    Thanks a lot for your answer. I guess we cant leave unassigned the bits. Normally as far as i have learned from what i have read in this forum, it is better to configure the bits of each port and give an Input or Output direction in addition to high or low stage.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

    Default Re: GPS Project: PIC18F26K22 or PIC18F46K22

    I guess we cant leave unassigned the bits
    there is no such state , pins are either inputs or outputs or analog inputs , outputs can only be high or low
    if you have no reason to use a pin as an output then leave as an input , if you have no reason to use a pin as a digital input you can leave it analog
    the pic chip won't care. the pic chip does not care if outputs are high or low its only what they connect to that cares , it up to you to initialise the pins
    in use to the correct type/state and direction to match the requirement of what they connect to and then make sure they stay that way.
    Warning I'm not a teacher

  4. #4
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: GPS Project: PIC18F26K22 or PIC18F46K22

    Quote Originally Posted by richard View Post
    there is no such state , pins are either inputs or outputs or analog inputs , outputs can only be high or low
    if you have no reason to use a pin as an output then leave as an input , if you have no reason to use a pin as a digital input you can leave it analog
    the pic chip won't care. the pic chip does not care if outputs are high or low its only what they connect to that cares , it up to you to initialise the pins
    in use to the correct type/state and direction to match the requirement of what they connect to and then make sure they stay that way.
    now it is clear. Really appreciate your help.

    Thanks a lot Richard.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: GPS Project: PIC18F26K22 or PIC18F46K22

    I have my doubts on leaving inputs floating.

    Usually if I have any unused ports, I turn them as outputs and clear them.

    If they are inputs, maybe enable the pull ups if any or tie them to ground.

    A floating pin can cause troubles in certain cases.

    Ioannis

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    Did you find this post helpful? Yes | No

    Default Re: GPS Project: PIC18F26K22 or PIC18F46K22

    if your program is adversely affected by an unused pin then your code is incomplete and needs more debugging
    Warning I'm not a teacher

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: GPS Project: PIC18F26K22 or PIC18F46K22

    No the program itself but on the total current consumption as the CMOS do not like to be float.

    Ioannis

  8. #8
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: GPS Project: PIC18F26K22 or PIC18F46K22

    Especially when in the presence of stray RF. They make rather nice antenna's.
    Dave Purola,
    N8NTA
    EN82fn

Similar Threads

  1. PIC18F46K22 config issue
    By LGabrielson in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th September 2012, 03:20
  2. Replies: 1
    Last Post: - 27th July 2008, 06:14
  3. Pic GPS project Demo
    By Art in forum GPS
    Replies: 0
    Last Post: - 28th October 2007, 03:05
  4. GPS project question
    By mjp130 in forum GPS
    Replies: 6
    Last Post: - 4th July 2007, 20:09
  5. gps project
    By chuckad in forum GPS
    Replies: 2
    Last Post: - 9th February 2007, 02:52

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