You actually need two resistors (which we’ll add to the code):
A pulldown on the clock pin (100KΩ clock -> GND)
A pullup on the reset pin (100KΩ reset -> Vcc)
Also, it might be config settings for Operating Voltage… take a look at line 161 (I think, github isn’t working for me right now, so that’s from my local file)
`// Configuration string: Extended instruction mode, Operating voltage (contrast),
// temperature coefficient, bias voltage, normal instruction mode, normal display mode
// Good values for op voltage (second byte) are around 0xB0. Go higher if the image is washed out, lower if too dark
static DEFAULT_CONFIG = “\x21\xB6\x04\x13\x20\x0C”;`
Try adding the pullup + pulldown resistor, and see if it fixes it. If it doesn’t, try increase the operating voltage (second byte of the DEFAULT_CONFIG blob).
Just found SClck of course, however, there are some naming differences between teh adafruit and sparkfun component. Do we have a wiring diagram anywhere? I have tried thsi from my side, included the pulldown up resistors, but i dont kno what the 257SPI should be wired to on the screen end. I have DN(MOSI) free and the clock only has the resistor on it, but is the 5 or 7 on the IMP going to the MOSI?
I did a testrun and been testing the clk and mosi pin on the screen as 257 spi connection.
one setup makes teh screen flicker a bit the other truns it all black (i guesss thats the testing part) but none ever loads the BMP or rather displays it on screen.
I tried this and I think my wiring was ok. Issue is that it blackens everything. When I freshly plug in the power, the BMP shortly shows up then is ‘covered’ by an all black screen. So the image either arrives or comes from cache, but displays. It seems to be followed by an all black screen. If I can kill that step, I should be there.
Okay working now. I think it was a loose connection on one of the nokia pins, if I tilt and press it into the breadboard, it starts working. Bit weird so. Hope it will be perfect once its soldered up
I don’t know how to do this with the imp, but with an Arduino, using the library Adafruit_PCD8544.h, you can set the contrast like this:
display.setContrast(55);
hope this helps a bit
–edit–
to quote beardedinventor :
// Good values for op voltage (second byte) are around 0xB0. Go higher if the image is washed out, lower if too dark static DEFAULT_CONFIG = "\\x21\\xB6\\x04\\x13\\x20\\x0C";
I am also using the Sparkfun version of the Nokia 5110 display but I am having trouble getting text to display consistently on the display. Most times it displays the text correctly but other times it displays the text in the wrong place or the text is scrambled or the display is blank.
Is this a timing problem? Does anyone know how to correct this?