Quantcast
Channel: Cypress Semiconductor - PSoC 4 Architecture
Viewing all 764 articles
Browse latest View live

Using a single PWM block to drive multiple pins using DEMUX

$
0
0

Hello all,

I'm trying to drive multiple servos using a single PWM block and DEMUX. Normally, I have enough PWM blocks to drive 4 servos. However, there are some applications that we require to use nearly all TCPWM/UDBs. So I'd like to know if it is possible to drive multiple pins with PWM using a single PWM block and DEMUX.

The idea is as follows:

PWM frequency is 50 Hz. Duty cycle on time is around 0.5 ms to 5 ms. So, I thought that I could start pwm on pin 1, wait for a falling edge interrupt. After that, switch to pin 2 and start PWM again with counter reset and new compare value. Same stuff for pin 3 and 4. After we get a final falling edge on pin 4, I write the total elapsed on time to PWM counter and let it generate an interrupt on TC. After TC is reached, the processes loops. So, this should in theory, make me able to use 1 single PWM block and vary its compare match value to drive multiple pins. However, the project does not work as expected. There is much jitter on the servos. Can anyone help me with this issue?

Thanks, in advance.

Attached is the example project that I've been working on.


Psoc programmer doesn't contain device family for cy8ckit-046

$
0
0

Hi.

 

