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 - weird latch..

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

weird latch.. (by mark hodsman)
This is a ludicrouly simple on off with latch but I have tried it several times and it sometimes doesnt work as expected...

Even under the simulator the xstop button works as a normally open contact. Within the PIC 16f887 it caused all manner of havoc last night.

The last time I tried (Sunday afternoon) it seems to work as expected. Unfortunately by then I was beginning to question my 20 years of electrical theory....

I wonder if it had to do with using the latch contact from an output pin and whether that is allowed. Although I have tried it entirely with internal contacts and coils and it didnt like that either.

Id appreciate it if anyone can confirm that this code included occasionally fails!!
Sun Nov 6 2011, 13:37:45, download attachment marks_test.ld
faulty latch... (by mark hodsman)
OK can confirm this code works as expected within the LD compiler. When it is U/L to the Pic16F887 on a dev board and using two switches - a N/o switch for Xstart & a N/C for Xstop (both pulled down to GND.) So initial state is RA0=0 & RA1=1.So far so good.

On pressing Xstart - pin RA0 = 1 - However Rlatch doesnt change state. It only changes state (energises) when both buttons pressed?

Has the hex code got dumped wrongly?
Mon Nov 7 2011, 07:23:28, download attachment start_stop.ld
program is correct (by Magno)
Friend, what I have seen your program is correct. constantly use programs with up to 100 lines written in pic 877 and works well. see if your pic is ok.
Mon Nov 7 2011, 11:52:34
(no subject) (by simon)
Hi Mark
use this
Mon Nov 7 2011, 13:33:58, download attachment startstop.JPG
(no subject) (by simon)
with this program
Mon Nov 7 2011, 13:35:36, download attachment teststartstop.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):