Quantcast
Channel: Cypress Semiconductor - PSoC 5 Device Programming
Viewing all 387 articles
Browse latest View live

usb - uart component and window 7 32 bit in psoc 5lp


DMA not updating vdac

$
0
0

hello,

i have attached project . I tried ti read potentiometer by ADC and use DMA to trasfer the adc data to Vdac.Also i have used usrt to print the value of adc. After each conversion of adc DMA should update the vdac but that dint happen. I believe i went wrong in configuring DMA.

Can DMA and UART access the same component at same time?

I Just wanted to know where have i gone wrong in configuring DMA. I used DMA wizard.

 

Thank You.

 

 

emFile Example problem

$
0
0

Hi,

I have a CY8CKIT-059 PSoC 5LP Prototyping kit and i want save some data in a SD card. So, I tried make a example project but this don't compiled. The error message is: Build error: cannot find -l..\..\..\pzoc\emFile_V322c\LinkLibrary\PSoC5\GCC\emf32nosnlfn. But, i don't understand why if the file emf32nosnlfn is in the folder.  I have created an emFile Project for a PSoC 5LP Application using GCC toolchain
When using the GCC toolchain, you must specify the directory where the library file is located. I have followed the steps to create the emFile project for PSoC 5LP application using GCC toolchain.

 

How to use CY_NOINIT?

$
0
0

Hi,

I am trying to use CY_NOINIT to not initialize a variable after soft reset conditions. I keep getting "reset = 0" message from UART. Am I missing something?

#include <project.h> static uint8 is_soft_reset CY_NOINIT; void app_init(void) {     UART_1_Start();    if(!is_soft_reset) {         UART_1_PutString("reset = 0\n");         CyDelay(1000);         is_soft_reset = 1;         CySoftwareReset();     }     UART_1_PutString("reset = 1\n"); } int main(void) {     app_init();
    for(;;)
    {
 
    }}

Del Sig Multiple Inputs (PSoC 5LP)

Create an USB composite device with two VCP and one 'custom' interface

$
0
0

Hello,

 

I want to create an USB device with two virtual COM ports and one custom interface. Since a VCP consumes three endpoints, two endpoints will remain for the custom interface.

I want to control the custom interface by CYUSB.DLL which is part of the SuiteUSB package.

So, my question is if anybody can help how to setup the USB_FS component the right way and how to create the correct INF file.

 

Regards,

 

Ralf

How to access ADC data faster.

$
0
0

Dear All,

Is there a way to access ADC data faster than the command given below:?

vol= ADC_SAR_CountsTo_Volts(ADC_SAR_GetResult16());

It costing around 10 us at least to get value in vol. Even though I am getting 1 Msps which can be seen via eoc pin.

looking for UART example

$
0
0

I'm trying to read a data stream of binary messages all tagged with a B5 62 start address (UBX) and don't follow the data sheet for isr and message address to buffer management.

Is there maybe an example I can't seem to find which covers this?

TIA


Bootloader component not executing downloaded application

$
0
0

Hello,

I'm attempting to verify my PSoC 5LP Bootloader/Bootloadable firmware using the CY8CKIT-059 Prototyping Kit.  I'm using the Host UART Bootloader program launched via the PSoC 3.3 Creator's Tool drop-down.  The download process appears to work fine, but the downloaded application is not being executed automatically after the download completes.  If I reset the board manually, the newly downloaded application executes as expected.   My concern is that we are planning to include the host bootloader software in our application, and we would prefer that the download process completes without user intervention.  Can someone help me determine if I am doing something wrong, or give me some advice as to how to make this process automatic?  

Thanks.

Psoc Creator 4.0 - Release build setting

$
0
0

Hi everyone

 

I would like to know which can be the reason a project work OK with debug  build setting  but fail when release option. is set.

Thank you for any help.

PSoC 5LP Reading Pins

$
0
0

I am very new to PSoC, and have very limited experience with C++, and none with C. I am trying to read the signal on a pin and toggle a boolean value to change the blinking speed of an external LED. Here's the code:

int main()
{
    bool button1;
    LCD_Char_Start();
    LCD_Char_PrintString("Hola Mundo!");

    for(;;)
    {
        if(CyPins_ReadPin(Pin_1_0) !=0) {
            button1 = !button1;
            CyDelay(100);
        }
        if(button1) {
            CyDelay(1000u);
        } else {
            CyDelay(250u);
        }
        P0_0_Write(!P0_0_Read());
    }
}

The CyPins thing I got from another thread and the LCD stuff is from the Hello World example project. The LCD doesn't work though. I also kept include project.h and added stdbool.h for booleans. Any idea what I might be doing wrong?

Edit: I should probably mention I have the CY8CKIT-059 and if it matters to mention too, the chip is the CY8C5888LTI-LP097.

Saving state of Filter component for filtering multiple (>2) signals

$
0
0

Hello,

