Hello! I'm using the P89LPC935FA microcontroller. I have written a program which involves calculation in floating numbers. While trying to compile it, I got a error message which I haven't been able to resolve. Below is the message: FATAL ERROR L210: I/O ERROR ON INPUT FILE: EXCEPTION 0021H: PATH OR FILE NOT FOUND FILE: C:\KEIL\C51\LIB\C51FPS.LIB Target not created. Could you please help. Ade
a guess: you are using the eval. Floating point is not included in the eval. Also, waaaay too many '51 apps are done with floating point, for which the '51 is singularily a bad choice. Use scaling instead of floating point, you will run faster and cheaper. Erik
Dear Erik, Yes you are right, I'm using the evaluation board. I'm quite a novice and I'm just beginning to learn the tricks. If I may ask, what do you mean by scaling? I have successfully used the below strategy to avoid floating point numbers. e.g representing 1.09 as 109/100. I however need the result to be in floating point as the figure is supposed to be used to control a servo motor so I'll be using figures like 1.02, 1.14 e.t.c. Is there a way of solving this problem?
I however need the result to be in floating point as the figure is supposed to be used to control a servo motor how (e.g RS232), and in which format (e.g. ASCII) do you send it to the servo motor control? Erik
If I may ask, what do you mean by scaling? I have successfully used the below strategy to avoid floating point numbers. e.g representing 1.09 as 109/100. that IS "scaling" Erik
I'm sending pulses(PWM) to the servo using one of the ports on the microcontroller. In order to control the servo, the pulse width will vary between 1ms and 2ms with an interval of 0.02ms.
"I have successfully used the below strategy to avoid floating point numbers. e.g representing 1.09 as 109/100." I would recommend that you upgrade to the full version and use floating point rather than that kludge. Contrary to what you may have heard there is absolutely no reason not to use floating point provided: 1) You have sufficient code space. 2) Your timing requirements do not prohibit it.
I would recommend that you upgrade to the full version and use floating point rather than that kludge. That is NOT a kludge it is a recognized, accepted, apprecieated, well known, much used method when programming the '51 (and a few other architectures). Whether or use it or not has nothing to do with eval or not, but whether to run or crawl the processor. I can find several professional '51 users that will avoid floating point at all cost. If you do not like scaling, say so, but it is NOT a kludge. That some "purists" that have absolutely no idea what is going on in the real world consider efficient programming that may not be straight out of a C book but adapted to the '51 a no-no is their problem. Erik
addition to the above: If you have "all the time in the world" by all means use floating point (I do) but since this is about a servo (PID?) loop, the time consumed will "kill" you Erik
I asked: "how (e.g RS232), and in which format (e.g. ASCII) do you send it to the servo motor control?" you replied" I'm sending pulses(PWM) to the servo using one of the ports on the microcontroller. In order to control the servo, the pulse width will vary between 1ms and 2ms with an interval of 0.02ms." Thewn, where does the floating point requirement come in? The PWM timer or PCA (if using timer, have a look at a PCA chip) is in microseconds anyhow. Just calculate all in, say, multiples of 10 microseconds instead of using seconds or milliseconds and all reasons for considering floating point disappear. Erik
Thanks very much. I'll try that. Also, I think stefan was refering to the evaluation board as kludge and not the idea of scaling. i'll let you know if i have any further problems. cheers. ade
View all questions in Keil forum