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 - to MGP (Master relay)

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

to MGP (Master relay) (by Petar)
Problem is that on ATMega128 master relay doesn't work on Jonathan and Ihor LDMicro.
On PIC it works OK.
I have to remember 4 values, until I made to block running program with master relay values were not remembered properly now I don't have that problem (stored values stay the same).
Sat Apr 23 2016, 03:03:09, download attachment Master Relay.png
(no subject) (by Petar)
Rung 7 is to reset values to visible numbers because I had problem that number was not visible only some characters on LCD, after power up.
I have also automatic reset to visible number with "less than 0"
and "more than 30000" to reset to "0"
Sat Apr 23 2016, 03:11:34
(no subject) (by MGP)
Petar, please post your LD program, maybe i can let it work.
It's difficult to see on a PNG what is wrong.
Sat Apr 23 2016, 03:53:40
(no subject) (by Petar)
On PIC master relay works OK, on ATMega 128 doesn't work at all.
Sat Apr 23 2016, 09:42:27, download attachment Punilica RevA.ld
(no subject) (by Petar)
I am testing atmega128 because for some projects I don't have enough space on 16F877a.
Sat Apr 23 2016, 09:47:43
(no subject) (by MGP)
Test your program again in the Atmega, I have deleted some (9) rungs and changed rung 5, everything else is the same.
Sat Apr 23 2016, 10:51:30, download attachment PunilicaRevA-V2.ld
(no subject) (by Petar)
I am going to test it later but only one question:
Rung 5; will it each time when I am trying to set the value, new value during changing numbers will be written to eeprom, can I wear out my eeprom (100.000 cycles).
Thanks for help.
Sun Apr 24 2016, 01:32:41
(no subject) (by MGP)
You did that anyway, look at your program.

Modern Eeprom last at least 1000 000 cycles
That is 1000 000/365/10Years = 273 changes per day for 1 number.

You see it's all relative, the danger with eeprom is when you change that number in your program, then you have no control over the nummbers of times writings to the eeprom.

Manually you can't destroy the controller.

If you do not believe me you may set the two NC contacts back but not rung 1 and 2, because I think, if you start the program all the variables are set to zero.

The MCR prevent from reading the eeprom during 500mS.
Once the time elapsed, the persist variable is set to zero because the variable is zero at that moment.

That is my way of thinking....
Sun Apr 24 2016, 02:36:57
(no subject) (by MGP)
Here you have the gearindicator program you can see in the video above, with persist and MCR instructions.

It measure the voltage on the motorgear in eath gear.
If you set the voltage there will be automatically generate a window.
This gives us a stable reading while driving and you can change all that while driving when you push the store button.
Sun Apr 24 2016, 03:03:32, download attachment Gearindicator_4Mhz_eeprom_88_V202b.ld
(no subject) (by Petar)
I believe You.
I think that You didn't understood my question.
If I need 29999 that is 38 number changes is that 38 eeprom cycles?
Yes You are right I never calculated how many changes is that.
I will try today.
Sun Apr 24 2016, 04:13:43
(no subject) (by MGP)
Yes you are right, that are 38 eeprom cycles, I overlooked this, you better set back those NC contacts.

It's the hard way to set a value, press 38 times ;-)
Sun Apr 24 2016, 05:24:12
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):