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 - LD-Micro and Arduino

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

LD-Micro and Arduino (by Mohammed Lux Abdul)
Hi,

Is there support for the atmega 328p? I have an arduino and would like to be able to use this software to program it.
I am using Arduino with my students the technical course. It would be wonderful to use with the Arduino micro-LD. One hardware and various applications ...

luxabdul
Tue May 31 2011, 15:21:00
(no subject) (by maxxir)
Use an older version of the Arduino based AtMega8.
For example, this: http://arduino.cc/en/Main/ArduinoBoardSerialSingleSided3
You need to use external programmer (e.g. an AVR-ISP, STK500, or parallel programmer), you can burn sketches to the Arduino board without using the bootloader.
Also you need to make some small changes to the Arduino preferences.txt, change: upload.using from bootloader to the identifier of one of the programmers in hardware/programmers.txt (e.g. avrispmkii, STK500 etc.)
If you would rather use an external programmer for only an individual board, you can edit the boards.txt file in the hardware/ sub-directory of the Arduino application directory. Set the board.upload.using parameter to the identifier of one of the programmers in programmers.txt.

Best regards
Ibragimov M.
Wed Jun 15 2011, 04:45:44
LD-Micro and Arduino (by Adam)
LDmicro program can be compiled in to ANSI C. So it’s possible to take C code, add header file and one small Arduino sketch and use Arduino IDE to compile and upload this program to Arduino board.

I have described this approach here: http://electronics4dogs.blogspot.com/2011/07/ldmicro-and-arduino.html

If you have any suggestion for this method let me know.

Best regards
Adam H.
Sat May 5 2012, 10:05:39
ldmicro e arduino (by luigi)
Ciao,
come posso usare gli ingessi analogici di arduino con ldmicro?
con quale sintassi? puoi fare un esempio?

con gli ingrssi e uscite digitali non ho problemi....
Sat Sep 20 2014, 10:58:46
analog input ldmicro & arduino (by luigi)
hello,
how can I use analog inputs Sum of arduino with LDmicro?
with what syntax? you give an example?

ingrssi with digital outputs and I have no problems ....
Sat Sep 20 2014, 11:01:07
ANSI C does not support Analog Inputs and PWM atc... (by Orhan)
Hi Adam,
I follow your instruction to use my Arduino UNO R3 with Ladder Logic written with LDmicro. It looks very good way if I am using only digital I/O. I am having problem when I use an Analog Input. It is giving an error message when I try to generate ladder.cpp file if there is analog input used in the codes. Is there any way to come over this problem or is there any body faced the same problem?
Thanks and regards

Orhan B.
Wed Mar 16 2016, 09:53:07
(no subject) (by Ihor Nehrutsa)
I can write support UART, ADC, PWM and EPROM for Arduino ANSI C in LDmicro. I need same days. It will be paid.
Thu Mar 17 2016, 13:32:44
(no subject) (by Jonathan Westhues)
My intent was that special functions (including A/D input) for the ANSI C back end would be implemented as "magic variables" whose values are automatically written by the runtime software. See the comment around "EXTERN_EVERYTHING" in the generated code.

You can implement any special function (A/D, PWM, DAC, RTC, etc.) with that mechanism, with no changes to LDmicro. Support for particular special functions in LDmicro would improve the simulation experience, though.
Thu Mar 17 2016, 19:28:25
arduino mega (by jorge ruano)
hi

i want to use ld micro to program arduino mega 2560
is possible?

because i can not find microcontroler in the list!!!
Tue Jun 28 2016, 20:06:47
(no subject) (by Ihor Nehrutsa)
You can use unofficial LDmicro support
latest release
https://github.com/LDmicro/LDmicro/releases/tag/3.4.1

build341.zip

Read for latest news
https://github.com/LDmicro/LDmicro/blob/master/ldmicro/CHANGES.txt
Thu Jun 30 2016, 09:59:00
(no subject) (by Alex)
some example using "magic variables" for A/D or PWM or DAC or RTC, or etc.
Sat Jan 21 2017, 21:27:10
demande d une solution (by hicham)
Bonjour,
Je veux serais gré de bien vouloir accepter m'a dit demande et ce pour problème donne m'a carte arduino pondant la programmation avec le langage ladder avec le logiciel ldmicro.

