AT89C52 or AT89S52 and Nokia 5110 LCD shield
This project is from plug and play category and has the aim to make a small demo of using AT89C52 (AT89S52) with Nokia LCD 5110 shield.
The code presented here can be improved to your requirements and different personal project by adding different sensor or other stuff.
The Nokia module is using the SPI interface , the Microcontroller has emulated the SPI interface in software because AT89C52 does not have SPI module .
Because of the emulation of the SPI in software area , the code can be moved also to other controller , but doing this you have to make a few changes
regarding the ports and pins used by controller, another thing is that if the other microcontroller is faster than 8051 architecture you should use
an oscilloscope to see if the speed of the emulated SPI is not too fast and the slave device (our case LCD) will not catch the whole serial sequence .
In the file lcd.h you will find the next label's :
#define SCK P2_1
#define DAT P2_2
#define DC P2_3
#define CE P2_4
#define RES P2_5
This labeles are used to define the pins and signals used in the code , here you shoud make chages if your project is using anothers pins.
After flashing the code in the microcontroller and power it up , please wait a few seconds . The controller need some time to initialize the LCD
Have a nice day and coding with no problems.
Download link :
https://drive.google.com/file/d/1XYKD8F6j7Br_ql_qYT09xV66e7mUamSZ/view?usp=sharing
Is necessary to compile the program again to obtain the hex file .
Main area code :
LCD library code for 5110
LCD.h file