12 Replies Latest reply on Aug 22, 2014 12:58 PM by julio.unigarro

    jcu

    julio.unigarro
        • 1. Re: jcu
          user_14586677

          Use IE of Firefox on this forum, Chrome does not seem to work.

             

           

             

          Regards, Dana.

          • 2. Re: jcu
            julio.unigarro
                Hello, I need to manage records for psoc 5.    
               
                Any help or example to mask ports and PSoC1 PRT1DR & 0x01.    
               
                    
               
                Thank you.   
            • 3. Re: jcu
              ki.leung

              can you explain what do you want to achieve?

                 

              And do you have problem with PSoC1 or PSoC5?

              • 4. Re: jcu
                user_14586677

                If you are working with PSOC 1 take a look at -

                   

                 

                   

                    

                   

                          

                   

                http://www.cypress.com/?rID=2900     AN2094 - PSoC® 1 - Getting Started with GPIO

                   

                http://www.cypress.com/?rID=39497     Shadow Registers

                   

                 

                   

                 

                   

                Regards, Dana.

                • 5. Re: jcu
                  julio.unigarro

                   I need to learn to manage registers in psoc 5.

                     

                  I need some examples.

                     

                  Gracias.

                  • 6. Re: jcu
                    user_14586677

                    Some thoughts -

                       

                     

                       

                    1) In Creator, Help, System Reference, System Reference Guide, section 7

                       

                    are the functions for register access. In the device.h file are the register names.

                       

                     

                       

                    2) In the Register TRM for your device there are the definitions of all the registers and their bit

                       

                    fields to control HW.

                       

                     

                       

                    Basically you read modify write registers to set/reset bits, bit fields, etc to effect

                       

                    HW control at more primitive levels.

                       

                     

                       

                    Regrads, Dana.

                    • 7. Re: jcu
                      julio.unigarro

                       I want to do the program for a 4x3 matrix keyboard and want to use the records, as follows; 

                         
                              
                         
                          void main (void)    
                         
                              
                         
                          {   
                         
                              
                         
                            LCD_Char_Start ();    
                         
                            uint8 fil = 0, col = 0, Bin = 0, result = 0;    
                         
                            Matriz_Write (0xF0);    
                         
                            Matriz_Read col = ();    
                         
                            Matriz_Write (0x0F);    
                         
                            Matriz_Read fil = ();    
                         
                            Bin & fil = col;    
                         
                            LCD_Char_Position (1.0);    
                         
                            if (Bin == 0x11) LCD_Char_PrintString ("1");    
                         
                          }    
                         
                              
                         
                          the problem is not as if setting pins to Pins:    
                         
                              
                         
                          or records:    
                         
                              
                         
                              
                         
                          I want to do it the same way as in PSoC1    
                         
                              
                         
                          PRT1DR = 0xF0; 11110000 // for columns if I press the 1 key.    
                         
                          col = PRT1DR; // Port leo 11110001    
                         
                          PRT1DR = 0x0F; // for rows 00001111    
                         
                          fil = PRT1DR // leo port 00011111si I press the 1 key.    
                         
                              
                         
                          Bin & fil = col; 11110001    
                         
                                                                                    00011111    
                         
                                                                                = 00010001 is equal to 0x11.    
                         
                          If (Bin == 0x11) result = 1;    
                         
                              
                         
                          I do this but necesoto Psoc 5.    
                         
                          If anyone can help me I appreciate.   
                      • 8. Re: jcu
                        user_1377889

                        Accessing complete ports in PSoC5 is described in the pin-component and the System Reference Guide (Help - System Reference). You may specify a port containing up to 8 pins and write with a single instruction

                           

                        Port_Write(0xf0)

                           

                        for example. Reading is done with Result = Port_Read();

                           

                         

                           

                        Bob

                        • 9. Re: jcu
                          julio.unigarro

                           I do not understand the configuration of the pins if I have to do it individually or as follows: "Cy_pins" pins 0-7 whit 

                             

                          With a single name for all the cosets of pins. example Matriz for p1.0

                             

                                                                                                                                              p1.1

                             

                                                                                                                                              p1.2

                             

                                                                                                                                              p1.3

                             

                                                                                                                                              p1.4

                             

                                                                                                                                              p1.5

                             

                                                                                                                                              p1.6

                             

                                                                                                                                              p1.7

                             

                          So a port but all under a common name "Matrix".

                          • 10. Re: jcu
                            julio.unigarro
                            • 11. Re: jcu
                              user_1377889

                              So just write

                                 

                              Matriz_Write(YourBitPattern);

                                 

                              and all the pins will be set as you want. Make sure that the configuration is set to "Contigous" under tab "Mapping"

                                 

                               

                                 

                              Bob

                              • 12. Re: jcu
                                user_14586677

                                This might be of use -

                                   

                                 

                                   

                                    

                                   

                                          http://www.element14.com/community/thread/25635/l/psoc-4-pioneer-kit-community-project054-custom-component-4x4-keypad

                                   

                                 

                                   

                                Regards, Dana.