- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear guys,
I am a newer about Psoc4, Yesterday , I attened cypress seminar at hangzhou , and I had not pass the third experiment about CapSense with your PSOC4 Pioneer Kit.
The aim of this experiment is make developers to familiar with the CapSense module, and the experiment seems very simple , but I have not past .
The experiment only have one componment --- CapSense , I add a CapSense to the project, and add a linearSlider to the module , then enable tune helper ,set the I2C data Rate to 100kbps, and set I2C address to 8.
Then configure the IO port .
Last , add source code to main.c
#include <device.h>
void main()
{
CapSense_1_TunerStart();
// CapSense_1_EnableSensor(); //Not sure where to put this??
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
CapSense_1_InitializeAllBaselines();
/* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
for(;;)
{
/* Place your application code here. */
CapSense_1_TunerComm();
}
}
But when I run the application , open laucher panel . Configuration the I2C , and start , It reports failed !!!!!
The error information is "Read operation" failed ! Check I2C bus connection.
can sb tell me why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the fsacinating world of PSoCs!
You simply forgot to enable global interrupts. I2C and CapSense rely on interrupts. Uncomment the CyGlobalIntEnable.
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do like to see an edit-function!
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear sir,
Thank you for you hint, however the same error also occurs after I add the statement " CyGlobalIntEnable" .
I have seen the datasheet from IDE (CapSense) ,It seems there are no different points between my simple project and the project in datasheet except in the datasheet the "button" have been added , while in my project there is only have a CapSense componment!
I2C failed ? i do not why? From the bridge panel the voltage has been put . And the address has been set to same as the project.
pls refer to attachment!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bob (STILL Small window!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
pls refer to this attachment, 3ks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Bob ,
I do not know why I can not uploaded my project (rar file ) to the froum, I have tried to use internet explore (MS in XP and Win7) and Chrome browser , but failed !
May be your froum have some issues.
BTW , Can you upload a project that in the project there is only a CapSense module and there is only a LinearSlider in the module , then I can see why my I2C can not be read!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you right click the CSD component, "Find Example Project",
pick procject with tuner and open in new workspace option, you
will have a working basic project to start from.