ColdTrix Game Suite for MCF5272 in C

Back in 2010, my colleague and friend Luis Úbeda ( @lubeme23 ) and me developed a video game suite for ‘Digital Systems Laboratory’ (LSED) course in ETSIT-UPM. This course is based on creating a system (usually a game) using C for MCF5272 microcontroller (AKA Motorolla Coldfire). The student has to create the appropiate hardware and software to achieve it.

What we did? The basic assignment consisted in creating a similar game to the famous Tetris. We had to create a matrix of 8×4 LEDs to use as the board and manage it  using Coldfire. Game was controlled using a usual 12-digit keyboard that was managed by the Coldfire as well. In addition to the basic assignment, we decided to improve the system: we developed the Snake game for the same board, we put music to the games, we added a little LED matrix that showed you the next piece that was going to appear, added a voice read menu… Moreover, we tried to control the system using the PSP with infrared but we didn’t find out how to make it work in time (interruptions were behaving strangely!).

After many hours of development we finished. That hard work was worth because we learnt a lot and we got Honors in that course :) .

Now we have decided to publish the code under GPL license. Every comment and description is in Spanish. You can find it in Github: https://github.com/kec0/Coldtrix-Suite-Game

For ones who want to know the system deeper here it is the report of the system (also in Spanish): Coldtrix Suite Game Report

To sum up, this is a demo video we recorded:

LSED (‘Digital Systems Lab’ course at ETSIT-UPM): Tetris & Snake. Honors awarded.

 

M-QAM Simulator in Matlab

Like one year ago, my friend and colleague Luis Úbeda ( @lubeme23 ) and me developed a nice script in Matlab for simulating a telecommunication channel using M-QAM modulation. We have decided to release the code because we think It can help people to better understand the digital M-QAM modulation when passing throung a noisy channel.

How does it work? The script generates a random binary string of the desired length. Then it creates a QAM modulation with the entered level (4-QAM, 16-QAM, 64-QAM…). The scripts shows the constellation of the modulation. In the next step, it simulates the channel adding additive white gaussian noise to the signal, degrading the signal, according to the SNR selected. After that, it demodulates the QAM, shows the degraded constellation and checks how many bits have been corrupted. The result shows the BER produced in the experiment.

There are 2 more scripts that allow you to compare between different M-QAM modulation and to select the appropiate modulation for a SNR given with a max BER.

You can find the scripts in Github https://github.com/kec0/MQAM-Simulator or you can download them all together in this zip file MQAM Simulator Matlab. There is a little pdf guide of how the algorithm is implemented inside the zip (it’s in spanish).

As an example, here are some screenshots with one experiment. I have run MQAM_Simulation(2000,3,0). This means that I have 2000 random bits, i’m using 64-QAM and the SNR is 0. To begin with, it shows the 64-QAM constellation:

As we can see, every signal is perfectly placed. Now we make the signal traverse the noisy channel. This is how the constellation looks like:

The effect of the AWG noise can be perfectly noticed. Then, the script represents a diagram with the input bits and the output ones where you can see that there are differences:

Finally, script returns the total number of corrupted bits and the BER:

The script is able to use any M-QAM modulation from 4-QAM in advance. I hope it helps everyone to understand better how this type of digital modulation works. In addition, these scripts are under GPL License.

HTC Contest: The Tomorrow Talks

Me cuentan desde la ETSIT-UPM que HTC ha organizado un concurso para presentar nuevos modelos de teléfonos móviles. Si no estoy mal informado, los ganadores viajarán a donde elijan. Estoy orgulloso de presentaros el prototipo de mis compañeros de teleco (Ignacio Suárez, Miguel Álvarez, Ignacio Bermejo, Luis Rivero y Mario Sánchez): Flow Concept.

Echadle un ojo, no tiene desperdicio. Link al video: Flow Concept

Espero que ganéis cracks :) .

 

Para más información sobre  el concurso: http://www.thetomorrowtalks.com/