Martha MigliacioAlex Wong
Published © GPL3+

Using the Pmod SSD with Arduino Uno

Application notes for Pmod SSD and Arduino Uno. In this app, Pmod SSD will be used as a counter that increments every second.

EasyProtip1 hour507
Using the Pmod SSD with Arduino Uno

Things used in this project

Hardware components

Pmod SSD
Digilent Pmod SSD
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Pmod SSD and Arduino Uno Fritzing file

Fritzing file displaying the connection of the Pmod SSD to the Arduino Uno.

Pmod SSD and Arduino Uno Fritzing Image

Fritzing image displaying the connection between the Pmod SSD and Arduino Uno.
Pmodssd arduinouno bb 92gc68juh3

Code

Pmod SSD and Arduino Uno Code

Arduino
Using this code will turn the Pmod SSD into a counter that increments every second.
/************************************************************************
*
* Test of the Pmod module
*
*************************************************************************
* Description: Pmod_SSD
* A counter increments every second.
*
* Material
* 1. Arduino Uno
* 2. Pmod SSD
*
************************************************************************/

byte ledPin[8]={2, 3, 4, 5, 6, 7, 8, 9}; // Numbers of pins on the Arduino
byte code[10]={63,6,91,79,102,109,124,7,127,103}; // code numbers 0 to 9
int unite=0;
int dizaine=0;
int duree;

void setup()
{
for (int i=0; i<=8; i++) // configuration of pins 2 to 9 in output
  {
pinMode(ledPin[i], OUTPUT);
  }
}

// Program principal
void loop()
{
duree=millis() / 1000; // stopwatch
dizaine=duree/10; // Extraction of tens
unite=duree%10; // Extraction of units
if (duree>=100) // RAZ when counter reach 99
  {
dizaine=0;
unite=0;
  }
digitalWrite(9,LOW); // selection of units on display
afficher(code[unite]); // show units
delay(10);
digitalWrite(9,HIGH); // selection of tens on display
afficher(code[dizaine]); //show tens
delay(10);
}

void afficher(int x) // Procedure coding the number in 7 segments
{
byte chiffre=x;
byte segment=0;
for (int i=2; i<9; i++)
  {
segment=chiffre&00000001;
digitalWrite(i,segment);
chiffre=chiffre>>1;
  }
}

Credits

Martha Migliacio

Martha Migliacio

5 projects • 5 followers
Alex Wong

Alex Wong

5 projects • 13 followers
I work in Digilent and like creating projects
Thanks to Lextronics.

Comments

Add projectSign up / Login