Martin Tithonium (tithonium) wrote,
Martin Tithonium
tithonium

I just realized something.

So, the PIC programmer I bought comes with a programming/testing board that includes 8 LEDs and a switch pre-wired to the chip. And it comes with example software. In fact, the PIC itself comes preprogrammed to cycle the LEDs, at a rate controlled by a potentiometer and with the switch reversing the direction.

I've been wondering how much I can do in terms of developing my martian watch without buying the rest of the hardware needed to build it (eg, the $80 lcd display, and whatever else I end up needing). What I just realized is that, with 8 LEDs, that's 8 bits of information, and a switch to change some state, I have everything I need to make the clock 'work'.

Hour, minute, and second are all representable with 6 or fewer bits. I can output the value of one of those registers on 6 of the LEDs, binary-coded. I can use the other two LEDs to indicate which field I'm displaying. I can use the switch to change between fields. So, I can start now, without any extra hardware, writing the code to start counting from 00:00:00 up to 24:39:35, and test it. I can't use the same scheme when I add day/month/year, but that's okay. that isn't strictly needed for a watch, and, once I've got the rest done, is a fairly uncomplicated thing.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 3 comments