Prox / RFID
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Resume / Consulting
Contact Me

LDmicro Forum - exploit atmel2560

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

exploit atmel2560 (by Alex)
is it atmega2560 "the best" mcu in ldmicro?apart from STM32F40X, i think it should have all tx and rx avaliable because we all know that the only way for now for using an lcd is via uart, but there are some cases, as ldmicro is inteneded to work with mcu like plc, that we need to comunicate our "plc" with pc or another "plc" but we need lcd in our plc also, most of the mcus that have uart function just have 1 rx and 1 tx port in ldmicro and we have to sacrifice either lcd or comunication with other "plc", etc We could do it via I2C with the help of José GUILLES, but as i said, ldmicro is intended for working with mcu as plc, there will be cases when we need long distance comunication and uart works for that.

i am a pic user but as there are more avr mcu than pic in ldmicro i think 2560 should be exploited or add a powerful pic as atmel2560.
Mon Dec 31 2018, 11:18:40
(no subject) (by José GILLES)
AtMega2560 has 4 uarts but only one is available at a time in a same ladder, because of the design of the software.
It wouldn't be so easy to manage several UARTs at the same time, expecially in native mode (Hex / Asm).

I made the same choice for SPI and I2C for simplification purposes ; but each SPI or I2C bus can handle several peripherals !

Mon Dec 31 2018, 11:52:45
(no subject) (by Calubert)
Si lo curioso es que cuando lo hacemos para colocarles los pines si es para arduino si nos indica los barios uar hablo de la Release, built 14:38:27 Aug 7 2018.
que la única version que no da errores para guardar en permanente yo fabrique esta placa para el atmega 2560 y de momento funciona y la grabación la hago con pickit4 y MPLAB XIpe v5.10 que ya como sabemos lo atmega los compro microchic y lla se pueden trabajar con las herramientas de microchi para atmega
Mon Dec 31 2018, 14:17:27, download attachment WhatsApp Image 2018-12-31 at 14.38.37.jpeg
(no subject) (by Alex)
yes, it is because of the design of the software, ladders work with cycles,could it be possible to work with each uart not at the same time but in a cycle way?, something like this, watch video please:


i really don´t want to sound demanding, or could it be possible to use an only i2c function for ldmicro for lcd? uart uses a lot of memory and we have a specified controller for that :

Mon Dec 31 2018, 21:19:41
(no subject) (by José GILLES)
To Calubert:
I don't speak spanish well enough to undestand what you mean...

To Alex:
I'll have a look at this 16x2 LCD display adapted to I2C for arduino with an expander. I don't have exactly the same, but I have an I2C IO expander (which works yet with ldmicro as tested) and a standard 16x2 display. Just need to connect as Arduino's one.
It'll probably work but as I said I don't know about timing...

But for the time being, I must achieve my developments arount C programming, SPI and I2C, and pusblish it on github.
Tue Jan 1 2019, 06:53:52
(no subject) (by MGP)
Gilles, is it possible to recompile version 4430 to 4440(?) and only remove the "terminating bugs" and other(?) know bugs?

The new "instruction menu" structure is beautiful and can also be used.

So we have a version where the instruction list is working with all the controllers in the menu.

That would be a nice gesture to all pic users and you can further expand the version for ARM and Atmel/AVR.

