PSoC™ 5, 3 & 1 Forum Discussions
text.format{('custom.tabs.no.results')}
Hi,
I am trying to work with Sigma-Delta ADC in single-sample mode for 16 bit in PSoC 5. I am testing my ADC by feeding it with 20Hz sine wave. This sine wave is generated by waveform DAC.
For 60 samples at sampling interval of 5 milli-sec about 6 peaks are expected from the ADC output [(60 *5ms)/50ms =6]. However I see 9 peaks when the raw ADC samples are plotted. I have attached the screenshot of the same.
Note :- I have checked the waveform DAC on the oscilloscope and 20Hz was observed.
Am I doing something wrong here ?
I am also attaching the project bundle.
My main.c looks something like this:
#define NO_SAMPLES 60
#define SAMPLING_INTERVAL_MS 5
#include <project.h>
#include<ADC_DelSig_1.h>
uint8 count=0;
int32 samples[NO_SAMPLES];
int main()
{
CyGlobalIntEnable; /* Enable global interrupts. */
WaveDAC8_1_Start();
ADC_DelSig_1_Start();
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
for(count =0; count<NO_SAMPLES;count++)
{
ADC_DelSig_1_StartConvert();
if(ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT)!=0)
{
samples[count]=ADC_DelSig_1_GetResult32();
}
ADC_DelSig_1_StopConvert();
CyDelay(SAMPLING_INTERVAL_MS);
}
}
Show LessI want to measure the width of each pulse from an external signal. For this I set up a timer to run continuously,trigger at the rising edge and capture at the falling edge. There is an ISR attached to the interrupt terminal of the timer and is called Channel_1_ISR as can be seen below.
The ISR runs once since the led state is only toggled once but not after that. What am I missing?
CY_ISR(Channel_1_ISR_Handler){
Channel_1_Count=Channel_1_Timer_ReadCapture();
onboard_led_Write(~onboard_led_Read());
Channel_1_ISR_ClearPending();
}
int main(void)
{
CyGlobalIntEnable;
onboard_led_Write(~onboard_led_Read());
Channel_1_Timer_Start();
Channel_1_Timer_EnableTrigger();
Channel_1_ISR_Enable();
Channel_1_ISR_StartEx(Channel_1_ISR_Handler);
for(;;){}
}
Show LessHi.
In my project I need a DMA to write values to a Timer counter register (according to some SW logic).
When I implement this using a UDB-based Timer - it works.
When I changed the Timer to Fixed - it doesn't.
Is there some limitation regarding DMA and Fixed peripherals?
Thanks.
Show LessHi.
I use the Kitprog as a programmer for my board. Occasionally, when plugging the Kitprog to the PC, it doesn't automatically recognize the target, and goes into the Mass Storage mode.
Is there a way to disable this mode? I want the Kitprog to connect itself only as a "normal" programmer/debugger. This "5 seconds reset button hold" drives me crazy...
Thanks.
Show LessHello, All! I am new in PSoC world. Currently I am working on a project that require accurate frequency measurement. Since PSOC5 internal clock doesn’t accurate, using external crystal oscillator will provide more accurate measurement.
I have an external crystal with part number ECS-240-20-33-CKM-TR, which is 24 Mhz crystal and 20 pF load capacitance. I already soldered this crystal on the PCB board next to PSOC chip at Pin 15[0] and Pin 15[1](I have attached schematic). I choose two 22 pF capacitors as load.
I followed procedure (AN54439_External crystal oscillators) and tried to enable this external crystal oscillator in PSOC creator, but it never work. (See attached setup).
I don’t know why that it doesn’t work. Thank you for any help, I will really appreciate.
Show LessHello every body, please I need some help to this error:
implicit declaration of function isrRx_StartEx is invalid in c99
the capture:
https://drive.google.com/file/d/0B9T5HFiW13_ieDhzc1RFMkhwTTg/view?usp=sharing
Thanks!
Show LessHi everyone,
We have a S6SAL211A94SA2001 (Intelligent LED Lighting Starter Kit for BLE Communication) and we are trying to communicate with it through a linux application. So far we have managed to connect to it using bluetoothctl and it used to appear with the name 'Cypress Demo'. Now I want to ask two things:
1. For an unknown reason, it has somehow lost it's name. It advertises itself with it's MAC address but the name has been replaced with the ASCII 0x01 character. How can I set it's name to the original string. It can still be connected with bluetoothctl but not through the android app.
2. What steps should I take to create a linux based application for controlling the leds via bluetooth? As I have already stated that it only connects when we are using bluetoothctl, other tools like gatttool, hcitool, pyblue library of python have all failed to connect to this module. Also, I can see only three characteristics of this module when connected with bluetoothctl. How can I use those characteristics to manually send led controlling instructions to the module?
Thanks.
Ahsan
Show LessI use a CY8CKIT-059 PSOC 5 LP Prototyping Kit.
The processor is running properly, when I use the internal clocks oran external XTAL on PIN 15.0 and 15.01.
Since internal clock and XTAL does not provide the required accuracy, I hav to use an external precise clock (e.g. 10 MHz TCXO).
Up to now we found no way to get the board running with an external clock.
I followed the following procedure:
1. Place a digital input pin in your top design.
2. draw a wire from that pin and give some name to that net.
3. In the .cydwr window, go to clocks tab and double-click 'master clock'.
4. A window named 'configure system clocks' will open. In this, check the 'Digital Signal' and click on the browse button.
5. Then select the net that you gave for the pin (clock input) previously and give the frequency and tolerance value.
6. Now you can use this clock to derive any clock source.
Do you have any idea, what could be the source of the problem?
Thanks in advance
Daniel
Show LessI want to use TX8 (RS232) in PSoC1. However, in the result window, broken characters are output. I want to know how to set up hardware and software(please check attached my project file)
Show LessI am trying to understand the timing of DMA transfers in the PSoC5LP in as much depth as possible, in particular DMAs between SRAM and the UDB working registers. So I set up a project to play around with these, routed signals that I was interested in to the device pins, and hooked up a logic analyzer so I could see the timings.
One thing that surprised me was that a DMA burst to a UDB control register always took two cycles for a write. Digging through the TRM I found a reference to the register(s) WAIT_CFG which controls wait states for access to UDB registers. Sounds promising. In the Registers TRM you can find out what the bits mean, but I found no further information. Disabling the wait states for the UDB working registers had the desired effect and the DMA timings were now as expected (7 cycles from drq latch to first write, 1 cycle per write).
So all is well? This is the question really. I have no context information at all. Under which conditions (e.g. bus clock speed) is which wait state setting acceptable? Is it automatically configured somehow? (appears not, I always get one wait state whether I set the bus clock to 200kHz or 72MHz). What other tradeoffs are there?
Obviously it would be nice if accessing the UDB registers was always without wait states, but there is probably a reason the wait state control is there and defaults to 1 for the working registers. Please tell me if you know more or where I can find such information.
Show Less