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 - Dzairo news..

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

Dzairo news.. (by Dzairo)
Hi all who thinking about LDmicro to C code generated.. for new function , hardware and MCU ..
Today I compile first project.. it's early to say .. all is finished but .. if will have more free time then can continue..

Compile for ATmega644 , in WinAVR ..

regareds.
Wed Jul 23 2014, 12:12:32
Compiling LDmicro for PIC (by Onos_tech)
Hello Dzairo,

I really appreciate your work on LDmicro with the addition of more AVR. And a big thank you to Jonathan for developing Ldmicro it has really made programming microcontrollers very easy and simplified.

I am interested in including some more PIC to Ldmicro as you included AVR. I have been having some challenges with compiling it with MSVC++. Can you please guide me on this. I am using MSVC++ 6.0

Thanks

Onos_tech
Wed Jul 23 2014, 15:42:34
(no subject) (by Dzairo)
Hi Onos_tech .
If you want compile LDmicro .. then read post in this forum..
I have also problem compile it ..
I compile in MSCV++ 2010 and I do it in WindowsXP SP3 .. no in other windows version..
sorry .. I don't have more free time.. but pls .. read all other post .. and exist video in youtube how to compile.. read it..

Now I work on export LDmicro code to C and compile in WinAVR ..
more easy to support AVR MCU..
but if you help me then I can add code for PIC too..
But I newer before work with PIC then it's problem for me ..
C code generator will be possible easy change to support PIC or other mcu..

regards
Wed Jul 23 2014, 16:04:49
(no subject) (by Onos_tech)
Hello Dzairo,

Thanks for the info. I have been reading those post in the forum. But I have not been able to make head way. I think I should get the MSVC++ 2010. And download the youtube video.

Please tell me how I can help you to add PIC to LDmicro. I will gladly do.

Thanks so much for your time
Thu Jul 24 2014, 05:21:36
(no subject) (by Dzairo)
Hi Onos_tech ..
Add new PIC to LDmicro .. now I rewrite C code generator source file.. and this will generate C code for AVR mcu and compile in real time.. then final file is hex file .. but compile by winavr .. LDmicro just generate C files ..

then this is possible use for PIC mcu also.. need rewrited C code generator for PIC and compile with external PIC compiler..
need to konw more information how to compile PIC code ..

regards
Thu Jul 24 2014, 06:15:46
(no subject) (by Dzairo)
Hi all...

I have litle free then start make any changes to possible compile LDmicro to C and then compiled by winavr ..

here is my first testing ...

pls on first install WinAVR from : http://sourceforge.net/projects/winavr/

LDmicro work for AVR mcu only.. I don't know but not working in my virtual PC .. in real HDD wor good..
I tested in ATmega644 with blink.ld ladder ..

try it and write here result ..
PS: hardware not working.. USART,ADC,EEPROM,PWM..

test another ladder too.. if have more free time then try solve problem with hardware..

regards..

PPS: now is more easy to add another MCU ..
Thu Jul 24 2014, 17:51:55, download attachment Temp.zip
(no subject) (by MGP)
@Dzairo, would you rename the ldmicro.exe file in ldmicro-avr-V1.exe or something,in the future.

Its very confusing when we unzip the file and then have 10 or more versions of ldmicro.exe.

Thanks for the good work, but as for now I'll stick with pic's ;)
Fri Jul 25 2014, 10:05:13
(no subject) (by Dzairo)
Hi MGP ..
sorry.. OK .. all other file will have diferent name by date time ..
About PIC .. just need to know how to declare port , declare variable , bit variable.. and can do it for PIC also.. but not hardware .. becase I don't know hardware..

regards ..

PS: test it and say what you thinking about it..
Fri Jul 25 2014, 10:54:07
(no subject) (by MGP)
For the moment, the original ldmicro good enough.
Make the changes for avr's only and later on for pic's (maybe someone else)
Fri Jul 25 2014, 14:17:03
(no subject) (by Dzairo)
For PIC .. only need some help.. then can add PIC mcu .. I rewrite part code to easy C source generated from LDmicro .. but also easy to generate for PIC .. etc..
But need help with timer setting .. UART,ADC,PWM.. I newer work with PIC MCU then I can't do this self..

regards..
Sat Jul 26 2014, 04:54:26
(no subject) (by Dzairo)
Hi all .
Here is ldmicro_temp_C_1.exe
Generate C source code and then compile.
work only with old AVR MCU - ATmega 8,16,32,64 ..
hardware working .. but pls test it ..
PWM - is problem with this old MCU ..for PWM is used TIMER2 .. is used FastPWM and there is problem set exactly frequency..
F_OSC/(256*divider) .. no beter ..

Now I will try make code for all new MCU (ATmega48,88,168,328,164,324,644,1284,2560) some hardware problem ..

ehm.. need help .. still can not make easy function to check if pin are assigned or not .. if not assigned then want show error message and stop compile .. help me with this ..

regards..
Fri Aug 1 2014, 10:50:36, download attachment ldmicro_temp_C_1.zip
(no subject) (by Dzairo)
Hi all .. Here is version 2 .. support all other MCU in list.. ATMega 48,88,168,328,164,324,644,2560 but need test it.. test hardware.. I solve some bug .. but in PWM is used Fast PWM mode.. and in this mode is problem to set exactly frequency .. then frekvenci is calculated by this formula : f_out = f_MCU/(256*div)

divider is 8,32,64,128,256,1024 ..
In new MCU is possible to do it .. correct setting but I use same PWM setting like in older MCU..

