Microchip® Advanced Software Framework

SAM Tic-Tac-Toe Example

Overview:

Introduction

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a tic-tac-toe game.

The game is controlled with the three mechanical buttons on the OLED1 Xplained Pro. The goal is to get three circles in a horizontal, diagonal or vertical row, before the opponent (SAM devices) gets three crosses in a row.

This application has been tested on following boards:

  • SAM D20/D21/R21/L21/L22/R30 Xplained Pro

Hardware Setup

The OLED1 Xplained Pro extension board must be connected to extension header 3 on the SAM D20/D21/L21/L22 Xplained Pro, and extension header 1 on the SAM R21/R30 Xplained Pro. To use another extension header, edit the configuration in:

  • conf_board.h
  • conf_ssd1306.h On the board of SAM D21 Xplained Pro, the PA03 Select jumper should be connected to EXT3 to make the Button 3 of the OLED1 extension board taking effect.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.