PSoC™ 5, 3 & 1 Forum Discussions
I am having a problem converting code that runs on a PSOC4 to PSOC5LP. The code is a used to drive an I2C 128x64 OLED using the great work done by Derk Steggewentz. He took the time to port over the Adafruit graphic code to work on PSoC4.
The code works very well using the CY8CKIT-049 4200 Prototyping Kit. The exact code is located at: github.com/derkst/Cypress-PSOC-OLED. On the converted code for the PSoC5LP. I get random pixels.
Here are the steps I used to move the code to the 5LP on a CY8CKIT-059 PSoC 5LP Prototyping Kit:
1. Start with working project directly from "github.com/derkst/Cypress-PSOC-OLED". It works right out of the box on the 049 kit.
2. Recompile with the new device: CY8C5868LTI-LP039, (I am using the PROG KIT portion of the 059 kit).
3. The PSoC4 I2C SCB component is not supported on the 5LP device, so I delete the I2C component and drag in a I2C UDB that is compatible with the 5LP.
4. Assign pins to 12.2 and 12.4 (Doesn't seem to matter what pins I use).
5. When I compile the code, there are a few errors as per the attached screen shot. Maybe this is the issue, but I remove the “I2C” prefix from the values that are highlighted and I get a clean compile.
6. After I recompile, I try to run the code and I get random pixels on the display. This means I wired it correct and the I2C address is correct, but the data is getting garbled.
7. I connected a Logic analyzer and see a difference in the starting Write frame - see attached screen shots. In the working frame, the first byte is '0x00'. On the upgraded code, the byte is '0x80'. I tried going through the I2C code, but can’t make out what needs to change to get the correct values.
Hoping that someone more experienced with I2C UDB can point out my mistake. By the way, I tried a Fixed Function block and got the same results.
Thanks in advance for any insight.
Show LessHi all,
So I've been working on this small project here and there for awhile and I started taking a more in depth look at some of the results I was getting, and I realized that the arm_cfft_q15.c wasn't returning what it should be.
If I had
q15_t ADC_samples[2048]
q15_t mag_of_fft [1024]
and ADC_samples where samples of a 1kHz wave sampled at 10Khz you would expect the resulting peaks to be at 1/5 pi and 9/5 pi.
when I do
arm_cfft_q15(&arm_cfft_SR_length1024, ADC_samples, 0,1);
which basically says compute the 1024 pt fft of ADC_samples, with the inverse fft bit false and the bit reversal bit true.
and
arm_cmplx_mag_q15(ADC_samples,mag_of_fft,1024);
which says compute the magnitude of the 1024 pt fft in ADC_samples
I get peaks at 2/5pi and at 8/5 pi?
I have confirmed my results in matlab as well. I have checked my ADC sampling, and just about everything I can think of.
I have also tried the example, but unfortunately they don't tell you the sampling rate and with the white noise they added in to their values it becomes pointless.
what am I doing wrong? I can't imagine arm has got it wrong. as my use is only for the relativity of results to each other and I can always just increase my ADC's clock, this isn't slowing me down, but it is very concerning that I may be mis-interpreting how one of these functions handles things.
Any help is greatly appreciated,
scarlson
Show LessI ues the wifi module RS-CY8C001-220X(based on redpine RS9110-N-11-22).The PSoC 3.2 and kit software 1.09 of wifi module are prepared. When running the demo application TestPSoC5_SPI,the creator says the components are old version and it still doesn't work after update the component(Project-->update component). Does anyone have the related experience?
Show LessHello Everyone
I want to work in the direction to port uClinux on PSoC5. As I am a novice in porting an operating system on a microcontroller, I need help to start it from the scratch. Everybody is most welcome to share whatever he/she knows about these concepts whether it be documents, links, books or explanations.
Thank you in advance.
Shaunak Vyas
Show LessDefect report: Extended ASCII prints chinese charaters, not US
sprintf(tstr,"%ldµV",ivolts);
LCD_PrintString(tstr);
should give "1234567µV"
but does give "1234567XYV"
Where X and Y are chinese characters see image
Show LessHi
Hi I am new to PSoC.
I want to read 3 pulses in a row and then set a pin High.
This is my code it does not work.
int main()
{
CyGlobalIntEnable;
UART_1_Start();
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
/* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
for(;;) {
high = Pin_1_Read(); // reading the pin
while(count < 3)
{
count = count+high;
}
if(count > 3)
{
Setpin_Write(1);
}
else
Setpin_Write(0);
Hi Everyone,
Currently now i'm able to read two temperature values through ADC[i.e for 60 & 90 degree],
I'm reading this temperature by calculating values given in the NTC thermistor table.
But now i'm not able to read more than 2 temperatures,I have defined atleast 5 tempeartures,
but able to read only 2,Kindly suggest how to read multiple temperature values through ADC.
Regards,
Angiey
Show LessDefect report: sprintf() with floats just prints 0x00 with no error.
This error existed earlier with the nano lib, and the fix was to either:
a. Disable newlib-nano in the linker, or
b. Enable newlib-nano Float Formatting, or
c. Add "-u _printf_float" to the linker command line
Now, none of these fixes does anything anymore.
Show LessHI,
I have a problem with ADC - DAC conversion, I am getting a signal in the input of ADC and don't get any signal at the VDAC output
1. If there any option to check where is the failure? to check if the data passed the ADC ? I know how to check the analog parts but don't know hot to check the digital...
2. Any idea? wrong C code maybe?
Thanks
Show LessHi all
I want to interface Graphical LCD(ks0108 - RG12864J ) with FreeSoC2 (sparkfun electronics),is any component available in PSOC creator 3.2 ?,
it would be great if anybody share example project.
Show Less