cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

Hi all!

   

This is the first time i post on this forum. I am developing my final degree project with a CY8C28445. It's simple, i'm using resistive sensor as proximity-pressure sensor, to get the proximity i use Capsense, and the pressure measurement is obtained from ADC. The problem is that i  have already a manufactured  PCB with the components assembled. Due to this, i have to share a pin (P0[1]) between capsense shield_electrode_output (Global out even) and ADC input(Analog in).

   

 

   

My doubt is, how can i change from a global odd/even output to analog in and vice versa ? I have read some application notes and the TRM and i really don't know how to to do this. I thought a possible alternative by changing the ADC input from Analog in (Analog column) to Analog mux input, the problem is that i don't understand the way to select an input from others. Do i have to change the other pins PRTXGS to stdcpu to select only one pin conected to the analog mux? Or, is there a function that enables and disables the mux inputs i want connected to the bus?

   

I hope you can help me cause im stuck.

   

Thank you all!!!

   

PD:

0 Likes
Reply
1 Reply
Moderator
Moderator

Hello LeFrank,

   

To change the pin mode from analog input to digital input, you can use the PRT0DM[2:0] registers. PRT0DM2 is for bit2 in the drive mode, PRT0DM1 is for bit 1 in the drive mode, and PRT0DM0 is for bit 0 in the drive mode. You can lookup the drive modes in the Technical Reference Manual under Figure 6-1 "GPIO Block Diagram". I assume that you want to change the drive mode for a port 0 pin.

   

In the chip editor, you can configure Port0, pin0 to analog input. You can also connect Port 0 pin 0 to the CapSense shield pin. At run-time you can switch between the drive modes of High-Z and High-Z analog for Port 0 Pin 0. Do let me know if you face any further issues.

   

Sampath

0 Likes
Reply