Port Digital Output Not Changing Properly


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Port Digital Output Not Changing Properly

    classic RMW read modify write
    watch this
    http://www.microchip.com/webinars.mi...cName=en556253
    click on
    View streaming media version:
    Warning I'm not a teacher

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Port Digital Output Not Changing Properly

    Richard, wow I wasn't aware of this issue. Check out the following article. It explains in detail exactly what happened in my code.

    https://download.mikroe.com/document...c/help/rmw.htm
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  3. #3
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Port Digital Output Not Changing Properly

    Also, is it possible to use LATCH instead or PORTx.x in PBP? How would you use the LATCH register?
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: Port Digital Output Not Changing Properly

    yes it's not the most thrilling video but it does explain the issue in easy to understand terms.

    is it possible to use LATCH instead or PORTx.x in PBP?

    pretty easy for chips with LAT regs

    in your case
    LATA.0 =1
    LATA.1 =1

    note LAT(X) cannot be used with compound commands THAT auto set TRIS regs like SERIN,I2CIN,TOGGLE etc
    Warning I'm not a teacher

  5. #5
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default Re: Port Digital Output Not Changing Properly

    Thanks Richard. That helps a lot.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

Similar Threads

  1. Can't properly configure RA3,Ra4 as digital out (PIC16F876A)
    By luxornet in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th July 2014, 16:10
  2. Changing output state after 2 minutes
    By carljbrooks in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st February 2014, 05:28
  3. Replies: 11
    Last Post: - 13th January 2013, 10:25
  4. 18F2520 - problem configuring fuse for port B as digital port.
    By hwhisperer in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th October 2010, 11:41
  5. open drain output as digital output?
    By droptail in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 10th November 2006, 03:11

Members who have read this thread : 0

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