1
\$\begingroup\$

enter image description here

I have a 7 segment led display with 3 digits (BT-M512RD-DR1 ) and Valueline Launchpad MSP-EXP430G2

I connected LED display according to this answer and here is my version of the sketch

But I am not sure how to control LED display correctly what data I need to send in order to display particular number or activate specific LED.

Please can someone explain me what is wrong or point me in correct direction?

UPDATE #1: LED doesn't blink and it is static while sketch is running.

\$\endgroup\$
8
  • \$\begingroup\$ The code looks like it cycles thru 00 to FF (I'm no expert). You need to understand what the code does more thoroughly than me in order to pick-out the parts than can output the correct bit pattern to suit the data you need represented. \$\endgroup\$
    – Andy aka
    Apr 16, 2014 at 20:36
  • \$\begingroup\$ actually this is what I want to figure out, I don't clearly understand what that code does and I am looking for a simple example how to trigger specific led, I read datasheet but I still don't understand, I am a newbie to this \$\endgroup\$
    – endryha
    Apr 16, 2014 at 20:44
  • \$\begingroup\$ Does the LED look frozen as per the picture you've posted or is it clearly scrolling thru 00 to FF. Maybe all the segments appear to be but aren't because the scrolling is too fast? \$\endgroup\$
    – Andy aka
    Apr 16, 2014 at 21:00
  • \$\begingroup\$ Where do you get 00-ff?? @andyaka \$\endgroup\$
    – Passerby
    Apr 16, 2014 at 21:36
  • \$\begingroup\$ I've probably got it wrong @passerby but in the example code there are 7-seg definitions for 0 thru to F and in my limited capacity as a sometimes-programmer I assumed the code scrolled thru 00 to FF - I didn't see an "entry point" for a "number" to be displayed and put 2 and 2 together and quite possibly got 4.5835! \$\endgroup\$
    – Andy aka
    Apr 16, 2014 at 21:40

1 Answer 1

1
\$\begingroup\$

This is an energia/arduino sketch. Setup sets up the output pins, loop does the work via loadLed. loadLed() expects 3 bytes, one for each number. numbers[] holds 16 bytes, numbers 0-9,A-F.

As such, loadLed(numbers[8], numbers[8], numbers[8]); means load the led diplays with 8, 8, 8.

Considering the decimal point is on in your picture, the data isn't matching up between your led display, the sketch code, and the datasheet.

No decoupling cap. That can be an issue.

Update: I think the issue is in that you are sending 36 bits, not 35. Change for (int i=0; i <= 10; i++) to for (int i=0; i <= 9; i++). As well as the decoupling cap.

\$\endgroup\$
8
  • \$\begingroup\$ yes this is exactly what I assume, but it doesn't seem to work, what can I do about it, what can I try to figure out how to trigger correct LEDs \$\endgroup\$
    – endryha
    Apr 16, 2014 at 21:59
  • \$\begingroup\$ It's a serial drive to the LEDs so maybe clock is inverted or swapped with data. Should it scroll 00 to FF or does it do something else dude? Curiosity! \$\endgroup\$
    – Andy aka
    Apr 16, 2014 at 22:09
  • \$\begingroup\$ @endryha try increasing the delays to 10 or 20 instead of just 5. Might be clocking too fast? \$\endgroup\$
    – Passerby
    Apr 16, 2014 at 22:17
  • \$\begingroup\$ @endryha also add a decoupling capacitor to the led display's vcc/vdd and ground. \$\endgroup\$
    – Passerby
    Apr 16, 2014 at 22:20
  • \$\begingroup\$ @endryha updated \$\endgroup\$
    – Passerby
    Apr 16, 2014 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.