Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 2 months ago.
KS0108B display and Nucleo F401RE
Hi, I've been trying to use this library
Import libraryDisplay
128x64 grafical display with KS0107B and KS0108B controller
with a Nucleo F401RE and this display https://www.sparkfun.com/products/710
This is my test code:
main.cpp
#include "mbed.h" #include "KS0108.h" #include "Arial12.h" #include "Arial14.h" #include "Comic24.h" #include "vivaldi16.h" // (_RST,_DI, _RW, _E, _CS2, _CS1, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7) //KS0108 display (PB_13, PB_14, PB_15, PA_3, PA_2, PC_4, PC_3, PC_2, PH_1, PH_0, PA_10, PB_3, PB_5, PB_4); KS0108 display (A2, A4, A3, A5, A0, A1, D7, D6, D5, D4, D3, D2, D1, D0); int main() { while(1){ display.ClearScreen(); display.GotoXY(5,0); display.SelectFont(Arial12,BLACK,ReadData); display.PrintNumber(1); display.PrintChar('m'); display.GotoXY(5,16); display.PrintString("arial Font test"); wait_ms(3000); display.GotoXY(2,32); display.SelectFont(vivaldi16,BLACK,ReadData); display.PrintString("Vivaldi font"); wait_ms(3000); } }
this is a picture of the wiring:
and this is a picture of the result:
What could I be doing wrong?
Question relating to:
2 Answers
10 years, 2 months ago.
First thing is to check the wiring (and then check again and maybe once more...). You may also want to look at D0, D1. Default these pins are not connected on the nucleo since they are used for the serial port between the F401 and the STLink interface part. You should replace these by other pins unless you have modified the related solderbridges on the nucleo board.
10 years, 2 months ago.
this LCD work with 5V
Use output with Open Drain (i am make custom library to resolve similar problem with 5v quadrature encoder chip)
check tensions with oscilloscope
Sorry, I linked the wrong library, this is the one I am using: http://developer.mbed.org/users/DimiterK/code/KS0108/
posted by Giacomo Graziosi 08 Oct 2014