Showing posts with label DS1307. Show all posts
Showing posts with label DS1307. Show all posts

Thursday, May 14, 2009

Click for A, Press and Hold for B

I planned to add a time setting mode to the alarm clock later, as gravy-- thought I wouldn't need one since the clock chip keeps time-- but with the board not yet built, I keep accidentally disconnecting the DS1307's battery and needing to reset it with a special sketch.

That's a pain, so I'm adding it to the PPAC program next, and to keep the interface simple-- jog/shuttle and a button-- a press and hold event seems appropriate for switching into an otherwise hidden mode, like shutting down a MacBook by holding down the button instead of just clicking it.

Despite a few posted examples on debouncing a button press (explicitly or with a library), I couldn't find any press+hold examples, so I took a stab at it and got a test sketch working pretty quickly with a button and two indicator LEDs. The code is posted below, as a comment.

Wednesday, May 13, 2009

PPAC Board V7.3: Hand Routed

Work on the main board (alarmduino?) is progressing nicely, but not without a false start-- after etching and building out the first board last week, I found that the 5-pin header to mate with the Futurlec DS1307 mini board was backwards! But the DS1307 doesn't need much circuitry, and the mini board had a lot of unused space, so I decided to revise the alarm clock main board with the clock built-in.

The latest PPAC layout has the DS1307 on the right side, with the battery holder on the bottom and interrupt going to A3; I would have tested the schematic on a breadboard tonight but I can't find any 10K resistors. I added an I2C EEPROM too (or, at least a socket for one-- I don't have the little sucker yet) for program settings, maybe a log of wake up times, and relief for the ATmega's built-in EEPROM.

Not to whine, but I'm getting impatient with EAGLE's autorouting for 1-layer boards-- I can usually find a route for the missed connections, and it's annoying to have to push around so many traces to fit them in. This board layout was routed completely by hand after EAGLE kept leaving at least four air wires. It might work as-is, or I may spread into the unused areas and widen the traces. Must resist the temptation to just etch it and build it before breadboarding the whole thing-- I want to have the program ready for this specific circuit, since I shuffled some pins around on the EAGLE layout after converting it from my previous working breadboard circuit.

Tuesday, April 21, 2009

PPAC Progress: RTC, Jog/Shuttle

I got my old test sketches working again for the DS1307 clock and jog/shuttle controller, and suddenly everything is working...:) It's "just" a matter of software and hardware layout at this point [gulp!].