(you are viewing a thread; or go back to
list of threads)
LDmicro.GitHub news v4.0.2 (by Ihor Nehrutsa)
== Release 4.0.2 experimental
* Fixed:
LDmicro Forum - hex file error
http://cq.cx/ladder-forum.pl?action=viewthread&parent=5008
LDmicro Forum - 4.01 hex problem
http://cq.cx/ladder-forum.pl?action=viewthread&parent=5410
AUTO_BANKING and AUTO_PAGING version 3 for PIC's.
* New: It is possible to add PIC10Fxxx - PIC12Fxxx family microcontrollers in LDmicro.
* Added message about the amount of RAM used.
* HOW TO: Soft start and smooth stop of LED with software PWM
https://github.com/LDmicro/LDm...-stop-of-LED-with-software-PWM
(no subject) (by Ihor Nehrutsa)
to all:
Can anyone to sponsor the LDmicro project?
I need:
1.1) Arduino Mega 2560 R3
1.2) Arduino Ethernet Shield compatible with Mega 2560
1.3) Arduino wifi shield compatible with Mega 2560
1.4) AVR Dragon programmer / debugger
2.1) PICxxx Development Board or Development Kit or Development Platform
2.2) Ethernet/WiFI board compatible with 2.1
Please contact to [email protected]
Simulation (by Boris)
Why in simulation all inputs are on?
(no subject) (by Ihor Nehrutsa)
to Boris
When selected mode is ("Simulation Mode") ,
and user presses once the Spase key ("Single Cycle"),
or hold down pressed the Spase key ("Single Cycle" ),
then ladder diagram executes one cycle (or repeatedly) and displayed correctly.
When then select "Start Real-Time Simulation"
the ladder diagram is in work,
but can displayed in the one same condition.
This happens only when the cycle time is less than 10 ms and 10 ms, divided by the cycle time gives an even number, and is also 10 ms, divided by the timer time gives an even number.
There are two causes for this strange behavior.
1) The LDmicro frame rate in "Real-Time Simulation" mode is 10 ms (100 Hz).
I.e. the ladder diagram state is displayed every 10 ms, but not the every one cycle.
If every 10 ms LD state is the same, then user sees the same picture on the display.
Although LD state chenged inside 10 ms over and over again
and go back to the same state.
This is what happened in your case.
All timers every 10 ms is repeated an even number of times (20 and 50) and go back to same state.
2) I tried to show LD state at a random time within the 10 ms frame. But WINAPI InvalidateRect() function works when there are no other messages in the application queue for that window. And the screen is redrawn also through an even number of times and showing the same picture (LD state).
I used UpdateWindow(). See attached picture.
UpdateWindow() function works without a queue and shows different states of LD on screen.
Note: The screen shows randomly LD state inside 10 ms frame.
This feature will implemented in v4.0.3
(no subject) (by Ihor Nehrutsa)
to Boris
...
== Release 3.5.0
...
* Fixed: On PIC microcontrollers there is bit 7 on
OPTION_REG named
_RBPU: PORTB Pull-up Enable bit or
_WPUEN: Weak Pull-up Enable bit.
Defaut value is 1 = PORTs pull-ups are disabled.
Now bit 7 is cleared and pull-ups are enabled.
Attention: Not all PIC ports have a pull-up resistors.
See datasheets of the controller.
Use an external resistor, if there is no internal pull-
up.
...
* In simulation mode You can set normal closed inputs to 1
before simulating.
Use symbol '_' after X in contact name.
For example:
Xcontast1 sets to 0 before simulating. (normal open)
Xcontast2 sets to 0 before simulating. (normal open)
X_contast3 sets to 1 before simulating. (normal closed)
X_contast4 sets to 1 before simulating. (normal closed)
This feature applies only in simulation mode,
and does not affect hex file in physical device.
...
This function is needed if you are using a pull-up resistor for MCU input
and normally open button in the scheme. If the button is not pressed, you have a HI input level in the initial state.
If the button is pressed, you have a LO input level in work state.
If you need a direct logic(not inverse) in LD you can use "_" in name of contact and negate a contact.
(no subject) (by Boris)
I didn't know that You changed "_" to represent inverted logic.
In old LD this was not in use "_" to change logic.
Problem for me is that "_" is only character which You can use in the name to see it better (X_in), now problem is simulation because everything is opposite.
If You need negative logic You have option "make negated".
Specially why this option if in real life doesn't work.
This is my opinion.
Thank You for great work!
(no subject) (by Ihor Nehrutsa)
When Pull-up registers enabled in MCU, then you can
assemble scheme like attached jpg.
SW1 is normal closed NC.
SW2 is normal open NO.
RB2 is pull-down via SW1.
RB6 is pull-up internally.
If you don't touched switches, RB2 is LO, RB6 is HI level.
You need to negate XB6 signal to normal/ positive logic.
When selected "Simulation mode" in LDmicro, all inputs setted to "0" and after negation XB6 output is "1" and XB6 light up YB7.
If use "_" , then X_ B6 setted to "1" before "Simulation mode" according to scheme, then nagated to "0" and YB7 is off.
"_" refers to MCU inputs RB6 not to the switches SW2.
This feature applies only in simulation mode,
and does not affect hex file in physical device.
In real device RB6 will be HI by default.
to all:
If anyone will present this text in correct English, I include it in the manual.
(no subject) (by Boris)
For me simulation has to be same as the real life, that is the purpose of simulation.
If somebody uses "_" and "make negated" to have simulation working correctly it can create problem in real life.
I always use positive logic it is easier for me. I use pull down resistor on every input and then for signal 5V.
You are programmer and we all have to work your way if we can follow You.
(no subject) (by Ihor Nehrutsa)
To Boris:
I understand you.
I will make this feature another way.
(no subject) (by MGP)
I have bad news.
I have been playing with Alex's program, see the other topic and when I compile the program with Ldmicro402 it does not work.
It works with version354ok.
I think its the memory paging that is the cause.
The hex (V402) file was uploaded in a simulator and an error was generated, see attached screendump.
(no subject) (by MGP)
V402 is working well, I made a mistake yesterdag, sorry.
(no subject) (by MGP)
The real reason why it went wrong is that when you use version 354, the hex file using 94% of memory and version402 uses 101% of the memory for the same program.
I did not see it..
(no subject) (by Ihor Nehrutsa)
to MGP
Accepted for review.
v4.02/4.0 (by segar)
HI,MGP
YOUR MESSAGE
I have bad news.
I have been playing with Alex's program, see the other topic and when I compile the program with Ldmicro402 it does not work.
It works with version354ok.
i have test with few version of ldmicro software ,the prblem error as appear from v4.02. V3.54 and lower than that its working good as i am tried so far. so have to careful in the V4.02 when do programming in the chip,or generate HEX file.
YES ITS CORRECT WHAT MGP SAYING
(no subject) (by Ihor Nehrutsa)
To segar
Accepted for review.
(no subject) (by Ihor Nehrutsa)
to MGP
Can you send me LD with 94% and 101% snap131.jpg?
(no subject) (by Ihor Nehrutsa)
to MGP
Can you send me LD with 94% and 101% snap131.jpg?
(no subject) (by MGP)
Attached the ld-file.
With "V354ok" the 16f628a is 94% full and with V402 = 101%
(no subject) (by Ihor Nehrutsa)
to MGP:
Versions v3.5.0-v3.5.4 uses AUTO_BANKING and AUTO_PAGING ver1.
It not bad for MCU with 2 program pages like PIC16F628. But it has a bugs.
I am currently working with AUTO_PAGING ver4.
Some increase of the size of the program will have to sacrifice.
(no subject) (by MGP)
Using more memory is not a problem for me but if you can give us a warning when the hex-file is >100%, if you can find the time, that would be great.
Auto-banking-paging is a good complement with pics.
And thanks for the great job you have done so far.
Post a reply to this comment:
|