When building another digital clock it is always a dilemma how to make it engaging and unique. Alex found interesting way of counting and displaying time. He used LED matrix controlled by Mbed board.
Clock updates and displays time as digits every minute. But after a second or two Game of Life takes over and starts changing LED pixels by following four simple rules:
- Any live cell with fewer than two live neighbours dies, as if caused by under-population.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overcrowding.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
So every minute you get different starting conditions what makes it behave differently every time. Game updates it status every second. So so get a seconds count as well but there is no way to tell the time until minute is counted up.
Generally speaking – computer is a device that can perform arithmetic and logical operations. In other words there mas be a processor, memory and some input/output. So not only personal computers, tablets and other stuffed devices can be called computers. Any microcontroller like AVR is already a computer in a chip. Anyway for some fun, rovku put together a simple computer out of three chips that make it tick. For a processor he’s chosen Rockvel R6502P which is an 8-bit processor running at 1MHz. As I/O controller there is an Atmega16 used which talks to external CY7C130 dual port 1K RAM and also generates composite video signals.
Computer doesn’t do any special – it outputs OK to screen and blinks a cursor. But this is more than enough to prove the concept and have a warm feeling of seeing it working.
We all know about STMicroelectronics. Recently they have released a surprisingly cheap (only 10 Euros) evaluation kit for their ever popular 8-bit controllers. It has an on-board micron roller, clocked at 16MHz and having a memory of 32KB with 2KB of RAM and 1KB of EEPROM data. As compared to AVR/PIC, it has 4sets of TIMERS along with additional on-board peripherals such as SPI, I2C, UART, and ADC. Surprisingly it also features an on-board integrated ST-LINK for programming and debugging over USB. Therefore you don’t need to buy any type of converters or even a separate programmer.
The circuit board has been designed so that you can simply snap off the ST-LINK part if you’d like to use the microcontroller on its own and it also has dedicated jumpers based on the power-supply you want to use. An interesting addition to the board is a touch-sensitive key which is a totally new and advanced concept. In my opinion, if you are just beginning to learn programming and don’t want to begin with ARDUINO, go with this as it’s cheap and has the basic peripherals on-board.
In many microcontroller projects you need some non-volatile memory – which preserves data even when power is off. Most popular type of such memory is Flash or EEPROM. Many MCUs like AVR or PIC already have some EEPROM inside chip that may suite your needs. But in many cases it is not included and you may need to connect it externally. EEPROMs with I2C interface is very common in such situation as they don’t need lots of I/Os (only two wires). If you decided to add an EEPROM chip in to your project check out the useful guide on how it works written by Jesus Echavarria. As example he took 24LC256 EEPROM which capacity is 32K x 8 bytes. Chip works in pretty wide voltage range – between 1.7V and 5.5V which is great either for 3.3V or 5V setups.
He covers all the basic things you need to take care of including selecting proper chip slave address in I2C line. Then performing reading and writing EEPROM data in byte and page modes. This guide might serve as nice snippet for your next project so you don’t have to scratch head if something goes wrong.