I want to filter a multiple constant data streams (data rate <= 2 kHz) with Filter component. However, only one Filter component with only 2 channels is able to exist in one PSoC 5 LP design. Therefore I want to save state of the Filter channel, load state of next signal (data stream), switch signal, save state of this signal,... and so on for multiple signals. In the other words, I want to multiplex Filter components to achieve the same effect as having e.g. 8 Filter components with the same parameters.

I am wondering if this is enough (idea taken from Filter_SaveConfig(void), pasted more as a pseudo code using polling):

#include <project.h>

​Filter_backupStruct filterBackup[NUMBER_OF_SIGNALS] = {0};

static void Filter_SaveCustomConfig(Filter_backupStruct * const backupStruct);
static void Filter_LoadCustomConfig(const Filter_backupStruct * const backupStruct);

void Filter_Signal(const int signal, const uint16_t sample, uint16_t * const resultA, uint16_t * const resultB)
{
    const uint8_t SR_DATA_PROCESSED = Filter_CHANNEL_A_INTR | Filter_CHANNEL_B_INTR;

    /* Load Filter state for specified signal */
    Filter_LoadCustomConfig(&filterBackup[signal]);

    /* Filter signal */
    Filter_Write16(Filter_CHANNEL_A, sample); /*< Load sample to Channel A */
    Filter_Write16(Filter_CHANNEL_B, sample); /*< Load sample to Channel B */
    while((Filter_SR_REG & SR_DATA_PROCESSED) != SR_DATA_PROCESSED); /*< Wait for data to be processed */
    *resultA = Filter_Read16(Filter_CHANNEL_A); /*< Read processed data from Channel A */
    *resultB = Filter_Read16(Filter_CHANNEL_B); /*< Read processed data from Channel B */

    /* Save Filter state for specified signal */
    Filter_SaveCustomConfig(&filterBackup[signal]);
}


static void Filter_SaveCustomConfig(Filter_backupStruct * const backupStruct)
{
    backupStruct->sr = Filter_SR_REG;
    backupStruct->sema = Filter_SEMA_REG;
    
    /* Put DFB RAM on the bus */
    Filter_RAM_DIR_REG = Filter_RAM_DIR_BUS;

    /* Save the ACU RAM */
    (void)memcpy(backupStruct->saveAcu, Filter_ACU_RAM, Filter_ACU_RAM_SIZE); 

    /* Take DFB RAM off the bus */
    Filter_RAM_DIR_REG = Filter_RAM_DIR_DFB;
}

static void Filter_LoadCustomConfig(const Filter_backupStruct *backupStruct)
{
    Filter_SR_REG = backupStruct->sr;
    Filter_SEMA_REG = backupStruct->sema;

    /* Put DFB RAM on the bus */
    Filter_RAM_DIR_REG = Filter_RAM_DIR_BUS;

    /* Restore ACU RAM */
    (void)memcpy(Filter_ACU_RAM, backupStruct->saveAcu, Filter_ACU_RAM_SIZE); 

    /* Take DFB RAM off the bus */
    Filter_RAM_DIR_REG = Filter_RAM_DIR_DFB;
}

 

Should I save any additional registers or DFB data (all arrays declared in Filter_RAM_Data.c are declared as const), or is the code above enough to achieve desired functionality?

Thanks,

Bojan

 

 

HSSP Example AN73054 related

$
0
0

I am using AN73054 HSSP example code to program another PSOC5LP . I used C# code  to get HexImage.h and HexImage.c  after replacing the existing hex file with new one(my application hex file) i found that during compling it give error in cm3gcc.ld file that ".rodata will not fit in region rom".

i could not understood for the same pSOC what may be the region.

kindly suggest the change to remove the error

regards.

PSoC 5LP and PSFB

$
0
0

Hi All,

 

I am using CY8CKIT-050 Development Board for my project purposes. I intend to generate a PSFB PWM signals from the PSFB block such that the phase shift is like a sine wave. To explain it in another way, I want my phase shift to gradually increase from 0 to maximum value and then reduce to 0 within 10 ms (half wave of a 50 Hz sine wave). It is similar to a sinusoidal PWM where the ON time of PWM increases from 0 to maximum and then reduces to 0 in 10 ms. The only difference here is that I need my phase shift to change the way a sinusoidal PWM changes.

My PWM signal is 10 kHz i.e. 10^(-4)s. My phase shift to increase from 0 and then return back to zero in 10 ms. So there would be 100 PWM signals (.01s/.0001s). From this information I came up with the sine table as given below after having a look at this article 'http://microcontrollerslab.com/spwm-generation-using-pic16f877a-microcon....

uint8 sine_table[101] = {255, 254, 253, 252, 251, 250, 248, 246, 244, 242, 239, 237, 233, 230,
                        227, 223, 219, 215, 210, 206, 201, 196, 191, 185, 180, 174, 168, 162,
                        156, 149, 143, 136, 129, 122, 115, 108, 101, 93, 86, 78, 71, 63, 55, 47,
                        39, 31, 23, 16, 8, 0, 0, 8, 16, 23, 31, 39, 47, 55, 63, 71, 78, 86, 93,
                        101, 108, 115, 122, 129, 136, 143, 149, 156, 162, 168, 174, 180, 185, 191,
                        196, 201, 206, 210, 215, 219, 223, 227, 230, 233, 237, 239, 242, 244, 246,
                        248, 250, 251, 252, 253, 254, 255};

