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 - can't compile the file for 12f675 Hi-tech-c file

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

can't compile the file for 12f675 Hi-tech-c file (by MedTronic)
dear my friend i desing a program to test the adc for 12f675
the file is working good when compiling it to hex but it can't compile for hi-tech C compiler there is some errors which i can't fix
please tell me why i can't compile for hi-tech C and what can i do

thanks
best regards
Sat Dec 2 2023, 14:27:21, download attachment 12FADC.ld
(no subject) (by MGP)
I can compile the LD file to Hi-tech C without any problems, you must be doing something wrong.
Sun Dec 3 2023, 02:07:19
(no subject) (by Medtronic)
Dear my friend did you test the attached file?
Sun Dec 3 2023, 07:55:54
(no subject) (by MGP)
Yes, how else could I know.
Attached is the .C file in Hi-tech C
Sun Dec 3 2023, 10:48:21, download attachment 12FADC.c
(no subject) (by MedTronic)
Hi my friend MGP
what is the version of ldmicro you used to compile the program
also can you check the file you already attached look at the function

void setupPlc(void) {
// Set ports as digital instead of analogical (default).
setPortDigitalIO();
// Set up I/O pins direction, and drive the outputs low to start.
PORTP = 0x00; //this line gives an error
TRISP = 0xCB; //and this line also gives an error

// Turn on the pull-ups on Port B.
#ifdef CCS_PIC_C
port_b_pullups(true);
#elif defined(HI_TECH_C)
nRBPU = 0; //and this line also gives an error
#endif


please help me to overcom this problem

thank you very much

best regards
MedTronic
Sun Dec 3 2023, 13:07:40
(no subject) (by MGP)
I'm using version 5411b, you can downloaded here.
Look for Ldmicro5411b.zip in this thread.

https://cq.cx/ladder-forum.pl?...parent=11445&tt=1681945891
Sun Dec 3 2023, 15:26:39
(no subject) (by MedTronic)
dear sir it is not compiled .... you sadi you can compile without ant problem ,,what about the error please help me to comiple for pic12f675

thank you
Mon Dec 4 2023, 14:41:58
(no subject) (by MGP)
I don't know what could go wrong.

What do you want to do now?

Create a C-file from LDmicro?
Or compile the C-file that LDmicro has created with Hi-tech C?

And the 2nd question is why would you do that? the hexfile created by LDmicro should be sufficient for the 12F675 to work.
Mon Dec 4 2023, 15:14:58
(no subject) (by MGP)
Ow, I see an error, pin4 (MCLR) is input only!
Mon Dec 4 2023, 15:18:22
(no subject) (by MedTronic)
Dear my friend
thaks for your replay
there is no error for pin4(MCLR)
i already don't use pin4 .... see attachment
i know pin4 is input only but i did't use it
i tell you at the first post that the hex file generated and its run ok for compile to hex
but what if i need to simulte the c source code or if i need to watch my variables then at that time i need the hi-tech C source to debuge it
after generate the hi-tech C file i can't compile it for pic12f675 even at MPLAP IDE there are some errors as i mention befor please help me to solve this problem

thanks in advanced

Best Regards

MedTronic
Mon Dec 4 2023, 17:18:22
(no subject) (by MedTronic)
the attachment file
Mon Dec 4 2023, 17:22:42, download attachment 12f675ldmicro.png
(no subject) (by MGP)
Sorry about pin 4 it's GP4 and you're right.

But I don't use Hi-tech C so I can't help you, more so.. I never use a C-compiler, LDmicro always does the job for me.
Mon Dec 4 2023, 18:14:24
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):