Binary Coded Decimal


Results 1 to 12 of 12

Threaded View

  1. #6
    Join Date
    Jul 2007
    Posts
    38


    Did you find this post helpful? Yes | No

    Default

    does anyone have any ideas?


    when the seconds register is equal to 40, the "tens" of the hours register becomes 4 (e.g 09 then changed to 49 when seconds becomes 40) the hours "tens" then returns to its correct value once seconds is smaller than 40 again.

    here is an example, i am debugging using hyperterminal:

    hours:minutes:seconds

    9(9):22(22):38(38)

    9(9):22(22):39(39)

    49(49):22(22):40(40)

    the values in the brackets are the bcd values straight from the registers without being ran through any conversion routines, i then output them using the HEX modifier.
    Last edited by -Dan-; - 23rd May 2009 at 04:30.

Similar Threads

  1. Convert long binary number to ASCII Decimal
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th July 2009, 14:58
  2. How to convert binary to decimal?
    By Cabomba in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th October 2007, 02:27
  3. Decimal to Binary Conversion
    By schlaray in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 23rd December 2006, 15:58
  4. Binary to Decimal from ADC
    By RYTECH in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 27th July 2005, 19:51
  5. Decimal to binary conversion
    By Demon in forum Code Examples
    Replies: 9
    Last Post: - 25th February 2005, 21:05

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