12 Replies Latest reply on Nov 19, 2014 12:37 PM by daniel.chacon

    Adding the CY8CKIT-017 to my CY8CKIT-050 5LP

    daniel.chacon

      I have followed the steps to setup the can bus on the Psoc 5, so i wanted to go ahead and add the 017 kit to it, but the steps in this document http://www.cypress.com/?docID=40086 reference using a Psoc3 board, which doesnt looke like the 5LP board i have.

         

      In the document it mentions the need for a MiniProg3, is that the case for the 5LP board i have?

         

       

         

      Is there any other documentation available that would help get the 017 kit installed and configured on the 5LP?

         

       

         

      thank you

        • 1. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
          user_1377889

          The installation in your document is made for a KIT-001 or rather two of them.

             

          You can probably use a Kit-050lp for connection and connect your lin-board to port E of the Kit-050

             

          The PSoC3 KIT-030 is compatible with the KIT-050, so there is no need using a PSoC3. The documentation is a bit old, probably a PSoC5 with CAN was not yet availlable at that time.

             

           

             

          Bob

          • 2. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
            user_78878863

            If you have -050 board, you don't need a MiniProg3. Its more or less compatible with the -001 board, but the pin assignments for some parts differ (switches, LEDs, LCD). You will need to change these assignments in the demo project. Apart from that everything should work fine. (If you have any questions, I have both a -017 and -050 kit available and can cross-check)

            • 3. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
              daniel.chacon

               I will be working on this again tonight as its a personal project, i can only work on it after work.

                 

              So what im hearing, is i can build the project and continue without the additional steps mentioned in the document.

                 

              And since i dont have a 2nd board, my options are limited? I asked a few people at work and one suggested getting a RS232 to USB so that i can mimic communications coming from another com port and treat that as the "car" in my scenario.

                 

              so i guess my next set of questions will be how do send the test byte over to the PSoC to move forward with the project.

                 

               

                 

              thank you

              • 4. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
                user_78878863

                You need to follow the steps to operate the board with the examples. The differences are:

                   
                      
                • you don't need to connect a MiniProg3, but instead connect the -050 board directly to the PC
                •     
                • you need to select the proper 5LP device in the project before compilation and programming
                •     
                • the connection to the potentiometer on the board will be different (and you need to use a different pin, since P1[6] is not available in the breakout area
                •     
                • Since you have only a single kit, you need a second CAN board (or a CAN analyzer). I have heard good things about USBTin (http://www.fischl.de/usbtin/), which also seems not to be too complicated to build by yourself
                •    
                • 5. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
                  daniel.chacon

                  So i worked on my project a little lastnight and have a question. Since I dont have the 2nd board and dont plan on getting it, is there any way to test that my board is setup and programmed correctly?

                     

                  I plugged in the CAN/LIN board to Port E

                     

                  Programmed the board, but of course without the 2nd 5LP i cant test actual comm, but is there any way to check that this board is setup and configured correctly?

                     

                  • 6. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
                    user_78878863

                    Aparts from attaching a scope to the CAN bus lines I have no simple idea.

                    • 7. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
                      daniel.chacon

                      yea i figured, thanks, ill have to see how i can continue with the project...we have a 5LP at work, but currently used for a actual paying project, so who knows when that would be available to see if i could borrow.

                      • 8. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
                        daniel.chacon

                        So after fixing my LCD display issue, i can now see values on the screen, but nothing happens..

                           

                        Here is what i have in my main.c

                           

                        #include <project.h>

                        uint8 Rx_Data;

                        int main()
                        {
                            CyGlobalIntEnable;
                            CAN_1_Start();
                            LCD_Char_1_Start();
                            
                            for(;;)
                            {
                                /* Place your application code here. */        
                                LCD_Char_1_ClearDisplay();
                                CAN_1_ReceiveMsg0();
                                LCD_Char_1_Position(0,0);        
                                LCD_Char_1_PrintString("Engine Oil Temp");
                                LCD_Char_1_Position(1,0);
                                // LCD_Char_1_PrintInt8(Rx_Data);
                                LCD_Char_1_PrintNumber(Rx_Data);
                                CyDelay(1000);
                            }
                        }

                           

                        But when i connect to the truck and turn it on(the truck) the value never changes, just stays on zero.

                           

                        this is within my can_1_tx_rx_func.c

                           

                        I have declared

                           

                        extern uint8 Rx_Data;

                           

                        void CAN_1_ReceiveMsg(uint8 rxMailbox)
                        {
                            if ((CAN_1_RX[rxMailbox].rxcmd.byte[0u] & CAN_1_RX_ACK_MSG) == CAN_1_RX_ACK_MSG)
                            {
                                /* `#START MESSAGE_BASIC_RECEIVED` */

                                /* `#END` */
                               
                                CAN_1_RX[rxMailbox].rxcmd.byte[0u] |= CAN_1_RX_ACK_MSG;
                            }
                        }


                        #if (CAN_1_RX0_FUNC_ENABLE)
                            /*******************************************************************************
                            * FUNCTION NAME:   CAN_1_ReceiveMsg0
                            ********************************************************************************
                            *
                            * Summary:
                            *  This function is entry point to Receive Message 0 Interrupt. Clears Receive
                            *  Message 0 interrupt flag. Only generated for Receive mailbox designed as
                            *  Full.
                            *
                            * Parameters:
                            *  None.
                            *
                            * Return:
                            *  None.
                            *
                            * Reentrant:
                            *  Depends on Customer code.
                            *
                            *******************************************************************************/
                            void CAN_1_ReceiveMsg0(void)
                            {
                                /* `#START MESSAGE_0_RECEIVED` */
                                    Rx_Data = CAN_1_RX_DATA_BYTE1(0);
                                /* `#END` */
                           
                                CAN_1_RX[0u].rxcmd.byte[0u] |= CAN_1_RX_ACK_MSG;

                            }
                        #endif

                           

                        Is there something within the code that looks wrong?

                        • 9. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
                          user_1377889

                          It would be much more helpful for us when checking your code when we can see all your settings and being able to use the IDE. Can you post your complete project, so that we all can have a look at all of your settings? To do so, use
                          Creator->File->Create Workspace Bundle (minimal)
                          and attach the resulting file.



                          Bob
                           

                          • 11. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
                            user_78878863

                            Is the CAN_1_ReceiveMsg0 function active (meaning is the preprocessor directive enabled)? Is the interrupt enabled and active?)

                               

                            To aid debugging, you can activate the LEDs on the -050 board, and toggle them in the respective places of the code to whether they are executed or not. (One in main, another two in your CAN functions)

                            • 12. Re: Adding the CY8CKIT-017 to my CY8CKIT-050 5LP
                              daniel.chacon

                              In the provided zip, since i dont have a 2nd set of board to test and debug at my desk, im working only with the main project which is called 2011TruckOBD

                                 

                              in that portion everything is as the tutorial stated. I think most of my current issues is that ive built and programmed the board as if there is a 2nd board to send the same data back. Because i dont have the 2nd setup, im merely connecting to the truck to see if i can read the data, which in this case is the oil temp.