PSoC™ 5, 3 & 1 Forum Discussions
text.format{('custom.tabs.no.results')}
We currently have a VC# application using CyUSB.DLL to communicate with our PSoC5 based product. It is configured as a Generic HID device. I notice that the date on the DLL is very old. Is this what we should be using?
We are having some issues:
1. Something seems to have a memory leak as the App crashes after about 48hrs of communication with our device (happens on multiple PCs). Programmer is looking into it.
2. If the PC goes to sleep the App usually crashes when it wakes back up. Programmer gave up looking for a fix for this!
Thanks,
Mike.
Show LessHello, I'm trying to write a simple I2C program on a CY8CKIT-059. I've snapped off the KitProg and using a MiniProg to Debug my code. Here is a snap shot of the I2C Master to Slave comms:
My program has one Master and one EZI2C Slave module. I want the Master to transmit one byte to the Slave Buffer and the data will control and LED using the PWM module. From the image above I see the SLAVE is ACK'ing back on the Address and the Register address but not the data word. Also, the Slave buffer is not being fill with the transmit data from the Master. I would like anyone to look over my code and maybe see something that would explain why the Slave buffer is not being filled.
#include "project.h"
#include "header.h"
#define RD_SLAVE_BUF_SIZE (0x2u)
#define BUFFER_RW_AREA_SIZE (0x2u)
#define MASTER_BUF_SIZE RD_SLAVE_BUF_SIZE
#define Wait(x) // Just for readability
uint8 slaveaddress = 0x8;
uint8 slavebuff[RD_SLAVE_BUF_SIZE] = {0,0}; // Buffer for EzI2C slave
uint8 masterbuff[MASTER_BUF_SIZE] = {0,0}; // Buffer for I2CM Master
uint32 master_status = 0;
void InitializeSystem(void)
{
uint8 i = 0;
CyGlobalIntEnable;
PWM_1_Start();
PWM_1_WriteCompare1(1);
I2CS_SetBuffer1(RD_SLAVE_BUF_SIZE, BUFFER_RW_AREA_SIZE, slavebuff);
I2CM_Start(); // start master
I2CS_Start(); // start slave
CyDelay(500);
}
int main()
{
uint8 compare = 0;
InitializeSystem();
WriteCommandPacket();
if(compare != slavebuff[0])
{
PWM_1_WriteCompare1(slavebuff[0]);
compare = slavebuff[0];
}
return 0;
}
/*******************************************************************************
* WriteCommandPacket(): Writes command packet to I2C slave
*******************************************************************************/
uint32 WriteCommandPacket(void)
{
/* Initialize buffer with packet */
masterbuff[0] = 0; // Address within EzI2C buffer
masterbuff[1] = 200; // Data
I2CM_MasterClearStatus();
I2CM_MasterWriteBuf(slaveaddress, masterbuff, MASTER_BUF_SIZE, I2CM_MODE_COMPLETE_XFER);
// Waits until master completes write transfer
while(0u == ( I2CM_MasterStatus() & I2CM_MSTAT_WR_CMPLT) )
Wait(); // Wait until transfer completed
master_status = I2CM_MasterStatus();
I2CM_MasterClearStatus(); // Usually needed only when there was an error
return (master_status);
}
Show LessHi,
I am new to PSOC
I am using PSOC 5LP with PSoC Programmer 4.2
I have a photodiode & resistor are connected externally, using Vdd and GND(Vss) pins on board as shown in picture.
This should be able to detect obstacle on photodiode and indicate it through the on board LED.
By default the LED is ON after programming.
What can be corrected in this setup?
Show LessA binary data reception interrupt program is being created using CY8CKIT - 059.
The communication conditions are 19,200 bps DataBit = 8 Parity = non stop = 1 Rx buffersizu = 100 and actual reception is about 30 characters.
The interrupt module was connected to the rx_interrupu terminal of the UART.
I created the code as follows, but sometimes the data dropout occurs.
I would appreciate it if you could give me advice on what is the cause and how I can solve it.
Below is the receive interrupt part
if ( UART_ReadRxStatus() == UART_RX_STS_FIFO_NOTEMPTY ){
bufsize = UART_GetRxBufferSize();
for(i=0;i<bufsize;i++)
{
data_cnt++;
rev_data[data_cnt]=UART_GetByte();
}
if (data_cnt==22 )whm_rev_end=1;
}
Show LessHi!
Is there a way to change the PWM compare value in PSOC-5LP using a hardware event? I mean a feature similar to PSOC-4, where compare buffer values can be swapped during a trigger event.
My concern is, what happens if the compare register is updated to a value less than the counter value? Since the PWM compare update algorithm can be running continuously in a non synchronized manner it is always possible to update the compare register to a value lower than the current counter value. How to avoid this?
Also, suppose if the compare register is updated to a value less than the counter value, what happens then?
Please help
Show LessHello.
I created a multi-application project file but I do not know how to switch applications using Bootloadable_SetActiveApplication.
Looking at Bootloadable.c Bootloadable_SetActiveApplication is not enabled, what should I do?
Show LessHello, I have attached a project where I am interfacing with an SI 7023 https://www.silabs.com/documents/public/data-sheets/Si7023-A20.pdf humidity/temperature sensor and capturing the PWM signal.
The output is for debugging purposes only.
The issue I am facing is that although I am able to accurately capture the pulse width, I am not able to capture the low time properly with my project. Instead, it seems that the low time is coming back as the period.
I have attached a PWM to the timer in order to simulate the problem. Normally, there is an external device connected to a pin.
I reset the timer after each capture, but am uncertain why I see the period rather than the low time captured.
Thank you in advance for any assistance.
Karl
Show LessHello,
I am new to the cypress. I am using cypress creator. I am successfully blink LED 3 using p6[2] pin and LED 4 using p6[3] pin on psoc 3 kit. Now i am trying to blink led 1 and led 2 but i dont get a pin configuration for that led's. There is a prototyping area near which led1 and led2 are brought out. So my question is how to blink this leds? and what is the use of prototyping area?
Show LessI have a question about how to adjust the ADC.
what should the setting be if you have to measure a
signal on an input that has a value between 3 and 4 volts.
And the required measurement accuracy must be 0.5mV.
Show Less