PSoC™ 5, 3 & 1 Forum Discussions
Dear,
I want to do a study with the color sensor.
There is sample code in datasheet. I created a library for them. but it doesn't work. Should I use a different command for i2c?
Sample Code:
#define I2C_AS72XX_SLAVE_STATUS_REG 0x00
#define I2C_AS72XX_SLAVE_WRITE_REG 0x01
#define I2C_AS72XX_SLAVE_READ_REG 0x02
#define I2C_AS72XX_SLAVE_TX_VALID 0x02
#define I2C_AS72XX_SLAVE_RX_VALID 0x01
void i2cm_AS72xx_write(uint8_t virtualReg, uint8_t d)
{
volatile uint8_t status;
while (1)
{
// Read slave I²C status to see if the write buffer is ready.
status = i2cm_read(I2C_AS72XX_SLAVE_STATUS_REG);
if ((status & I2C_AS72XX_SLAVE_TX_VALID) == 0)
// No inbound TX pending at slave. Okay to write now.
break,
}
// Send the virtual register address (setting bit 7 to indicate a pending write).
i2cm_write(I2C_AS72XX_SLAVE_WRITE_REG, (virtualReg | 0x80)) ;
while (1)
{
// Read the slave I²C status to see if the write buffer is ready.
status = i2cm_read(I2C_AS72XX_SLAVE_STATUS_REG) ;
if ((status & I2C_AS72XX_SLAVE_TX_VALID) == 0)
// No inbound TX pending at slave. Okay to write data now.
break;
}
//Send the data to complete the operation.
i2cm_write(I2C_AS72XX_SLAVE_WRITE_REG, d) ;
}
I
Show LessI'm looking to read a Nordic nRF52840 over UART through the CY8CKIT-059. So far I've used an example project to read a hardcoded message (Hello World) over USBUART from the -059 to the PC, but now I'd like to change the hardcoded message to the Rx channel on the -059 so it will display data coming from an external board.
Show LessTo all,
I have place a Windows PC terminal source code in C# on the Code sharing forum.
PC Terminal Program with C# Source Code
Enjoy,
Len
Show LessI'm using a PSOC 5LP.
This code works..
for(;;)
{
if (LightItUp_Read() != lightState)
{
lightState = LightItUp_Read();
if (lightState)
DebugPort_PutString("Light On\r\n");
else
DebugPort_PutString("Light Off\r\n");
}
}
But this doesn't..
for(;;)
{
lightState = LightItUp_Read();
if (lightState)
DebugPort_PutString("Light On\r\n");
else
DebugPort_PutString("Light Off\r\n");
CyDelay(1000);
}
Can someone please explain ?
Message was edited by: Ajinkya Bansod Added new project
Show LessHi,
I want to make an adjustable square project using kit59.
Can I create a 48Mhz Square Wave?
I reviewed WaveDAC8 Example project."Error in component: WaveDAC8_1. Clock frequency for selected DAC range must be between 0 and 1000.000 kHz."
Best Regards
Show LessHi all,
I am using CY8CKIT-059 with usbuart module. On the PC side I'm using Teratem to send and receive data. teratem send a file .txt file over the uart. The code is working fine but now I want to remove the Teratem(any terminal). I want to implement it just by some piece of code. that can open a com port on PC side and send a file (.txt) from particular location in pc to cypress controller. Is there any way to implement this?
Show Less
How do I set a flag when the Fixed Function I2C Master is done with its transfer? I am sending 33 packets of 32 bytes frequently and it uses a lot of idle delay time waiting for the transfer to be done when I need it to be running other parts of code? I can't seem to find an interrupt callback for when the transfer is done.
Show LessHi,
we got a problem with a PSoC 5 CY8C5867 and I2C-Bus.
Under still unknown circumstances the PSoC stalls the bus by holding the SCL low.
We need to integrate the PSoC PCB in an older hardware with some issues regarding power supply and I2C bus layout.
The bus signals are not perfect and do not reach 0V e.g.
Is the I2C module of the PSoC 5 sensitive to dirty voltages?
Or what can be the trigger for the I2C stop?
We use the I2C component 3.50, fixed function, hardware address decode.
Greets,
Joerg
Show LessTo all,
I have place a Windows PC terminal source code in C# on the Code sharing forum.
PC Terminal Program with C# Source Code
Enjoy,
Len
Show LessTo all,
I have place a Windows PC terminal source code in C# on the Code sharing forum.
PC Terminal Program with C# Source Code
Enjoy,
Len
Show Less