PSoC™ 5, 3 & 1 Forum Discussions
i need to create 6 signal that drive a three phase bridge with a frequency =3600hz
i can do it by timer and a switch case like :
but when i use serial to contact with pc and send a frame , the interrupt to timer wait until the frame is send , so the frequency is not fixed.
how to implement it without using CPU to change the port case . like PWM that working without CPU assistance؟
Show LessI have a FreeSoc2 development board with the 5888 part, MASTER_CLOCK comes from an external 24MHz crystal and is bumped up to 64MHz by the PLL. BUS_CLK==MASTER_CLK. Release build with LTO etc. enabled, optimization goal set to speed. Debugging a soft 3-wire SPI implementation I ended up with the following snippet:
for(;;) {
Soft_SCLK_DR |= (1 << Soft_SCLK_SHIFT);
Soft_SCLK_DR &= ~(1 << Soft_SCLK_SHIFT);
}
The output frequency on the Soft_SCLK pin is 4MHz -- I expected it to be in the 15-20MHz ballpark. So why is it so slow?
Show LessHello All,
I have a design using an SPI slave (PSoC 3/5) with the following parameters:
- CPHA=0, CPOL=1
- MSB First
- No data being received (MOSI is zero constant)
- 8-bits wide
- 4 Byte FIFO
- External Clock (24 MHz BUS_CLK)
The application requires that, while SCLK is in its idle state, MISO be a steady high to indicate that the device is ready for a data transfer. Immediately after the last SCLK, the MISO must go low to indicate that the device is not yet ready for another transfer. Once the device is ready, the MISO will go high. I can add logic to the SPIS to force these conditions, but before I do that, I think I should better understand the SPI slave.
I will only transfer 4 bytes at a time. And, since the clock is much faster than SCLK, I consider a delay of a few clock cycles to be essentially instantaneous. I don't want to use the SS input, but if I have to, I'll use internal signals to "fake it out". That being said, I want to determine/control the MISO state before and after the transfer.
Assume that the FIFO is full and I have written directly to the shift register using SPIS_WriteTxData() before the first leading (falling) SCLK edge. What is the MISO state? Is it equal to the MSb of the first byte, already in the shift register?
Also, what would the MISO state be after the trailing (rising) edge of SCLK? Would it be the LSb of the final byte, the MSb of the next byte from the FIFO, or something else?
Any help would be appreciated.
Paul
Show LessHi,
We are trying to acheive something like Sigma-Delta ADC -> DMA -> Filter_Block -> DMA -> SRAM. Initially we started testing
with ADC -> DMA -> Filter_Block-> Interrupt. The readings obtained were as expected. However when we tried replacing the
interrupt with DMA {Sigma-Delta ADC -> DMA -> Filter_Block -> DMA -> SRAM} we noticed the readings not as expected.
For the 50 tap filter the readings kept changing till the 49th sample and then it remained constant.
I have attached the project bundle. Kindly help me figure out the issue ?
Thanks
Show LessHello,
I'm a student on internship and my teacher want me to use two PsoC in order to display the current and the voltage of a battery. The values are converted and sent by the UART of the first PsoC, received and handled by the second PsoC. I want to display these values on a LCD screen but all the program I've developed until now doesn't seems to work.
More specifically, the first PsoC convert a data from float to ASCII using the function ftoa() and send it to the second PsoC in order to display it on the LCD screen. The problem is that the value printed by the LCD doesn't match what I am supposed to have.
I'm not using any development kit but instead, I'm using a PCB which was developed by my university.
Until now, I've managed to display a unsigned float variable.
The code below my message is supposed to store the data send by the Rx buffer in a table and show the content of the table in the LCD Screen. But my LCD Screen display some hex value like :
"F4000000000" for the first line
"03072B2B00" for the second line.
What I expect is a value like : "11,4578"
Can you help me please ?
void main(void)
{
char* strPtr; // Parameter pointer
char tab [100];
int i;
int byte_length = 256;
// Initialize receiver/cmd buffer
UART_CmdReset();
//Turn on interrupts
M8C_EnableGInt ;
//Enable RX interrupts
UART_IntCntl(UART_ENABLE_RX_INT);
//set parity as zero and start the UART
UART_Start(UART_PARITY_EVEN);
LCD_1_Start(); // Initialize LCD
//Clear the screen in Hyper terminal window
UART_PutChar(12);
while(1) {
UART_CmdReset();
LCD_1_Position (0,0);
LCD_1_PrCString ("tension :");
LCD_1_Position (9,0);
for (i=0;i<byte_length;i++)
{
//tab = UART_cGetChar ()/0xA; //test pour récupérer des caractere
strPtr = UART_cGetChar ()/0xA;
//tab = UART_bReadRxData();
//strPtr =& tab;
//strPtr = &UART_aRxBuffer;
//UART_aRxBuffer = UART_bReadRxData ();
//tab = UART_iReadChar(); // Get a character from UART RX data register
}
for (i=0;i<byte_length;i++)
{
Delay10msTimes (50);
//itoa(strPtr,tab,10);
//LCD_1_PrString (strPtr);
//LCD_1_WriteData (tab);
//tab = tab/0xA;
LCD_1_PrHexByte (tab);
UART_CmdReset();
}
//Reset command buffer and flags
UART_CmdReset();
}
}
I'd like to make DMA transfer 2 data from SAR ADC to Memory as switching AmuxHW, but the output of DAC was mixed signal of 2 data (reference to attached picture:Blue= SIG1, Yellow=SIG2, Green=output of DAC).
Digital delay circuit was referenced to CE95299 (http://www.cypress.com/documentation/code-examples/ce95299-delta-sigma-adc-using-16-multiplexed-single-ended-inputs-psoc).
Show LessHello,
I'm improving a project containing a PSoC 1, switching to PSoC 5.
The problem is that PSoC 1 has an instrumentation amplifier up to Three Opamp Topology, allowing dynamical changing of the gain (differential gain + conversion gain). This feature allow to make a fine gain control (< 1) and a big gain control (> 1) too.
With PSoC 5 this feature is still not present. I have only Opamps and PGA that I could connect together to obtain the same configuration.
The problem is the dynamically gain control of PGA. I can't get down gain = 1, so this is reduce the performance of my system because I can make a fine gain control.
Is there a similar PSoC 1 component to use with PSoC 5 or alternatively do you have a solution?
Best regards
Show LessI want to configure cypress mbr3116 using i2c protocols by using host controller Renesas R8C25276. The host is writing data in memory of cypress but after giving command of Save_Check_crc & Reset_sw it is going in low power state mode. I have given wake up instruction to wake up the device & The delay between two i2c transaction is also less than 320ms. Host is reading data correctly after sending commands but its not working. Is there any other parameters i need to check?
Show LessHi All,
I am getting a warning (see attachment) when i compile the program.
I like to know the affect of it on the output of my SPI communication and how I can solve this warning?
Looking forward to your reply!
Awais
Show LessHello,
assume F0 is in dynamic, edge triggered mode and is controlled by UDB, (stores from A0). It contains [1, 2, 3, 4], A0=5. Now, let there be a datapath sequence of states
PASS A0, (A0 WR SRC = F0)
ADD A0, A0
and the FIFO write strobe generates a rising edge when control goes to the ADD. There are two possible scenarios in that state:
a) F0 = [2, 3, 4, 5], A0 = 1 (read and write were merged: I'd like this to happen)
or:
b) F0 = [2, 3, 4], A0 = 1 (because: A0 is first written to a full FIFO, so ignored, then the FIFO is read into A0)
or:
c) undefined.
Which one will happen? I can check it on a real device, but I don't consider it a proof of anything -- is there a documentation backup for that behavior?
Best regards,
Show Less