cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

New Contributor

 I created attach project and connected to 16x2 LCD with proper 7 pin connections from PSOC4 - checked with multimeter already.

   

But i am not getting any output on LCD.

   

1st / 16th pin are gounded - 2nd / 15th pin are +5Volt = Connected correctly.

   

Support me.

0 Likes
Reply
15 Replies
Esteemed Contributor

I do not see where you have actually placed the LCD

   

component on the schematic from the catalog ?

   

 

   

Correction, I see it was way off schematic.

   

 

   

Also the pin assignment starts with the LSB in the port -

   

 

   

   

 

   

And make sure you have a contrast pot set to ~ 1/2 Vdd (Vcc) to start.

   

 

   

   

 

   

Regards, Dana.

0 Likes
Reply
Honored Contributor II

Here is an example project for Ardunio and it shows the wiring for the LCD.  This Library component allows you to hook the LCD up to any port this is better than trying to find 4 pins togetter on one port. I think the RW pin is your issue however if you look at the LCD schematic it is grounded.

   

Bobgoar

0 Likes
Reply
Honored Contributor II

Also it is best not to use P2 for digital uses at this is the Analog ports for the SARMUX and on the Pioneer kit it is designed to be the analog ports and has the Analog shields and has less noise.  I know that you can use any pin on most ports but it is best to follow the design specs for the PSOC device. 

0 Likes
Reply
Esteemed Contributor

Here is the kees LCD component you can add to your workspace that allows random

   

pin assignment. Note this does NOT override the dedicated pin limitations in PSOC 4.

   

 

   

    

   

          http://www.cypress.com/?app=forum&id=2492&rID=75707

   

 

   

    

   

          

   

http://www.cypress.com/?rID=93401     AN86439 - PSoC® 4 - Using GPIO Pins

   

 

   

 

   

Regards, Dana.

0 Likes
Reply
Honored Contributor II

Review this document look at fig 16 it shows what ports should be used for best performance. http://www.cypress.com/?docID=50855. mixed signal board layout for best performance.

   

Bobgoar

0 Likes
Reply
Esteemed Contributor

A pin map for the Pioneer board that may be useful. Its got some of

   

my junk in one of the columns, just clear that out.

   

 

   

Regards, Dana.

0 Likes
Reply
Anonymous
Not applicable
0 Likes
Reply
New Contributor

Dear Dana / Bobgoar,

   

Thanks for support. 

   

I have modified my project as below and I am using PSOC4 Pioneer Kit in this project.

   

P0.0 - DB4  - LCD Pin 11

   

P0.1 - DB5  - LCD Pin 12

   

P0.2 - DB6  - LCD Pin 13

   

P0.3 - DB7  - LCD Pin 14

   

P0.4 - En     - LCD Pin 6

   

P0.5 - RS    - LCD Pin 4

   

P0.6 - R/W  - Grounded

   

You can also check attached snapshot in zip file alongwith psoc creator 3.1 SP3 project file.

   

On hardware side i had checked all connections with multimeter which are correct.

   

I had given separate 7805 based supply to 16x2 LCD - with no common ground as well.

   

Also i not connected POTNETIONMETER on 3rd pin of LCD. Can i used any fixed resitors instead of potentiometer on this pin.

   

Thanks once again.

   

Have a good day.

   

Nainesh.

0 Likes
Reply
Honored Contributor II

Here is a picture of the program I sent you. You can see the bread board setup and the Arduino shield on the PSOC 4M.  This also works on the Psoc Pioneer board.

0 Likes
Reply
Esteemed Contributor

Also i not connected POTNETIONMETER on 3rd pin of LCD. Can i used any fixed resitors instead of potentiometer on this pin.

   

 

   

The problem with this is none (that I have seen) of the LCD datasheets have a

   

spec on the contrast voltage optimum V. Stated another way this is saying it varies

   

a lot LCD to LCD. What you can do is use IDAC and an R to convert to V and

   

feed that to LCD, coupled with user code to optimize the LCD contrast. That way

   

you get optimum contrast, best display appearance.

   

 

   

Keep in mind setting this properly may also affect viewing angles on some LCD

   

technologies.

   

 

   

 

   

Regards, Danba.

0 Likes
Reply
Honored Contributor II

I can not see your Psoc 4 pioneer board in the picture you enclosed in the file dump. But you have all your connections to port  P0_0 -P0_7 on the PSOC 4 chip in your design. 

   

These do not come out on the Arduion pins in a straight line.  So here is the header list for Psoc to Arduino headers.

   

Psoc  Arduio

   

J0_0   J2_13

   

J0_1   J2_15

   

J0_2   J2_2

   

J0_3   J2_4

   

J0_4   J4_1

   

J0_5   J4_2

   

P0_6   J3_6

   

P0_7  J4_03

   

Also you must tie the ground from your external regulator to the Psoc ground or the digital signals will not be correct . You could just change the 3.3v Jumper to 5 V operatiion and drive the LCD with the PSOC directly.

0 Likes
Reply
New Contributor

 Dear All,

   

Because of your support i am getting output on 16x2 LCD finally but having issue as attached in snapshot alongwith my project coding.

   

Thanks for support.

   

All characters are coming on single place only.

   

Do I have to shift digit of printing in C coding or API do that directly ?

   

Have a good day.

   

Nainesh.

0 Likes
Reply
Esteemed Contributor

Yes, when you print to display first you should position cursor with

   

 

   

   

 

   

Most components have APIs, just right click, open datasheet.

   

 

   

Regards, Dana.

0 Likes
Reply
Honored Contributor II

  Nain Since you are using an ADC in your project you should be using the Printf function to print the data to your LCD and your EEprom. Check this example http://www.element14.com/community/message/78621/l/psoc-4-pioneer-kit-community-project023-tinyprint.... It makes your data conversion easier. I did not see any characters on your LCD photo. Also it appears that your contrast is too high on your LCD and it is blanking out your characters.

0 Likes
Reply
Esteemed Contributor

If you are going to use sprintf the attached will help with

   

formatting string.

   

 

   

Additionally if you are going to use floats you need to enable

   

library -

   

 

   

    

   

         

   

http://stackoverflow.com/questions/2302969/how-to-implement-char-ftoafloat-num-without-sprintf-libra...

   

http://www.cypress.com/?id=4&rID=87354     nano library

   

http://www.jb.man.ac.uk/~slowe/cpp/itoa.html

   

 

   

Regards, Dana.

0 Likes
Reply