You win some, you lose some.
-
I'm not sure how I feel about this. I made some new video drivers that are decoupled from the bus type they use. This is because for example, an ILI9341 display may come in serial (SPI) or parallel (8-bit) bus styles. An SSD1306 display comes in serial SPI or serial I2C buses. So I made such that you have 3 different types of busses - a parallel 8-bit bus, an SPI serial bus, and an I2C serial bus. You can plug those into the display driver for your device like the SSD1306, the ST7789 or the ILI9341 That way you can select the display type independently of the style of connection it uses. So for I2C for example, you declare a tft_i2c bus:
using bus_type = tft_i2c<LCD_PORT,0x3C,PIN_NUM_SDA,PIN_NUM_SCL,0x0,0x40,400000>;
And then you can feed that to your driver declaration:
using lcd_type = ssd1306<LCD_WIDTH,LCD_HEIGHT,bus_type,LCD_VDC_3_3,PIN_NUM_DC,PIN_NUM_RST,true>;
// declare it
lcd_type lcd;I wrote the SSD1306 and the I2C bus first. It's still not working. But when I simply swapped out the I2C bus for an SPI bus it worked with my SSD1306 SPI device on the first try. But it still gives me a shrunken display port and dropped scanlines on I2C. Amazing that I wrote the non working code first, and plugged it into my SPI bus and it worked right off though. my SSD1306 driver was developed entirely blind.
Real programmers use butterflies
-
I'm not sure how I feel about this. I made some new video drivers that are decoupled from the bus type they use. This is because for example, an ILI9341 display may come in serial (SPI) or parallel (8-bit) bus styles. An SSD1306 display comes in serial SPI or serial I2C buses. So I made such that you have 3 different types of busses - a parallel 8-bit bus, an SPI serial bus, and an I2C serial bus. You can plug those into the display driver for your device like the SSD1306, the ST7789 or the ILI9341 That way you can select the display type independently of the style of connection it uses. So for I2C for example, you declare a tft_i2c bus:
using bus_type = tft_i2c<LCD_PORT,0x3C,PIN_NUM_SDA,PIN_NUM_SCL,0x0,0x40,400000>;
And then you can feed that to your driver declaration:
using lcd_type = ssd1306<LCD_WIDTH,LCD_HEIGHT,bus_type,LCD_VDC_3_3,PIN_NUM_DC,PIN_NUM_RST,true>;
// declare it
lcd_type lcd;I wrote the SSD1306 and the I2C bus first. It's still not working. But when I simply swapped out the I2C bus for an SPI bus it worked with my SSD1306 SPI device on the first try. But it still gives me a shrunken display port and dropped scanlines on I2C. Amazing that I wrote the non working code first, and plugged it into my SPI bus and it worked right off though. my SSD1306 driver was developed entirely blind.
Real programmers use butterflies
-
Thanks! I'll maybe feel amazing when my code works. :-D *bangs on it some more* At least some of it does.
Real programmers use butterflies
-
I'm not sure how I feel about this. I made some new video drivers that are decoupled from the bus type they use. This is because for example, an ILI9341 display may come in serial (SPI) or parallel (8-bit) bus styles. An SSD1306 display comes in serial SPI or serial I2C buses. So I made such that you have 3 different types of busses - a parallel 8-bit bus, an SPI serial bus, and an I2C serial bus. You can plug those into the display driver for your device like the SSD1306, the ST7789 or the ILI9341 That way you can select the display type independently of the style of connection it uses. So for I2C for example, you declare a tft_i2c bus:
using bus_type = tft_i2c<LCD_PORT,0x3C,PIN_NUM_SDA,PIN_NUM_SCL,0x0,0x40,400000>;
And then you can feed that to your driver declaration:
using lcd_type = ssd1306<LCD_WIDTH,LCD_HEIGHT,bus_type,LCD_VDC_3_3,PIN_NUM_DC,PIN_NUM_RST,true>;
// declare it
lcd_type lcd;I wrote the SSD1306 and the I2C bus first. It's still not working. But when I simply swapped out the I2C bus for an SPI bus it worked with my SSD1306 SPI device on the first try. But it still gives me a shrunken display port and dropped scanlines on I2C. Amazing that I wrote the non working code first, and plugged it into my SPI bus and it worked right off though. my SSD1306 driver was developed entirely blind.
Real programmers use butterflies
It's this sort of problem that makes software engineers such well-adjusted people who spread joy wherever they go... :) /s
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
-
It's this sort of problem that makes software engineers such well-adjusted people who spread joy wherever they go... :) /s
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
:laugh: Well I solved the last of it today. I was making a simple mistake, easily corrected once I found it. It was almost luck that I found it though.
Real programmers use butterflies