Digital clock project


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008
    Posts
    41

    Default Digital clock project

    I'm in the process of building a large digital clock using VFD matrix tubes found on ebay. Here is an example of 5 tubes making up one digit:



    This will be a 4 digit 24 hour style clock and each digit is controlled by an Allegro A6812 20 bit serial latch. All the latches are driven from the same serial line with separate strobe lines. To keep time I plan on using http://www.picbasic.co.uk/forum/showthread.php?t=2129 which looks simple and accurate enough for a home clock.

    It takes 20 bits to light up each digit, for example 0 = $0D, $C1, $B7 and 1 = $04, $80, $92. What I'm not sure about is how to use a lookup table to get this information. Use a table with 0 to 9 and then always read the index plus two in order to write the required bits? Any thoughts?

  2. #2
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86


    Did you find this post helpful? Yes | No

    Default

    I would use 3 lookup commands

    Code:
    lookup digit, [$0D,$04, ...], patternA
    lookup digit, [$C1,$80, ...], patternB
    lookup digit, [$B7,$92, ...], patternC
    Lookup2 allows for 16 bits, but that still would not meet your needs for 20 bits.

  3. #3
    Join Date
    Nov 2008
    Posts
    41


    Did you find this post helpful? Yes | No

    Default

    An ugly way that would probably work are two long select case commands for HH and MM. If HH = 1 then... if HH = 2 then... etc etc. Maybe have one go from 00 to 59 and the other in reverse order to save instruction time.

Similar Threads

  1. Digital clock thermometer Calendar PIC 16F628
    By valdirdf in forum Code Examples
    Replies: 0
    Last Post: - 31st May 2009, 01:52
  2. Replies: 2
    Last Post: - 1st May 2009, 08:23
  3. Digital Clock With Alarm Using DS1307.
    By Leonardo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2007, 02:43
  4. 6-Digit Digital Clock using PIC16F84
    By emavil in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2006, 19:04
  5. digital clock
    By jojokatada in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st February 2005, 11:16

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts