travisgoodspeed / goodwatch

Replacement board for Casio Calculator Watches using the CC430F6147
503 stars 55 forks source link

Add option for passing serial port to make, add numeric rng applet, fix some typos, and adjust character display #72

Closed etbusch closed 6 years ago

etbusch commented 6 years ago

Title should explain it all. If you don't like the changes to the alpha display, then I can leave those out.

Also, I added the +- display to the submenu app, as a UI indicator that we're in the submenu.

travisgoodspeed commented 6 years ago

Not sure how I feel about the font change to the letter G, but everything else looks good. I'll try to find time to run and merge this branch tonight.

The buzzer ought to have a proper waveform, but you can get half-assed chips by just flipping P1.7 a few dozen times. You must have that tiny little spring that always falls out during installation, and your backplate must be properly oriented.

Cheers from Pizza Rat City, --Travis

etbusch commented 6 years ago

Whoops, I forgot that pull requests track the branch, and aren't frozen to a commit. The alarm stuff has only been lightly tested, but does seem to work.

I was planning on making a buzzer driver with an unused timer for tone generation, if there are any available. I haven't read that far into it yet, but if you could advise on a likely solution I can certainly implement it.

Thanks!

travisgoodspeed commented 6 years ago

Pin 1 of the CC430F6137 is connected to the buzzer, as P1.7/PM_UCA0CLK/PM_UCB0STE/R03. The default secondary mapping is the USCI_A0 clock, but secondary functions on this chip are mappable, and it can be set to Timer A's rollover or clock as you feel would be cleanest in the source code.

For lack of pins, we are unable to light the alarm icon on the LCD. Some other indicator will be needed, to distinguish the alarm from the time.

etbusch commented 6 years ago

From the schematic, the buzzer is connected to P2.7, in case that was a typo.

I hacked on this for a bit this evening, but wasn't able to get the timer A service routine firing, and aren't sure what's wrong. You can look at my progress in my alarm branch and see where my mistake might be: https://github.com/etbusch/goodwatch/tree/alarm

travisgoodspeed commented 6 years ago

D'oh, typo on my part.

I'll rig up a minimal test case in a throwaway branch for you tomorrow, after I assemble a new development board.

etbusch commented 6 years ago

Great, I'm sure that will be helpful. In the meantime I have stripped all of the alarm and buzzer driver code from my fork's master, so we can merge this pull request without any half-working features.

I also reverted the 'G' LCD representation, as per your preference.

travisgoodspeed commented 6 years ago

The alarm interrupt is still enabled in this branch, but with the appropriate (empty) handler, I don't think that will be a problem.

My development watch is repaired, and I'll merge this PR in a few hours.