I've got Psoc 4 l-series pioneer kit and I'm trying to use the UART USB example (this SDK http://www.cypress.com/documentation/development-kitsboards/cy8ckit-046-...)

The UART communication wasn't responding in any way so I started going trough the kitprog user guide for this kit (http://www.cypress.com/file/226201/download).

I've used the PSoC Creator ( 3.3 SP1 (3.3.0.7343)) for flashing and debugger works fine.

The kitprog user guide however mentioned updating the firmware for the kitprog and that's not working. If I start up the PSoc  programmer (3.25.0.2504) it doesn't contain the CY8C4xxx -family. Should I be able to upgrade the firmware via this tool or is the info in the documentation obsolete? Or is the problem the CCG3 SDK that I had installed before (I uninstalled it before installing this).

SWO tracing with psoc 4

Em EEPROM with CY8CKIT-049-42xx Board

$
0
0

Hello!

I'm trying to use Emulated EEPROM to store some data and I'm running into the known problem with the Bootloader. After a power cycle my program wont start anymore. I don't own any hardware programmer so it doesn't seem possible to update the Bootloader itself. With the prototyping kit alone it looks like I'm stuck. Or is there another way?

It seems like an unnecessary task to include the Bootloader image in the Bootloadable component this way.

Many Greetings!
Remo

Problem with array data pointer

$
0
0

Hi,

My example is next:

unsigned char value=0x10;

unsigned char* US_InQEnd;

unsigned char US_InBuffer[3];

 

Test_Write(1u);

InQEnd = US_InBuffer;                 // getting buffer address

*(US_InQEnd++) = value++;      // writing at buffer first location

*(US_InQEnd++) = value++;      // writing at buffer second location

*(US_InQEnd) = value++;           // writing at buffer third location

Test_Write(0u);

 

I can see Test pin getting up but not getting down. Is there any mistake ? 

Thank you,

Asier.

Where is KitProg driver of CY8CKIT-046 PSOC4 L-series Pioneer Kit??

CY8CKIT-042 I2S Example Project - DMA tr_out to Timer Counter

$
0
0

Hello,

 

I have been looking at the example USB Audio example project for the CY8CKIT-042 and, looking at the schematic, it looks like DMA can be connected from tr_out to the 'count' input in a timer counter. I tried to do this myself in a different project but got the error:

E2806: Failed to place fixed-function blocks. See the report file for details.

 

I also tried copying and pasting the components from that project to my project. The device I have for my project is CY8C4248LQI-BL583 so I was wondering if there would be a difference based on the device used.

I2C_Stop and set scl pin to output while running

$
0
0

Hello ,

I would like to stop i2c communication during runtime and use the scl pin to toggle several times to reset a slaves State Machine.

It seems that calling the SCL_Stop() function is not enough to get the scl pin back to normal output function.

Here is my code:

I2C_Stop(); /* Stop I2C */
I2C_scl_SetDriveMode(I2C_scl_DM_STRONG); /*set DriveMode*/

I2C_scl_Write( 1u ); /*set pin output manually*/


Eagle CAD Support for PSOC4 Series

$
0
0

Hello,

I'm searching for an Eagle Library for PSOC 4 (4200-L) Series Devices.

Specially QFN68 and TQFP64 Packages.

Best Regards,

Jackson

Can't build due to some component over-packing PSOC 4 UDB

$
0
0

Initially in my project I was following the iOS Build a Robot tutorial which incorporates BLE, Capsense, and PWM components.  I just added an SPI Slave component in order to receive data from a cRIO-based instrument and received an "Unable to pack the design into 4 UDBs" error message.  The project that I'm going to be making incorporates some of the implementation from the iOS tutorial, but I will not be needing the Capsense interaction at all.  However, when I remove that component (and the pin attachments), I still cannot build the project.

I am very new to this such that I have no idea what particular part of a component is causing the database to over-pack.

I've attached the project, and don't hold back into going into heavy details about this issue.  Anything I can learn is a plus.

- Anthony

IDAC with DMA

$
0
0

I'm using the CY8C4247AZI-M485.  I want to use the IDAC component with the DMA to generate a sine wave.  I believe I have everything set up correctly but it's not working.  In the "DMA Support" section of the IDAC datasheet it states the following:

Note DMA support in the IDAC_P4 component is limited due to the following reasons:

 The IDAC_1_IDAC_CONTROL register is common for two IDACs (8-bit IDAC and 7-bit IDAC).

 The IDAC_1_IDAC_CONTROL register is common for the IDAC setting and IDAC data.

Before using the DMA channel with the IDAC_P4 component, review the description of this register in the device registers Technical Reference Manual (TRM).

I've searched for "IDAC_CONTROL" in the TRM but couldn't find anything. 

Can someone tell me if this is even possible with this PSOC?  If so, what am I doing wrong?

 

Problem with CY8CKIT-048 power supply

$
0
0

The factory soldered 3.3V and 5V pin does not provide power at all. If I don't connect anything to these pins I can measure 5V, but if I connect them as a power supply to any circuit the voltage drops to 0V. The other, unsoldered 3.3/5V and the VDD pins are all right, but I can't figure out why the factory soldered pins doesn't work. I worked around it by using the other pins, but it is quite annoying. This is the case when I use USB power supply.

I also have another power supply problem: If I try to power it from a 12V DC power source through the VIN connections, it just doesn't work. PWRLED flashes for a moment and that's it. SW4 is set to REG, J9's connection is 1-2. If I measure the VDD pin's voltage it's about 0.8V and I can measure ~4.5V on the 5V pins, but if I connect anything to them their voltage drops to 0. I measure 0V on the 3.3V pins.

Am I missing something? What is causing these problems and how can I solve them?

Conflict between GPIO OE and SCB

$
0
0

Hello Everyone

I am interfacing with an 8-bit bus with read/write capability, so I'm using an 8-bit port with Output Enable. There is as well a SCB UART. The prototype I implemented with the CY8CKIT-042 works perfectly.

For the prototype, I switched to a bigger chip: CY8C4245LTI-M445. When compiling the same project (after remapping the IO of course) I now get the following errors:

Pin guidance unavailable: CD(0) cannot be configured for Output Enable or Input/Output Synchronization while connected to \UART_1:SCB\'s rx terminal.

Pin guidance unavailable: CD(0) cannot be configured for Output Enable or Input/Output Synchronization while connected to \UART_1:SCB\'s cts terminal.

...

I have attached a screenshot of the errors. CD(0) is the bit 0 of the data bus. CD(0) is mapped on P1.4.

P1.4 ctb0.oa1.inm tcpwm.line[6]:1 scb[0].spi_select1:1

Although the UART is not using scb[0] but scb[1].

Of course, disabling the Output Enable for the 8-bit port gets rid of the error, but that's not an option for my application.

Any idea why I'm getting this conflict?
Thanks!

 

Attachments: 

PsOC4 Project - Alarm Loop

$
0
0

As part of my current education as an Electronic Engineer, I am currently attending a course in Embedded Systems. For this course, we are required to complete several projects concerning the PSoC4 Pioneer Kit and multiple Shields (including the Arduino MultiFunctionShield); my final assignment for this course is to simulate an alarm system, which must be monitored via at least three methods (see below). However, I am currently experiencing several recurring problems, which have caused me to restart my project multiple times.

 

As such, I thought it might prove fruitful to ask for your advice concerning the project. To be specific, the hard requirements for the project are as follows:

 

- The system has to detect/simulate the status of the loop via three methods; the Capsense present on the PSoC4 (loop 1), the PotMeter present on the Shield (loop 2) and an additional slider which has to be configured on the Shield via Input Gate A5 (loop 3).

 

- In each loop, five specific voltage/current intervals have been defined. As these are applied in relation to a 5V power supply, these are as follows:

          1; Sabotage 1 --> 2,483 V - 4,999 V

          2; Alarm open --> 2,246 V - 2,482 V

          3; Sabotage 2 --> 1,345 V - 2,245 V

          4; Alarm active --> 1,161 V - 1,283 V

          5; Sabotage 3 --> 0,001 V - 1,160 V

 

- If Key 1 on the Shield is pressed, the RGB-LED on the PsOC4 has to turn Green after a 10-second delay; As long as this is not the case, the RGB-LED has to turn Blue, EXCEPT when any of the loops is subject to Sabotage. In case of Sabotage, the RGB-LED has to turn Red and the Buzzer on the Shield has to produce a continuous signal, which can be turned of by pressing Key 2 on the Shield. Once all loops are in correct current ranges (either Alarm open or Alarm active), the Buzzer has to turn off automatically and the RGB-LED has to turn Blue once again. 

 

- Each of the specified areas has to produce specific visual messages via the 7-segmentsdisplays (present on the Shield), as well as turning on LED's on the shield in binary code. These messages/LED's are as follows:

          1; Sabotage 1 --> "S1" --> LED1 

          2; Alarm open --> "OPEN" --> None

          3; Sabotage 2 --> "S2" --> LED2

          4; Alarm active --> "AAN" --> None

          5; Sabotage 3 --> "S3" --> LED3

 

- When sabotage is detected, the display has to be followed by a space, after which the respective loop is also displayed. Each of the aforementioned visual messages must be displayed for exactly the duration of 1 second, which is followed by the actual Voltage meassured in that specific loop (varying between 0,000 V and 5,000 V); the programme itself continuously alternates between each of the three loops. 

 

FOR EXAMPLE: when the PotMeter is adjusted to create 1,500 V, the text "S2 2" is displayed; Exactly one second later, the text 1.500 is displayed; afterwards, the correct message for loop 3 (the slider) is displayed, after which the correct voltage is displayed; the same follows for loop 1 (CapSense), and so forth. I have been able to construct the necessary components and Pin Configuration for the project (see the attached project). It is mainly, and perhaps purely, the software programme itself that presents the challenges I can't seem to overcome.

 

As such, the realisation of the system presents the following challenges;

     I. To construct a scanning-program that puts data obtained via inputs in array(s).

     II. To create a display-programme that can relay data from the array(s) dynamically per second.

     III. Loop both programmes continuously.

     IV. Control the 7-segmentsdisplays with the help of an interrupt-routine. 

 

 

Additional Requirements:

- Incorporation of a Deep Sleep Mode into the system --> By pressing both Key 1 and Key 2 simultaneously for three seconds, the system has to put itself into Deep Sleep Mode to preserve energy; after pressing both buttons for three seconds once again, Deep Sleep Mode is lifted and the system functions normally.

- Incorporate Hard Reset into the system --> by pressing the Reset-button, the user has to be able to completely reset the entire system.

 

As an enthousiast technician (who seriously attempts to obtain as much knowledge in as little time as possible), I sincerely hope you might be able to help me in creating the project. Sincerely and many, many thanks in advance.

How to make .cysch layout for voltage divider of analog input signal

$
0
0

I have a pressure transducer circuit that outputs a voltage between 0-5V.  There's a pin connected to that output that I connect to analog pin P2[2] on the PSoC 4 board.  I was wondering how to divide this down to meet the 3.3V max VDDA for the ADC SAR Sequencer.  Right now I have my "Transducer" analog input pin connected to the 1st pin of the 12 bit ADC (the 2nd going to ground).  For the divider, I have R1 as 5k and R2 as 10k, connected to the PWR Vdd (all of which is fed to external terminal of the analog pin).  Is this how it's supposed to be connected in the TopDesign.cysch?

I attached the project bundle.

-Anthony


Interrupt for buried component pin

$
0
0

For my design i'm using a SCB SPI slave component and need to generate a interrupt from slave select. This pin is hidden from the top level schematic so i cant simply place a ISR component on this I/O line. 

I need the steps for enabling the interrupt at the GPIO pin and all other steps up to the ISR service function. I have so far determined these steps but dont have the complete solution: 

Create ISR prototype 
     CY_ISR_PROTO(SPIS_nSS_Isr); 
Create function 
     CY_ISR(SPIS_nSS_Isr) 
Link function to interrupt vector??? I believe port 5 is connected to IRQ5 
    CyIntSetSysVector(5,SPIS_nSS_Isr); 

Enable interrupt vector??? 

Enable Pin interrupt 
     SPI_SLAVE_ss_s_SetInterruptMode(SPI_SLAVE_ss_s_INTR_ALL,SPI_SLAVE_ss_s_INTR_RISING);

Trans-Impedance Amplifier configuration for 5 Amp Current Sense

Problem creating a Central GAP role

$
0
0

Hello, I am working with CY8CKIT-042-BLE, it´s the BLE Pioneer Kit. 

The problem, I have, is to create a Central GAP role, using the USB dongle 56LQXI , I did already a Server GAP Role project  and it works when I used CySmart.

I read some tutorials about how to initialize the StackEventHandler but when I developed the code

the connection between the USB dongle and the PRoC BLE Module. However, using the Cysmart the connection is posible.

Also I´m having problem how to write on my server, I´m using the function  CYBLE_GATTC_WRITE_REQ_T 

but I dont know how get the attrHandle

I´ve attached the file with the Peripheral and Central  projects.

 

Thanks you for your help

David Caraveo

Attachments: 

Interrupt pin

$
0
0

Can someone clear this up for me?  On the Timer component there is an interrupt pin.  If I want to generate an interrupt every time the timer reaches terminal count I can enable the interrupt by checking the check box.  Then I'd put an "Interrupt" component on that pin.  How is that any different then leaving the interrupt check box clear and putting the interrupt component on the OV pin? Is this the difference between a hardware and software interrupt?

Eagle CAD Support for PSOC4 Series

$
0
0

Hello,

I'm searching for an Eagle Library for PSOC 4 (4200-L) Series Devices.

Specially QFN68 and TQFP64 Packages.

Somebody can help?

Best Regards,

Jackson

Viewing all 764 articles
Browse latest View live


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