CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Re: PIC code etc.

on 2001-02-28 10:49:47 UTC
Hi Tony,

I've got the CCS 'C' compiler, only simple work with it so far. No
ICE. I'll check out the URL's, thanks.

Driving a single motor by commanding "steps" is fine. No need for
floating point there. Trouble comes in when doing interpolation. I was
doing long * long, and overflowed on a 10" move. Not very pretty! Back
to FP.

The 2 and 4 line LCD's along with 16 to 20 key keypads makes a nice
package. And the L297/298's seem Ideal. Are you getting microstepping,
or just half step? This is a project that Bill and I were talking about
doing, just for our own use. The limited lines of display DO pose an
interesting UI problem! But I sure could use some floating point!

Best Regards,

Alan KM6VV

Tony Jeffree wrote:
>
> At 08:04 28/02/2001 +0000, you wrote:
> >What are you using to write code for the 16F877?
>
> I use a commercial "C" compiler - see:
>
> http://www.fored.co.uk/
>
> The development system I am using is a beast called "Icebreaker" (see
> http://www.magenta2000.co.uk/) - does in-circuit breakpointing etc. The
> drawback is that it uses proprietary code in the PIC & only gives access to
> the lower 4K of memory. Would be no problem to use a different dev board
> though - FED supply one of their own.
>
> >I have a friend using
> >two in a dive computer. What do you do for the floating point?
>
> I don't use floating point. For stepper drive use, integer/fixed point
> calculations are much more useful - even essential - you don't want the
> inherent rounding errors associated with floating point calculations to
> creep up on you as accumulated errors in your calculation of the
> current/desired position. With integer/fixed point calculations you can
> always keep to within +- 1/2 step of the desired position if you do the
> calcs right. However, that side of the project is early days yet...I'm
> fighting with the user interface right now - provided by a 2 by 16
> character LCD display plus a 16-key keypad. As always with this kind of
> project, the "guts" of the software is less than 10% of the total needed to
> interface the machine to a human operator in a sensible way. My prototype
> will drive a stepper a known number of steps, ramping up & down between min
> & max speeds; the next trick is to get the number of steps & the speeds
> into the machine by some means other than using debug!
>
> The driver stage is L297/L298; seems pretty easy to interface the PIC to
> these devices. I haven't bothered to opto-isolate between the PIC and the
> L297, and haven't seen that cause any problems as yet.
>
> So far, I'm only attempting to drive one stepper; however, I don't see any
> reason why the 16F877 shouldn't be able to handle a couple of motors, maybe
> more, but I've not measured its maximum stepping rate yet. Certainly no
> shortage of I/O lines on the PIC, and I am not making the most efficient
> use of them right now.
>
> Regards,
> Tony

Discussion Thread

Tony Jeffree 2001-02-28 00:44:08 UTC Re: PIC code etc. Alan Marconett KM6VV 2001-02-28 10:49:47 UTC Re: [CAD_CAM_EDM_DRO] Re: PIC code etc. Henrik Olsson 2001-02-28 11:37:54 UTC Re: [CAD_CAM_EDM_DRO] Re: PIC code etc. Alan Marconett KM6VV 2001-02-28 14:06:17 UTC Re: PIC code etc.