Driver to control a peripheral circuit being controlled by the operation of a FET. Inbetween the mbed and FET is a single D type latch, used to latch a signal to the driver.

Committer:
sk398
Date:
Sun Feb 07 18:20:55 2016 +0000
Revision:
2:9059b675917e
Parent:
1:a0209f182a64
Child:
5:7d1b124490ed
Latch Driver using SR Latches

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sk398 0:87f2d094bea3 1 #include "mbed.h"
sk398 0:87f2d094bea3 2
sk398 0:87f2d094bea3 3 #ifndef LATCH_FET_DRIVER
sk398 0:87f2d094bea3 4 #define LATCH_FET_DRIVER
sk398 0:87f2d094bea3 5
sk398 0:87f2d094bea3 6
sk398 0:87f2d094bea3 7 #define LOW 0
sk398 0:87f2d094bea3 8 #define HIGH 1
sk398 0:87f2d094bea3 9
sk398 0:87f2d094bea3 10
sk398 0:87f2d094bea3 11 class Latch_FET_Driver
sk398 0:87f2d094bea3 12 {
sk398 0:87f2d094bea3 13
sk398 0:87f2d094bea3 14 public:
sk398 1:a0209f182a64 15 Latch_FET_Driver(PinName set,PinName reset);
sk398 2:9059b675917e 16 void outputHigh();
sk398 2:9059b675917e 17 void outputLow();
sk398 2:9059b675917e 18 // int setOutput();
sk398 2:9059b675917e 19 // int resetOutput();
sk398 0:87f2d094bea3 20 private:
sk398 2:9059b675917e 21 void initialState();
sk398 2:9059b675917e 22
sk398 0:87f2d094bea3 23
sk398 0:87f2d094bea3 24 protected:
sk398 0:87f2d094bea3 25 DigitalOut *SetPin;
sk398 0:87f2d094bea3 26 DigitalOut *ResetPin;
sk398 0:87f2d094bea3 27 };
sk398 0:87f2d094bea3 28
sk398 0:87f2d094bea3 29 #endif