- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there
It's long time ago that I programmed some C code. So the C Syntaxes are gone out of my brain:)
I searched I the whole PSOC Creator and Keil help, but I couldn't find an help or lookup table for the basic C Syntaxes. ex. how to perform a logic shift of a Varliable, Array handling, Pointer initializing...
Does sombody know where I can find these?
Best regards
Fabian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Fabian,
you asked about C-Syntax for PSoC Creator. There is no specific C-Synthax for Creator, just C-Syntax in general.
There are API calls though and they are listed in the data sheet of every component. These calls and how to pass parameters follow the same standard C-Syntax.
As for a good C-Book, that is highly depending on personal liking.
I posted this a couple weeks ago but it makes for a good reference you can use as well.
"The C programming language by Kernighan / Ritchie" is old but still a reference.
"Embedded C-programming by Michael J. Pont" comes to mind.
Have fun developing with PSoC and Creator!
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So that means there is no specific language for PSoC ? We can use syntax of C language with with parameters given ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that is quite right. The special properties of a PSoC component are introduced at design-time and can be modified at run-time using the appropriate APIs. You need to download and install the PSoC IDE Creator 3.3 from Cypress website for free.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for your information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It looks like syntax that we use in general for embedded C programming has errors in PSoC Creator.
e.g.
ADC_Output = (BYTE)(F_ADC_Output>>2);
error : BYTE is unidentified identifier.
This was good in designer; can anyone help me out with this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ceena,
You section of code:
ADC_Output = (BYTE)(F_ADC_Output>>2);
error : BYTE is unidentified identifier.
The (BYTE) is a C Cast operation that casts the (F_ADC...) to a type of BYTE
In the designer include files there is a #define which causes BYTE to be a shortcut to an 8bit c type.
In creator you can use the type of uint8... which is also a #define to a native C-type of an 8bit unsigned integer.
Your code could be
ADC_Output = (uint8)(F_ADC_Output>>2);
This wikipedia page is a good reference for the c-programming language
http://en.wikipedia.org/wiki/C_syntax
Alan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Alan . . .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a "C Language Compiler User Guide" for PSoC Creator? Similar to the one offered for PSoC Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another way of finding this documentation is go to the Help tab in PSoc Creator, then navigate to Help > Documentation > GCC or other document of your choice.
- 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
IGPIO GPIO current Min = -30mA and Max = 41mA.
Is it the Sink current of the GPIO pin or Source?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
When you have a look at the thread title you might see that this is concerned with C-Language and not GPIO pin's properties.
Would make things easier for us would be when you specify:
Which PSoC are you talking about and which datasheet you picked the information from.
Bob