This paper is a machine translation, please slowly read and understand. thank you.
I am very tired of the 5110 display of the rough dot matrix display.
But I like GameBuino very much, so I'm going to have to replace the display.
After the study of the program, due to hardware restrictions, can only use the LCD 96*64 screen.
But I hand only 128*64, use only a part of the demonstration effect, but also good.
128*64 only use the 96*64, and the rest of the 32*64 is also used, the direct write screen, used to display the score, tips, and the like is very good.
New screen driver chip:[uc1701x],Datasheet:http://www.sohya.com.tw/page/STN_UC1701x.pdf
Modify:
libraries
1.Display.cpp
- Code: Select all
// toggle RST low to reset
if (rst > 0) {
digitalWrite(rst, LOW);
delay(10);
digitalWrite(rst, HIGH);
}
clkport = portOutputRegister(digitalPinToPort(sclk));
clkpinmask = digitalPinToBitMask(sclk);
mosiport = portOutputRegister(digitalPinToPort(din));
mosipinmask = digitalPinToBitMask(din);
csport = portOutputRegister(digitalPinToPort(cs));
cspinmask = digitalPinToBitMask(cs);
dcport = portOutputRegister(digitalPinToPort(dc));
dcpinmask = digitalPinToBitMask(dc);
// get into the EXTENDED mode!
command(PCD8544_FUNCTIONSET | PCD8544_EXTENDEDINSTRUCTION);
// LCD bias select (4 is optimal?)
command(PCD8544_SETBIAS | 0x4);
// set VOP
if (contrast > 0x7f)
contrast = 0x7f;
command(PCD8544_SETVOP | contrast); // Experimentally determined
// normal mode
command(PCD8544_FUNCTIONSET);
// Set display to Normal
command(PCD8544_DISPLAYCONTROL | PCD8544_DISPLAYNORMAL);
// initial display line
// set page address
// set column address
// write display data
update();
To modify the above section of code below this section
- Code: Select all
// toggle RST low to reset
if (rst > 0)
{
digitalWrite(rst, LOW);
delay(10);
digitalWrite(rst, HIGH);
}
command(0xE2); //System Reset//系统软复位
command(0x40); // Set display start line to 0 //从0,0开始显示
command(0xC8); //Set SEG Direction//行扫描顺序0xA1
command(0xA0); //Set COM Direction//列扫描顺序0xC0
command(0xA2); //Set Bias = 1/9//设置偏压比
command(0x2C); //Boost ON//升压开
command(0x2E); //Voltage Regular On//升压步骤一
command(0x2F); //Voltage Follower On//升压步骤二
command(0xF8); //Set booster ratio to
command(0x00); //4x//设置通讯速度
command(0x22); //Set Resistor Ratio = 3//0x23对比度初调
command(0x81); //对比度细调
command(0x32); //Set Electronic Volume = 40
command(0xAC);//Set Static indicator off
command(0x00);
command(0XA6); // Disable inverse//正显A6负显A7
command(0xAF); //Set Display Enable//打开显示
delay(100);
command(0xA5); //display all points//全屏初始化
delay(200);
command(0xA4); //normal display//恢复正常显示
Allclear();
update();
2.display.h Related parameters.
3.Gamebuino.h and Gamebuino.cpp
4.Demo Loader Related parameters.
5.Compile and upload.
Now show you my results.
Game Test
Loader Test
Old loader Test
Bugs:
1.RAM capacity is too small, the system firmware library occupies a considerable number of RAM, so, currently only able to do DEMO.
2.The entire GameBuino programming idea that everyone feels there is a defect, hope to improve.