1

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.

endryha
  • 111
  • 1
  • 3
  • 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. – Andy aka Apr 16 '14 at 20:36
  • 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 – endryha Apr 16 '14 at 20:44
  • 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? – Andy aka Apr 16 '14 at 21:00
  • Where do you get 00-ff?? @andyaka – Passerby Apr 16 '14 at 21:36
  • 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! – Andy aka Apr 16 '14 at 21:40
  • 1) it doesn't blink or anything like that for this method call loadLed(numbers[8], numbers[8], numbers[8]); it displays exactly what you see on the photo and the LED is static 2) Yes my sketch quite the same to the "answer" link, I highlighted that I followed it, I changed pin numbers and now I am trying to figure out how to send numbers to the display – endryha Apr 16 '14 at 21:56
  • @Andyaka it only displays 8 8 8 as coded, but the loadLed() takes three bytes, then shifts them out msb, as well as 11 extra bits to fill up the 35 bit shift register buffer. According to the datasheet, this should be working. – Passerby Apr 16 '14 at 22:20
  • @Passerby I updated link to "answer" sorry my mistake – endryha Apr 16 '14 at 22:34

1 Answers1

1

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.

Passerby
  • 72,580
  • 7
  • 90
  • 202