Input/output configuration

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

cross mob
Anonymous
Not applicable

 Hello,

   

I want to use a dht11 sensor. So I need to change the bit wich the sensor is situated at precise times. I want to know how I can change an input bit to output in main file programm.

   

PS: Sorry for my English :p.

   

 

   

Regards

0 Likes
3 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

This ap note should help -

   

 

   

    

   

          

   

http://www.cypress.com/?rID=2900     AN2094 - PSoC® 1 - Getting Started with GPIO

   

 

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

 Thanks for your answer but I need some example codes please.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Code for writing to the registers, there are examples in the ap note. It is

   

simple by just using the name of the register in a typical assign statement,

   

and use of a mask so that you only alter the bit(s) of interest.

   

 

   

Register bit definitions are shown in the Register Technical Reference Manual (TRM).

   

A copy of this is on Cypress web site for each family of parts. You should read

   

the chapter on GPIO in the TRM so that you know all the registers to use.

   

 

   

The TRM also in help, documents menu of PSOC Designer.

   

 

   

Regards, Dana.

0 Likes