Close

Processor Board

A project log for Simple LED Matrix Alarm Clock

A Fairly Conventional Alarm Clock using LED Matrix Displays

bharbourBharbour 03/14/2023 at 20:110 Comments

This is a pretty minimal board.

It has the processor itself (ATSAMD21E18A), a 12MHz crystal, a 32.768KHz crystal, a JTAG connector and I/O signal connectors.

Since the crystal signals use GPIO pins, I put jumpers on to allow using the crystal or the two GPIO signals. Surprisingly, the 12MHz crystal is not useful, being too high to use as a reference for the PLL to multiply it up to 48MHz. This project is using the 32KHz crystal for the PLL reference and the GPIO signals that could go to the 12MHz crystal. The USB socket is not used at all in this project.

These chips are only starting to become available again after the chip shortage. Fortunately, I had an old test PCB left over from when I designed this board.

The board runs on 3.3V from the filter regulator board.

Serial I/O on the SAMD21 family is done with configurable blocks that they call Sercoms. Each one can be configured to operate as a UART, an I2C or a SPI port. The ATSAMD21E18A has 3 of these Sercoms.  Two of them are in use as I2C ports, an one is configured as a UART for debugging.

Most of the GPIO signals on J6 are in use for one thing or another.

When I first started messing with this processor, I tried to write my own clock system configuration code. After bricking a processor chip by configuring the clock system in a non-functional way, I added a piece of code that tests two of the GPIO pins to see if they are jumpered together. If they are jumpered together, the code enters an endless loop. This test is run before entering the clock configuration code. In the event that I screw up the clock configuration again, I can put the jumper in and re-program the part. Without this code, it jumped into the clock config code before I could break to re-program it. People with more experience on this chip, may know a better way to deal with it. At this point, I have figured out the vendor supplied configuration stuff well enough that I have a working clock configuration for the projects that I use it on.

Discussions