PSoC™ 5, 3 & 1 Forum Discussions
text.format{('custom.tabs.no.results')}
Hello everybody,
Is it possible to generate watchdog interrupt on Psoc5? It seems we can do it on Psoc4. There is an option in GlobalSignal component. But i couldn't see it for 5.
Mehmet
Show LessI have a sensor that outputs a voltage between 0 and 3V. When I use Delta Sigma, the reading from my PSoC is compared with a volt meter. The result is not the same as the volt meter, it may be off by 5-10 mV some times, but I just want to prove the concept, and I'm just glad that it has some reading.
However, when I remove the sensor, the reading still says 200mV instead of zero. What am I doing wrong?
Here is the code snippet of the sensor reading function:
void handleRead(uint8 *buf, uint8 len) {
int16 adcResult = 0;
int16 mVolts = 0;
if(ADC_IsEndConversion(ADC_RETURN_STATUS) != 0) {
adcResult = ADC_GetResult16();
if (((int16)adcResult) < 0) {
adcResult = 0u;
} else if (((int16)adcResult) > 16383) {
adcResult = 16383;
}
mVolts = ADC_CountsTo_mVolts(adcResult);
printf("sensor read: %d\n", mVolts);
}
memcpy(buf, &mVolts, len);
}
Hi,
There´s not a lot of topics about DFB and i would like to know if i can use the DFB to average ADC results. The ADC will be configured with 10bits of resolution, sample rate will be controlled with the soc terminal (~10sps). I would like to use the DFB to sum 10 results of the ADC and then calculate the average, generate a interrupt after the average calculation.
My biggest doubt is the format on the input Stage of the DFB, can i pass it directly the results of the ADC?
All this project is for learning purposes, the calculation can be easily done with the CPU and interrupts. The DFB block is scary lol.
Thanks in advance
Carlos
Show LessHello,
I am testing out my new design with a CY8C5688AXI-LP099, and I'm trying to connect with a kitprog, snapped off a CY8CKIT-059.
But I'm getting "FAILED! Can not acquire device in SWD mode!" i PSoC programmer 3.25. I can detect the kitprog and have upgraded firmware. The gnd, swdio, swdclk and rst are connected to the kitprog, I'm powering the board from an USB charger.
Any ideas?
Show LessI have been working on PSoC 5LP for a while, PSoC is quite powerful but it takes a lot of efforts to know the details... The DFB is another complex unit. I disassembled the FIR code generated by the Filter component, so I can test it with the DFB Assembler. I put some comments on it based on my understanding with the DFB module, I might be wrong... Here is the assembly code:
// Copyright 2008-2013, Cypress Semiconductor Corporation. All rights reserved.// Filter coefficients are stored in RAM-Barea acu // 16 taps dw 0x0F0F // mreg dw 0x0000 // lreg dw 0x0000 // initial value for ACU-A.reg area data_b // 16 taps dw 0x00E168 dw 0x00432A // add another 14 taps here... initial: // Enable modulus arithmetic acu(setmod,setmod) dmux(sa,sa) alu(set0) mac(clra) acu(clear,clear) dmux(sa,sa) alu(hold) mac(hold) jmp(eob, wait_for_data) wait_for_data: // Wait input from stage-A(in1) for the next element acu(hold,hold) dmux(sa,sa) alu(hold) mac(hold) jmpl(in1,load_data) load_data: // Load (mreg,lreg) with (acu[0],acu[1]) acu(loadm,loadm) addr(0) dmux(sa,sa) alu(hold) mac(hold) acu(loadl,loadl) addr(1) dmux(sa,sa) alu(hold) mac(hold) // Open the channel from stage-A(addr(1)) to RAM-A at mux1a
acu(hold,hold) addr(1) dmux(ba,sa) alu(hold) mac(hold) // Write data to RAM-A, modify mux, load acu-A with acu[2] acu(read,clear) addr(2) dmux(sra,sra) alu(setb) mac(clra) write(da) jmp(eob, calc) write_bus: // Write acu[2] with acu-A.reg acu(write,clear) addr(2) dmux(sa,srm) alu(setb) mac(hold) acu(hold,hold) dmux(sa,sa) alu(hold) mac(hold) // Write shifter output to the bus' holding register A with addr(1) acu(hold,hold) addr(1) dmux(sa,sa) alu(hold) mac(hold) write(abus) jmp(eob, wait_for_data) calc: // Multiplication acu(incr,incr) dmux(sra,srm) alu(setb) mac(macc) jmpl(eob, acubeq, write_bus)
As part of my stereo preamplifier project, I am attempting to create messages that are stored as constants in an array of chars.
const char Inputs[6][7] = {"TUNER", "OPTICAL",
"AV", "SERVER", "PHONO", "FRONT"};
I need these messages to be stored in a global header file so elements throughout my program can access them. When I declare the above line in a c file, it compiles fine. In a header file, even if I use the extern keyword, my code does not compile.
What is the best method to declare a constant array of strings in a header file?
Show LessHi,
for storing audio samples, I figure PSRAM might be an option. Is there a way to circumvent the 24bit limitation on the emif, and how involved would it be (besides soldering a BGA)?
Show LessHello friends,
Does someone have any idea whether any of these controllers CY8C3866AXI-039 or CY8C4245AXI-483 or CY8C5868AXI-LP032 controllers support PID contol implementation(function). Iam unable to find any clue about it.
Please reply ASAP.
Thanks,
Vaibhav Patel
First of all thanks everyone for your reply, in continuation I would like to describe my problem.
I want to measure temperature of chamber and feed it to one of the following microcontrollers (CY8C3866AXI-039 or CY8C4245AXI-483 or CY8C5868AXI-LP032) and accordingly control PWM from microcontroller to control the temperature of chamber through one device. For this I need to implement PID control function and my question is :
Any of these controllers support inbuilt PID function library whose functions I can use directly in compiler(IDE) like setting Kp, Kd,Ki values and tune PID. If any one supports also then tool will generate code or we have to do coding part by our own.
In regards to Bob's answer who said PSOC 4 family can use PSOC creator tool for PID tuning but in datasheet I am unable to find any description of PID module in controller so how it will implement. Please explain.
Expecting Reply ASAP,
Vaibhav Patel
Show LessHello Forum
Our company uses a few types of PSoC5 and 4 devices with projects sharing a common code-base for the I2C protocol. With the same instance name for the I2C component, the function names are inherently different between the two families.
PSOC4
SCB_I2CSlaveInitReadBuf();
PSOC5
SCB_SlaveInitReadBuf();
Are there any novel suggestions or ideas to keep the function names similar between PSoC families? Thought below of possibly redefining the PSoC5 function names??
#if (ProjType == Project1)
I2C_R_I2CSlaveInitReadBuf(i2cReadBuffer, BufferSize);
I2C_R_I2CSlaveInitWriteBuf(i2cWriteBuffer, BufferSize);
#endif
#if (ProjType == Project2)
I2C_R_SlaveInitReadBuf(i2cReadBuffer, BufferSize);
I2C_R_SlaveInitWriteBuf(i2cWriteBuffer, BufferSize);
#define I2C_R_I2CSlaveInitReadBuf I2C_R_SlaveInitReadBuf
#define I2C_R_I2CSlaveInitWriteBuf I2C_R_SlaveInitWriteBuf
#define I2C_R_I2C_SSTAT_WR_CMPLT I2C_R_SSTAT_WR_CMPLT
#define I2C_R_I2CSlaveStatus I2C_R_SlaveStatus
#define I2C_R_I2CSlaveGetWriteBufSize I2C_R_SlaveGetWriteBufSize
#define I2C_R_I2CSlaveClearWriteBuf I2C_R_SlaveClearWriteBuf
#define I2C_R_I2CSlaveClearWriteStatus I2C_R_SlaveClearWriteStatus
#define I2C_R_I2C_SSTAT_RD_CMPLT I2C_R_SSTAT_RD_CMPLT
#define I2C_R_I2CSlaveClearReadBuf I2C_R_SlaveClearReadBuf
#define I2C_R_I2CSlaveClearReadStatus I2C_R_SlaveClearReadStatus
#endif
With Best Regards
Greg