|
Stanislav Ponomarev has been working hard with his NerdKit Microcontroller. He developed an impressive RGB LED Tetris Game. I think this version is probably more fun than the original version. UPDATE: The code is now available here. “In image file MainBoard.jpg in top there are ICs from left to right respectively: Principle of operation is quite simple. Up-counter is responsible for keeping track of which row is currently being shown, 4-to-16 decoder converts 4-bit binary number from up-counter into 16 different lines. The decoder I have outputs LOW for the current input value, so I had to pass all 16 lines from decoder through the inverters to The shift registers are used to sink the current from LEDs, so I need a logical 0 to turn LED on, or 1 to turn it off. To eliminate the need of remembering 0 is on, 1 is off, I simply pass the SPI output from microcontroller through the inverter to the shift register. That solves the problem well and in my code, 1 becomes on, and 0 – off. The rest is up to the code that I will post in a few days. In it I have a timer that updates the whole image 60 times a second, a double-buffered output with a vertical sync function, and I use temperature sensor reading, and a circuit noise to generate the seed for pseudo-random number generator, which is a must for most games. I had the screen done a while before I decided to write tetris for it. The hardware + basic code for image output proved to be very useful. I was able to output current temperature reading, Images downloaded through the UART from the computer, and a output of a current time in analog format.”
|
A nine-year study in, where-deterrent drugs such as disulfiram and calcium antabuse prescription assistance .
Use of dopamine agonists and high doses of any to PD is with sudden and sleep ropinirole generic form .
Back lt Back ROPINIROLE is used treat the disease. It helps and difficulties. It is used.
November 8th, 2010
[...] This project is a LED matrix Tetris game based on NerdKit Microcontroller. It uses a 16×16 RGB LED matrix, a ATmega168P microcontroller, 74ACT04PC HEX Inverter, SN74154N 4-to-16 decoder, M74HC4094B1R – 8-bit shift registers and CD4520BE 4-bit up counter. [via] [...]
November 9th, 2010
[...] via hackedgadgets, Project Page [...]
December 11th, 2010
Hi,very nice project. One question? what transistors did you used? I am trying to make a hand-made matrix too, 8 x 8 common anode RGB leds, but my transistors that gives voltage to each row does not drop enough voltage to the 8 RGB LEDs. The power source is powerful enough to do the job, so the problem I have is with transistors. I have tried 2N3904 and TIP122 but without success. Thanks very much for your help and response.
December 12th, 2010
Juan, I used 16 of s8050 NPN transistors, simply because I already bought a 100 of them a while ago. There was a danger of getting using a NPN transistor with common anode LED matrix. Just to be clear, a transistor has A Collector (C), Base(B), and Emitter(E) terminals. The way NPN transistor works like this – is a small current flows from B to E, large current can flow from C to E. Remember, conventional current flows from (+) end of the battery, to the (-) end.
Now, look at the schematics for my project http://hackedgadgets.com/wp-content/uploads/2010/11/tetris.zip. A hex inverter sends current into B of a transistor, BUT (!) it has to go through all the leds, sink into shift-registers, and come back to hex inverters, in order for a power supply, connected to C, to go to E, then to LEDs, shift registers, and back. Your input in B MUST be able to supply enough current to go through all that stuff and return back. Whatever is feeding your B of the transistor might simply be not powerful enough.
There are two way to fix this.
1) Get the part, supplying current to B, powerful enough.
2) Use PNP transistors instead.
The way PNP works is if a small current flows from E to B (reverse on NPN), then a large current can from from E to C (also reverse of NPN). So, you can connect Vcc to the E of PNP, common anodes to the C of PNP, put at least a 1KOhm resistor between B and your logic circuit (WARNING, if you omit the resistor, you will damage transistor). However, now your logic circuit will SINK current, so logic 0 will select a row, and logic 1 will deselect a row.
I hope it helps.
Hexorg
December 12th, 2010
Hi Hexorg. Thanks for your help, I followed the second way you kindly suggested (using PNP) and it works fantastic. I used 1kOhm resistor between Base of a TIP106 transistor and the microcontroller part, and It is now working very very fine. Thank you so much for sharing your knowledge and for such a detailed explanation on what to do and how to do it. Best Regards. Juan.
June 18th, 2011
Hi Hexorg,I would like to ask if we would not send the whole scheme ,because I would like also to make these but I controlled with PIC. Could you help me.
June 19th, 2011
Ben, I didn’t quite understand your question, but I don’t mind helping.
June 19th, 2011
Sorry that you do not understand but I do not speak English, and I am translation with dictionary.
I would need the whole schematics, because it make with controls for PIC
June 19th, 2011
Ben, The schematics in http://hackedgadgets.com/wp-content/uploads/2010/11/tetris.zip already show almost everything you need. Just connect the wires to the output pins of the PIC microcontroller, and write the code to output data to those pins.
April 23rd, 2012
Hi Hexorg, I am really enjoyed your project and i have a question . i am trying to make rgb led matrix tetris and i am starting my project from “0″ / i haven’t prepared anything /. my question is now i am about to start my code and from what code section do i need to start ? delay ? or main ? or draw section ?
April 23rd, 2012
my second question is can i use atmega128 instead atmega168p?