element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#061 – Nokia 5110 LCD Interface
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 19 replies
  • Subscribers 31 subscribers
  • Views 3945 views
  • Users 0 members are here
Related

PSoC 4 Pioneer Kit Community Project#061 – Nokia 5110 LCD Interface

cy.wbz
cy.wbz over 12 years ago

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).

 


image

 

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:

 


image

 

Test Your Project:

 

Connect your screen and program the Pioneer kit. See the screen display the example text and images.

 


image

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
5732.Project Images.zip
imagePCD8544 datasheet.pdf
Nokia5110 LCD Interface.cywrk.Archive03.zip
  • Sign in to reply
  • Cancel

Top Replies

  • chr1sg75
    chr1sg75 over 5 years ago in reply to koudelad +1
    Hi David, Thanks for taking the time to reply. Glad to see the forum is still alive. I have dug out an old BitScope, so I am in the process of debugging the signal lines. For what it's worth, I can answer…
  • jesusantoniocar
    jesusantoniocar over 12 years ago

    Hello Matt.

    Thanks for this project.

    When you refer to bit-banging method , you are doing the transmission of bits by software ?, i understand that this method  emulates by software an UART transmission , does it right?.

     

    best regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to jesusantoniocar

    Hi Jesus Antonio,

     

    Yes, data is transmitted bit-by-bit from software (esp by Send_Data API()). For detailed understanding, you can refer to the following API implementation on how is the data being sent out serially. This is similar to SPI actually - Put the data bit on the DataInput pin and then toggle the ClockInput pin for sending the data to LCD.

     

    void Send_Data(int8 value)

    {

        uint8 index3;

        for (index3 = 0; index3 < FONT_HEIGHT; index3++)

        {

            /* Take one bit (MSb) at a time and send it to Data Input pin of LCD */

            if(MSb_POSITION == (value & MSb_POSITION))

                Din_Write(HIGH);

            else

                Din_Write(LOW);

           

            /* After setting the Data value on Din pin, toggle the Clock so that LCD can read Din */

            Clk_Write(HIGH);

            CyDelayUs(DELAY_1_US);

            Clk_Write(LOW);

            CyDelayUs(DELAY_1_US);

           

            /* Left shift the value before processing next bit */

            value <<= SHIFT_LEFT_BY_1;

        }

    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jesusantoniocar
    jesusantoniocar over 12 years ago in reply to Former Member

    Hello kishorekumar.

    Thanks for your reply and explanations. It is an interesting project.

     

    Best regards.

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 12 years ago in reply to jesusantoniocar

    Hi Jesus Cardona,

     

    Thanks you !!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago

    Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dougw
    dougw over 11 years ago

    Thanks Matthew,

    The 5110 I have has a slightly different pinout so it couldn't plug in directly. This display is limited to 3.3 V although yours seems to indicate it can tolerate 5V.

    I connected the power pins to 3.3V and GND as you suggested and everything works fine.

    Many thanks for the head start.

    Doug

    Since the embedded links above no longer seem to work, I am attaching the files in an LCD.zip.

    Attachments:
    LCD.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • charrua
    charrua over 11 years ago

    Can someone help me, The download links don't work! it occurs for all the files in this example, but also on other files form the 100 days 100 projects list

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dougw
    dougw over 11 years ago in reply to charrua

    Hi Luis,

    I updated my response above to include the files.

    Doug

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • charrua
    charrua over 11 years ago in reply to dougw

    Thanks Doug!

     

    I'm trying them this afternoon.

     

    Luis

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • dougw
    dougw over 11 years ago in reply to charrua

    Hi Luis,

    Make sure the pin driving the back light is set as an input until you figure out if the back light on your display requires more current than the pin can supply. Some of these 5110 displays have a back light drive transistor built-in and some don't. The ones that don't can damage an output pin by drawing too much current. The LCD back light pin could be wired directly to the 3.3V power supply instead of an output pin if you are connecting with jumper wires.

    Doug

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube