I've been working on adding the alarm and snooze/stop functions to the alarm clock and have been successful so far. Things to note so far:
- A single alarm can be set with SW5 (using the same buttons to change the time) and armed with SW6
- The alarm tone is TBD, but right now it is a 250 Hz square wave with a 50% duty cycle. Need to work on this more, but it is simply a placeholder that seems to work well.
- Snooze causes the alarm to stop going off, but then triggers another alarm in 5 minutes unless the alarm is de-activated.
- Added some basic remote configuration functionality over serial. This uses the on-board FT230X to communicate with a host PC. This remote configuration capability should ideally allow configuration of all clock settings from a serial interface without the use of buttons. Right now, the current time (day/hour/minutes), alarm status, and alarm time (hours/minutes) can be set over serial. The ability to snooze and stop an alarm will be added next.
- Serial here is a simple 8N1, 38400 baud interface. Why 38400? The error for a 38400 baud rate seems to be much less than all others and this is important for a system running off an internal oscillator.
- I foolishly tied the FT230X's reset line to the main reset line without a jumper so now I can't use debugWIRE for serial functions. Bummer.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.