Smart I/O : combinatorial expressions on GPIO inputs to trigger interrupt

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

cross mob
philippe_elie
Level 1
Level 1
5 sign-ins First question asked Welcome!

Dear all,

I am getting started with CY8CPROTO-062-4343W and Modus Toolbox to build a RAM/ROM emulator, connected to the address and data busses of a 8-bit computer. As such, I want to decode some address lines and some other control signals to generate an interrupt (chip select), so the PSoC can either read the 8bit data input and store internally, or output a 8-bit pattern for the provided address. 
The operation needed are only combinatorial and the LUTs could certainly do that. But here is my - stupid - problem : how can I configure the LUT ouput to go to one PSoC port and trigger an interrupt ? HSIOM is supposed to allow this routing, but I could not understand how to configure this in Modus Toolbox. Also, can I still read from the firmware the GPIO inputs for signals that are routed to the LUTs (as I will need to read the address lines that were used to define the chip select/interrupt signal) ? 

Thanks in advance for your help, my apologies for the rookie's questions ! 

Philippe

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @philippe_elie ,

All questions are welcome! 🙂

The combinatorial logic for the LUTs and the different inputs and outputs can be configured in the Smart IO configurator. You can find it under Tools in the Quick Panel. 

The output of the LUT can be given to the supported GPIO ports like this:

DheerajK_81_0-1632928682503.png

Here IO0 and IO1 are inputs to the LUT and the output of the LUT2 goes to Port9 Pin2. 

Once the SmartIO is configured, open Device Configurator and set the right drive modes for the GPIOs based on if they are input or output. Since you want an interrupt to be triggered on the output pin, you can specify the Interrupt Trigger Type as "Rising Edge" or "Falling Edge" as shown below:

DheerajK_81_1-1632928873943.png

Then you need to just write your code to enable this interrupt, the smart-io block and you should see everything working as expected. I have attached a simple project that demonstrates your requirement. I have simulated the inputs to the SmartIO via software. 

Hope this helps!

Regards,
Dheeraj

View solution in original post

0 Likes
1 Reply
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @philippe_elie ,

All questions are welcome! 🙂

The combinatorial logic for the LUTs and the different inputs and outputs can be configured in the Smart IO configurator. You can find it under Tools in the Quick Panel. 

The output of the LUT can be given to the supported GPIO ports like this:

DheerajK_81_0-1632928682503.png

Here IO0 and IO1 are inputs to the LUT and the output of the LUT2 goes to Port9 Pin2. 

Once the SmartIO is configured, open Device Configurator and set the right drive modes for the GPIOs based on if they are input or output. Since you want an interrupt to be triggered on the output pin, you can specify the Interrupt Trigger Type as "Rising Edge" or "Falling Edge" as shown below:

DheerajK_81_1-1632928873943.png

Then you need to just write your code to enable this interrupt, the smart-io block and you should see everything working as expected. I have attached a simple project that demonstrates your requirement. I have simulated the inputs to the SmartIO via software. 

Hope this helps!

Regards,
Dheeraj

0 Likes