Storing hours and minutes into single byte?


Results 1 to 17 of 17

Threaded View

  1. #5
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Storing hours and minutes into single byte?

    If you could live with 5 minute resolution then, I think, it is doable - easily. In the same way that 12 hours fits into the upper nibble, 5 minute increments fit in the lower.

    It may also be possible to use the memory location as a partial bit - if location is even then AM, odd is PM or some such. I have not the will or the expertise to work out such a solution, but if program space is not the issue... Using the example above, it may be that you can differentiate 11:14 from 14:11 by its location? Or, perhaps you need only store the hour once every 10, 15, or 60 bytes, then use the bytes in between for only am/pm and minutes.
    Last edited by Amoque; - 4th June 2014 at 15:39.

Similar Threads

  1. SEROUT command (single byte value not string)
    By MrRoboto in forum mel PIC BASIC
    Replies: 15
    Last Post: - 12th June 2010, 04:34
  2. 6 hours for a comma, a space, and some caps.....
    By boroko in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 13th March 2009, 21:31
  3. 10,20,30,40 minutes
    By helena in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 1st March 2007, 13:04
  4. Timer and long (hours) sleep period - how to?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th January 2007, 08:32
  5. increases every 5 minutes
    By Sasha in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd April 2006, 22:09

Members who have read this thread : 0

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