PSoC™ 5, 3 & 1 Forum Discussions
Hello All,
Has anyone been able to successfully measure the Max voltage of a sine wave?
I am routing my analog wave through a PGA before inputting into the ADCINCVR. The Clock frequency is set to 2Mhz, the CPU is set to 12Mhz. The input wave is 3Vpp @ 3840Hz with a DC bias of 1V.
while(1){
if(ADCINCVR_1_fIsDataAvailable()){ // check flag to see if last conversion is complete
ADCcount[0] = ADCINCVR_1_iGetDataClearFlag(); // read sample from the ADC
break;
}
}
ADCcount[0] = 0;
loopCount=0;
while (loopCount<20){
PRT2DR|=IO_TEST; //DRIVE P2[0] HIGH
ADCcount[loopCount]=ADCINCVR_1_iGetData();
loopCount++;
PRT2DR &= ~IO_TEST; //DRIVE P2[0] LOW
}
After taking the 20 samples, I am looking for the highest value in the array.
The problem I am running into is that I can only recover the DC offset portion of the wave.
To verify the sampling frequency is sufficent, I put an o-scope on the input wave and output of PRT2DR. I am able to see that sample is being taken at various portions of the sine wave.
Any Ideas?
Vlad
Show Lessstate_var is only available in main loop. Nowhere else this value is neither read nor written.
How it's possible, that in case statement case 7:
value on exit is negative?
in assemble there are 3 instructions related to increament state_var.
However it's not rtos but a simple single thread aplication, mainly for problem isolation.
Should I disable breakpoints during increment/decrement which do not play with this variable at all?
Show LessHi All,
I ran into this and took awhile to find the problem... thought I would write this while it was fresh.
USBFS_v2_60.pdf Page 57:
The discription for the "void USBUART_CDC_Init(void)" function gives an example using USBUART_GetConfiguration() to wait until the host has enumerated and configured the device.
USBUART_Start(…);
while(USBUART_GetConfiguration()){};
USBUART_CDC_Init();
The second line should have been "while(!USBUART_GetConfiguration()); ".. note the added "!" to invert the returned value from the get configuration function. The example above does not wait as indicated in the discription. The problem showed in my test software, where the Psoc could write to the PC but the PC could not write to the Psoc.
Show LessHello all,
my design holds microSD card (working with emfile) and Serial RAM (connected to the same SPI lines as microSD card).
My question is how can I assign same pins to both emfile and SPI Master?
Whenever I set pins for emfile (in Pin Editor), pins for SPI Master get deselected and vice versa. Is there something basic that I am missing?
Regards
Show LessHello!
I was using a chip AXI-060 (PSoC 5 architecture I think) before and was getting readings from some analog sensors (pressure transducers). Those readings were pretty accurate. I am now working with a 5 LP-032 chip, and I just notice that, even if I'm using the same code as on the AXI-060, those readings are completely different. I get a reading in mV that is about 3 times less than what I was getting with the old chip.
This is pretty scary. Any idea of what would cause that? Is the ADC different in PSoC 5 and PSoC 5LP?
Thank you.
Show LessWhen a packet of exactly 64 Bytes is transmitted using USBUART from PSoC to a PC and the result observed on a Terminal program, nothing is displayed on the Terminal program on the PC.
Reason and Workaround:
This is because of a bug in the USBUART User module code. The firmware is supposed to send a zero length packet after sending the 64 byte packet. The driver in the PC will know of the reception of the string only after receiving this zero length packet. As the firmware does not send the zero length packet, the PC driver is not aware of the reception of the data. This problem occurs only for a packet of exactly 64 characters. Packets with other lengths are received fine. The workaround for this problem is to split the 64 byte packet into two packets of any lengths, for example 32 + 32, or 62 + 2 etc.
This problem will be fixed in PSD5.0 SP6, which is expected by the end of September 2009. Show Less
In thermocouple example Thermocouple_GetVoltage() API accept temperature range maximum of 100 Degree.
But how can i modify that API for Full temperature range for any thermocouple.??
Show Less