Thanks in advance and a Happy New Year to all.
Tue Jan 1 2019, 07:57:32
Uart (by Calubert)
Si pero los pin del microcontrolador en el video es el mismo salida ( La escalera que has formado no quiere decir que sean 4 uart ( son cuatro variables que su salida es la misma por el mismo pin Ejemplo pin 23
Tue Jan 1 2019, 08:01:27
por José GILLES (by Calubert)
yo copio y pego en el traductor de google, y me traduce el Español bastante bien al Ingles como viceversa. Pero si me lo traduce automático por la misma pagina sale un poco diferente no es muy bueno la traducción por pagina ya que el Español tiene muchas palabras diferentes que su significado es el mismo. con la traducción del castellano al fances es bastante mala.
Mi nombre es Paulino Cano y me dedico a programación de PLCs Las Marcas, Teco, Delta; Siemens, AWEC (Puedo programar cualquier plc que asiste en el mercado (solo Escalera, Ladel). La verdad que no programo en C, C++ ni Ensamble.
me puedo dedicar a fabricar PCB y hacer las pruebas de los micro controladores nuevos que saquen en LDMicro ya que tengo la mayoría de herramientas para cargar la mayoría de micros controladores en .hex. mi email;[email protected]
esto es porque la empresa donde trabajo en Tecno Calubert S.l. tenemos un laboratorio y nos dejan uso del laboratorio para ensayos y particular no solo para la empresa.
estoy haciendo un proyecto (casi esta terminado) que es una fuente de laboratorio (con toda la programación en Ladel que funciona con energías solar como batería energía e grupo electrógeno, de salida 60vdc 60amp, con testes, analizador de espetrun, sonda de temperatura, señales de salida PWM variables. etc y el valor aproximado es de 60€ coste de componentes y LCD 20x4 TX y RX, por eso pido mas Uart para hacer trabajar mas periféricos. Ejemplo: Bluton, Rfi,targetas externas. ETC.
Estoy para lo que pueda ayudar a los amantes de LDMicro y este en mi mano gracias atoados y que este año 2019 sea mejor que el 2018 (Gracias a todos por hacer que LDmicro funcione)
Tue Jan 1 2019, 08:48:22
by José GILLES (by Calubert)
(Hola José GILLES, e estado probando tu LDMicro Release, built 21:41:36 Dec 29 2018. Con el microcontrolador ATMega2560 y parece funcionar bien, pero no veo como colocarlos los Pines SPI, I2C, pero si están implementados los pines UART (ejemplo Pin3).

(Hello, José GILLES, and I have been testing your LDMicro Release, built 21:41:36 Dec 29 2018. With the ATMega2560 microcontroller and it seems to work fine, but I do not see how to place the SPI, I2C pins, but if the UART pins (Pin3 example).

(Bonjour, José GILLES, et j’ai testé votre version de LDMicro, construite le 29 décembre 2018 à 21:41:36. Avec le microcontrôleur ATMega2560 et cela semble fonctionner correctement, mais je ne vois pas comment placer le SPI, Broches I2C, mais si les broches UART (exemple Pin3)
Tue Jan 1 2019, 10:50:47, download attachment Atmega2560.jpg
(no subject) (by José GILLES)
There's a lot of questions...

First, happy new year to everyone !

Coming back to version (the base I used) would be now a bit difficult ! Normally you can keep on using your PICs with my ldmicro32 without any change ?
You've just got to know that you can't use - for the time being - SPI and I2C. As I found some C libraries for PIC16F877, maybe I'll implement SPI and I2C (in C mode) for some PICs...

To Alex:
I have made my 16x2 LCD display work on AtMega with an IO Expander PCF8574 linked to I2C bus - fortunately the one used by Arduino ! It opens the way to drive such displays via I2C in ldmicro.

To Calubert:
I have put your text in google translator to know what you meant...
To test SPI and I2C on Atmega2560, you'll have to wait for a few days, because I must declare these new peripherals in ldmicro to make them available for all Atmegas (just tested on Mega8, 16, 328). I have a Mega640 (compatible) but students have broken something on the board...

To be continued
Best regards
Tue Jan 1 2019, 11:49:51
(no subject) (by MGP)
For me, you do not have to implement SPI or I2C for PICs because I never convert programs into C.
I am satisfied with LDmicro as in version 4430.
Tue Jan 1 2019, 14:40:11
(no subject) (by Ziggy)

A similar sense of LDmicro has been forming in my mind as well.

I am of the opinion that LDmicro should progress and evolve towards a black box functionality within the LDmicro graphical environment as enshrined in ladder logic paradigm.

While it is nice to have low level functionality offered by C/C++/Arduino mixing the two approaches dilutes the simplicity of ladder logic.

If i need to have low level control of functionalities and yet maintain ease of use of ladder logic I use PLClib for Arduino otherwise if performance is needed it is a job C.
Tue Jan 1 2019, 17:38:19
(no subject) (by Alex)
Exploit ldmicro, exploit ladder programming
Tue Jan 1 2019, 18:51:56
Post a reply to this comment:
Your Name:
Your Email:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):