
SPI1_write(0x0F) //select low-nibble BCD 4-digit 7-segment SPI1_write(0x01) //set 1-digit BCD display only SPI1_write(0x09) //select decode-Register We can select BCD coded format for 1-digit, 4-digit or 8-digit displays by setting this register values to 0x01, 0x0F, and 0XFF respectively. But if you want to use 7-segment displays, you should select BCD decode mode. We can also select either BCD code operation or no-decode operation. It is used to select the number of seven-segments digits we want to use. SPI1_write(0x00) //select normal operation Decode-Mode Register (0x09) For instance SPI1_write(0x0c) //Select shutdown-register Writing 0x00 to this register will shut down the IC and if you want to activate it again, write 0x01 through SPI communication. It is also used to shut down or activate the display. When we initially power-up, all control registers go into reset mode.
