PSoC™ 5, 3 & 1 Forum Discussions
Hi, I'm helping to develop a device driver for a module that uses the CY8C9560A. I'm having a problem getting PWM to send a signal. The data sheet isn't very clear to me regarding the exact steps or sequence that needs to be taken to activate PWM for a pin. The code I'm using is below but all I am getting is a solid 1.63V output from PWM8. Can you help point out what I might be missing?
From some of the other posts, I gathered that it might be necessary to reset the device before the PWM settings take effect. Is this the case? Is there a way to soft reset this device? If this is necessary then is there a way to reset just the one pin so that others are not interrupted? Thanks!
io60p16.SetPwm(7, 0, 0x5e, 0x2f); // Port 7, pin 0 = PWM8
public void SetPwm(byte port, byte pin, byte period, byte pulseWidth) { WriteRegister(0x18, port); // Select port var b = ReadRegister(0x1a); b &= (byte)(~(1 << pin)); WriteRegister(0x1a, b); // select PWM for port output b = ReadRegister(0x1C); b &= (byte)(~(1 << pin)); WriteRegister(0x1C, b); // Set pin for output. WriteRegister(0x28, (byte)(0x08 + pin)); // Select the PWM pin to configure. WriteRegister(0x29, 0x00); // Config PWM (select 32kHz clock source) WriteRegister(0x2a, period); // set the period (0-256) WriteRegister(0x2b, pulseWidth); // set the pulse width (0-(period-1)) }Show Less
Have you ever wondered how the analog components in PSoC are interconnected when you place them on the TopDesign and draw those lines using PSoC Creator. The fact is, PSoC Creator generates code to write to multitude of registers and does the connection for you. The code is generated by what is called CY_FITTER. This piece of code goes in to the boot code which is executed before your main.c execution begins.
Once all the register configuration is made, is there a way to visually look at the actual analog routing? Yes there is, watch this video here and learn how to do this, http://www.cypress.com/?rID=57718
Show LessThis is my first try with PSoC. I tried to get my dev kit, cy8ckit-030 to look like a serial com port on my PC. Did my own coding coding. When I connect to the PC, Windows says 'USB Device Not Recognized'. I futzed around for a few hours and it's still not working. Tried to load USBUART.inf, but it doesn't seem to do anything. I then discovered an example project in Creator 2.0, USB_UART. Unfortunately, it has the same problem. What's wrong??? Do I need a *.sys file??
TIA,
John
Show LessI am using ADCINVR to measure to two different voltage and use DAC to supply to voltage, i am using mux to select pin01 and pin03 for measuring. There is problem. the first measurement always give me deviation. say i use pin01 to measure the voltage first, use pin03 to measure voltage then.
If i switch pins, then the pin03 measure the voltage first, the deviation is on pin03
if i do not use mux and use each seperately, i work properly . I thought i need a delay before DAC. but it does not work after i put delay before DAC.
DAC supply voltage at pin05
the code is below
void main(void)
{
LCD_Start();
PGA_Start(PGA_HIGHPOWER);
ADCINCVR_Start(ADCINCVR_HIGHPOWER );
ADCINCVR_GetSamples(0);
DAC8_Start(DAC8_HIGHPOWER);
M8C_EnableGInt;
fScaleFactor =(double)2.6/(double)8192;
while(1)
{
DAC8_WriteStall(150);
AMUX4_InputSelect(AMUX4_PORT0_1);
while(ADCINCVR_fIsDataAvailable()==0);
iData1=(double)ADCINCVR_iGetDataClearFlag();
voltage1 = fScaleFactor*iData1;
AMUX4_InputSelect(AMUX4_PORT0_3);
while(ADCINCVR_fIsDataAvailable()==0);
iData2=(double)ADCINCVR_iGetDataClearFlag();
voltage2 = fScaleFactor*iData2;
//iData=(double)ADCINCVR_iGetDataClearFlag();
//voltage2 = fScaleFactor*iData;
//iData=(double)ADCINCVR_iGetDataClearFlag();
//voltage3 = fScaleFactor*iData;
average=voltage1;
LCD_Position(0,0);
LCD_PrCString("Low");
LCD_Position(0,4);
LCD_Display(voltage1);
LCD_Position(0,10);
LCD_PrCString("volts");
LCD_Position(1,0);
LCD_PrCString("high");
LCD_Position(1,5);
LCD_Display(voltage2);
LCD_Position(1,9);
LCD_PrCString(" volts");
}
}
void LCD_Display(double data)
{
char * value;
int * status =0;
value = ftoa(data,status);
LCD_PrString(value);
}
Hi everyone,
I've developed a project for a PSoC5 device using PSoC Creator 1.0 and after I tryed to design the same project using PSoC Creator 2.
With PSoC creator 1.0 all the hardware resources was correctly fitted into the device, while PSoC Creator 2 gives an error message in which says that there are insufficient UDB for the fitting.
Among the other components present in the project there is also an UART block, configured as simple UART.
In PSoC Creator 2 if I remove this block the fitting procedure is completed succesfully.
In the .rpt file the resources available are enough to introduce an UART configured as simple UART but introducing it the fitting procedure goes fail.
If I try to introduce the UART block configured as half-duplex usart, the fitting is succesfully completed.
What can be the problem ?
Is this problem due to the different implementation of the USART block in both versions?
There are resources permanently allocated to the EMIF block even if this is not used ?
Thanks in advance
Dear Bob,
I am first in this Community and know that this community will be helpful for our research members.
The man who asked a question about PRS is my research member. After I read your advice, you need more detail information about our problems.
Until now we have developed for the EMR(electromagnetic resonance) tablet device with Psoc3. In the system, in order to drive the coil to emit electromagnetic power from coil to pen(LC circuit) like a wireless power transmittion, we used PWM signal frequency pulse. After driving PWM pulse to coil driver, the response voltage signal of drive coil shows sine wave.
But this driving condition has some problems because the pen LC condition( or resonance frequency) changed due to some reasons but we don't know the exact resonance frequency. Under this conditon, we have to transmit maximum power to pen. To overcome this problem, we decided that if we send broad band waveform(from 450KHz to 500KHz) such as pseudo random pulse,we can send more energy under miss match between the driving frequency and pen natural frequency. I think if we understand more about Pseudo random pulse generation configuration, we can make such signal.
So I ask for followings if you can support,
1. More examples to control PRS
2. if PRS does not support our problems, I think we can make bit stream like a PRS by using shift register ways. Is there any case study about making bit stream by using predefined user data.
ps. The harmonic composent of PRS signal is not important becase only fundamental frequency is transmitted to pen due to analog circuit ie the square wave changed into sine wave.
Show LessThe page is a mess. You dont get the videos lined up in order and do not know how many there are or anything.
I've started following a series (PSoC 5 101: Introduction to Architecture and Design), I've seen 101 and 102. In 102 he says at some point, "this" will be covered in a later video.
Where are they? I only get the first two? I think??
PSoC is fun, the videos are great (the ones I can find), but the website that keeps the training-vids is a mess. A MESS!!!
Why not just link to the next video for example When the one you see is finished?
Or do I just miss a button or something?
The damn messy page:
https://secure.cypress.com/?id=1353&rtID=134
🙂
Show LessI EXECUTED ONE SAMPLE PROJECT
I GOT THE ERRORS AS
1) "INCORRECT LICENCE CODE(LIC) IN TOOL.INI"
2) "KEIL LICENCE EXPIRED"
TO AVOID THIS STATEMENTS WHAT I SHOULD DO???
Show LessI try to control PRS module, but it is to hard to control frequency range,
PRS module can grnerate random square frequency,
but, it has wide frequency range, and i want generate band range frequency,
so, does anyone know, how control PRS module to generate band range frequency,
please let me know.
Thank you.
Show Less