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 - Jonatan , you have a future plan to improve LDmicro?

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

Jonatan , you have a future plan to improve LDmicro? (by Ilie)

You have a future plan to improve LDmicro? If your answer is yes , we could come up with suggestions to help you.
Thu Jan 7 2010, 14:32:56
(no subject) (by Jonathan Westhues)
LDmicro is under semi-active development, but my time is limited. So you can ask, but there's currently no shortage of desirable features to add, probably starting with something like a PIC18 back end.
Fri Jan 8 2010, 08:52:32
(no subject) (by Ilie)
I thought that some ideas do not hurt. Example add menu bar instructions separate from the title bar, adding to Atmega32 PWM instruction and more PWM pins to ATMEGA128, copy and paste inside progamului not in txt and the ladder Progam in another, perhaps even reducing the space occupied by Progam in the controller, maybe someone will make some proposals.
I thought you would be better if you put on the website of a bank account and who would like and if possible (depends on country, etc.) with small donation from many people you could do more in this direction.
Fri Jan 8 2010, 12:20:26
(no subject) (by David R)
Hi,
I think the donation thing is great idea I always fell that
Jonathan is giving up to much of his time and getting no help with it. so I will give.
Regards
David
Mon Jan 11 2010, 16:18:11
donation (by Gavin)
I will definitely be donating
Fri Jan 22 2010, 08:39:29
(no subject) (by Samukelo Shezi)
Jonathan!

I know you informed me in a private email about how you feel about the donation story. But, nevertheless, I still stand with the guys in this idea! I therefore pledge, even though the South African Rand is a baby compared to the US$!
Sat Jan 23 2010, 16:34:27
Improvement (by BoumPower)
Hi,

Add 'virtual' processor :

the description of a processor is hard-depandent (like in mcutable.h) and if we choose 'Interpretable Byte Code', we loose the possibility to assign I/O, A/D, PWM....

It will helpfull for portability to have compilation that produce code like 'Interpretable Byte Code' with information like pin assignement in MCU selected.

With this output, it will be easy to build a virtual machine on a specific mcu without having a closed code generation.

So we can handle external hardware connected on the mcu (shift register for more I/O, I2C specific...) store the compiled code (like Interpretable Byte Code) in external memory, pgm memory, eeprom.

I have a project to use LDmicro with external I/O, external I2C EEPROM, I can explain more about this concept.

Best regards

Olivier
Sun Jan 24 2010, 14:35:49
(no subject) (by Jonathan Westhues)
My intent is that those would be handled in the same way as on many real PLCs, with specially named variables.

For example, you could decide that X0 to X31 were inputs (corresponding to micro pins, or to pins on some GPIO expander, or to something else entirely). Then when you parsed the .int file generated by LDmicro, the virtual machine would map those bit variables to the physical inputs.

It's likewise possible to define special output bit variables, or special integer variables for stuff like PWM outputs or ADC inputs. Or to make the virtual machine interpret all variable names of the form Pxxx as persistent variables, and save them to EEPROM, or something else.

It would be possible to add a less general mechanism, more similar to the I/O list for the PIC or AVR targets. But this means that LDmicro would have to be customized to the particular bytecode interpreter, which I would like to avoid.
Sun Jan 24 2010, 14:45:26
(no subject) (by Evan Raftery)
Count me in. The concept is too good to be left semi dormant and yes time these days is a precious commodity. Your project puts more ability in the hands of people to program pics & AVRs.
Sun Jan 24 2010, 18:49:23
Virtual MCU (by BoumPower)
"... you could decide that X0 to X31 were inputs (corresponding to micro pins, or to pins on some GPIO expander, or to something else entirely)..."
It's exactelly what I mean

"...But this means that LDmicro would have to be customized to the particular bytecode interpreter, which I would like to avoid. "
I agree with that and my idea go to this direction : the 'virtual' mcu will abstract the hardware.
The need I have is to map the virtual i/O (ex. : X0 to X31 above) to real mcu pins. When you select a mcu (not Interpretable byte code), you provide to user a way to choose pin assignement (in the table below the shematic view) and you store these information in your .ld file.

The request is to have the same with 'virtual mcu', but instead of producing .hex file, produce a .int file with same code as 'Interpretable byte code', but with adding at the end the 'virtual i/o, integer variable....' mapping, example :

$$bits
Xnew,4,vp7
Xnew2,5,vp3
Xnew3,7,rb3
Xnew4,8,i2c328_1
$$int16s

where vp3,vp7,rb3,i2c328_1 are the 'virtual pins' selected by the user like with real mcu.
With these information, it's easy to build a command-line tool that produce final code for VM without the need of an additonnal file for mapping info. Example : rb3 can be directely mapped to PortB.3 pin of PIC Mcu, i2c328_1 can be mapped to a external IC on i2c bus...

I don't know if it's a problem to change the .ld syntax to :

MICRO=VIRTUAL
IO LIST
Xnew at "vp7"
Xnew2 at "vp3"
Xnew3 at "rb3"
Xnew4 at "i2c328_1"
END

for handling this new feature

Best regards
Mon Jan 25 2010, 03:23:19
.ld file format (by BoumPower)
I suggest you this new file format that allow multiple target data saving.

LDmicro2.0
TARGET_LIST
TARGET
MICRO=Microchip PIC16F876 28-PDIP or 28-SOIC
CYCLE=10000
CRYSTAL=4000000
BAUD=2400
COMPILED=C:\depot\ldmicro\reg\expected\misc-ops.hex
IO_LIST
Xon at 2
Yalways at 3
Ain at 4
END
END
END

also notice the "_" between IO and LIST to avoid having 2 words
I also suggest to extend the syntax of IO_LIST to
Xon at PortB.3
or
Xon at RB.3
or
Xon at RB3
I like more the syntax with ".", easier to read from compiler
Fri Jan 29 2010, 05:07:04, download attachment Test.ld
(no subject) (by Jonathan Westhues)
I am very reluctant to make any changes to the .ld file format, especially just cosmetic ones. There are many thousands of .ld files already in existence with the current syntax, so any change must preserve backwards compatibility. This means that LDmicro would have to read both versions, which adds complexity.

It's already possible to map the I/Os as I describe above. The command-line tool just has to read the .int file, and look at the $$bits and $$int16s sections.

See ldinterpret.c--which supplies the bit 'Xosc' to the program as an input, and reads the int16 'a' from the program as an output--for an example of this.
Fri Jan 29 2010, 12:52:31
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):