#include #define LATCH BIT2 #define CLOCK BIT3 #define DATA BIT4 void pulseclock(void)//function to pulse the serial clock { P1OUT |= CLOCK; P1OUT ^= CLOCK; } void pinwrite(unsigned int pin, unsigned long j)//function to send 0 or 1 on gpio for a high or low value of sent data { if (j) P1OUT |= pin; else P1OUT &=~ pin; } void shiftout1(unsigned long j)//function to send higher order 16 bits as msp has 16 bit architecture { P1OUT &=~ LATCH; int l; for (l = 0; l < 16; l++) {// as data value is 16 bits and clock has to be toggled 16 bits only pinwrite(DATA, (j & (1<