Posted in PlayTable-top

Introduction: STROOP GAME

This is a great game to test your skills.

Step 1: INTRO

This project has been adapted from an experiment by John Ridley Stroop, who published his work in 1935. Basically it is a "trick." It is a trick in that you are required to answer a question at a "second level of thinking."
But this is not the requirement.
That's why it will be interesting to have your friends take a test.
The "Stroop effect" has been used to investigate the psychological capacities of a person. In fact it introduces capabilities that have never been investigated before. Although I don't believe in anything to do with psychology, this test is considered to measure selective attention, cognitive flexibility and processing speed. About the only word I understand is "processing speed" and that's how our game works. It runs for 20 seconds and gives a score on the 7-segment display.
The game comes on by displaying the letters "S-t-r-o-o-P" on the 7-segment display and then sits ready for your first try.

Step 2: The CIRCUIT

See Circuit below and see the .asm and .hex files by clicking on the box above: "View all steps on one page."



Step 4: The PROGRAM

The program has been kept simple to make it easy to understand. Very few Boolean expressions have been used as they take a lot of understanding and "working out" as to the the outcome of the instruction.
We note that a simpler program was written in "C" and it failed to compile into the 1024 memory locations, so I don't know how the inefficiency of higher-level programming would relate to this project.
When the timer overflows, the program-execution is interrupted and the micro goes to location 4 (called the Interrupt location where it finds an instruction to go to a sub-routine called: "isr." At isr, another file is decremented (_20Secs) thirty-nine times and this produces the 20 seconds duration for each game.

The program now knows if a button is pushed or not.
It will exit with a value of 1-8.


The most difficult thing to produce on a computer is a random number.
You can combine and XOR various files or use a table. but nothing generates a truly random result.
We have used the "waiting time" when a player waits to provide an answer and this generates a new random number, while the program is actually using a previously generated number for the play in progress. That's why the random number has to be generated in a sub-routine called "Create," and this number is passed to the Random Number file for use in the next try.

The program contains a number of very important subroutines that you will be able to "cut and paste" for projects in the future.

Step 6: MORE

For more details on modifying the program and burning the PIC chip, see Talking Electronics website and click on Elektor,EPE,Silicon Chip in the index.
You can find details of: PICkit-2 and Adapter connected for In-Circuit Programming at this link.

Step 7: Parts List

Stroop Parts List
Cost: au$25.00 plus $7 postage
Kits are available from

7 - 22R SM resistor
6 - 82R SM resistor
1 - 2k2 SM resistor
1 - 22k SM resistor
1 - 47k SM resistor
1 - 100k SM resistor

2 - 100n SM capacitors

14 - Orange SM LEDs
3 - tri-coloured LEDs
1 - SPDT mini slide switch
3 - mini tactile push buttons

20cm fine enamelled wire
30cm - very fine solder
1 - 18 pin IC socket
5 - machine pins
1 - PIC16F628 chip (with Stroop routine)
3 - AAA cells (do not use button cells
- they produce false operation)
1 - Prototype PC board

Pre-programmed PIC16F628 micro with Stroop routine $15.00 plus $5.00 post

Step 8: THE GAME

The game is played by switching the project on and seeing which colour is illuminated.
Press the first button if the colour is RED, the second button if the colour is Orange and the third switch if the the colour is GREEN.
The aim is to get as many correct in 20 seconds.
The score appears on the 7-segment display. The display flashes the tens digit and then the units. It then blanks for 2 seconds and repeats the number. It does this 3 times then turns off.

Step 9: Files

Click on: "View all steps on 1 page" to see the .pdf of the whole article including the program and .asm, .txt and .hex files



    • Spotless Contest

      Spotless Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Space Challenge

      Space Challenge

    We have a be nice policy.
    Please be positive and constructive.




    Here's the stroop game in video :


    PIC16F628 or PIC16F628A can be used

    What is the difference with those 2? and can i use ANY Pic16f628 into pic16f628a?

    thank you Colin! :)

    The only difference is the way the code protection-bits are set to prevent others hacking into the chip to reach the program.

    so the code for a PIC16F628 is ALWAYS compatible with the pic16F628A chip?

    thank you Colin!

    All the photos have been included in the article. There are no step-by-step instructions as the project is really only suitable for expert constructors as the components are all surface-mount.

    But if you include step-by-step images, you help others become capable of making it.

    Else, what's the point? "Here's an instructable you mere mortals cannot make"?

    In addition, the inclusion of pictures of your make shows that you have made it...