Hello!
Today’s example we are showcasing how to interface to the Nokia 5110 LCD screen with the PSoC 4 Pioneer Kit. This simple display provides a 84 x 48 Graphics LCD that was used in the Nokia 5110 model in 1998. This example provides a simple example to write text and an image on the LCD screen. This example uses a bit-banging method for sending the data & clock from the CPU to the LCD panel. The project does not require any UDB resources, therefore it can be used with the PSoC 4 (42xx and 41xx families).
Forum Post Attachments:
At the bottom of this post we are including the following items:
- Example Project Zip File
- Zip File of Images
- Project Schematic
- Component Configurations
Components Used:
The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:
- Annotated Component for Kit-042
- CyPins
Firmware Description:
The main.c firmware is included in the example project. Please review the commented sections for more details.
In this example we provide you with a couple of firmware based files named “Nokia5110LCD.c” and “Nokia5110LCD.h”. These files are the source & header files required for using APIs. In this example we support the following APIs to control the Nokia 5110 LCD screen.
- void LCD_Character(uint8)
- void LCD_Clear(void)
- void LCD_Init(void)
- void LCD_String(char*)
- void LCD_Write(uint8, uint8)
- void Send_Data(int8)
- void LCD_gotoXY(uint8, uint8)
- void LCD_Bitmap(char*)
The main.c simply calls the APIs defined in the source file for initialization & for displaying the string on the LCD.
In this example, LCD initialization is done as specified in the datasheet of PCD8544 LCD driver which is used in the LCD panel. It is not necessary to use all 8 pins of PSoC 4 for interfacing this LCD. Reset, Chip Enable, Power, Backlight & Ground pins can be connected to fixed voltage levels on the board. Only Data/Command, Data & Clock pins are used for sending the data to LCD.
Hardware Connections:
In this example we are not using any specific headers or shields. Instead we are providing a firmware example to interface with the Nokia 5110 screen. We have connected the screen in the following connections:
Test Your Project:
Connect your screen and program the Pioneer kit. See the screen display the example text and images.
I hope this example can help you in your design.
Best,
Matt