how to setup 7 digit led multiplexer code for running in background?


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: how to setup 7 digit led multiplexer code for running in background?

    I would look at DT's Instants
    http://www.picbasic.co.uk/forum/showthread.php?t=3251

    The elapsed timer might be what you need, with a little modification...
    http://darreltaylor.com/DT_INTS-18/elapsed.html
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: how to setup 7 digit led multiplexer code for running in background?

    Thanks, looks interesting!

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: how to setup 7 digit led multiplexer code for running in background?

    I'm doing it backwards. Mainloop turns on leds, start a timer, while timer runs gosub main code, turn off leds when timer over. Start a 2nd timer for off period, gosub main code until over. Rinse and repeat.

    I adjust 2 timers until no more flicker.

    Robert

  4. #4
    Join Date
    Feb 2013
    Posts
    1,122


    Did you find this post helpful? Yes | No

    Default Re: how to setup 7 digit led multiplexer code for running in background?

    The problem is, when looking at that sample code, I see only the part of code, which runs on interrupt. I have no idea where to insert the "main" code?

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: how to setup 7 digit led multiplexer code for running in background?

    In here:

    Code:
    Main:
      IF SecondsChanged = 1 THEN  
         SecondsChanged = 0
         LCDOUT $FE,2, DEC Days,"d-",DEC2 Hours,":",DEC2 Minutes,":",DEC2 Seconds
      ENDIF
    GOTO Main
    You check the status of the timer flags to determine if things have changed, then reset them.

    Robert

Similar Threads

  1. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 08:42
  2. Replies: 2
    Last Post: - 14th July 2008, 22:11
  3. 20 Digit Virtual LED Counter
    By T.Jackson in forum Code Examples
    Replies: 9
    Last Post: - 19th November 2007, 05:02
  4. Using a MAX7219 (LED digit multiplexer) with a 16F88
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 11th March 2007, 21: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