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

LDmicro Forum - Program does not work

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

Program does not work (by Sean)
I used the sample program of LDmicro, shown in the picture, on my PIC16F877A. I used a 20MHz crystal as my oscillator and I also configured the bits of my microcontroller before generating the IHEX file. Upon sending the code through my microcontroller using a PICkit 3 and MPLAB X as my program, I noticed that my program does not seem to work. The LED I connected in RB4 of my microcontroller already turned ON upon receiving the program. Pressing the button I assigned on RB3 do not do anything.

What do you think went wrong on my setup or program? What should I do?
Fri Mar 8 2019, 02:38:29, download attachment Capture.PNG
(no subject) (by Alex)
I think i it because ldmicro (if you are using 5.x.x.x v) has interna pull UP resistores enabled by default, you could fix it by changing xbutton to negate
Fri Mar 8 2019, 03:47:55
(no subject) (by Sean)
Hi Alex!

Thank you for answering. The LED did not turn on upon programming the hex file to the microcontroller. However, the LED does not also turn on when I press the button.
Fri Mar 8 2019, 06:39:43
(no subject) (by Sean)
Hi Alex!

The program already worked. I realized that there is something wrong with the connection in my hardware for the button. I also negated the button in LDmicro like you said and set it to HI before simulation.

Thank you!
Fri Mar 8 2019, 06:57:12
(no subject) (by Alex)
Good to hear that
Fri Mar 8 2019, 06:58:31
(no subject) (by Tom J.)
It's useful to use one rung with just a 500ms cyclic on/off and use it to cycle a coil for a status LED.
Then at a minimum you'll know if the PIC is even running.
Fri Mar 8 2019, 12:26:53
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):