PSOC 5 Component won't work

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

cross mob
Anonymous
Not applicable

Dear community, 

i'm very new to cypress psoc and have developed a little application which reads the temperature and humidity from an dht-22 sensor. 
This works really great, but now i thought it would be much better to create an component as an easy driver source for future projects.
So what i've done til now is created an Library Project and added an symbol with one output pin (DHT-22 works with an single line data).
Then i created an api file .c and .h For read and write i created an schematic with an Terminale and an control register. The control register is used to read and write the data.

My problem now is that the Register seems to be optimized and is greyed out in my project.
Is my approach right? Or should things be done in an other way?

Regards
Moritz

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is a program that reads the DTH11.

View solution in original post

0 Likes
7 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received
        Please post your code so we can check it.   
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

i've attached both the project i'm currently working on and the componentlibrary i try to create

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Have you read the component Author Guide?

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is a program that reads the DTH11.

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        moritz31, >The control register is used to read and write the data. - use Control register to write data and Status register to read back. To combine them on a single pin use bufoe (3-state in-out) component. Example of that can be found in custom component (DS18B20 temperature sensor) http://www.cypress.com/forum/psoc-community-components/component-read-ds18b20-digital-temperature-se...   
Anonymous
Not applicable

Thanks,

have updated the library with the tri state buffer and now it compiles. I will check on weekend if the sensor readings are working as expected.

Regards
Moritz

0 Likes
Anonymous
Not applicable

Hey guys thanks for help. 
The Library is now working like charms 

Regards
Moritz

0 Likes