Interrupts & OWIN/OWOUT


Closed Thread
Results 1 to 3 of 3
  1. #1
    Desterline's Avatar
    Desterline Guest

    Unhappy Interrupts & OWIN/OWOUT

    Hey boys and girls,
    I have a little project that handles a multiplexed LED display (timer0, assembly interrupts, ~250Hz) and it needs to read the time from a DS1994 (Maxim/Dallas iButton RTC). Problem is, if I let the interrupts run I seem to be getting garbage data from the iButton. But if I turn off the interrupts during the OWIN/OWOUT, the data's fine but I get unacceptable display flicker.

    Anybody have any light they can shine on this?

    Thanks,
    -Denny

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink

    Hi

    And What about using a specialised LED Driver ... as I suppose you don't read time more than once a second ... some latching could be welcome.

    as OWin must not be interrupted ... no other solution !!!

    Alain

  3. #3
    Desterline's Avatar
    Desterline Guest


    Did you find this post helpful? Yes | No

    Thumbs up

    I believe I may have found an acceptable work-around for this. It turns out that _part_ of the problem was the way I was handling the display multiplexing. I was writing to the TRIS byte on the same port as the 1wire link. Now I'm reading the TRIS byte and bitmasking the write.

    But the real solution was to run the OWIN/OWOUT _in_ the interrupt. That way the 1wire commands are sync'd to the interrupt and complete before the next interrupt. I had to add some flags to steer the main loop and to indicate when the data is valid and should be proccessed, but that's not a big deal.

    Thanks,
    -Denny
    Last edited by Desterline; - 22nd June 2005 at 02:15.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. Continuous Interrupts when using DT_INTS and an INCLUDE file
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 15th January 2010, 21:42
  3. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 21:43
  4. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 20:48
  5. help: TMR0 interrupts disabling PORTAchange interrupts???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th August 2008, 15:10

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