Shop OBEX P1 Docs P2 Docs Learn Events
Creating a Self-Resetting Bs1-IC. — Parallax Forums

Creating a Self-Resetting Bs1-IC.

sumdawgysumdawgy Posts: 167
edited 2010-05-21 16:58 in BASIC Stamp
My own personal pet(first) project is nearly completed.· But, I have one last issue.

I need the Bs1-ic to reset itself when it's reset is pulled low then released...
by one of it's own I/O pins.·· I am trying to·avoid using anything external except maybe a resistor.

When I·progmatically·pull·the pin low & release it.. The chip doesn't reset.
But the front panel buttons grounding·reset DO reset the chip.

Is this a current flow issue?· Not enough sink from the I/O pin?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-18 17:19
    The I/O pins are more than capable of sinking enough current to reset a BS1. There must be some other reason why this isn't working for you. As usual, you will get more helpful information if you provide a schematic and source program.
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-18 20:11
    hm...Nothing to it really.

    (grrr.uploaded wrong image.)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
    698 x 437 - 27K
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-18 20:25
    The hardware connections you've shown should work. The little program you showed would reset the BS1 on the 1st statement which would start the program over again (and reset it again). The INPUT and GOTO statements would never get to execute. If you use an oscilloscope on P4, you should see negative going pulses since /RST is held high by the built-in 4.7K resistor and P4 is initially high impedance while the BS1 is initializing itself, then would immediately go low as the LOW statement executes.
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-19 16:30
    Mike you're right.· As I posted that's exactly what I would expect.

    Although (as you knew), I'd used a slightly more expanded circuit for testing..
    it included a buzzer that sounds on prog init.

    I'm attaching the more appropriate circuit & . . . .
    Apologizing for rushing off that·response post.

    When I run this setup...the bs1...doesn't reset unless·I press both buttons.

    (EDITED·the picture....again I uploaded the old version....sigh.)
    ....onButton = pin6

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown

    Post Edited (sumdawgy) : 5/19/2010 6:14:48 PM GMT
    727 x 447 - 69K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-20 19:30
    Actually the procedure for resetting any BASIC Stamp Module via one of its I/O pins is something I have shown on here before. You don't drive the pin low then high. That is not necessary. What you do is connected the pin you intend to use to reset the module to the reset pin. Let us assume you have used P7 for this task. When you're ready to reset you simply execute the command OUTPUT 7.

    The default state of the output register is low, so once the pin is made an output it will drive the pin low. Once the reset is executed the interpreter will initialize all I/O pins to inputs releasing the reset pin automatically.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • Shawn LoweShawn Lowe Posts: 635
    edited 2010-05-20 20:45
    Sumdawgy-
    Givin your picture, you would have to press both buttons in order to reset the stamp. Isn't this what you want?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    When all else fails.....procrastinate!
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-21 01:32
    Shawn Lowe said...
    Sumdawgy-
    Givin your picture, you would have to press both buttons in order to reset the stamp. Isn't this what you want?
    Yep.· That's the manual reset, it's working fine.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
  • sumdawgysumdawgy Posts: 167
    edited 2010-05-21 01:37
    Chris Savage (Parallax) said...
    Let us assume you have used P7 for this task. When you're ready to reset you simply execute the command OUTPUT 7.

    The default state of the output register is low, so once the pin is made an output it will drive the pin low. Once the reset is executed the interpreter will initialize all I/O pins to inputs releasing the reset pin automatically.
    Hm.
    Well, I didn't try it that way.· Will implement it tomorrow.· Obviously if that fails... I've got some other issue.· (It occurs to me· I didn't test the pin for damage...altho..it's not had any stress.)



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-21 16:58
    You can verify if the pin is driving low by connecting an LED to it such that the Cathode is connected to the I/O pin and the Amode through a 470 ohm resistor to 5V. If the following code links the LED the pin works.· This code assumes P0.

    DO
      OUTPUT 0
      PAUSE 1000
      INPUT 0
      PAUSE 1000
    LOOP
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
Sign In or Register to comment.