Port 12 interrupt

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AlVa_264671
Level 5
Level 5
25 sign-ins First like given First like received

HI !

   

 

   

I would need use all the pins showed in the attached PDF for interrupt, for detect switch pressed.

   

Psoc doesn't let me set interrupt art both separete pins of Port 12

   

I cannot set interrupt at pin 12[4] and 12[5] with the pin configuration box  so that I do not get building errors.

   

Pins  12_0 12_1 12_2 12_3 have set falling edge interrupt with  the pin configuration box.

   

 

   

Please refer at tge PDF

   

 

   

Thank you very much

0 Likes
7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I have no problems assigning interrupts to all 8 pins of port 12.

   

Consider to post your project. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.



Bob
 

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

I confirm as well, error free build, all P12 set with ISR.

   

 

   

   

 

   

Regards, Dana.

0 Likes
AlVa_264671
Level 5
Level 5
25 sign-ins First like given First like received

Thank you Dana  and Bob

   

Dana the issue with Port 12 is in the same bundle I have already sent you for the issue with EEPROM.

   

I have only added to pins to Port 12 so that I have  right now 6 key at the keypad.

   

Any way I will posted the Bundlle.

   

Thank you

0 Likes
lock attach
Attachments are accessible only for community members.
AlVa_264671
Level 5
Level 5
25 sign-ins First like given First like received

Hi Dana And Bob thank you very much your help.

   

What I am trying to do is to use an interrupt for all the Port 12 I/O that are showed in the schematic.

   

The six pin cannot be assigned to only one Pin Component, it cannot be set  "continuosly".

   

That is why I have configured  the Port 12 pins in two Pin components.

   

Regarding the code, it is not including yet the pins 12[4] and 12[5] in  the Switch-Case sentences.

   

Any way , as the code does not compile  I didn't finish that part of the code.

   

 

   

Please let me know how I can use one only ISR component for the  6  I/O set as  digital input or any other way to reach the same fuctionality

   

Everything is working fine with the four Port 12 I/O 12[0],12[1],12[2] and 12[3]. 

   

 

        Regards,   
0 Likes
AlVa_264671
Level 5
Level 5
25 sign-ins First like given First like received

Thank you guys I 've  fixed the issue with the Port 12.

   

It remain  the question I have asked to Dana about setting lvia and lvid  regarding EEPROM programming.

   

Thank you very much for your help.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Some info on EEPROM and Emulated EEPROM -

   

 

   

    

   

          

   

http://www.cypress.com/?app=forum&id=4749&rID=101511     PSOC 4 EEPROM Emulated Location in Flash

   

http://www.psocdeveloper.com/project/easy-eeprom/

   

http://video.cypress.com/video-library/video/Corporate/PSoC-Creator-Tutorial-Importing-Components/20...

   

 

   

 

   

Regards, Dana.

0 Likes
AlVa_264671
Level 5
Level 5
25 sign-ins First like given First like received

Hi Dana !

   

Answering your question, I don't filed the case for RESET_CR1 register, yet  I'll do that.

   

Thank you very much for your links,  I am leraning a lot about EEPROM.

   

With that material, I think I wiil find the aswer to the question: why I cannot  program the register RESET_CR1`

   

I repeat again, the code you saw in the bundle that I have sent you guys, the EEPROM get prorammed  and  I can read from the EEPROM.

   

Just in case you did not recive the code,  here is it.

   

 

   

#include "Int_for_Eeprom.h "


#define  SET_b0_b1_INTERRUPT_CR1REG    0X03
#define  CLR_b7_b6_INTERRUPT_CR3REG    0X3F

void Int_Eeprom( void) {

/*                                             
Estasblish "interrupt and not Rset " for lvia and lvid circuit detector because the nececity
to prevent failure when  EEPROM is been writing. Look at ( Architecture_TRM manual-15.3.3.1 Low-Voltage Interrupt)


*/
 

uint8 A,B;

   
   
   



//Set bits b0 and b1 on RESET_CR1 register
   
   
CY_SET_REG8(CYREG_RESET_CR1, CY_GET_REG8(CYREG_RESET_CR1) | SET_b0_b1_INTERRUPT_CR1REG );


// Clear bits b7, b6 on RESET_CR3 register                                                              

 
CY_SET_REG8( CYREG_RESET_CR3,  CY_GET_REG8(CYREG_RESET_CR3) &  CLR_b7_b6_INTERRUPT_CR3REG  ) ; 



}// End fuction


Thank you so much for your help and for learn from you.

   

Regards,

   

Alex 101










/* [] END OF FILE */
 

0 Likes