279
ch = (((value / 10) % 10) + 0x30);
LCD_goto(7, 1);
LCD_putchar(ch);
ch = ((value % 10) + 0x30);
LCD_goto(8, 1);
LCD_putchar(ch);
}
Simulation
Explanation
Basically here, the same LCD library as in the LCD example has been used. The only difference is the
Serial-In-Parallel-Out (SIPO) part. I used a CD4094B CMOS SIPO shift register between the LCD and
the host MSP430 micro to achieve the port-expansion task. Only three pins of the host micro are
needed to drive the LCD. In the LCD library, you can see SIPO function on the top. This part translates
serial inputs to parallel outputs. Note that at every level the stored value in the SIPO is either ORed or
inverse ANDed instead of entirely changing the SIPO’s current content. In simple terms, it is like read-
modification-write. This is to ensure that only the target bits are altered, not the entire content of the
SIPO. In this way to some extent, data corruption is prevented.