@@ -144,14 +144,18 @@ typedef enum {
144144} display_type_t ;
145145
146146static display_type_t detect_display_type (void ) {
147- // Bitbang 4-wire SPI with a bidirectional data line to read the first word of register 0x2e,
147+ // Bitbang 4-wire SPI with a bidirectional data line to read the first byte of register 0x2e,
148148 // which is the 10-byte USER ID.
149+ // NOTE: the SSD1680 drives its response back on the MOSI/DATA line (GPIO35) in half-duplex
150+ // mode, NOT on the separate MISO line (GPIO37). Read with GPIO35 switched to input.
149151 // On the IL0373 it will return 0xff because it's not a valid register.
150- // With SSD1680, we have seen two types:
152+ // With SSD1680, we have seen three types:
151153 // 1. The first batch of displays, labeled "FPC-A005 20.06.15 TRX", which needs colstart=0.
152- // These have 10 byes of zeros in the User ID
154+ // These have 10 bytes of zeros in the User ID.
153155 // 2. Second batch, labeled "FPC-7619rev.b", which needs colstart=8.
154156 // The USER ID for these boards is [0x44, 0x0, 0x4, 0x0, 0x25, 0x0, 0x1, 0x78, 0x2b, 0xe]
157+ // 3. Third batch, labeled "FPC-7519rev.b", which needs colstart=8.
158+ // The USER ID for these boards is [0xca, 0xfe, 0x0, 0x16, 0x80, 0x0, 0x75, 0x1, 0x0, 0x98]
155159 // So let's distinguish just by the first byte.
156160 digitalio_digitalinout_obj_t data ;
157161 digitalio_digitalinout_obj_t clock ;
@@ -214,6 +218,7 @@ static display_type_t detect_display_type(void) {
214218 case 0x00 :
215219 return DISPLAY_SSD1680_COLSTART_0 ;
216220 case 0x44 :
221+ case 0xca :
217222 return DISPLAY_SSD1680_COLSTART_8 ;
218223 }
219224}
0 commit comments