PSoC™ 5, 3 & 1 Forum Discussions
In my project with a PSoC 5LP the CyDelay functions runs 4 times too slow.For verification, I toggeled a digital output in a loop with CyDelay(100) between the output changes. Measured with an oscilloscope, the CyDelay(100) takes 392 ms.
Any ideas how to fix?
Show LessI want to change amplitude and frequency in wave Dac with current source.
In first iteration I get the signal, But after the this I am not able to get signal in second iteration.
Same thing is working If I use voltage source of wave dac.
This is my sample code .
Please give solution.
#include <project.h>
void Wave_Scale(const uint8 *wave, uint8 *wave_scaled, uint16 wave_len, float scale)
{
uint16 i;
for (i = 0; i < wave_len; i++)
{
wave_scaled[i] = (uint8)(((float)wave[i]) * scale);
}
}
int main(void)
{
CyGlobalIntEnable;
uint8 wave_sram[100] = {0};
while (1)
{
// First iteration - Generate sine wave with scale 0.5
WaveDAC8_1_Stop();
Wave_Scale(WaveDAC8_1_wave1, wave_sram, 100, 0.5);
WaveDAC8_1_IDAC8_Init();
WaveDAC8_1_Wave1Setup(wave_sram, 100);
WaveDAC8_1_DacClk_SetDividerRegister(23 , 1);
WaveDAC8_1_Start();
CyDelay(10000);
// Second iteration - Generate sine wave with scale 0.8
WaveDAC8_1_Stop();
Wave_Scale(WaveDAC8_1_wave1, wave_sram, 100, 0.8);
WaveDAC8_1_IDAC8_Init();
WaveDAC8_1_Wave1Setup(wave_sram, 100);
WaveDAC8_1_DacClk_SetDividerRegister(23 , 1);
WaveDAC8_1_Start();
CyDelay(10000);
}
}
I know the Project Build settings for the linker are supposed to have newlib nano float enbled with added libraries of m; c; gcc; g. This has always worked in the past. Now using 4.4 I am finding I cannot both print and scan floating point, only one or the other. I can scan, but not print if nano float is true but regular newlib false {this used to work}. If both are true I can only print, but not scan.
Show LessHello,
I just recently got my CY8CKIT-059 and one thing I cannot figure out is how do I create signals in software?
For example, I have an AND gate with two inputs, one should be driven by external signal so I assign it a digital input pin, and the other terminal I want to control with C code. Is there a way to create a pin that I could drive with CPU without assigning a physical pin?
For now I solved this issue by assigning a digital pin which I can drive with software. I have to use bidirectional pin for this because otherwise I get "No driver on net..." error.
How is this problem commonly solved?
Thank you!
Show LessI have a question regarding how to determine if a component (in this case, a UART) is running.
the initVar for the component isn't quite what I'm looking for, since all that tells me is if the _Start() function was ever called. It tells me if it was *ever* enabled, but not if it is *currently* enabled.
I'd like to be able to detect if _Stop() has been called after _Start(). Simply to know "Is the UART currently 'On'"?
I maybe have a couple options? Check the internal RX interrupt enable maybe?
if (!(DAP_UART_RXSTATUS_ACTL_REG &(uint8)DAP_UART_INT_ENABLE)){
/*UART RX is disabled, do stuff*/
}
or if the "Write Bit Counter" is disabled?
if (!(DAP_UART_RXBITCTR_CONTROL_REG &(uint8)DAP_UART_CNTR_ENABLE)){
/*Write Bit counter is disabled*/
}
Is there a "preferred" way to go about this? I was kind of hoping there would be some generic API function or simply a status bit to tell me if a specified component is "on".
Any other suggestions?
Show LessI am using several 5LP's in an application and have setup their SPI communication as SPIS. I am using an Arduino microcontroller as the SPIM. When only one 5LP is connected to the SPI bus, everything works correctly. As soon as I connect more than one 5LP, the MISO line does not return anything for any of the 5LP's connected to the SPI bus. The MOSI line is sending data correctly and the 5LPs are processing correctly but I am unable to get any data back. I have read on several discussions that the Enable Multi-Slave mode needs to be activated. It says that the
external BUF_OE component should be connected to the MISO output in this mode. This mode
allows you to turn MISO output to a high-impedance state when SS line is high. I am unable to connect an external buffer since I have designed the motherboard that accepts all the 5LP's already.
Are there any work arounds that would allow me to disable to MISO line when the 5LP is not being communicated. Any suggestions would be appreciated. I never had an issue running multiple SPI with the MISO in other designs. I should have thoroughly read the 5LP data sheet.
Show LessHi All,
I am trying to implement a high throughput USB data capture system using the PSOC 5LP.
Using a COM port setup: I can currently send back 180kB/s by simply calling USBUART_PutData() in my main loop, however, I have been told that there are much higher performance options that would allow me to get to ~1MB/s.
I have tried Project 3 in AN56377 "PSoC® 3 and PSoC 5LP – Introduction to Implementing USB Data Transfers" which uses Isynchronous mode to send 1023 bytes per transfer, but I cannot find a suitable USB driver to support this mode.
Does anyone have any high-throughput USB tips or projects that I can reference.
Thanks
Greg
Show Less
Hello,
when placing hardware output on UART receive that toggles with T-FF , we see that sometimes the interrupt happens after 1 byte and sometimes after 2 bytes, how we make it interrupts always after 2bytes, or make it interrupt always on a single byte ?
Thank you
Guez Segev, BSc.
Software engineer
CI Semi - A division of CI Systems
Migdal HaEmek 10551, Israel
Tel: +972-4-644-8873
Show Less
I am trying to follow the PSoC Component Object Model Interface Guide making a C# project. But when I do exactly as described i get this error massage. Does anyone know what that mean
Show Less
Analog Devices defines a no_os_spi.h file that allows spi communications to many of their devices. https://github.com/analogdevicesinc/no-OS/blob/master/include/no_os_spi.h
I am trying to use an ADXL362 accelerometer with a cy8c5888LTI-LP097. Does anyone have an implementation of no_os_spi.c? Alternately, I could use a library for the 5LP that interfaces to the ADXL362 or ADXL363. I'm looking for c functions such as: