Comments (18)
That is great. Well done for finding the problem!
I'll leave the issue open for reference.
from mpd_oled.
Hi
Thanks for the feedback. I have just reviewed the OLED library code, and it does not directly support SH1106 with SPI. If I have understood, you are running with "mpd_oled -o 6" and have modified oled_is_spi_proto to call the SPI setup for OLED_SH1106_I2C_128x64. However, it looks like ArduiPi_OLED::display(void) in ArduiPI_OLED.cpp will also need changes as it is calling fastI2Cwrite(buff, 17); for OLED_SH1106_I2C_128x64, which will be wrong for SPI.
Adrian.
from mpd_oled.
Also, but I think you probably reviewed this, some of the the SPI parameters cannot be set on the command line and have to be set in init_display() in display.cpp if the defaults need changing.
from mpd_oled.
hi,
thank you for the response. i did review the SPI parameters. there were all fine except for the default chip select value.
will review ArduiPi_OLED::display(void).
from mpd_oled.
have modified ArduiPi_OLED::display(void) as follows (when isSPI is true):
bcm2835_gpio_write(dc, HIGH); if (oled_type == OLED_SH1106_SPI_128x64) { fprintf(stdout, "is SSH1106 spi\n"); for (uint8_t k=0; k<8; k++) { sendCommand(0xB0+k);//set page addressSSD_Data_Mode; sendCommand(0x02) ;//set lower column address sendCommand(0x10) ;//set higher column address } } // Send all data to OLED for ( i=0; i<oled_buff_size; i++) { fastSPIwrite(*p++); }
still no joy. have to admit i have no idea what i am doing ;-)
from mpd_oled.
All I can suggest is that in the original code
sendCommand(0xB0+k);//set page addressSSD_Data_Mode;
was called eight times, with different values of k, each time followed by writing some data. The way you have it all the data is written at the end (outside the k loop).
from mpd_oled.
hi,
got the display to switch on and display something. unfortunately just random noise / snow.
had to upgrade to the latest bcm2835 (v1.58) to make it work. the current version, as on trunk, caused an endless loop in bcm2835_spi_transfer.
have you seen the random noise issue before? guess that something is still off in ArduiPi_OLED::display(void).
ArduiPi_OLED::display(void) has now been updated to mirror the i2c:
bcm2835_gpio_write(dc, HIGH);
if (oled_type == OLED_SH1106_SPI_128x64)
{
char buff[17] ;
uint8_t x ;
buff[0] = SSD_Data_Mode;
for (uint8_t k=0; k<8; k++)
{
sendCommand(0xB0+k);//set page addressSSD_Data_Mode;
sendCommand(0x02) ;//set lower column address
sendCommand(0x10) ;//set higher column address
for( i=0; i<8; i++)
{
for (x=1; x<=16; x++)
buff[x] = *p++;
fastSPIwrite(buff, 17);
}
}
}
do you perhaps have any other advice?
from mpd_oled.
It looks like with the fastI2Cwrite(buff, sz) call the first character is a "command", rather than data, and so 17 bytes are sent for 16 bytes of data. This does not appear to be the case for fastSPIwrite(buf, sz), in which case you could try fastSPIwrite(&buff[1], 16); in your code above.
I updated bcm2835 to v1.25 in a development version which uses autotools for the build (I think because I encountered a compilation issue). If possible, I'll update this to v1.58. I haven't had any feedback of success or failure with the supported SPI OLED (mpd_oled -o 1) and therefore haven't had confirmation that the version of bcm2835 in master works correctly with it.
from mpd_oled.
thank you for the quick response.
unfortunately the change made no difference:
fastSPIwrite(&buff[1], 16);
suspect something else is wrong. the display is already corrupted after ArduiPi_OLED::begin (with a 10s pause).
from mpd_oled.
It's a shame it didn't work out. Just a thought, if it is suitable for your project, have you checked whether your display also supports I2C?
from mpd_oled.
yes, it does, but that is not the default. to change to I2C one would have to resolder resistors or some such....unfortunately out of my league.
from mpd_oled.
found a bug. have not tested the fix yet.
the issue is with the sequence:
- set DC pin high to indicate data
- send various commands, e.g. SH1106_Set_Page_Address, which pulls DC low for command node.
- by the time we do fastSPIwrite dc is actually low.
have corrected the above by adding a sendData overload that takes a char* and length. will test later today.
from mpd_oled.
the above mentioned bug addressed the issue. all working now.
thank you for your the help!
from mpd_oled.
hello i have a question i have an oled display ssd1325 spi but i can't get mpd_oled spi to work can you help me with that already thanks
from mpd_oled.
I am a layman in this area if I send my SSD1325 to spi then iksudo ./mpd_oled-o 1 -r 24 -b 10 -g 1 -f 20 that does not want you can help me with this my ssd1325 display send to me with raspberry pi 3 hifiberry please help me
bedankt theo
from mpd_oled.
Hi Theo
mpd_oled only supports displays compatible with SH1106 or SSD1306, and from a quick web search it appears that SSD1325 is not compatible with either of these, and so your display will not work with mpd_oled. I am not able to add support for more displays at this time, but it is something I would like to look at in the future.
Adrian.
from mpd_oled.
okay thanks well i will now get a new ssd1306 i2c display i hope if it goes better then
greeting Theo.
from mpd_oled.
Closed by: 410fcba and d964414
from mpd_oled.
Related Issues (20)
- MoOde - ALSA loopback - SoX HOT 24
- hello how it use with mic without player HOT 35
- Volume - % HOT 2
- Mod main.cpp HOT 3
- Really solved? still have issue HOT 3
- Feature Request turned Bug: Prevent OLED Burn-In - Turn off display or screensaver after idle period HOT 5
- MPD OLED for Raspberry Pi VOLUMIO 3.0? HOT 37
- Display freezes on playback start (moOde 8.1.2) HOT 11
- Mpd_oled on a 128x64 RGB matrix HOT 3
- cp: cannot stat '/var/local/www/currentsong.txt': No such file or directory HOT 28
- Some potentially useful tips for defining the mpd_oled service for Volumio HOT 4
- 128x32 Monochrome OLED HOT 2
- Improve framerate by changing image data transmission HOT 2
- Unable to use hifiberry digi pro DAC with mpdoled HOT 13
- Option for showing Spectrum analyser only, when mpd is playing HOT 2
- Russian song titles are not displayed HOT 4
- MPD_oled over MoOde audio rel 8.3.2 HOT 17
- A mpd_oled is crashing in idle/clock mode after switching to 64bit. HOT 8
- Not an issuse but some things for Raps p4 64bit raspbain HOT 1
- Spectrum Analyzer after some time in stop HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpd_oled.