cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

Im doing project on this topic, do any one have any idea about it?

   

The question that Im facing is that, why PSoC?

0 Likes
Reply
21 Replies
Anonymous
Not applicable
        In short the reason could be availability of programmable analog for signal processing and digital peripherals for intelligence on one single chip. Reduced component cost, and hence reduced failure rate. Give us more information about your project.   
0 Likes
Reply
Anonymous
Not applicable

 Interfacing PSoC with inverter and to a battery system.

   

We have generated the driving signal of 50Hz with your help.

   

Inverter circuit designing is completed. Now, the job of making the system intelligen is pending.

   

From the transformer output, signal is fedback to PSoC to pragram it. On the basis of some factors like over charge protection,under discharge protection,over load protection etc.

   

Can we do program in 8051 language on PSoC 3. 

0 Likes
Reply
Anonymous
Not applicable

Hi,

   

PSoC3 has 8051 based core, however the normal practice is to perform coding using C langauage which strengthened in PSoC Creator via APIs.

   

The intelligence that you intend to add to your project is easily achievalbe using PSoC3. There is an ADC, which can be coupled with Analog Mux to scan multiple channles. This way appropriate circuit can be built to monitor the conditions such as overcurrent, overvoltage/undervoltage protection etc. The conditions can be read out using ADC and AMUX APIs. The digitally read out values can be compared against standard values to verify occurance of a particular event(such as over current) and suitable actions can be taken(Ex: Turning of an external MOSFET using GPIO).

   

I hope this helps. Let us know if you need specific help related to PSoC3.

0 Likes
Reply
Anonymous
Not applicable

 hi U2,

   

ADC and Analog MUX can be used for only the scanning, isn't?

   

Where is the comparison done and how can we do the action, that you mentioned.

   

Rply

0 Likes
Reply
Anonymous
Not applicable

 Using ADC and MUX  we can only evaluate only one parameter at a time, isn't it?

   

Can u just elabrate it? 

0 Likes
Reply
Anonymous
Not applicable

The channels(input voltages) being monitored to can be connected to different Analog MUX inputs. The Analog MUX can then be routed to the ADC input. Note that ADC needs to be configured in multisample mode. Select a particular AMUX channel, Start ADC conversion, read the ADC data and store it in a buffer. Stop the ADC, Switch the AMUX channel, Start ADC conversion read the ADC data and store it as before. Repeat the same for all the analog input channels. Then you can perform the comparisons and calculations you intend to do. Since PSoC3 ADC will be running in few MHZ, you can have good amount of comparisons/calculations. I hope i have made it clear. 

0 Likes
Reply
Anonymous
Not applicable

 hi,

   

You told to save it to a buffer,in PSOC3 there is a tri state buffer BUFOE, can i use it.

   

And then I shud fed it to the comparator for comparison.

   

I need to interrupt the square wave output, follawing my comparison.

   

Wat can I do?

   

Can u send me if any particular changes have to b made on the configurations of used blocks.

   

Plz help

0 Likes
Reply
Anonymous
Not applicable

 By buffer, what i really meant was firmware buffer or an array in C program. The ADC data can be stored in an array. These digital values can then be compared against constant values and take necessary actions accordingly.

   
    

In your case the square characteristic can be changed based on the analog input. Hence the period or the compare value of the PWM component might have to be modified to get desired result.

   
0 Likes
Reply
Anonymous
Not applicable

 hi,

   

 In my project , now im dealing with overload protection. Ive done the circuit part and a voltage varying from 0V - 6V dc is to be fed to the PSOC.Input is then fed to Analog MUX+ ADC for conversion .

   

In the same project Iv done the PWM square wave of 50Hz.

   

I now need to monitor the dc input from the circuit.

   

As it  reaches 6V, (ie; when overload occurs) the square wave output to the inverter circuit should be OFF. And the inverter is interrupted. Then as the the load is decreased, this 6V gets lowered and automatically the PWM shud deliver the square wave to ON the inverter.

0 Likes
Reply
Anonymous
Not applicable

 hi,

   

One question can v program PSOC 3 and implement it in a particular circuit, like microcontrollers programmed to an IC and then used it in different circuits.

   

Plz rply...

   

Plz rply to my prveous post too.

