hef4894b

rwlee-lv/hef4894b/hef4894b

No description
hef4894b
@/hef4894b
UPDpulse
Triggers new read
DATAport
data input(SER, DS)
LATCHport
latch input(RCLK, ST_CP)
CLOCKport
clock input(SRCLK, SH_CP)
1 portboolean
port QA (Q0)
2 portboolean
port QB (Q1)
3 portboolean
port QC (Q2)
4 portboolean
port QD (Q3)
5 portboolean
port QE (Q4)
6 portboolean
port QF (Q5)
7portboolean
port QG (Q6)
8 portboolean
port QH (Q7)
9 portboolean
port QH (Q7)
10 portboolean
port QH (Q7)
11 portboolean
port QH (Q7)
12 portboolean
port QH (Q7)
hef4894b
UPD
DATA
LATCH
CLOCK
1 port
2 port
3 port
4 port
5 port
6 port
7port
8 port
9 port
10 port
11 port
12 port
DONE
DONEpulse
Fires on a successful write
To use the node in your project you should have the rwlee-lv/hef4894b library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD evaluate_on_pin disable
#pragma XOD evaluate_on_pin enable input_UPD
#pragma XOD error_raise enable

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    if (!isInputDirty<input_UPD>(ctx))
        return;

    const uint8_t lch = getValue<input_LATCH>(ctx);
    const uint8_t cl = getValue<input_CLOCK>(ctx);
    const uint8_t dt = getValue<input_DATA>(ctx);
  

    ::pinMode(lch, OUTPUT);
    ::pinMode(cl, OUTPUT);
    ::pinMode(dt, OUTPUT);
    const bool a = getValue<input_1_port>(ctx);
    const bool b = getValue<input_2_port>(ctx);
    const bool c = getValue<input_3_port>(ctx);
    const bool d = getValue<input_4_port>(ctx);
    const bool e = getValue<input_5_port>(ctx);
    const bool f = getValue<input_6_port>(ctx);
    const bool g = getValue<input_7port>(ctx);
    const bool h = getValue<input_8_port>(ctx);
    const bool i = getValue<input_8_port>(ctx);
    const bool j = getValue<input_8_port>(ctx);
    const bool k = getValue<input_8_port>(ctx);
    const bool l = getValue<input_8_port>(ctx);
    
    
   ::digitalWrite(lch, 0);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, l);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, k);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, j);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, i);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, h);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, g);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, f);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, e);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, d);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, c);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, b);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
    ::digitalWrite(dt, a);
     ::digitalWrite(cl, 1);
     ::digitalWrite(cl, 0);
   ::digitalWrite(lch, 1);
    emitValue<output_DONE>(ctx, 1);
}