7segment.h little bug

Marcoos
2013-08-26
2014-03-29
  • Marcoos
    Marcoos
    2013-08-26

    Display char fail with number.
    In the file 7segment.h; Table SevenSegDispLetter the command says that
    Letter is at ASC - 64, I know A at 1. A = 65-64 = 1.
    in the table SevenSegDispDigit the routine subtracts 48, then '0 '-48 = 0 instead of 1, and the display shows a number less.
    For now I have changed the routine doing -47, and it works, there are other implications?.

     
  • Anobium
    Anobium
    2013-08-27

    Interesting. If it works for you. Then, its ok.

    :-)

     
  • Marcoos
    Marcoos
    2013-09-23

    Hi Hugh, Please remember to edit the file. h of the 7-segment display, otherwise every time, when I update the environment recompile wrong .....

    Thank you, Marco

     
  • Anobium
    Anobium
    2014-03-29

    You are absolutely correct. There is an incorrect calculation in the method DisplayChar. The method of displaying a numeric character was incorrect as you stated.

    I have corrected and updated the header file. I have also extended the DisplayValue to support 0x0 to 0xF. It was 0x0 to 0x9. I have also added an example to an update to the help file.

    Thank you.