PIC mcu still working but compile directly to hex not export to C and then compile .. I need help with hardware..

Please test it for bug and opinion ..

IF all work then I can start to add new MCU or new function .. SFR like my previous LDmicro .. is possible .. but we don't need this function if can export LDmicro code to C .
First what I add will be Temperature Read .. function similar like ReadADC.. but if read ADC input then calculate to Celsius or fahrenheit .. for this use NTC temperature sensor 10k .. easy to use . Second can add support digital scale weight sensor .. after read ADC input then calculate and output will be mass (g , kg .. etc.. ) not big accurate but easy to use .. (+-) 5% accurate .

Suport RTC, LCD .. need more time .. and your sugestion..

best regards..
Tue Aug 5 2014, 07:52:52, download attachment ldmicro_temp_C_2.zip
I want to contribute programming this project. (by Mladen Bruck)
Hi Dzairo!

Couple days ago, I started exactly the same thing as you... Didn't know about your work.

My intention was also to generate C++ code for Arduino boards, and to have ability to use existing Arduino libraries, which will be huge advance to PLC functionality.

I'd like to work with you if possible, since there is no need for two of us work on same idea, than have two almost the same projects.

If you interested send me e-mail.

BR,

Mladen
Wed Aug 6 2014, 04:47:07
(no subject) (by Dzairo)
Hi Mladen Bruck.
I don't use Arduino becase I can not use code directly in AVR Studio.. than I can not emulate code in my hardware.. sorry..
but can help to you .. or you me .. my code is possible to run in your board .. no problem.. and if to LDMicro add new MCU -> Arduino board then can do it directly to all your project..

regards.
Wed Aug 6 2014, 07:15:19
Arduino boards (by Mladen Bruck)
I believe you didn't understand me correctly. I like to contribute to project in two ways:

1. To add new features (functions) to "normal" avr procesors and boards in way you alredy started. Immediately I'll will write:
- modbus RTU slave and master functionality
- MCP23s17 I/O extension (SPI and I2C)
- I2C HMI functions for cheap ebay LCD's
- Servo motor function
- H bridge motor control with speed control
- Ultrasonic sensor function (if possible becouse of pulsed ot)
- Help based on function (when press F1 it will show just that fuction explanation)
- etc etc more folow

2. To add new type of "procesor", it will be Arduino boards. Generated code will be slightly different but it woulod be normal arduino project so it can be modified with AVR studio. All functions would be the same (as much as possible), but it will just use generaly available arduino libraries in the back.

So, what I need, if you are willing to share, is your current source code and explanation how you added this couple new functions. Just as direction, since it will be quicker for me not to explore what you already find.

Hope you will share your current source with us :)
I'm realy exited about this! I believe we can make LDmicro realy powerfull now !

My e-mail is mladen dot bruck @ gmail dot com
Wed Aug 6 2014, 14:24:49
LDmicro on Arduino (by Ziggy)
Arduino can handle LDmicro C code as is.

There is a header file pathway which can be followed

http://electronics4dogs.blogsp...11/07/ldmicro-and-arduino.html

The author of the blog might want to contribute to this discussion.
Wed Aug 6 2014, 18:36:30
(no subject) (by Mladen Bruck)
I have seen and tryed this. It's kinda complicated process, but...it works.
Better to embed all in one program.
Thu Aug 7 2014, 03:46:45
(no subject) (by Dzairo)
Hi Mladen .. I send to you email.. with latest version LDMicro .. source code..
Thu Aug 7 2014, 04:33:55
74hc595 (by meiyazhakan)
hi mr.jwesthues and Dzairo and MGP help me how to use 74hc595 multi output.send me example
Wed Aug 27 2014, 12:45:46
(no subject) (by MGP)
meiyazhakan, open a new topic if you have a question.

This is for a 4094 but you can change it for a 595.

Look here

http://cq.cx/ladder-forum.pl?action=viewthread&parent=2461
Wed Aug 27 2014, 13:14:57
...news... (by Dzairo)
Hi all.
Now I don't have free time then I don't answer to this forum..
I make changes in LDmicro C version .. and want make new forum for LDmicro with better function.. pls MPG answer to all post in forum...
MPG you write you work with PIC .. new version work with AVR only .. but litle help then can support PIC too..

regards..
Wed Aug 27 2014, 15:41:58
(no subject) (by MGP)
Dzairo, as I said, for me, you should not change your program for PICs.
If necessary, I'll change to AVR's, but not now.
Thu Aug 28 2014, 03:15:59
(no subject) (by Ziggy)
Dzairo,

How does the software handle say ATmega8 28pin DIP versus the more complete peripheral set in the SMD package?

Will the C code support additional 2 ADC channels and or I/O pins?
Thu Sep 4 2014, 20:24:14
(no subject) (by Dzairo)
Hi Ziggy ... IF make support for ATmega8 TQFP package then we can do support for all ADC input .. I thinks ..I must test it .. tomorrow..
Mon Sep 8 2014, 11:26:33
(no subject) (by Dzairo)
HI Ziggy .. I test it .. I add to DIMP-32 package opiton for ADC6 and ADC to to existing code .. not working ..
if want use this PIN - ADC input then must create new MCU with name TQFP or MLF to support this ADC input ..right now I don'tk now how to make support to DIP version extra pin from TQFP or MLF package..
if some MCU have different package with different pic configuration then must make new MCU .. in MCU list.. there is not another way.. I think ..

regards..
Mon Sep 8 2014, 14:53:56
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):