PSoC™ 5, 3 & 1 Forum Discussions
Any time before there was a question on the forum: Can I change the filter constants in runtime ?
My answer is: Yes you can.
Here is a code snippet that complains, how it works.
void LoadFilter (uint8 fltr)// fltr is the pointer to the dedicated parameter block
{ // Put DFB RAM on the bus :
Filter_RAM_DIR_REG = Filter_RAM_DIR_BUS;
if (fltr == 1)
cymemcpy(Filter_DB_RAM,Filter100_data_b, Filter_DB_RAM_SIZE);
else if (fltr == 2)
cymemcpy(Filter_DB_RAM,Filter200_data_b, Filter_DB_RAM_SIZE);
else if (fltr == 3)
cymemcpy(Filter_DB_RAM,Filter400_data_b, Filter_DB_RAM_SIZE);
else if (fltr == 4)
cymemcpy(Filter_DB_RAM,FilterTP2800_data_b, Filter_DB_RAM_SIZE);
// Take DFB RAM off the bus :
Filter_RAM_DIR_REG = Filter_RAM_DIR_DFB;
}
The Filter_data you can compute with the embedded filter wizard. After setting your parameters
in the Filter Block, build the application an then read out the file Filter:Ram_Data.c :
const uint8 CYCODE Filter_data_b[] =
{
0x14, 0xD0, 0x01, 0x00, 0x28, 0xA0, 0x03, 0x00,...
And if you want to change the filter structure ( FIR --> IIR) you have to exchange in the same way the following matrix:
const uint8 CYCODE Filter_control[] =
{
0x20, 0x13, 0x00, 0x25, 0x61, 0x17, 0x80, 0x26,....
Don't know why all filter coefficients are located in Filter_data_b, even when you use filter stage A...
Good luck!
Hi all,
I would like to ask for a bit of help to soft out my troubles with my ancient old arch enemy - the I2C bus 🙂
My setup is this: a 29566 device acting as a master, and using the P1[5] and P1[7] lines. I managed to successfully run a I2Cm module and verify the communication. However I need 400k speed and trying to use the I2CHW module instead. Just repeating the example code for a single master device and it always hangs on this line:
while(!(I2CHW_bReadMasterStatus()&I2CHW_WR_COMPLETE));
I also tried the option:
while(I2CHW_bReadI2CStatus()&I2CHW_ISR_ACTIVE);, again with no success.
Don't know what to try next...
Show LessHi all,
I would like to ask for a bit of help to soft out my troubles with my ancient old arch enemy - the I2C bus 🙂
My setup is this: a 29566 device acting as a master, and using the P1[5] and P1[7] lines. I managed to successfully run a I2Cm module and verify the communication. However I need 400k speed and trying to use the I2CHW module instead. Just repeating the example code for a single master device and it always hangs on this line:
while(!(I2CHW_bReadMasterStatus()&I2CHW_WR_COMPLETE));
I also tried the option:
while(I2CHW_bReadI2CStatus()&I2CHW_ISR_ACTIVE);, again with no success.
Don't know what to try next...
Show Less Hello everyone,
Thanks in advance for any help, I'm a student which needs to use a QuadDec with 32 bit size counter, so I created a long int variable to storage it's value, because I need to send it through the UART interface as string to capture the quadrature information, the thing here is that even though I do select the counter with 32 bits, the data I'm receiving can't go up to -32 768 and +32 768 just as it was a 16 bits counter.
I read in the Component Data Sheet this:
"The 32-bit counter implements the lower 16 bits in the hardware counter and the upper 16 bits in software to reduce hardware resource use. For this target, an additional ISR is used. To work properly with the 32-bit counter, interrupts must be enabled. You can add ISR code to source files as needed; see the Interrupt Component datasheet for more details."
I'm not really sure to fully get what it means but as far as I can understand that it seems that it really never creates a 32 bit counter.
How can I fix this?
Thanks again.
I'm a newbie, and I wanted to poll the community to see if there is any collateral describing or explaining the use of the PSoC3 (or 5L) SPI interface with frames less than 8 bits? I haven't checked the PSoC creator yet, so maybe it's outlined there. I'm just getting started, but l'm looking forward to it.
Show LessHi all,
I programed my CY8C5868AXI-LP without any problems and since that moment I can't re-program it. PSoC Programmer says to me:
"FAILED! PSoC device is not acquired! Check connection of the chip to the programmer
Please, check the following items:
- the connection between the programmer and the PSoC;
- the correct programming protocol is selected;
- the correct connector option is selected."
thanks in advance 🙂
In attached my JTAG connections on the PSoC.
Show LessHi there !
Anaybody knows how to get again PSoC 3.0 ?. I think is about the last Service pack version.
The rason for get again that verson is because I have an application that was working spectacular in PSoC 3.0
and doesn't want to work wiith f PSoc 3.1
It is about RF tranceiver nRF24L01P breakout board.
The only component used in the design is a SPIM 2.40.
I would like to get PSoC3 3.0 to verify if it is some mistake from myself.
Thank you very much.
Show LessI want to program psoc4 firmware by using psoc5 (psoc4 is target , psoc5 is programmer) I follow "AN84858 PSoC® 4 Programming Using an External Microcontroller (HSSP) " http://www.cypress.com/?rID=81013
and " \AN84858\B_Hssp_Pioneer.cydsn " is model for PSoC5 firmware(Programmer) .
This concept be possible? And if I connect PSoC5 and PSoC4 together with SWD protocol
and run this function" programResult = ProgramDevice(); " PSoC4 will programed? or I need to do anything else.
Thank you.
Show LessI have a design where I need to be able to supply analog voltages to a variety of pins for test purposes. I'm using a PSoC 5LP chip with two VDACs, and I'd like to be able to generate two independent voltages or waveforms, routing each one to one (or even several) arbitrarily selected pins.
I've had a go at this a couple of ways; two great big 17-way MUXes which connect to the array of pins works fine, but has the downside that you nothing prevents you connecting both DACs to the same analog pin.
17 2-way MUXes makes more conceptual sense, since it allows each pin to choose which VDAC (or neither) it's connected to. However, the API for this is a nightmare - 17 individual MUX APIs, with no straightforward way to address them programmatically. I can't use a hardware mux to connect these all to a single set of registers, because PSoC creator won't allow the 'wide' side of an analog hardware mux to be connected to anything other than GPIO pins.
Can anyone suggest a third way? I looked into customizing the MUX component, but it's a fiendishly complex bit of dynamically generated verilog.
Show Less