How to invert OWOUT pin in assembly?


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: How to invert OWOUT pin in assembly?

    Give me a little time, I may be able to find a few minutes here and there to make the mods and test them. But my "DEFINE OWINV 1" comment *** DOES *** involve editing the library. It simply adds a 'switch' that causes OWOUT to be inverted when the define is used, and "in the normal way" when it isn't.

    I have to ask... I have used one wire devices once in the past, and while I think the idea is kind of neat, my opinion is that saving two wires (compared to I2C) is generally not worth it - especially when you start adding special drive circuits. Is there some reason you aren't using I2C?
    Charles Linquist

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: How to invert OWOUT pin in assembly?

    A little more than inverting the OWOUT command ... you would need to change the 1-Wire command into a 3-wire command for AN244.

    Not impossible, but do ya really want to go there ?
    DT

  3. #3
    Join Date
    Jun 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default Re: How to invert OWOUT pin in assembly?

    Well....yes, I do. The application is a big sensor network, partially in a dangerous environment, where for safety reasons current has to be limited. Hence the "parasitic powering" from the 1-wire line. Also for reverse-compatibility with existing, installed sensors.

    Darrel, I take your point. What I am planning is a modified implementation of AN244, with the active pull-up implemented using a separate comparator and PIC (PIC#2). The comparator monitors the line voltage, comparing with a logic threshold reference voltage. When the level on the line rises beyond the threshold voltage (because either the master or a sensor has "let go"), the comparator outputs high. PIC#2 monitors the comparator output, and when it goes high it drives the active pull-up on. The preceding low on the line has been timed by PIC#2, and depending on the combination of the length of the preceding low and whether it has been pulled down by the master (pre OWOUT toggle pin state on main PIC) or by a slave, PIC#2 knows how long to hold the active pull-up.

    The code for the above is regular PBP stuff, no big problem.

    But inverting the OWOUT pin?
    Charles, thanks for the clarification, that makes a lot of sense. In the meantime, I will add an inverting gate on the breadboard and test my code, so that I at least (fingers crossed) have a proof of concept...

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