Nucleo driving Multiple 4 digit 7 segment display
Dependents: MutiplexedDisplaysSocketServer mltiplexed_7_segment_displays_over_ethernet mltiplexed_7_segmt_displays_ethernet Multi_7_Seg
SN74CBT3257.cpp
- Committer:
- shivanandgowdakr
- Date:
- 2018-10-23
- Revision:
- 1:85ec0f240cb8
- Parent:
- 0:e5e550b7a341
File content as of revision 1:85ec0f240cb8:
#include "SN74CBT3257.h"
#include "mbed.h"
SN74CBT3257::SN74CBT3257(PinName S0, PinName S1, PinName S2, PinName S3, PinName OEB0, PinName OEB1,PinName OEB2, PinName OEB3) :
mS0(S0), mS1(S1), mS2(S2), mS3(S3),mOE0(OEB0),mOE1(OEB1),mOE2(OEB2),mOE3(OEB3)
{
mS0=1;
mOE0=1;
mS1=1;
mOE1=1;
mS2=1;
mOE2=1; // Disable All Floors
mS3=1;
mOE3=1;
}
void SN74CBT3257::Select_Floor_Zero(void)
{
mS0=0;
mOE0=0; //Out Enable Floor Zero
mS1=1;
mOE1=1; // Disable All Other Floors
mS2=1;
mOE2=1;
mS3=1;
mOE3=1;
}
void SN74CBT3257::Select_Floor_One(void)
{
mS0=1;
mOE0=0; //Out Enable Floor One
mS1=1;
mOE1=1;
mS2=1;
mOE2=1; // Disable All Other Floors
mS3=1;
mOE3=1;
}
void SN74CBT3257::Select_Floor_Two(void)
{
mS0=1;
mOE0=1;
mS1=0;
mOE1=0; //Out Ensable Floor Two
mS2=1;
mOE2=1; // Disable All Other Floors
mS3=1;
mOE3=1;
}
void SN74CBT3257::Select_Floor_Three(void)
{
mS0=1;
mOE0=1;
mS1=1;
mOE1=0; //Out Enable Floor Three
mS2=1;
mOE2=1; // Disable All Other Floors
mS3=1;
mOE3=1;
}
void SN74CBT3257::Select_Floor_Four(void)
{
mS0=1;
mOE0=1;
mS1=1;
mOE1=1;
mS2=0; //Out Enable Floor Four
mOE2=0; // Disable All Other Floors
mS3=1;
mOE3=1;
}
void SN74CBT3257::Select_Floor_Five(void)
{
mS0=1;
mOE0=1;
mS1=1;
mOE1=1;
mS2=1; //Out Enable Floor Five
mOE2=0; // Disable All Other Floors
mS3=1;
mOE3=1;
}
void SN74CBT3257::Select_Floor_Six(void)
{
mS0=1;
mOE0=1;
mS1=1;
mOE1=1;
mS2=1;
mOE2=1; // Disable All Other Floors
mS3=0; //Out Enable Floor Six
mOE3=0;
}
void SN74CBT3257::Select_Floor_Seven(void)
{
mS0=1;
mOE0=1;
mS1=1;
mOE1=1;
mS2=1;
mOE2=1; // Disable All Other Floors
mS3=1; //Out Enable Floor Seven
mOE3=0;
}