|
|
|
(you are viewing a thread; or go back to
list of threads)
Ldmicro running on Atmel ATmega168 / 328 (by José GILLES)
Hi
I enjoyed trying ldmicro on Atmel ATMega8 / 16.
As I own some ATmega168 / 328 (used by arduino) I have
adapted the source code to support these more recent Atmel AVRs.
I built the project under MSC++ 10 Express, modifying only 4files:
ldmicro.h, mcutables.h, lang.cpp, avr.cpp (mainly)
Ports, ADC, PWM and UART seem to work fine on all my targets (8, 16, 168, 328).
I also noticed a little bug in langage tables Fr, De and Te:
a double % is missing after 5% on 2nd line, which generates wrong error messages. So lang-tables.h as also been modified.
Here are modified files, and new executable, for everyone who may be interested !
Maybe it could justify a new release ?
JG (France)
More recent releases on Github (by José GILLES)
I've just seen that more recent releases are on Github (4.4.3 vs 2.3 on ldmicro)
It should be updated !
(no subject) (by Alex)
have you modified 2.3v? i can´t open. would like to try your version
(no subject) (by Ziggy)
LDmicro already supports those two microprocessors.
Error MSVCR100(D).dll (by Jos� GILLES)
This error MSVCR100(D).dll is due to 2 factors:
1)
I posted the Debug executable of my 2.3+ modified version.
Release (normal) executable is in the new attached zip file.
2)
Il the problem persists with new executable, it meens that Visual C++ runtime is missing on your computer.
You can download it on microsoft website:
https://www.microsoft.com/fr-fr/download/details.aspx?id=5555
Install it and run ldmicro again.
JG
Bug LCD / Alex (by José GILLES)
I've been playing with ldmidro for 2 weeks only ; so I'm not aware of too many things !
I have discovered a few days ago that new releses were held by a new developper. I'm looking at it and recompiling sources. It seems to be more poweful but also more confusing than before !
I also think that former releases are fine to start.
About your display pb, I watched the video.
Your board is an Arduino Uno with AtMega 328 and you use a PIC to drive the display via UART ? I have a Myavr board with the same µC (but 3.6864 MHz), and some HD44780 compatible 16 pin LCD displays, but I do no longer use PICs.
What is the speed of the UART ? I've just tried 9600 bds in echo.
I'll have a better look at UART with ATMega328 using your swatch3 example...
My goal is not really to use Ldmicro with atmel AVRs, but with some 32 bits ARMs, if I can adapt it...
JG
(no subject) (by Alex)
speed uart in that ladder is 9600, would be excellent, yeah ihor´s development is powerful
UART / ATmega328 (by José GILLES)
Hi Alex
In fact ATMega328 UART has one more register (UCSRC) to configure compared to other similar Atmels.
I have set the right - I believe - value in UART setup from avr.c and I hope it should be better.
I can't exactly try your ladder because I dont have the same material, and no simulator either. With a terminal it works
at different speeds.
Let me know if its OK or not ?
New files are in attached zip.
JG
UART / ATmega328 (by José GILLES)
OK
I can't explain the pb for the time beeing but I will have a look at it again by the end of the week !
Now I'm working on ARM STM32 support in ldmicro 4.3 and it begins to be fine...
JG
(no subject) (by Oleksiy)
Hi José.
Did you have an open repository on GitHub?
(no subject) (by Alex)
thanks for your reply José,would be great to have arm stm32, when you say ldmicro 4.3 you mean latest ldmicro 4.4.3.0 version?
ARM STM32 (by José GILLES)
Hi
To Oleksy:
No I haven't got a repository on Github
What are you interested in ?
To Alex:
Yes, I also think it would be great to use 32-bit ARMs in ldmicro. That's what I use now with my students after using a few PICs and several AtMegas for years.
I used the last version on Github for my trials (4.4.3.0).
For the time being only I/O pins are working on 8 bits. I can generate with ldmicro a full c program using ST libraries, which is compiled via ArmGcc and loaded into the target via flashMCU (modified) script. All this without exiting ldmicro.
It works with a trial program just using 1 button and 1 led !
To be continued...
I'll post a video as soon as possible.
JG
(no subject) (by Oleksiy)
To José:
>>What are you interested in?
Nosing special, just curious.
Also, I slowly try an upgrade codebase of LDmicro.
My aims are:
* made code more C++/c++11 and above
* divide compiler itself and GUI
my repo: https://github.com/slyshykO/LDmicro
(no subject) (by Alex)
hello Oleksiy, are your realeses implemented in Ihor´s ldmicro version?
(no subject) (by Oleksiy)
To Alex:
Yes, I push changes to Ihor's repo.
ldmicro 2.3 Uart bug (formatted strings) fixed ? (by José GILLES)
To Oleksiy:
You're right when you say that ldmicro sources derived from 2.3 version are a bit old fashioned nowadays. To be more efficient, it ought to be (re)written in C++, because contacts are naturally objets ! Menus and dialogs should be implemented as resources, as you're doing... But all this is a lot of work.
To Alex:
I have worked today on our UART problem with my ATMega328 under ldmicro 2.3+. In fact, as you probably know, the problem is general: it's not a bug in my UART, since the same phenomenon occurs with ATMega16, ATMega8 and - I suppose - all other targets. It'a bug in formatted strings implementation in ldmicro 2.3
I believe I have fixed this bug in my "2.4" release by modifying pieces of code in intcode.cpp. As far as I have tested it, strings via uart work in simulation and truly on my ATMega16 and ATMega328.
Your ladder called "swatch3" now works fine too !
Can you try it with your simulator ?
Attached zip file includes my new "2.4" fr executable and several ld files, among which the "famous" bug of not connected strings but sending chars ! It does no longer send anything.
If you confirm that it works for you too, I'll post the source files and an english version for those who may be interested.
JG
(no subject) (by Alex)
Thanks a lot José GILLES now it works fine, at 0:35 second of the video it had some problem , it freezes , tested again for 5 minutes it worked very well without any problems, at 0:35 second it is more probably just simulation, i had same problem with Ihor´s but when implemented in real life it worked very well, now i am going for a trip for some days, after that i´ll test it in real life, thanks again :)
https://www.youtube.com/watch?v=OhgkN9dKAMY&feature=youtu.be
btw: i was listening some music during video recording sorry for that
(no subject) (by Alex)
would it be possible to have it in spanish and english? also memory usage of 328p
(no subject) (by José GILLES)
Hi
I have created a repository on Github:
https://github.com/joegil95/LdMicro-2.4
You'll find a zip file with all sources and different langage
executables.
What do you mean by "memory usage of 328p " ?
JG
(no subject) (by José GILLES)
Alex,
Once again I can't open your image !
Don't know why ?
José
Post a reply to this comment:
|