Shop OBEX P1 Docs P2 Docs Learn Events
Look over my schematic? — Parallax Forums

Look over my schematic?

DHDH Posts: 1
edited 2006-05-07 10:30 in BASIC Stamp
I'm a little new to electronics in general, and was wondering if someone could look over my schematic and make sure it's sound.

The project is for a binary calculator (I've got the code roughed out, and will maybe post that later). Basically you flip switches 8-11 for the first number, and switches 12-15 for the second number. The BS2 calculates the addition, and then outputs to the LEDs on pins 0-4.

And if it's not too much to ask, could you also tell me about what type of resistors I'll need, assuming the LEDs are around 2VDC max?

Critique away, just don't be too mean.
400 x 395 - 4K

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-06 19:07
    Okay, since you've admitted that·you're new to electronics, you should work on that first -- get a copy of "Getting Started in Electronics" by Forrest M. Mims.· It's a straightforward intro to electronics principles and parts operations.

    I've attached a "proper" circuit for your goal; it uses 220-ohm series resistors for protection from programming errors.· Pros don't normally use those but you should until you're really good at writing code.· You'll also see that the input pins must be pulled to a known state; in this case the pins are pulled low (0) and when a switch is closed you'll get a 1 on that pin.· Finally, you should never use just one resistor with multiple LEDs; use one per LED and for the number of LEDs that can be lit, 1K is a safe value.

    It will take you longer to wire the circuit and write the code -- the truth is you can read the switches and output the result with just one line of code (if you've connected everything properly).


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    1436 x 815 - 92K
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-06 20:36
    Won't he need two lines?

    One to calculate, and one to loop....
    Saves him from having to reset the BS2 for every calculation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-05-06 21:43
    The actual program will be a few lines (DIRS setup, DO-LOOP, etc.), but the reading of inputs and writing the outputs can be done with one line of code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-05-07 10:30
    Yeah, forgot that just assigning a value to an OUT type variable won't set the DIRS.
    *Slaps myself with the manual*

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
Sign In or Register to comment.