Shop OBEX P1 Docs P2 Docs Learn Events
cheap and simple LED display — Parallax Forums

cheap and simple LED display

yarisboyyarisboy Posts: 245
edited 2010-09-04 17:22 in Propeller 1
I'm experimenting with the BS2Functions.spin and the MC14489 driver chip. So far I've successfully called the BS2 function shiftout without errors at compile time. What is the best way to lower my enable pin? The function as-written does not use an enable line for the shift-out. Do I have to modify BS2.shiftout so that it has an enable line working in concert with the rest of its guts? I'm sending hex characters to the 4x7 display. Is this the best function to use for this?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-09-04 16:23
    An enable line is not provided for in the shiftout routine because it's not provided for in the BS2 SHIFTOUT statement. Normally this is done by the programmer as separate HIGH / LOW statements. You can certainly add appropriate OUTA[ ... ] := statements to your shiftout routine or you can use separate statements around calls to shiftout. I'd use the 2nd choice because it's sometimes useful to use several calls to shiftout in a row with the enable line high or low.
  • yarisboyyarisboy Posts: 245
    edited 2010-09-04 17:22
    Thanks again Mike. Writing a zero to my enable pin and then a 1 after the shift-out works perfectly. That involved just adding three statements to the object. The MC14489 only works with MSB first so I'll have to rearrange my hex codes going in. That should be no big deal.

    Turns out it wasn't. I had to write a decimal to hex converter using integer math, modulus, and shift. I'll OBEX this driver when I've finished the required comments.
Sign In or Register to comment.