0 Likes
Reply
Anonymous
Not applicable
        
  • First, you might want to step down the dc voltage from 6V to any voltage within PSoC's operating range using a resistor divider. Say you step down the voltage to 3 volts, connect this to negative(or positive) input terminal of a comparator on PSoC and connect the other terminal of comparator to an appropriate threshold level(in this case slightly less than 3 volts). The reference can be provided by programming the VDAC component appropriately and connecting it to the afore mentioned terminal.
  •     
  • Once the dc voltage crosses the threshold, the comparator ouput level flips and this can be used to trigger an ISR. In the ISR the PWM can be disbaled. The comparator ouput can be monitored continuously and once the comparator output flips its state again, PWM output can be turned ON.
  •    
   

 

   
        
  • Just like any other microcontroller, you can make your own custom PCB and program the chip tp provide necessary functionality. PSoC3 chips can be purchased by contacting the Cypress sales team. Samples of PSoC3 can be requested from cypress website.
  •    
0 Likes
Reply
Anonymous
Not applicable

Hey Deeps,

   

 

   

As suggested by U2, you should use a voltage divider (like resistor divider) to bring down the voltage by a known factor (like half the voltage).

   

So, in this case your voltage threshold where you want to switch will be 3V.

   

In case you are planning to use an ADC, you can use the API which converts the ADC counts to milli volts, ADC_CountsTo_mVolts( ).

   

You can compare the value obtained with 3000mV. When it exceeds, then take necessary action.

   

 

   

This method will make the CPU continuously compare the two values hence it will not be available for other operation.

   

Also make sure that the value of reference voltage used is selected correctly in the 'Voltage Configuration' tab.

   

This can be found here: .cydwr file > System > Voltage Configuration

0 Likes
Reply
Anonymous
Not applicable

 hi U2

   

How can we use ISR to interrupt the PWM can u tell us the steps

   

As its only mentioned in the configuration as derived, rising edge etc only

   

Plz help

0 Likes
Reply
Anonymous
Not applicable

Connect an ISR component to the comparator and build the project. Once the project is built, isr.c and isr.h files are generated. Insert PWM_Stop() API, inside the isr.c file. See this post to better understand where to insert the code.

   

Once PWM is stopped, now monitor the comparator output, based on your comparator output you can take decision(bring back the PWM to operational state )

0 Likes
Reply
Anonymous
Not applicable

See this put to learn more about inserting code in to ISR, http://www.cypress.com/?app=forum&id=2233&rID=51078

0 Likes
Reply
Anonymous
Not applicable

Hi Deeps,

   

 

   

 

   

These are the steps you need to follow to use Interrupt in your project.

   

 

   

1) First drag an Interrupt component into the design and connect it to the interrupt terminal of the PWM as shown in the figure below.

   

   

2) Next in the PWM configuration tab, select the source of interrupt. In this case, i have chosen the Interrupt to occur on the terminal count event.

   

   

3) Build the project and the isr_1.c file is generated. Include the "PWM_1.h" file in the location which is between "Start of code" and "end".

   

0 Likes
Reply
Anonymous
Not applicable

4) In the CY_ISR(isr_1_Interrupt) write the statements which has to be executed in the ISR on every Interrupt trigger. Remember that this statement has to be written between the #Start and #End indicated.

   

Also, the Interrupt has to be cleared first by reading the Status Register of the PWM component used.

   

 

   

 

   

   

 

   

 

   

5) In the main.c, donot forget to uncomment the CYGlobalIntEnable, and also start the isr_1 component.

   

 

   

   

 

   

Once you follow these steps, you can get your Interrupt working. However you have to remember to declare the variables which you are using between the main.c and the ISR to be declared as extern.

0 Likes
Reply
Anonymous
Not applicable

 hi dasq,

   

Thanks for ur rply.

   

For my project I need to place the interrupt at the comparator or at the PWM.

   

Or u wer juzt showing how to work it.

   

Is there any change while it is placed at the comparator output.

   

plz rply

0 Likes
Reply
Anonymous
Not applicable

Hi Deeps,

   

 

   

You can place the Interrupt component at the Comparator's output depending upon your logic.

   

Set it to either Rising edge, Falling edge or Derived.

   

 

   

When using Interrupt along with Comparator, there is no necessity to read the Status Register upon Interrupt unlike in the case of PWM.

   

Other than that, all other configuration of Interrupt remains the same.

   

 

   

Regards,

   

dasg

0 Likes
Reply
Anonymous
Not applicable

 hi dasq,

   

My final year xams are on 1st june.

   

I hav not done the work yet,that you have suggested.

   

Sorry..for that.By 13 th v vl work on it give u the feedback.

0 Likes
Reply
Anonymous
Not applicable
        Hi , So there is no need to have an interrupt at PWM. Can you do the program and post it here.it would be helpful..   
0 Likes
Reply