Mon problème c'est que je televreser une fichier hex de ldmicro la televrison ca se passer bien mais le programme ca marche pas la led de pin 13 il reste allumer ou lieu dr clignotement, et en contrer le fichier hex du logiciel arduino il ca marche bien et la led clignoter.
Celle vous plaît je veux voir le problème.
Je porté a votre connaissance que j'ai essayé de televreser le fichier hex de ldmicro avec 3 logiciel Xloader v 1.00 AVRDUDESS 2.4 V 6.1 et SinaProg . Et je trouver meme problème, je regardais plusieurs vidéos qui passent l'opération bine sont problème mais je ne sais pas comment.
Merci d'avance,
Wed Jun 7 2017, 21:39:56
Arduino and ld micro (by Gerard Jacquemin)
Hello hicham,

Yes you can flash a arduino ( in my case it's a nano )
by using Xloader or directly from ld micro YES !!!!!!
No need to use a C format !!!! or a programmer, use the usb
cable and the bootloader of the arduino.

You need to use (for a nano):

- the last version of ldmicro 4.1.3 -> for the cpu support.
- set the microcontroler : atmega328 28pin
- set the crystal to 16 mHz
- Use the cpu pin reference see :

http://www.pighixxx.com/test/pinouts/boards/nano.pdf

pin 13 = PB5

then you make your ladder program and compile.

After you flash by Xloader the hex file chose atmega328,
or flash by using flashMCU.bat

You need avrdude, i use the file from xloader,
and the com port of your arduino ( in my case com3 ).

After you edit the flashmcu.bat

rem set the path of avrude
SET AVRDUDE_PATH=D:\Program\Electronique\Ldmicro\XLoader\

rem the programer for the arduino
SET AVRDUDE_PROGRAMMER_ID=stk500

rem set the type of the arduino cpu
SET AVRDUDE_PART_ID=m328p

rem set the serial port -Pcom3 and speed -b57600
%AVRDUDE_PATH%avrdude.exe -y -c %AVRDUDE_PROGRAMMER_ID% -p %AVRDUDE_PART_ID% -PCOM3 -b57600 -U flash:w:"%2.hex":a -E noreset, vcc

Have fun
Gerard

ps: i change the .bat to .txt for my flashMcu
Sun Oct 22 2017, 14:10:00, download attachment flashMcu.txt
Arduino and ld micro (by Gerard Jacquemin)
Hello hicham,

Sorry i make a error:

The arduino pin 13 is PB1 see the file

http://www.pighixxx.com/test/pinouts/boards/nano.pdf

Have fun
Gerar
Sun Oct 22 2017, 14:13:56, download attachment flashMcu.txt
(no subject) (by Alex)
sorry for my ignorance, you can compile burn arduino ladder with ldmicro?
Sun Oct 22 2017, 14:38:10
(no subject) (by Gerard Jacquemin)
Yes, you can :-)

You only need the usb cable and the driver for you arduino. Then you have a com port and you need to put the
value in the flashMcu.bat : -Pcom3
The speed will change from arduino to arduino the nano is
5600 then in the file you need : -b57600
and the programer id is :
SET AVRDUDE_PROGRAMMER_ID=stk500
Also you need the file to flash : avrdude
Then I use the file from xloader and the i copy to the xloder ( you can also flash the bin by xloader, it work)
directory and set the path:
SET AVRDUDE_PATH=D:\Program\Electronique\Ldmicro\XLoader\
Change it because you path will be not the same.


See the flashMcu.txt of my previous post.
I have done for the nano V3.

Then you can use all fonction from ldmicro, but you need to
use the cpu pin name, not the arduino name.
1,2,3,4 .... will not work, you need to use pc0,pc1 .....

Do not forget to compile before flash the arduino.

It s not finich, you can also test you ld program
by simulide, make you board, uload the bin to the arduino
and test on yout PC it before flash the real board.

https://sourceforge.net/projects/simulide/

And have fun.

Gerard
Fri Oct 27 2017, 02:09:39
(no subject) (by Alex)
thanks for your reply, i will try, looks interesting :)
Fri Oct 27 2017, 12:25:09
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):