Problem with the function Pin_Write(uint8);

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

cross mob
Anonymous
Not applicable

if I make this function LED_Write (1); The LED should turn on and will not turn
and if I make this function LED_Write (0); and StrongDrive the LED should shutdown. but the LED is turned on and before was unlike may be failing to pin status change.

   

Thank.

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

Sounds like LED is wired Vdd > LED > Rlimit > Pin, and

   

is turning on when pin goes to logic 0.

   

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable


From time to time change the state I once used this function to light a led (Pin_Write (1); Strong Drive (1)) and now comprises the function (Pin_Write (0) Strong Drive (1);) I do not understand what has happened. this happened after doing a project with Timer and interruptions.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Which development/prototyping kit do you use? Can you post your project here, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.



Bob
 

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

This is a project timer, after making the project the pin_Write (1) function; does not operate normally. Now the output gives a high logic state pin_write (0);I know what happened.

   

Thank.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

How do you determine that the pin is 0? Voltmeter? LED? How is the LED connected?

   

I don't see any code that sets the pin back to 0?

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

these are the led's

   

 

   

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Yes, that is a PSoC FirstTouch Kit and as you can see, the LEDs are lit when the appropiate port is sinking current, which is the case when you write a 0 to it. There are some example projects for that kit which get installed together with Creator. The bad news is that the PSoC5 chip is obsolete and has been replaced by the newer PSoC5LP chip. Additionally the actual Creator software no longer supports the old chip, so you have to stay with your Creator 2 version.

   

If you are further interested in PSoCs there is some help at hand: Cypress has announced the CY8CKIT-059 Prototype Kit which comes for a very reasonable price, but does not contain as much additional peripherals as the firsttouch kit. Mounted on a breadboard it will allow you to build all the electronic devices you'd like to.

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You should upgrade to Creator 2.x, this is the latest version supporting the PSoC5 on that kit.

   

As Bob wrote, your LEDs light up when writing a 0 to the pin. As Dave Jones would say: "a trap for young players" 🙂

0 Likes
Anonymous
Not applicable

Thank you very much, but two weeks ago was the opposite, the LED light when was writing a 1 to the pin.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Try again tomorrow, then it is Friday 13th.

   

 

   

Bob

0 Likes
JeCo_264681
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

 But Bob, did you celebrate PI Day?  I did.

   

At 9:26:53 the date and time displayed the first ten digits of PI. I can't believe nobody on this post took notice of that.

   

3/14/15 9:26:53

   

PI = ~ 3.141592653

   

Let's do this again in 2115!

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

A long, long time to wait... My Grandmother died at an age of 107 years, and she had that PI date only once... I'll wait for March 20Th watching a partial eclypse...

   

 

   

Bob

0 Likes