PSoC™ 5, 3 & 1 Forum Discussions
I am trying to interface color sensor TCS34725 with cypress kit to get the R,G,B values in our firmware.
The communication is I2C. We are using the configurable pins FN0,FN1 as SDA and SDL. I am using I2C_M digital communication block for it. But we are not able to see any waveform on SDA and SCL lines.
So, kindly help us resolving this issue.
Show LessHello,
Very recently I ported and existing application from the PSoC 3 to the 5. I must say it was amazingly easy to do. Creator even properly assigned all the pins! I have not had the chance to actually test the code as the PSoC 5 development board has not arrived.
However I do have one question. The Keil compiler had no hard burn with the following code:
void set_params(float wpm,uint8 paddle,uint8 mode,uint8 spacing,float weight, uint8 lag,uint8 memory,
uint8 l_sound,uint8 l_cw_mode,uint8 l_iambic_mode,float l_iambic_tuning,uint8 l_semi_breakin,uint8 l_tx_hold,uint8 l_semi_control)
{
uint8 error;
//uint8 is_written = 1;
uint8 iambic_section;
CySetTemp();
iambic_section = CyEnterCriticalSection();
// This writes variable data to EEPROM
error = EEPROM_ByteWrite(FIRMWARE_VERSION_MINOR,1u,EE_FIRMWARE_VERSION);
error = EEPROM_ByteWrite(paddle,1u,EE_PADDLE_REGISTER);
error = EEPROM_ByteWrite(mode,1u,EE_MODE_REGISTER);
error = EEPROM_ByteWrite(spacing,1u,EE_SPACING_REGISTER);
error = EEPROM_ByteWrite(lag,1u,EE_LAG_REGISTER);
error = EEPROM_ByteWrite(memory,1u,EE_MEMORY_REGISTER);
error = EEPROM_ByteWrite(l_sound,1u,EE_EXTERNAL_SOUND_REGISTER);
error = EEPROM_ByteWrite(l_cw_mode,1u,EE_CW_MODE_REGISTER);
error = EEPROM_ByteWrite(l_iambic_mode,1u,EE_IAMBIC_MODE_REGISTER);
error = EEPROM_ByteWrite(l_semi_breakin,1u,EE_SEMI_BREAKIN);
error = EEPROM_ByteWrite(l_semi_control,1u,EE_SEMI_CONTROL);
error = EEPROM_ByteWrite(l_tx_hold,1u,EE_TX_HOLD);
error = EEPROM_ByteWrite(((uint8) (weight * 100)),1u,EE_WEIGHT);
error = EEPROM_ByteWrite(((uint8)(wpm)),1u,EE_WPM);
error = EEPROM_ByteWrite(((uint8) (l_iambic_tuning / RATIO_FACTOR)),1u,EE_IAMBIC_TUNING);
CyExitCriticalSection(iambic_section);
error = 0;
}
The GCC compiler produces a warning that "error" has not been used: "variable 'error' set but not used [-Wunused-but-set-variable]". I'm confused as it does appear that error is used in the procedure. What am I missing.
Regards,
Ron
Show LessHi,
I am working on implementing a terminal menu using the UART user module on a PSOC1 with the IMAGECRAFT compiler and Designer 5.4. I had already developed the code for this on a PIC18F chip back in college, so naturally dropped it in and hit compile (with fingers crossed of course). Unfortunately, it didn't work and the compiler is throwing its errors on an instruction that is attempting to call a function from a void pointer that is an element of a structure.
Compiling the attached project gives the error at menu_struct.c line 44 (I have modified the project so that menu_struct.c and menu_struct.h should be the only code in question). I think that the function pointer needs to be type-cast as a function pointer, which is what I'm trying to do with the (void(*)(void*)). This syntax makes zero sense to me and I am just regurgitating the syntax from college and that I've found online...
Running into this problem, I did brush up on void pointers, and used knowledge base article Function Pointer - KBA84041 to run some tests. Based on that, I tried changing line 44 to (*sub_menu_01.menulist[0].item)() which gives an error "found 'void' expected function". In my mind, this confirms the need for the type-cast. That actually makes sense the more I think about it, because the compiler has no idea the pointer points to the start of a function.
At this point, I have tried a ton of different combinations of syntax and have googled for hours in search of the correct syntax for this specific situation. My suspicion at this point is that the syntax for handling void pointers in the PIC MCC18 and IMAGECRAFT compilers is simply different, but at the same time I would have thought this functionality would have been consistent. The IMAGECRAFT guide that I found only gives some basic information about pointers.
Does anybody know what the correct syntax for calling a function in this manner?
Hello Everyone,
I have CY3210-PSoCEval1 in hand, and try to realize large amplification on it.(without using outer amplifier IC, for example, LMV358 and so on)
The signal from Radar module is very week, so I have to enlarge the useful signal and eliminate other frequency noise.The parameters are the following.
1. magnification factor is 50000(50K,about 90dB)
2. frequency range is 5 Hz~300 Hz.
In the PSoC Designer 5.4 software, I try to use double PGAs to realize, the function of the first PGA is ok, the second PGA is abnormal, the out signal(with large noise) is not enlarge one.
The circuit is described as follows:
pull up radar signal(AGND) + PGA(gain 48) + LPF2 + capacitor and pull up signal + PGA(gain 😎
It is a small project to detect motion using radar sensor, would you please help give me some suggestions? Thank you very much in advance.
Best Regards,
Mark
Show LessHi,
I am modifying an existing application and adding a Wavdac8 to the project. The wavdac8 is simply generating a 600Hz tone to be used as CW side tone (I hope there are couple amateur radio operators on this forum :)). When CW is generated by another section of the code, I would like to turn the side tone on and off with the CW generation. I could simply stop start the component but my gut feeling is that is not the correct method to do it. Is there another component that could be inserted between the Wavdac8 and the PSoC 5 pin that can basically act as an ON/OFF switch.
The PSoC 5 will be driving a simple external circuit that basically consists of a transistor to drive a speaker.
Regards,
Ron
Show LessHi, I'm working on a project where I tested some aspects of the PSoC5-LP board, but now I need to create a printed circuit on eagle where my system will be implemented. My question is: How can I program the CY8C5888AXL-LP096 without the board? How can i upload the program to the processor?
Thank you for your time,
Best Regards,
Carlos
Show LessHi,
I've successfully integrated EMIF into my project which contains a data stream coming in via SPI among many other things.
The SPI data coming in is 32-bit, so I am using a DMA to facilitate the creation of 32-bit values in the internal sram. I have also tested the EMIF_Example project and configured it to 32-bit transfers, where the source is incremented (src incrementation is default for the example) and have verified it works this way.
What I want to do is use a second DMA to transfer the result the DMA creating the 32-bit values makes onto the external sram. In this case I would not want source incrementing.
The problem I am facing is the emif component does not seem to work properly when I increase the burst count to 4 (for 32-bit transfer, it is 1 for 8-bit tx by default in the example). It only transfers the first and 3rd byte properly, the second and fourth byte are either corrupted or not transferred.
Attached is both my project and below is my google sheets for received data from the external sram via the emif component. SendData is the original correct data, ReceivedData is the data on the sram.
The data points: https://docs.google.com/spreadsheets/d/1QUtSaZzsetq-DZz1eQH9XXWUm8FNalx63D9bqPaOUoE/edit?usp=sharing
Any help would be greatly appreciated, this is the last step of a critical stage of my design, without this I cannot move forward.
Show LessI'm using the PSoC5 LP Development Kit and try to implement the CSD for capacitive sensing.
Due to current research i found some hints how to calculate the capacitance from the counts.
Like this one:
http://www.cypress.com/knowledge-base-article/calculating-resolution-cy8c21x34-capsense-csd-kba82521
I've some problems to use this formula.
Since i'm using IDAC Sourcing there is no value for Bleed resistance.
In addition i'm not sure how to evaluate the average switching frequency of the sensor.
Are there any documentation about the measurement procedure of the controller?
So in general it should be possible to deduce that formula from the controller working procedure,
with knowledge of the systems capacitance.
The second topic concerns the temperature dependence of the system (without any plugged sensors).
I found that the board itself is not stable to changes in temperature and humidity level.
Could you please explain the origin of this drift?
Show Less