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 - Ladder.h help

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

Ladder.h help (by Alex)
I made my ladder.h from an easy program, an on/off switch for one led.



inline extern BOOL Read_U_b_Xswitch(void)
{
return input_state(PIN_A0);
}

inline BOOL Read_U_b_Yled(void)
{
return input_state(PIN_A0);
}

inline void Write_U_b_Yled(BOOL v)
{
output_bit(PIN_B0, v);
}

it works fine, but i want to turn on/off a led with a timer called T1, so instead of "return input_state(PIN_A0);" what should i change?
Tue Aug 16 2016, 19:07:18
(no subject) (by Alex)
i just left it like this:

inline extern BOOL Read_U_b_Xswitch(void)
{

}

with no return.., it worked
Tue Aug 16 2016, 22:44:00
(no subject) (by Alex)
it worked in simulation but in real life it just keeps turn on
Tue Aug 16 2016, 22:48:23
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):