I've been playing with the Nokia 5110 display. These are now available very cheap and work well with any picaxe with HW SPI.
I found code from hippy and srnet
http://www.picaxeforum.co.uk/showthread.php?21676-Mini-Morse-decoder-using-Nokia-5110-graphics-LCD&highlight=5110
http://www.picaxeforum.co.uk/showthread.php?18500-Graphical-LCD-module-from-mobile&highlight=5110
I've tested this code and have the following observations:
The SPI mode (SPImode01) in the examples appears wrong for the two displays I've tried with a 20X2. It does work just about but the clock idles low whereas it should be high. This is corrected with SPImode00 which then works very well with a SPImedium speed and a clock frequency of 64MHz.
The code now also works well without requiring a disconnect command and is not affected by the use of sertxd
One of the displays I have needs 0V to drive the backlight, the other needs 3.3V so the PWM range will be upside down depending on the display.
The software contrast setting is very sensitive and really there is only a very small range of usable numbers for a display and it is display specific (I found the range 0xB0 to 0xBF to work). So it does not make sense to use a pot as input to the picaxe to set this.
Both srnet and Hippy's versions use the picaxe to read a serial input to drive the display. I prefer to embed the display code in my main program (same for normal LCDs).
Based on their code and some Arduino code, I've developed my own much simplified version to be built into complete programs and which also integrates the generic formatting routines I've just posted:
http://www.picaxeforum.co.uk/showthread.php?25359-Formatting-numbers-solved
It also includes a bargraph routine that I'm quite pleased with
Example code (with thanks to Hippy and srnet) attached
I found code from hippy and srnet
http://www.picaxeforum.co.uk/showthread.php?21676-Mini-Morse-decoder-using-Nokia-5110-graphics-LCD&highlight=5110
http://www.picaxeforum.co.uk/showthread.php?18500-Graphical-LCD-module-from-mobile&highlight=5110
I've tested this code and have the following observations:
The SPI mode (SPImode01) in the examples appears wrong for the two displays I've tried with a 20X2. It does work just about but the clock idles low whereas it should be high. This is corrected with SPImode00 which then works very well with a SPImedium speed and a clock frequency of 64MHz.
The code now also works well without requiring a disconnect command and is not affected by the use of sertxd
One of the displays I have needs 0V to drive the backlight, the other needs 3.3V so the PWM range will be upside down depending on the display.
The software contrast setting is very sensitive and really there is only a very small range of usable numbers for a display and it is display specific (I found the range 0xB0 to 0xBF to work). So it does not make sense to use a pot as input to the picaxe to set this.
Both srnet and Hippy's versions use the picaxe to read a serial input to drive the display. I prefer to embed the display code in my main program (same for normal LCDs).
Based on their code and some Arduino code, I've developed my own much simplified version to be built into complete programs and which also integrates the generic formatting routines I've just posted:
http://www.picaxeforum.co.uk/showthread.php?25359-Formatting-numbers-solved
It also includes a bargraph routine that I'm quite pleased with
Example code (with thanks to Hippy and srnet) attached
Attachments
-
23.4 KB Views: 123