Interfacing 7 Segment with ARM


Hey Folks, In this tutorial, we will learn how to interface a Seven Segment Display with ARM(FRDM-KL25Z).

Components Required
  • FRDM-KL25Z board
  • Seven Segment Display (Common Cathode)
  • Breadboard Mini
  • Jumper Wires (As Required)
  1. FRDM-KL25Z
      2. Seven Segment Display
 
     3.Breadboard Mini
 
 

    4. Jumper Wires (Male to Male)


 Follow the Image below for circuit connection reference:-


 (Interfacing all components)

After making the circuit dump the code given below:-

#include "mbed.h"
BusOut display(PTA1,PTA2,PTD4,PTA12,PTA4,PTA5,PTC8,PTC9);
int main() {
        while(1) {
       
        display=0xBF;
        wait(1);
        display=0x86;
        wait(1);
        display=0xDB;
        wait(1);
        display=0xCF;
        wait(1);
        display=0xE6;
        wait(1);
        display=0xED;
        wait(1);
        display=0xFD;
        wait(1);
        display=0x87;
        wait(1);
        display=0xFF;
        wait(1);
        display=0xEF;
        wait(1);
    }
}


After dumping the code the output is shown on the video below:-




After dumping the code the output is shown on the image below:-


Thinking?

 Join our hands-on training courses.

 To know more visit us at Karkhana Training Portal

 
Next
Previous