CAD CAM EDM DRO - Yahoo Group Archive

Re: PICS as replacements for L297s

on 2001-04-21 12:06:00 UTC
----- Original Message -----
From: "Alan Rothenbush" <beer@...>

> If using the ubiquitous F84, though, you have to be a bit more clever to
ensure
> operation with all three types of signals. It IS possible,
though,
> as the F84, while officially lacking an interrupt, has something
> even better for this particular task !

The 16F84A does have Interrupt on RB0, interrupt on PortB change 7:4 and the
normal Timer 0 interrupt and eeprom write completion interrupt. Haven't
looked at the F84 data sheet though.

> But resist the temptation to use Basic .. in fact, just don't do it for
> THIS sort of project. For projects less time-critical, go right ahead.
> But for this one, learn assembly language.

I generally agree. But the Basic compilers for the PIC produce good code. So
do some of the C
compilers. I prefer the Bytecraft MPC compiler for day to day work with a
PIC. I would only use
the CCS PIC C for hobby work. Hi-Tech C compiler is good but I just haven't
warmed up to it.
I also use the Microchip 18C compiler for the 18CXXX series. I like it as
well as the Bytecraft compiler.

The product I did with two encoders on PORTB and an interrupt on RB0 is all
done with the Bytecraft C compiler. The ISR's are all in C. It does real
time PWM motor control and communicates via RS-485 to control / display
units which also use 16F877's. No Assembly in the source code anywhere.

> Do yourself a favour and DON'T use Microchip's assembler.
>
> Use CVASM16 from Tech-Tools .. it's an 8051 like assembler that uses
mnemonics
> that are almost human readable. It will be a little bit more work to use
some
> of the other tools you might need, but the learning curve is a lot
shorter.

Coming from a heavy 80X86 Assembly background I agree that the Tech-Tools
neumonics are easier to use than the Microchip version. ( previously
Parallax Inc. Tech Tools bought out the PIC stuff when Parallax started
working with Scenix )

However, I'd say if you are starting out, go ahead and learn the Microchip
version. Then if you do progress into bigger and better things and happen to
get a Microchip ICE, you will already be used to writing in what you'll have
to debug in. ( you can get the Tech Tools ICE though )

Also, Microchip instructions are rather cryptic compared to Intel type
instructions. But if you ever pick up another processor like a Texas
Instruments DSP chip, you'll have an easier time. TI DSP chips have the
single worst instruction set I've ever had to use. Now that stuff will make
your head hurt!

A DSP chip however would be a better choice for a stepper controller than a
PIC if you want to make a fancy controller. ( microstepping, acceleration
curves etc ) I'm just not that ambitious though.

later,
Larry E.

Discussion Thread

Alan Rothenbush 2001-04-21 10:05:28 UTC Re: PICS as replacements for L297s Larry Edington 2001-04-21 12:06:00 UTC Re: PICS as replacements for L297s