PSoC™ 4 Forum Discussions
I need to make this exercise in PSOC 4:
"Use an analog port to read from the KIT GROVE potentiometer. Confuse an ADC of a
channel, eight BITS, and 100 Hz sampling. Use the API generated by PSoC Creator and
breakpoint in the XXX_GetResult16 (..) function. Read and find the value in Volts (Vx), knowing
that Vref + = 3.3V and Vref- = 0V. Observe Equation 1 below, where X is the digital read value and Vx the
value in Volts read. Calculate the value of Vx and compare the result obtained in
XXX_CountsTo_mV (0, X).
Vref+ - Vref- --------------- 2n – 1
Vx – Vref- --------------- X
Vx = (X * (Vref+ - Vref-) / (2n - 1) ) – Vref-
Use the voltage value provided by the potentiometer to modulate the frequency at which the
Red LED flashes."
I did the pratice this way:
I used 1 analog input,1 digital output for the LED and 1 ADC.
Settings ADC:
And i leave my code this way:
#include "project.h"
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
ADC_Init();
ADC_StartConvert();
ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);
int16 x = ADC_GetResult16(0);
float32 y = ADC_CountsTo_mVolts(0, x);
for(;;)
{
LED_Write(!LED_Read());
CyDelay(1000 *y);
ADC_StartConvert();
ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);
x = ADC_GetResult16(0);
y = ADC_CountsTo_mVolts(0, x);
}
}
But my code is not working. Help me!
Show LessWe have worked this till we can try no more, it just will not connect and pair....we have two bundles, a remote and a controller. They are both PSoC4s, the remote is central the controller is server, the pin is 000000, it connects, but will not pair, we have a security mismatch we cannot find, please see if you can help us, we have spent a ton of time on this and just cannot seem to get it to work.
The server works perfectly with the smartphone based app. We are really stuck here, please do not just refer us to the 100 projects git, we have read them all.ChaitanyaV_41@
Herb
Show LessHello,
I have designed a BLE peripheral that implements a composite HID device consisting of:
- HID keyboard
- HID mouse
- HID generic/custom device
I can pair the device with a Windows10 PC, the keyboard and mouse both function as expected.
The generic (custom) HID profile is intended to exchange data between the peripheral and a custom application running on the PC.
Could someone kindly point me in the right direction on how to exchange (receive and transmit) data from a Windows application to a generic/custom HID BLE device?
I know how to handle the problem on the peripheral side (PSoC 4 BLE), but have no experience on doing so in Windows.
Where could I find come code examples? The preferred SDK on Windows would be Xamarin.
But any code example (also for other SDKs) would be very welcome in helping me getting started.
Thank you for any suggestion!
Show LessHello,
I'm trying to use SPI with DMA on PSoc 4 on the CY8CKIT-044.
I started with the code example SPI Master DMA (https://www.cypress.com/documentation/code-examples/ce224339-psoc-4-spi-master). I removed the receive part because I just need to send an int-array with 1253 elements.
I checked with an oscilloscope if I'm sending data on the MOSI and SCLK and both looks as expected.
For code and configuration please have a look at the attached project.
I have two problems with my project:
- I want to generate an interrupt after DMA sent all 1253 elements. When the interrupt is triggered, the ISR should set a pin to 1. When I watch this pin with an oscilloscope I can see that there are 2 interrupts shortly after each other. Does somebody have an idea why I get 2 interrupts?
- Is there a possibilty to get an interrupt after the SPI is done with sending all the 1253 elements? If I turn on the SPI done interrupt source then I get an interrupt after every byte which was sent. I need to set a pin to 1 for about 30ns after the SPI is done.
Thank you very much in advance!
Best regards.
Show LessI'm using the MBR3 cap sense evaluation kit. Out of the box, I plug in the mini-USB and the proximity LED won't activate but the Cap touch buttons work fine. Is my board defective? Or am I doing something wrong?
I am also unable to load the .NET framework for the EZClick software since my organization prohibits external Windows updates. I would think these basic functionalities would still work even without the EZClick software?
Show LessBelow, the same sentences are written in English and Japanese.
Below is the continuation of the thread.
https://community.cypress.com/thread/45946
・Engilsh
Is there a formula for calculating the resolution bit value to be set from Cp (parasitic capacitance)?
・日本語(japanese)
Cp(寄生容量)から、設定すべきresolution bitの値を求める計算式ありますか?
Regards
Show LessBelow, the same sentences are written in English and Japanese.
・Engilsh
Currently, there is no sensor board.
However, I want to know the approximate scan time.
Is there a formula for calculating the resolution bit value to be set from Cp (parasitic capacitance)?
・日本語(Japanese)
現在、センサ基板が無い状況です。
しかし、スキャン時間の概算を知りたいです。
Cp(寄生容量)から、設定すべきresolution bitの値を求める計算式ありますか?
Regards
Show LessThe coils on the board are fixed on the board. But I'd like to design and add my own coils. Which pins are available for me to connect my coils? Thanks.
Show LessHi,
I have programmed PSoC4 according to send sensor data to the custom android application via Bluetooth Low Energy.
I tried my Android application on Nexus 5 phone with Android version 6.0.1. My custom android application is working fine.
But when I tried my custom Android application on Samsung Galaxy TAB S4 10.5 with Android version 8.1. Custom Android application is not working properly. PSoC 4 board is connected and before sending data it's disconnecting. Even I tried Cysmart android application. Cysmart application is also not working properly.
I wanted to know why PSoC 4 is not working with the latest Android devices which have the latest Android version?
Can anyone please help me to solve this problem.
Thanks,
Harsha
Hello,
while previously the OTA process using the Cysmart android app was working okay now I am facing with an issue that the progress is stuck at 0%.
The thing puzzling is that I am using the same unchanged project which has been tested working always fine, it still gets the OTA process completed successfully using the cysmart dongle on pc.
It used to work also with the app but with a different phone which I no longer have. I am trying with two different devices running os 4.4 and os 8.1 both unsuccessfully.
Firmware and app have the same unchanged code which were tested okay, that makes me think it might be a phone or android issue.
I have attached the log from the cysmart app, there aren't errors but it doesn't transfer the image.
Regards
Fausto
Show Less