I have included my code along with this post. Please have a look at it and do point me in the right direction so that I can sort out this issue at the earliest.

Thanks in advance.

GPIO High On Powerup

$
0
0

Hello,

In one of my projects, I am using GPIO pins to drive a ULN2003 Darlington transistor array. The transistor array drives some LED lamps and two relay coils.

When power is first applied to the circuit, all the lamps and the relays come on for about 100mS then go into their initial states (low for all in this case).

Is there any way I can force the GPIO pins to be low even on power up? If it requires a hardware change, I am open to that because I need to do a board spin anyway.

I do not know if the paragraph below is relevent, but...

My digital power supply uses 3.3 volts and the analog system uses 5 volts (along with VDDIO3 and VDDIO0). The relays switch mains voltage so I do not want interment turn on. The power supply for the system uses 3 linear regulators. A 24 volt power transformer feeds a 12 volt regulator. The 12 volt power feeds the LEDs and relay coils which are switched by the ULN2003 chip. The 12 volt regulator feeds a 5 volt and 3.3 volt regulator for the logic digital and analog power supplies. There are two 6800uF capacitors on the power input to allow for delayed power off.


PSOC5LP programming

$
0
0

I am using a psoc5lp.The Creator cannot recognize this device. When  programming psoc5lp,I see a error“this device was recognized,but PSoC Creator does not support using it at this time”.

 

Attachments: 

PSoC 5LP - Signal Generator

$
0
0

I am making a signal generator for a school summative project, due in January, but I need it done by the 21st of December as I will be away with family on vacation for 3 weeks.

My plan for this is to have a menu system on a 16x4 HD44780 display, and digital control of external wave-dacs to generate either a sine wave, triangle wave, sawtooth wave, ramp wave, or possibly a custom waveform from an external storage device. There will also be a separate terminal for the square wave that has variables tied to the other waves, but also will have a duty cycle, and pulse setting.

In the menu you will be able to change the frequency, amplitude, voltage offset, duty cycle, table steps, pulse, and be able to reset the settings to default. It will save values on power down. Also in the menu, you can change how much you change values by, in powers of 10: 1, 10, 100, 1K, 10K, 100K, and 1M. There will also be a power on/off switch, and it will likely be a soft power-on button of sorts.

On screen, it will always display the current settings position at the bottom of the display, and will always display frequency as F###, amplitude as A###, offset as V+-#.#, and table step as TS###. Frequency and amplitude will have either nothing, a K, or an M depending on if it is 1000 or above, or 1000000 or above.

The table will have maximum either 256 or 512 steps to still attain a high enough frequency, and I will likely be using a 10mhz wave-dac, as the internal wave-dacs can only reach 1Mhz and no more.

If you have any suggestions, feel free to say. I will try to keep this thread updated as much as I can, whenever I do something on this project.

Getting DelSig_16Channel Example to Work on CY8KIT-059 (with Serial instead of LCD)

$
0
0

I am modifying the  DelSig_16Channel example to get it working on a CY8KIT-059, using the serial port as a substitute for the LCD for data output.   Has anyone got this example to work on the PSoC5 either as is or modified?   At the moment I only need 4 channels and I am working in a single-ended mode on the ADC.

I notice that the EOC pin sometimes shows no activity even though I get a decent pulse on the SOCPin, and even when it does show up, the numbers coming off the ADC make no sense. 

 

 

 

 

 

Using CY8Ckit-059 Variable Square wave generator

$
0
0

Hi 

I am looking to use a Cy8Ckit-059 and PSOC creator to make a variable square wave generator using a potentiometer to change the frequency, and a 4 digit, 7 segment LED to show the change in frequency. I want to program the chip, and power the entire thing with a 9V battery, and have it be mobile and not connected to a computer. 

Requirements 

frequency: 10-100 Hz

​4 digit-7 segment cathode -LED display

potentiometer to set the frequency

a stop/pause button..

and I would preferably like to use mostly logic gates, I already have an idea of what it is going to look like, I just don't have a lot of experience using PSOC creator. Thank you. 

 

PPS from RTC component

$
0
0

Hello,

I am working on a GPS clock using CY8CKIT-059. I have decided to use RTC block because of its DST support. I see in auto-generated code that it has a precious pulse-per-second ISR for internal purposes. Is there any way to get this PPS signal, to execute some code every second? 

One easy solution would be to place clock display update to main function - to uninterrupted code, but I would like to keep this for better purposes than updating display many times per second. It would be statically driven nixie tubes. Also I don't want to put sleep just to lower update rate.

Thanks for reply,

Stanislav

Viewing all 387 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>