PSoC™ 5, 3 & 1 Forum Discussions
Hi,
All examples of CY8CKIT-033A platform are stereo input/output.
Now we are designing a product with mono input/output.
I modify all the bNrChannels setting of Audio Descriptor of the USBiAP component, from 2 to 1.
Then I rebuild the project and download to the product, it works as a mono audio device.But the sound it recorded is not right. I know that it is because the sound data is not right.
How to make it right?
Thanks.
sd.
Show LessWhen I try to assemble it make says "no changes" so It does not assemble.
I know I made chages because the power banner has the wrong version listed.
Show LessHello,
I have kit of Psoc 5lp I need to interface the IMU sensor. So how to interface through I2c ?
Please give me the top design for that and hardware connection.
Show LessHello,
I would like to use the delta sigma ADC from 5LP in one of my application and I have some questions:
1. I intend to monitor 3 single-ended signals using the inherent analog multiplexer and the delta sigma ADC available. The monitored signals range from 0 to 5.15V and I need to adapt my input voltage to the ADC input ranges available in datasheet using a voltage divider alongside a filter capacitor. For single ended operation I thought to go with the 0-2.048V range, hence I need to divide my input signal by 2, approximately (I do not have a very stable Vdda available on my board therefore the Vssa to Vdda option does not fit my needs).
According to the datasheet this option sets automatically the buffer gain to 1, which normally would clip the input voltage range to both upper and lower rails. However the datasheet also states that the single-ended option will bypass the low side buffer.
Does it mean than when configured as single-ended the input signal will not be affected by the lower voltage limit of the buffer, VOL?
2. I did not found any information about the leakage current of the ADC pin and maximum allowed current into the ADC pin (or GPIO as a matter of fact), inside the document. The leakage component will affect my readings due to the voltage drop across the series external resistor.
3. Another point concerns the external capacitor – is it ok if I foresee a filter capacitor 1000 x the value of the hold capacitor? The cut-off frequency of the external filter is not a big concern as I am monitoring some rather sluggish signals.
4. The last point that I am interesting in: could I use the differential mode configuration to measure single ended signals?
The datasheet states that in differential mode I can tie the negative input to 2.028V and obtain a usable input range between 0 and 4.096V. Does it mean that even if in differential mode I can monitor a single-ended signal ranging from 0 to 4.096V? This would be more appropriate for my application as it is closer to the input signal range. Please let me know if possible!
Also, I presume there is no bypass of the rails when configured as differential, so for monitoring low voltage signals (under 100mV) is should bypass the buffer.
Many thanks for your support,
Florin
Show LessHello Cypress Forum,
I'm having an issue where the I2Cm_SendStop() appears to create an extra pulse on the SCL line in PSOC1. We are having communication issues with the slave that are catastrophic in certain conditions and the slave device sometimes won't ACK the PSOC with this extra pulse and the whole design fails. We think our problem of the slave not acknowledging the master is due to the extra clock pulse after the ACK. I've created a slide that shows the I2C transactions with a one byte write both with a stop and without and the code that generates this transaction. In both pics the slave acknowledges the master as I haven't created the failure state. I am just showing the extra clock pulse that is being created by the I2CmSendStop code.
Does anyone know why this is happening and how to correct it?
Also, is it possible to write my own send stop function and still use the I2Cm API library if this extra pulse can't be removed?
In my application I am using the Low Level functions.
Show Less
Hello, I am trying to control the speed of a brushless DC motor using an external electronic speed controller. The speed is determined by a signal from an RC device which I have been able to configure correctly to read the input and generate a measured pulse width (from 1ms to 2ms), using a timer configured for input capture. My only issue is outputting a signal to the ESC (requiring an 8kHz PWM signal) to drive the motor. I have attached part of my project for scrutiny and advise. Thank you.
Regards,
Leslie
Show LessHello, I trying to develop a simple I2C program using two PSoC5 CY8CKIT-059's. I have one kit acting as the Master and the other kit as a Slave. The idea is to have the slave PWM control the onboard blue LED. The Slave expects to receive two bytes, byte 1 will turn on the LED and byte 2 will control the PWM frequency. I got it working using the Bridge Control Panel. I was so happy. Here is my code:
int main(void)
{
uint8 i2cbuff[2];
CyGlobalIntEnable; /* Enable global interrupts. */
I2C_Start();
I2C_SetBuffer1(2,2, i2cbuff);
i2cbuff[0] = 0;
PWM_1_WriteCompare1(1);
for(;;)
{
if(i2cbuff[0] == 0) // Byte 0 is the on/off control, if equal to 0 stops the PWM
PWM_1_Stop();
else if(i2cbuff[0] == 1) // Byte 0 is 1 start PWM module
{
PWM_1_Start();
PWM_1_WriteCompare1(255);
}
}
}
The Slave was very easy because there was a great PSoC 101 video on the topic and I used EZI2C module.
The problem I now have is getting the Master I2C to work. The Master should send out two bytes to Slave. I have connected together the SCL on both kits and also connected together the SDA pins. Here is my Master Code:
int main()
{
LED_ON; // define macro to turn on blue led
CyGlobalIntEnable;
I2CM_Start();
LED_ON;
WriteCommandPacket(); // call function to transmit to slave
return 0;
}
/*******************************************************************************
* WriteCommandPacket(): Writes command packet to I2C slave
*******************************************************************************/
uint32 WriteCommandPacket(void)
{
uint8 buffer[2];
uint32 status = TRANSFER_ERROR;
uint8 read = 0;
/* Initialize buffer with packet */
buffer[0] = 1;
buffer[1] = 255;
I2CM_MasterClearStatus();
I2CM_MasterWriteBuf(0x8, (uint8 *) buffer, 2, I2CM_MODE_COMPLETE_XFER);
read = I2CM_MasterStatus();
read = I2CM_MasterStatus();
while (0u == (I2CM_MasterStatus() & I2CM_MSTAT_WR_CMPLT))
{
/* Waits until master completes write transfer */
LED_OFF;
CyDelay(1200u);
LED_ON;
CyDelay(1200u);
LED_OFF;
CyDelay(300u);
LED_ON;
CyDelay(300u);
}
LED_OFF;
I2CM_MasterClearStatus();
return (status);
}
The MasterStatus return 0x004 which is means the transfer in progress.
I have the Master power using a MiniProg3 and the Slave plugs into my laptop. I measured the voltage on the Master and it is 3.3V and the voltage on the Slave is 5.
Could that be the problem?
Thanks,
Joe
Show LessWe 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 Less