Microcontrollers and stuff A blog by Derk Vedelaar


JY-MCU 3208 Game of Life

After my previous post about the JY-MCU 3208 lattice clock I played around with it and eventually figured I could create the game of life on the display.

After I created the game of life on one display I wanted to have it running on all of my 4 displays (yes I bought 4 of them). Because this was not possible with the libraries found around the internet I made my own. With the display library I made all code has to be run on 1 display and on the other displays you have to erase the mega8 (or program an empty program) of the displays that are not running the code.

So in the end there is one display running the code and on the other displays the micro processor is not used. On the display that is running the code I replaced the crystal to a 16mhz one, so that it is still quite fast (without the crystal you can set the fuses to 8mhz and without changes the display runs on 1mhz).

You can see my code in action (with 3 displays) in this video:

Basically what I did for the 3 display version is; I connected the cs and wr lines of all 3 displays to each otcher. Then I connected the rxd to the cs of one of the displays and the txd to the last display. In the code, you can easily tell which pin is connected to the display driver.

For the fourth display I searched for 3 pins that when there is data sent over them the other displays would interpret it as bad formatted data. I chose to connect cs to txd, wr to rxd and data to data. I have not seen any problems with this setup.

On the side of the game of life I had some choices to make. I saw others connecting the downside of the display to the upside so that the field basically is infinite  (a so called toroidal array). I did not want that. But it also does not look nice when the borders of the display are visible. Strange things happen on the borders. So I made the field of the game of life bigger than the actual display. The part you can see is in the middle.

You can download my code on github.

Posted by Derk

Comments (9) Trackbacks (0)
  1. Just read your post love the idea of a Game of Life on one. I am not good with c but not bad with Arduino environment. Any chance you can help me convert the files to work on an arduino?



Leave a comment

No trackbacks yet.