1 2 3 Previous Next 44 Replies Latest reply on Jan 14, 2016 11:35 PM by userc_40623

    Problem PSoC Creator CY8CKIT-042



      I have a big problem with PSoC Creator. I want to program my CY8CKIT-042 to be able to use it with an alphanumeric LCD, LED and switches, but I know absolutely nothing about all the creation of the project. All I want is to write a code and build it in the card, but I can't. Is there a way to only write the code without creating some project ? Also, when I want to integrate a header file, it says that the file is untraceable, is that a problem from the installation ? I hope that you will help me because I must do it before the 15 January. Thanks for reading.

        • 1. Re: Problem PSoC Creator CY8CKIT-042

          No, you need a project. You can start by looking at the example projects that come with Creator.


          I recommend looking at the PSoC Creator 101 videos / tutorials: http://www.cypress.com/video-library/PSoC-Software?tid=38161

          • 2. Re: Problem PSoC Creator CY8CKIT-042

            Alex, relax!


            You have still 10 days left, you could do your project within two days (as a beginner) and write the documentation within the next week.


            PSoC projects are easy to build, just (as shown in the videos hli pointed you at) drop your needed components onto the topdesign, adjust them by setting the properties and connect them with wires to the pins. Remember that the datasheet for any component is just a mouse click away, do read (and understand) them!


            When you got stuck, don't hesitate to further as us, attach a workspace bundle to your  post (Creator -> File -> Create Workspace Bundle) and we will help you asap.


            Btw: What kind of LCD have you got? Interface, lines, columns? Compatible with Hitachi HD44780? Link to datasheet





            • 3. Re: Problem PSoC Creator CY8CKIT-042

              Hello !


              First, thank you for your quick answer. I've read some documentations, but they're all in English and it's not my native language. I don't think I'm that bad in English but reading something that isn't your native language all day is very tiring because I must focus to understand the maximum. The LCD is one the DOG series from Electronic Assembly, the EA DOGM162-A with 16 columns and 2 lines.


              Here's the datasheet : http://www.lcd-module.com/eng/pdf/doma/dog-me.pdf.


              I'm really a beginner with Cypress, before I used a Arduino UNO Rev 3 in class so I made an Arduino code for what I want to do with the LCD but it's not compatible with Cypress... So, I created a project but when I open "main.c" it told me that "project.h" can't be found. No matter how many times I install PSoC Creator, I've always problems with the libraries.


              I'll wait for your answers.

              • 4. Re: Problem PSoC Creator CY8CKIT-042

                'project.h' is created when you build the project for the first time - it contains the reference to all the hardware that you have in your schematics.


                To move over your code from Arduino to PSoC depends on the interface mode. For 8/4-bit modes, create a control register in your schematic, which you can use just like pin/ports on an Arduino. There are APIs for writing the register in one go, or you can adress single pins.


                If you are using SPI, add a SPI master to your schematic and use its API. Or you use a control register and do bit-banging.


                Apart from these differences the code should be quite easy to migrate.

                • 5. Re: Problem PSoC Creator CY8CKIT-042

                  The file project.h will be generated automatically when you build your project (Creator->Build->Build your project). You should follow the videos where that is shown.


                  Your LCD does not have a HD44780 chip, so you will have to program everything yourself (without using an LCD component).


                  In the datasheet you provided is no initialization shown for a 4-bit interface which would require fewer pins, so you will need an 8-bit data port and a 3-bit control port as interface. There is a pin-component which you can use for that, look into the board's schematic for pins already used (LEDs, switches, care for polarity) which is installed on your disk when you installed the files for the CY8CKIT-042.


                  There are many example projects (simple ones and complicated): at Creator Start page under Examples and Kits -> Kits you will find them, under Find Example Project there is another bunch.





                  • 6. Re: Problem PSoC Creator CY8CKIT-042

                    So, I've done what I could about the components dropping but I don't know if it's correct, I'm at the lesson 7.  I want to know your opinion about it if you accept. I've put a schema of the circuit made on Isis but the real will be with the Cypress instead of the Arduino and the correct LCD. And when I try to build "TopDesign.cysch", I have an error but I don't know why.


                    I'm waiting for your answers.

                    • 7. Re: Problem PSoC Creator CY8CKIT-042

                      The LCD component might not work for you, use pure pin-IO as I indicated in attached project.


                      You do not want to shortcut your switches, the wires in the schematic are "true" wires, so read the pins directly


                      Change the sw-pins from "High impedance" to "Pull Up" or the pin will be floating while the switch is not pressed (I changed one of the pins to show how. Examples on how to read and write pins are attached.





                      • 8. Re: Problem PSoC Creator CY8CKIT-042

                        Well... I'd love to want to thank you but I can't open the "TopDesign" file, so I don't know what you've done.

                        • 9. Re: Problem PSoC Creator CY8CKIT-042

                          Well, this is something I cannot help you with. I just downloaded and expanded the project from my post into a new folder and successfully opened the project and topdesign.





                          • 10. Re: Problem PSoC Creator CY8CKIT-042

                            Sorry to ask you that after all you've done, but can you take some screenshot about what you've done in "TopDesign" or explain it to me ? Because as I am right now, I'm really stuck because of that and also because I don't know how to initialize the LCD because until now I've only used 3x7 segments display.


                            EDIT : It's OK, now I can open "TopDesign" it was because I was using the 3.2 version PSoC Creator so I updated it. For the initialization of the LCD, I've found something in the datasheet page 7, but I still don't understand and because there are hexadecimal, isn't that for BASIC ?

                            • 11. Re: Problem PSoC Creator CY8CKIT-042

                              Hexadecimal has nothing to do with a programming language (BASIC, C or PASCAL) but is used to represent in a more readable form the representation of numbers in the binary world of computers.


                              TAKE CARE: The schematic you supplied shows only a four-bit interface which your LCD module supports, but in the datasheet no initialization for a 4-bit wide data bus is shown.


                              A test:


                              There is a Character LCD component (which you already put on your topdesign)


                              Try it by connecting the module to port 1[0..6] (see datasheet for the pin functions page 14)


                              in main() you may use




                              LCD_PrintString("Hello World!");


                              while(1);   // Stop here


                              This might work for your LCD.





                              • 12. Re: Problem PSoC Creator CY8CKIT-042

                                I was wondering about the hexadecimal because when I was doing some codes on BASIC for same project before they told to use a Cypress, I saw hexadecimal numbers in some ".bas" file.


                                I will try, but the LCD have 20 pins in total with at least 3 to the ground, 10 connected together with I don't know what, 5 whom I think are connected to the Cypress and 2 floating. That the picture inside the archive.


                                • 13. Re: Problem PSoC Creator CY8CKIT-042

                                  The LCD module has exactly 14 pins and none of them is floating. Stick to the schematic you supplied and not to pictures which only show part of one side of the story. Some more pins of your PCB are for the switches. Did you already change the drive mode of the pins as I suggested? Did you manage to read a switch?? Are you using the debugger to see if you can access the switches???


                                  Can we see your latest elaborate?





                                  • 14. Re: Problem PSoC Creator CY8CKIT-042

                                    I know that some of the silver ink wires are for switches and LEDs, but I was talking about the LCD not the PCB. But because I've never used an alphanumeric LCD before except on Isis, I don't really know the "real" connection of the LCD. What I was talking about is the pins on the top of the DOGM162 (look at the picture inside the archive).
                                    For the moment, I use a breadboard before putting everything on the PCB and I'm trying to make a LED blink (that's the project inside the archive) but when I assign a port for the pin of the LED and that I build and program, nothing happened. I was wondering if the pin I connect between the LED and the pin of the Cypress does matter because I've tried by connecting to the "P2_5" port after I assigned the "Pin_LED" to "P0[4]" on the CY8C4245AXI-483 44-TQFP. Is there a specific port at which I must connect the LED and where's the port for GND and VDD because I think I found it on the paper with the Cypress but there's absolutely nothing when I connect it to the breadboard.

                                    1 2 3 Previous Next