Output power problem (by ML2697)
Hello,
I wrote a program for my PIC16F88 and i have some issues with it. Program is supposed to light different lights depending on times button A1 was clicked. So simulation works ok and even on my circuit it works ok but the problem is with power output. Only when i press for the third time the lights will shine brightly, otherwise they shine very low. I have no idea how is this happening but i asume its because of button switching states. Simple programs work like a charm. I have file attached so u can see how i made it. If you know how to make it easier I open for suggestions. Thanks.
ML
Great! Case closed! (by ML2697)
Thanks man,
I guess you shouldnt have more than 1 coil with same name. I changed names of coils and works like a charm. thanks again
Ah sh*t, I take it back... (by ML2697)
Sry dude.
My bad. I didn't actually figured it out. U cant assign one output pin to more coils in LD micro
(no subject) (by MGP)
If you run the simulation in de first version, then you can see in the window below the ladderwindow that Y..B3 in rung 3 is not set(active) when Cpr==2.
It does in rung4.
In some cases it works when you assign one ouput pin to more coils, but when??
I try always to avoid it.
How cna i close this thread? (by ML2697)
It works ok now. I had to limit same output only to 1. See file. I have no idea why it didnt work before but its ok now. It just took me some time to rearrange everything.
(no subject) (by David R)
HI the problem is having more than one output coil with the same name.
assuming Cpr=1 then YIzhodB4 on run 2 is set high
as the program scans down at line 4 Cpr is not 3 so YIzhodB4 is sets the outputs.
or in other words a logic high will not over ride logic lows else in the code.
I have attached another way of fixing the problem bu using set coils
at the first line the coil IzhodB4 is reset and through the code it may be set at the end of the scan if it is true then the out puts will be set true.
Kind Regards
David.