Shop OBEX P1 Docs P2 Docs Learn Events
Scrolling 7 seg. Display — Parallax Forums

Scrolling 7 seg. Display

Brian_BBrian_B Posts: 842
edited 2007-12-09 03:45 in Propeller 1
Hi,
·I wrote this code to scroll a 7 seg led display. Pin 15 is vss and 16 through 23 lights the segments. It seems to work ok , but there is a pause in the reset loop.·Any clue why it's pausing for more than the waitcnt ?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian


http://tech.groups.yahoo.com/group/lunarX/

·"Imagination is more important than knowledge..." ·· Albert Einstein

http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)


Post Edited (Brian Beckius) : 12/7/2007 7:54:24 PM GMT

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-12-07 23:41
    I think this
    cmp   23,outa                wz
    


    shpuld read
    cmp   test1,outa                wz
    



    Note that it is not a good idea to connect the common cathode to a I/O pin. It will have to suck the curent of all segments wihct can go up to 70 mA... It will not of course, rather it will look dim... smile.gif
  • Brian_BBrian_B Posts: 842
    edited 2007-12-07 23:55
    deSilva,
    I started out with the test1 deal , It will only makes the loop once. If I use the version I posted , theres a delay in every loop (not the waitcnt delay).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thank's Brian


    http://tech.groups.yahoo.com/group/lunarX/

    ·"Imagination is more important than knowledge..." ·· Albert Einstein

    http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-07 23:57
    The version you posted makes no sense!

    And yes, of course it will only work again after bit 23 has been shifted out of the 32 bit register again.
    Best you reconsiderthe algorithm you plan to use again.

    Post Edited (deSilva) : 12/8/2007 12:02:38 AM GMT
  • Brian_BBrian_B Posts: 842
    edited 2007-12-07 23:58
    Thank's

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thank's Brian


    http://tech.groups.yahoo.com/group/lunarX/

    ·"Imagination is more important than knowledge..." ·· Albert Einstein

    http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-08 00:02
    Sorry smile.gif
    What I wanted to say is that there is no "bug" to catch...
    You have to rewrite it.
  • Brian_BBrian_B Posts: 842
    edited 2007-12-08 23:08
    Ok,

    ·Does this look any better ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thank's Brian


    http://tech.groups.yahoo.com/group/lunarX/

    ·"Imagination is more important than knowledge..." ·· Albert Einstein

    http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-09 03:08
    The question is: Does it work?
    But I think it will smile.gif

    As long as you are shining just one segment this is fine, but notice the load to I/O 15 I pointed to in my first posting.
    And I noticed you are also enabling I/O 14 for output - for any reason?
  • Brian_BBrian_B Posts: 842
    edited 2007-12-09 03:45
    Yes it does work, well at least to the point that I can move forward. Thank you for not just posting “the code”, sometimes I just need a little kick in the butt to rethink stuff.

    Ps . The 14 pin was me just getting ahead of myself smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thank's Brian


    http://tech.groups.yahoo.com/group/lunarX/

    ·"Imagination is more important than knowledge..." ·· Albert Einstein

    http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
Sign In or Register to comment.