6 years, 11 months ago.

So I need to get 2.468 to display on a 4 Bank 7 segment display

New to this code and wiring stuff, So I am completely lost. I know I need to "BusOut" I know digit 1 is controlled by pin 1. It needs to illuminate segments a,b,g,d,e which translates to pins 14,16,15,3,5. On the display I know decimal point 1 is held by Pin 1 and pin 7 on the Display unit

How do I wire this on the bread board? How do I code this? I have looked in Youtube, I have looked through the forums I found one other question about this, but it did not help

2 Answers

6 years, 11 months ago.

Have you seen this notebook page?

Accepted Answer

I have, But it did not help. I am so lost and confused I don't know how to ask the question i need.

posted by Douglas Sorensen 16 Dec 2017
6 years, 11 months ago.

Hi Douglas,

This is another way with BusOut but you will need to wire a lot.

BusOut Example

#include "mbed.h"
// TARGET NUCLEO F091RC


// Timer Three digits display H.MM
BusOut          display_H(PC_3, PC_2, PC_0, PC_1, PB_0, PA_4, PA_1);            // a, b, c, d, e, f, g
BusOut          display_dM(PB_6, PA_7, PA_6, PB_11, PB_12, PA_11, PA_12);       // a, b, c, d, e, f, g
BusOut          display_uM(PB_13, PB_14, PB_15, PB_1, PB_2, PA_9, PA_8);        // a, b, c, d, e, f, g
// Still need to define the four 7 segment digit display
DigitalOut      display_DP(PD_2);

// common cathode
const int DIGITS[11] = { // G, F, E, D, C, B, A --> Invert to BusOut
                          0x3F, // {0111111},  // ZERO
                          0x06, // {0000110},  // ONE
                          0x5B, // {1011011},  // TWO
                          0x4F, // {1001111},  // THREE
                          0x66, // {1100110},  // FOUR
                          0x6D, // {1101101},  // FIVE
                          0x7D, // {1111101},  // SIX
                          0x07, // {0000111},  // SEVEN
                          0x7F, // {1111111},  // EIGHT
                          0x6F, // {1101111},  // NINE
                          0x00  // {00000000}   // TURNIT OFF
                         };

int main()
{
// Turn off
display_H.write(DIGITS[10]);
display_DP = 0;
display_dM.write(DIGITS[10]);
display_uM.write(DIGITS[10]);


	while (true) {
                // Do something else...

		// To display 2.46 
		display_H.write(DIGITS[2]);
		display_DP = 1;
		display_dM.write(DIGITS[4]);
		display_uM.write(DIGITS[6]);
		// still need the four 7 segment digit display for the 8

              wait(1.0);
	}
}

Any dude please letme know to help you

Best regards,