Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - pic16f877a

(you are viewing a thread; or go back to list of threads)

pic16f877a (by johnny)
i have a problem i cant figure out if i write this code and push each button one at a time the leds light only half as bright if i use test they should be same brightness why is this? here is logic
Fri Oct 1 2010, 23:06:12, download attachment light test
(no subject) (by Jonathan Westhues)
You have two coils attached to each output pin. So if, for example, the button Xbutton2 is not pressed, but the branch of the test rung corresponding to the yellow LED is active, then the first coil instruction turns the LED off, but then the second coil instruction turns the LED on.

So the LED ends up blinking with a period equal to the cycle time. The duty cycle depends on the timing of the program, and it's different depending whether the coils go off-on or on-off. That explains the variation in brightness.

Never place two coils on the same pin. (Really, LDmicro should give a warning in that case.) Instead, make the test rung determine the state of three internal relays, Rred, Rylw, Rgrn, and place the contacts for those internal relays in parallel (Boolean OR) with buttons 1-3.
Sat Oct 2 2010, 00:00:22
16f877a (by johnny)
im confused i only have one coil on each pin its logic so so long as its name is the same it sees it as a complete rung? it is supposed to be bright i guess i worded it wrong i cant figure out why its dim useing one button at a time
Sat Oct 2 2010, 00:21:39
(no subject) (by Jonathan Westhues)
Look at your program. There are two each coil instructions with name Yred, Yylw, and Ygrn. This is not correct.
Sat Oct 2 2010, 00:34:55
no subject (by simon)
try this . next time post the LD file ,not the txt file
Sun Oct 3 2010, 12:29:54, download attachment light.ld
7 segmen multiflashing (by hasan ramli)
I have tried to make the ladder program to turn on
it led 7segmen as an example your web site but did not fire the third 7segmen and read numbers that have been loaded
that is not 185. whether there is a program that wrong? ..
Mon Oct 4 2010, 06:34:04, download attachment 7seg-apot.ld
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):