- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I''m trying to read the value of a GPIO pin on the Cy8CKit-040 PSoc4 4000 Pioneer Kit). I want to read this value in Debug mode, and see how the value changes accordingly. For some reason, I cannot create a Watch expression for the variable that I am trying to observe.
Attached is my main.c file.
Analog_In_Read is the name of the Analog Pin I want to read. I have set this pin to be P0_0 on the MCU.
Thank you for your time
Solved! Go to Solution.
- Labels:
-
ispn:39609:1:0
-
l1:314:1:0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a Code Example project "ADC_VoltageInp" You can download and install to your PSoC Creator.
Select a menu item "File->Code Example..." on the PSoC Creator.
Type "ADC_VoltageInp" to the "Filter by:" text box on the "Find Code Example" dialogue as follows.
Click the "Create Project" button to create a copy of the code example to your workspace.
Please refer the operation manual installed with the code example project.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please let me know what do you want to read from the pin?
A digital signal or an analog voltage value?
The API macro reads a digital value on the pin. If you want to get a digital value on the P0_0 youcan use a notation like CyPins_ReadPin(CYREG_PRT0_PC0)
If you want to get an analogue value, you must put an AD converter on the CYSCH page and connect an analog pin to the ADC's input.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are interested in reading an analog value from GPIO Pin P_0_0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is a Code Example project "ADC_VoltageInp" You can download and install to your PSoC Creator.
Select a menu item "File->Code Example..." on the PSoC Creator.
Type "ADC_VoltageInp" to the "Filter by:" text box on the "Find Code Example" dialogue as follows.
Click the "Create Project" button to create a copy of the code example to your workspace.
Please refer the operation manual installed with the code example project.
Regards,
Noriaki