PDA

View Full Version : Look over my schematic?

DH
05-07-2006, 01:25 AM
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.

Jon Williams
05-07-2006, 02:07 AM
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

05-07-2006, 03:36 AM
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 Williams
05-07-2006, 04:43 AM
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