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 - LDmicro 2.0 -- release candidate

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

LDmicro 2.0 -- release candidate (by Jonathan Westhues)
I've attached a new version of LDmicro. If all seems good, then I will release this version as the official build in a week or so. This build includes changes to:

* Add PIC16F886 and PIC16F887 targets.

* Fix display bug in the list to select an I/O pin.

* Fix bug where PIC16 UART locks up forever after a framing error when the cycle time is faster than one byte time.

* Fix bug where PIC16 outputs could briefly glitch high at startup.

* Clear PCLATH in PIC16 boot vector, since some bootloaders expect that.

Let me know if you see any problems; or if you test this and it works, then please post the processor that you used.
Fri Oct 30 2009, 05:56:29, download attachment ldmicro.zip
Question about Instructions (by Jose Jacobo)
Is this new release of LDmicro still with the same set of instructions? i mean, there are the same instructions of RLL (Relay Ladder Logic) availabe as in the previus version (1.9) or there are some more added? please advice.
I have PIC16F886s and 887s available for test, i will test and then post the results of my test.
Thank you for such a nice piece of software.
Fri Oct 30 2009, 23:53:43
(no subject) (by Jonathan Westhues)
This release does not add any new instructions, and all new releases will keep backwards compatibility (i.e., a program that works with an old version will also work with a newer version).
Fri Oct 30 2009, 23:57:46
(no subject) (by David R)
There is one other small display bug you might want to look at,
when I use send serial string command with no VAR it does not appear down in the i/o list.
Regards
David.
Sat Oct 31 2009, 02:34:30
(no subject) (by Jonathan Westhues)
That's working as designed. The I/O list contains only variables, so the "formatted string" op doesn't generate an entry when it's used without a variable.
Sat Oct 31 2009, 15:18:11
(no subject) (by Evan Raftery)
When the information on line 15 has been added then the program capacity is exceeded. Prior to this the program size is 39%.

Also adding 1 line for UART send also tips program size over scale.
Sun Nov 1 2009, 03:26:22
(no subject) (by Jonathan Westhues)
There's no attachment.

But that behavior is not surprising. The program memory on a PIC16 is organized in pages, and a conditional block can't span a page boundary. So a program may occupy less than 100% of the total bytes of program memory, but not fit because of the paging.

The AVRs don't have this issue. The PIC18s wouldn't either, if I ever do a back end for them.
Sun Nov 1 2009, 03:56:03
(no subject) (by Evan Raftery)
Yes the attachement did nt go through. I have reattached the latest one.
While constructing the program any additional elements added caused the message out of memory choose larger controller. By adding maths on rungs without contacts was permissible but if a maths operation had a contact inserted on same rung then capacity goes from 51% to memory exceeded.
At this point if a contact from an existing address is added in a rung, the memory count progresses as normal but If a leading edge pulse is added, it tips the program out of memory.
In the program are 23 variables. Any attempt to increase gives out of memory message. Is this the variable memory limit or can I increase further by other methods? Also can not add timers or counters at this point either.
Is there any advantage to nesting a much as possible within each rung or is it more efficient to create more rungs?

I will have to go ATMEGA128 but have been reluctant to so far as prefer a 40 pin package for replacement ease. The smaller capacity ATMEGA chips in DIL format don’t seem t support PWM as well. Is it possible to software create frequency ports at say 15kHz with these chips? Duty cycle on has to be 50%. I don’t have an ATMEGA chip to live test yet.
Is it possible also to ascertain program capacity in the ATMEGA chips in LDmicro?
What is the process for setting the processor fuses in the ATMEGA microcontrollers?
Sorry to ask so many questions & use your valuable time. There is very little reliable information on the net and I know people on this forum are extremely appreciative of your efforts. LDmicro would have to be the easiest to understand pic programmer software there is.
Sun Nov 1 2009, 22:02:51, download attachment Test.ld
(no subject) (by Jonathan Westhues)
Long rungs are more likely to waste memory on the PIC16, since it's harder to pack large blocks than small ones. The limit relates only to program memory; the amount of data memory used is irrelevant. It would be possible for the compiler to do a better job of packing things, but for now it does not.

The ATmega128 comes in an 0.8mm TQFP, which is quite easy to solder. With in-system programming, it's unlikely that you will ever have to replace a chip.

Software PWM at 15 kHz is unlikely to be practical; that would require a cycle time of 1/(30 kHz), or 33 us.

You can compile for the ATmega parts in LDmicro, and look at the size of the output file. There is no paging on the AVRs, so program memory sizing is more straightforward.

Unlike the PICs, AVRs do not specify the fuses in the .hex file. So the programmers all have some additional interface to specify the fuses. In AVR Studio, there's a dialog box with a list. I use an AVRISP mkII, which is about 30 USD and officially supported.
Mon Nov 2 2009, 02:09:01
(no subject) (by Jonathan Westhues)
I have posted the new official release, at

http://cq.cx/ladder.pl .

Let me know if you see any problems.
Wed Nov 4 2009, 04:42:08
Servo Control (by Dian Bertoni)
Is there any possibilities to make servo control via RS232 with this ldmicro? would you send/share some examples.

Mit Freundlichenruss
Mon Sep 6 2010, 04:33:04
Possibilidades de uma versão que atenda todas as instruções. (by Charles)
Será que podemos esperar uma versão que possamos usar todos os protocolos de comunicação e todas as instruções contidas nos microcontroladores mais utilizados? gostaria de uma resposta, é que desenvolvo aplicações para automação de maquinas industriais, já tenho em vista desenvolver controladores mais robustos mas esbarro em muitas limitações.
desde já agradeço.
att,
Charles
Wed May 6 2015, 21:17:48
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):