• AVR Freaks

Hot!PIC18F: PORT I/O

Author
Aharon
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2013/01/01 16:45:58
  • Location: 0
  • Status: offline
2020/03/04 08:42:15 (permalink)
0

PIC18F: PORT I/O

HI
i have a question regarding port definition.
if i use the  TRISx: PORTx TRI-STATE REGISTER  and set the port as output  TRISA bit (= 0)
but not define the level output (LAT register) what will be the output level on the port? = 0 ,=1 , = unknown ?
 
Thanks
Aharon
#1

3 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 5771
    • Reward points : 0
    • Status: offline
    Re: PIC18F: PORT I/O 2020/05/12 03:25:23 (permalink)
    0
    Hi,
    Just look in the datasheet : above each register there is the default value for each bit @reset
    regards
     
    #2
    ric
    Super Member
    • Total Posts : 27934
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC18F: PORT I/O 2020/05/12 03:36:11 (permalink)
    0
    It's always a good idea to reveal which precise PIC part you are asking about.
    Hint, when you look in the datasheet, I'm confident you are goin to find this biut is labelled "u" meaning "undefined".
    That's the same as "unknown", which is why what you suggest is NOT a good idea.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    nigelwright7557
    Super Member
    • Total Posts : 446
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: PIC18F: PORT I/O 2020/05/12 08:45:16 (permalink)
    5 (1)
    I always set port value first before setting tris bits.
     
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 4.5