Shop OBEX P1 Docs P2 Docs Learn Events
Displaying a decimal point — Parallax Forums

Displaying a decimal point

Brian DalzielBrian Dalziel Posts: 17
edited 2005-02-04 13:42 in BASIC Stamp
Hi,

I am using the MAX7219 display driver IC and a BS2P40. I need to turn on the decimal point on my 2-digit LED display so I can display a number like 1.6

What would be the PBasic command to turn the decimal point on (permanently)? Or to display a none-whole integer.

Thanks
Brian

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-02-04 00:51
    According to the MAX7219 docs (hint, hint...) you can turn the decimal point on when using Code B decoding by setting bit 7 of the value for the digit in question.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Brian DalzielBrian Dalziel Posts: 17
    edited 2005-02-04 03:59
    Hi John,

    Yes, I have been reading this document in earnest.

    I know I need SHIFTOUT to set Code B Decoding for digit #1 (OF in HEX). But how would the commands actually be sent in PBasic (my original question).

    SHIFTOUT [noparse][[/noparse]data pin], [noparse][[/noparse]clock pin], MSBFIRST, OF ?? This isn't working

    Then How do you cammand bit 7 for DP?


    Thanks John, you have helped me twice today!
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-02-04 13:42
    Download our StampWorks book -- it has a project with the MAX7219 that uses Code B decoding as well as individual segment decoding. Using the MAX7219 is a bit complex, but can be handled with the BASIC Stamp with some patience. There's also a couple columns in our Nuts & Volts "Stamp Applications" section, though I don't remember when they were written.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
Sign In or Register to comment.