一,打开文件(可以随文下载放置在文档中打开)。(如下图1所示)
图1
二,调整原理图大小,适合可视,另存工程文件。(如下图2,3,4所示)
图2
四,编辑main.c 代码如Proteus8.9 VSM Studio Keil编译器仿真AT89C51RD2系列022_lcdNokia3310_5510 (如下图6所示)
图6
五,Main.c 代码:
/* Main.c file generated by New Project wizard
*Coder: Ziegler Yin
#include “nokia_5110.h”
#define delay_time 25664
void main(void)
{
LCD_init(); //初始化液晶
LCD_clear();
while(1)
{
LCD_write_english_string(0,0," Welcome to ");
LCD_write_english_string(0,1," Kaillen Work ");
LCD_write_english_string(0,2,"www.wark.top");
LCD_write_english_string(0,3," Nokia5110 LCD");
LCD_write_chinese_string(12,4,12,4,0,5);
}
}
nokia_5110.h:
/* Main.c file generated by New Project wizard
*Coder: Ziegler Yin
#include “89c51rd2.h”
#define u8 unsigned char
#define u16 unsigned int
sbit SCLK = P2^5;
sbit SDIN = P2^4;
sbit LCD_DC = P2^3;
sbit LCD_CE = P2^2;
sbit LCD_RST = P2^1;
void LCD_init(void);
void LCD_clear(void);
void LCD_move_chinese_string(u8 X, u8 Y, u8 T);
void LCD_write_english_string(u8 X, u8 Y, char *s);
void LCD_write_chinese_string(u8 X, u8 Y, u8 ch_with, u8 num, u8 line, u8 row);
void chinese_string(u8 X, u8 Y, u8 T);
void LCD_write_char(u8 c);
void LCD_draw_bmp_pixel(u8 X, u8 Y, u8 *map, u8 Pix_x, u8 Pix_y);
void LCD_write_byte(u8 dat, u8 dc);
void LCD_set_XY(u8 X, u8 Y);
void delay_1us(void);
七,点击窗口左下方仿真按钮,可见lcdNokia3310_5510屏上信息显示在屏。 (如下图8,9,10所示)
图8
八,选择release,点击构建工程按钮,编译工程生成Hex文件。(如下图11所示)
图11
九, 系列的001-003虚拟仿真与开发板对应已证明:虚拟仿真程序对于开发板有效,之后不再➕上下载到开发板的介绍。
附件下载:https://download.csdn.net/download/kaillen/12499104
Proteus8.9 SP2下载:https://download.csdn.net/download/kaillen/12459968
附件Proteus8.9 VSM Studio Keil编译器仿真AT89C51RD2系列022_lcdNokia3310_5510在已安装Proteus8.9的计算机文件夹中打开即可
需要进一步了解,请加入QQ群:976235464