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 - Help PIC18F4520

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

Help PIC18F4520 (by Bogdan)
Help me PIC18F4520 (by Bogdan)
Please help me compile the file for PIC18F4520
Thank you!
Mon Jan 17 2022, 03:23:30, download attachment test.jpg
(no subject) (by José)
Hi Bogdan

You seem to use ldmicro32 v 5.5 ?

Your attached image doesn't show any error but it's not complete ; can you send a full capture of the script output ?

If there's no error, you'll find the hex file in HTC\bin subfolder of your project...

Best regards
José
Mon Jan 17 2022, 04:58:14
(no subject) (by Bogdan)
Hi José!
I use LdMicro32-6.0a.zip and Compiler-HTC-Pic18_9.80.zip.

Thank you!
Mon Jan 17 2022, 06:02:37, download attachment test.zip
(no subject) (by José)
Hi Bogdan

There seems to be an error in your build because no hex is generated ; but I still can't see which error because your build capture is not complete !

To simplify build, you can remove in HTC\Lib some libraries you don't need for this project: ADC, I2C, LCDI2C, PWM, SPI and UART
before rebuilding

I have tested the ladder (one of my examples) and it compiles fine on my computer.

Here's attached the full output that I get + hex file.

If I can se the error it shout be solvable.
Beware (maybe) of your antivirus software ?

BR
José
Mon Jan 17 2022, 10:07:53, download attachment build.zip
(no subject) (by Bogdan)
Hi José!
connected the xc8-v2.32 compiler, but now the error
Is it possible to work with XC8?
Tue Jan 18 2022, 02:33:45, download attachment XC8 LD test.zip
(no subject) (by José)
No, source code and building are not adapted to XC8.

There's no reason which it shouldn't work with HTC compiler.
Tue Jan 18 2022, 06:51:28
(no subject) (by Bogdan)
Hi José!
Thanks! Now everything works, you just need to specify the path to
:: compile main file
c: \ LDmicro \ Compilers \ Pic18 \ bin \ picc18.exe --pass1% ~ nx2.c -q --chip =% 3 -P --runtime = default -I% 1 \ HTC \ lib --opt = default -g --asmlist --OBJDIR = HTC \ obj

Does not work UART Simulation (Terminal) installed Ldmicro32-6.0a-en.
Thank you!
Sun Jan 23 2022, 08:34:46, download attachment terminal.zip
(no subject) (by Bogdan)
And yet, ADC simulator max up to 10
Sun Jan 23 2022, 09:44:59
(no subject) (by José)
OK Bodgan

That' fine if you can use your PIC18F4520 with Ldmicro32-6.0 !

Concerning UART Simulation : formatted strings are not supported by the simulator...

BR
José
Sun Jan 23 2022, 15:11:06
(no subject) (by Bogdan)
Good afternoon José
When compiling, there are warnings, text in the file.
Mon Jan 24 2022, 09:44:45, download attachment 2022-01-24_163654.jpg
(no subject) (by José)
Yes

It's normal ; in Ldmicro32 v6 the new C code generated has labels based on Rung numbers.

As these label are generally not used, some compilers (ie HTC) print a warning ; it doesn't matter at all.

I can hardly remove the labels because of the GOTO ladder instruction which makes a jump to a specific rung number ; and the GOTO can be far below the rung...
And they can be used to compare C code and source ladder.

BR
José
Mon Jan 24 2022, 12:00:56
(no subject) (by Bogdan)
Thank you very much, it works in the controller PIC18F452, if you can look at the ACD simulator, slider gives a maximum value of 10.
Sincerely, Bogdan
Tue Jan 25 2022, 06:46:34, download attachment 2022-01-25_133404.jpg
(no subject) (by José)
You're right Bogdan !

I have solved this disagreement for next release of ldmicro32 v6.
Wed Jan 26 2022, 03:37:47
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):