Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

assembly code help

Status
Not open for further replies.

spke1816

New Member
I am currently attempting to come up with a capstone project for my final quarter for my associate's degree. I have been toying with several ideas, but most have either been too difficult for my level of understanding or too simple. My next attempt at a project started as something simple that I wanted to expand on.

Based on the board game "Clue" I thought it would be fun to make to make the score sheet (for marking the who, what and where) lights and push buttons. All very simple connecting the source to a switch and then to the lights. No help needed there.

The expansion on this idea would use a microcontroller, maybe arduino (not sure which one would be best for this- would need to be able to have 3x21 outputs and 3x21 inputs- one for each light I wanted to use- 21 would be known to be wrong, 21 for guess to be wrong and 21 for known to be correct since there are 21 cards total to be used in the game). Where I need the help is in the coding. I'm not very good at writing my own code.

I know the way I'm going to word this is more similar to "C" but I have a better understanding of assembly:

for people- only 6 people in game:
If switch 1, switch 2, switch 3, switch 4 are known wrong (would have it's own switch) and switch 5 is guess to be wrong then it would output to turn on the light for switch 6 would turn on indicating that it is most likely correct.

I know there are many variations of how this situation could be worded. if it were to look like a key pad of sorts it would be 3x21 with the same number of lights.

Does anyone think this would be possible with a microcontroller or am I going too far on this? Any help would b emost appreciated, thank you in advance for your time.
 
I think this is entirely possible to do with any of several small microprocessors.

My problem is that I don't know how Clue is played, and therefore I don't have a clue as to how the logic works (right, wrong, guess to be wrong, etc.). Maybe someone else here knows how the game works can give you programming advice.

One question: when you say "keypad", are you referring to a telephone-type keypad (momentary-contact switches, one at a time pressed) or something else?
 
I would suggest using push buttons and tri colour LEDs (red, green, yellow). Each press of the button would move to the next colour (+ out) for no idea, not, maybe, yes. This would require a 3*7 matrix for the switches and a 6*7 matrix for the LEDs, 24 I/O total. Easily handleable by something like an 18F4620. You can even use the free C18 compiler from Microchip.

Mike.
 
Why would you need so many switches? Couldn't you just have the three pushbuttons (for the three possible choices) and have the "current position" indicated by the LED array? (Again, you'll have to excuse me, as the last time I played Clue was so long ago I have no idea how it went!)
 
A uC could do it easy!
I use GCGBasic (with object blocks!) for my pikkit2 programming needs, simple simple simple!

7 led for choices, X 3 LEDS per catagories,

use 4 buttons to make analog keypad (one analog input pic pin) w. up.down. L. R. to move through matrix
use "OK"! key to rotate; redON = suspect / redOFF = clear
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top