Shop OBEX P1 Docs P2 Docs Learn Events
What's wrong? Please Help ! — Parallax Forums

What's wrong? Please Help !

The_ApprenticeThe_Apprentice Posts: 15
edited 2004-10-18 18:58 in BASIC Stamp
Hello Everyone,
I'm trying to run this code with my BS2, I don't understand what I'm doindg wrong,
counter var nib
OUTA=$0
DIRA=$F
loop:
FOR counter=0 to 9
OUTA=counter
pause 1000
NEXT
goto loop
With this program I suppost to counted between 0 and 9.
PLease if any body can help me I will be glad.
Thanks.
This is my schematic:

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-16 13:48
    Let me help you with your code -- you're using PBASIC keywords as labels (a no-no).

    counter··· VAR· · Nib
    myDigit··· VAR·· ·OUTA

    Setup:
    · DIRA = %1111

    Main:
    · FOR counter = 0 TO 9
    ··· myDigit = counter
    ··· PAUSE 1000
    · NEXT
    · GOTO Main

    Now you just need to double-check your connections -- perhaps pin 5 needs to be pulled high, and pin 4 left floating.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • The_ApprenticeThe_Apprentice Posts: 15
    edited 2004-10-16 15:43
    Hi Jon,

    I did as you said, but i still don't see nothing.
    Just clear somethig with me, when I try to program using Stamp Editor v2.1, the program ask me to select a Basic Stamp mode Bs1, BS2...., I chose BS2.
    Before I change the pin 5 to high, i grounded pin 1, 2, 6, 7 and my display shows the digit zero. Now my pin 5 is high and 4 is floating.
    What can be wrong?
    There is no samples in internet using this particular Ic (74ls47).

    Thanks for your help.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-16 15:54
    I Googled the part and think that pins 3, 4, and 5 should be high -- sorry for the confusion. Here's the doc I referenced:

    http://www.optics.arizona.edu/Palmer/OPTI380B/PDFdocs/74ls47.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • The_ApprenticeThe_Apprentice Posts: 15
    edited 2004-10-16 16:08
    Jon,
    I did try that before and I did right now and still don't work.
    Any another sugestinion?
    Thanks.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-17 01:38
    I popped by my favorite electronics store (Tanners in Dallas) today and picked up parts ... the bad news is that my circuit works (with the code I posted above AND with your origintal program) when I connect it as in your diagram. So it must be in your wiring; check again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • The_ApprenticeThe_Apprentice Posts: 15
    edited 2004-10-17 03:42
    Jon,

    You was right.
    I cut in hafl my wires, and seven segments start to display the numbers. I was using long cables jumpers from my BS2 Board Education to my breadboard. I'm sorry about this mistake.

    Thank You so much for your help.
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-18 18:52
    Jon, Dude!

    You went and BOUGHT the part, so you could verify the guy's problem?
    Man, and I thought working Sunday's was above and beyond.

    You're Da Man!
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-18 18:58
    That's right, I rule! smilewinkgrin.gif

    Just kidding.· But yes, I popped by a store and bought the part so that I could help out.· It's how we do things at Parallax.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
Sign In or Register to comment.