Making a component - help

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi.

   

 

   

I've got two problems about making components:

   

1. In my design I use Digital Input terminal, and I want to use on this input function PIN_Read(); How can I do that? Using this Digital Input Terminal (this green with an arrow), program isn't see this as a GPIO which Ican manipulate.

   

2. On *.h file when I use standard formula:

   

#ifndef(`$INSTANCE_NAME`_H)
    #define `$INSTANCE_NAME`_H
#endif
 

   

I got an error: Build error: macro names must be identifiers. After commenting it it works as it should be. Is this line important?

0 Likes
5 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        You can declare terminal as 'buried pin' (pin->properties). This way the terminal will reside inside the component. As an example, for a look on this 1-wire component by 'pavloven' http://mylab.wmsite.ru/moi-razrab/cypress-psoc/psoc-user-module-library/ 2. Make sure you set correct API prefix in component symbol->properties->API prefix.   
0 Likes
Anonymous
Not applicable

About 1. Srr, but I can't find anything in this 1-Wire Project which will help me about this Buried Pin. Can you tell me how can I use it, where can I find it?

   

 

   

About the 2nd one. I have named it but still error.

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        1. This is an example which uses a pin buried inside the component, and which could be accessed using standard API. It was my understanding that is something you looking for. 2. It may be not important if only a single instance of the component is placed on schematic. Otherwise the compiler will complain.   
0 Likes
Anonymous
Not applicable

1. I don't know if it is a buried Pin, but in my component I just made an Pin which has input and output and it works, but it looks like, that I put signal to Pin_0_1 and this signal goes to Pin_0_2 and after that it goes to my timer inside component. That means I use one Pin which is doing nothing.

   

2. Unfortunetly I need to use this component two times. And still I get this error ;(

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        You can post demo project here for review, project'> create Workspace bundle->minimal.   
0 Likes