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 - Unreadable numbers

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

Unreadable numbers (by Boris)
I have problem that when is short power failure PIC reset and sometimes enter some numbers in his memory which I can't read on LCD (like *) or only shows one line on LCD.
MCLR pin is connected to bas85 diode and then to +5V.
In datasheet they have for 16F877A RC network but no value for for capacitor.
Sun Feb 15 2015, 03:35:15, download attachment Numbers.ld
(no subject) (by MGP)
Connect the MCLR pin with a 22k or 33K resistor to the +5V and nothing else, that will work.

If you prefer the datasheet solution a capacitor between 10nF and 100nF is perfect.

I have made some changes to your program for better use of the memory at startup.

Because you use a very high cycle time you must change your program for the LCD.
Use a CTC counter (0-3) and send each variable after a certain time (+-50mS) otherwise you'll miss data.

The last line should be clearscreen (LCD) with a OSR, once executed at startup.
Sun Feb 15 2015, 05:11:47, download attachment Numbers_V2.ld
(no subject) (by Boris)
Thank You for reply.
I have two questions:
Will I worn-out pic eeprom because each time I change number it will write down new value to eeprom?
How can I write this "The last line should be clearscreen (LCD) with a OSR, once executed at startup".
Sun Feb 15 2015, 05:55:34
(no subject) (by MGP)
Eeprom should last > 100 000 write cycles, some papers says 1000 000, so why worry?
In 10 Years you can change the values 10000 times, at least.
But if you make changes at the program, the first thing that LDmicro do is reading the variables, so the rung must be always true at startup.

LCD, I made some time ago a program for you? forgotten?

http://cq.cx/ladder-forum.pl?action=viewthread&parent=3753
Sun Feb 15 2015, 06:24:01
(no subject) (by Boris)
No I didn't forgot that was for 4 line LCD.
Now I am using 2 line LCD and one screen is always on the other one only when I have to change value.
How to make reset to visible numbers if it happen again.
I will try to use only 22k resistor to MCLR pin.
Sun Feb 15 2015, 08:31:46
(no subject) (by MGP)
I do not know what you want to say about that LCD.
But you must maintain those 4 rungs and use the cursor controls for two lines.

A reset can be given by a pushbutton from the MCLR pin to GND.
Sun Feb 15 2015, 10:20:58
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):