Re: PIC or Freescale HC08 ??




<r.laury@xxxxxxxxxxx> wrote in message
news:zfGdnb4JbbkxFrrZnZ2dnUVZ_tqdnZ2d@xxxxxxxxxxxxxx
Hi Group:
I've got a project that I'm contemplating that needs:

To read a keypad with 20 switches.
Control 7 digits of 7 seven segment displays.
Generate pulses for a small stepper motor. (full step and micro step)
Possible control of a brushless servo motor with encoder feedback.
Monitor a few simple sensors.
A few hundred bytes of RAM is enough.
Program size with lookup tables ect, should be under 4-6K.
Flash would be nice.

I've never worked with the PIC and looking at their product line up
there's just too many to chose from.
I have worked with the Motorola stuff (HC05) but they are not making
anymore HC05 parts.
My question is, What PIC would you use to do the above. Or maybe use
several PIC's to get the job done?
Or would you just go for one of the bigger HC08's?

Thanks!
Any input appreciated.

RonL
MicroStepping, is quite a complex thing in itself. You need to generate
sinusoidal drives, to two different power drive branches. Now there are
several PICs that can do this, but you would end up using both PWM outputs
(most PICs have 2*PWM), which then leaves you without PWM's for the servo
control application.
I suspect I'd probably look at the Allegro A3977 to drive the stepper,
which removes the need for seperate power FETs, clamp diodes etc.. This
then leaves the PWM outputs available for servo control.
These days, flash is cheaper, an simpler for any limited size production
run, and is 'standard' on most parts.
Now there is the question of 'what interface' for the 'sensors'. Mst PICs
will offer ADC's, I2C. SPI, and sync/asynch serial.
Depending on the number of 'encoder counts' for the servo motor, and the
rotational speed, there are some PICs with encoder inputs, which would
allow handling at very high speeds, while most PICs could handle lower
rates, using the 'interrupt on change' ability.
The LED drives, and keypad scanning, are just down to number of pins. You
need 7 bits to control the segments (possibly 8, if you have a decimal
point?), and three bits (using a 3-8 line decoder) to address the digits
(or 7 bits for direct drive). On the keypad, 4*5 lines.
So assuming you use the Allegro chip, say 11 bits for the LEDs, 9 bits for
the keypad, 2 bits for the stepper (step/dirn), 3 bits for an H-bridge for
the servo (a PWM output, and two control bits), 2 bits for the quadrature
inputs, and leave perhaps 6 bits for the 'sensors'. This puts you as
needing a minimum of 33 I/O lines.
I'd probably look at the PIC18F4331, or 4431. The 'F' means 'flash'. These
chips are 40 pin DIP packages, with 36 I/O lines, including up to 9 ADC
inputs (or eight, if you use an external reference voltage). They have a
quadrature encoder built in, and 2 PWM outputs. 768 bytes of RAM,
4096/8192 'words' of program memory respectively, 256 bytes of EEPROM,
UART, SPI, & I2C.

Best Wishes



.



Relevant Pages

  • Re: looking for THE dc drive motor speed controller solution
    ... DC drive gear motors, but it appears that PWM from one device is ... Acroname Moto 1.0 module or Servo Controller module until I ... that I can't get the speed control granularity I want that way --- ... There are a couple of different types of drives (signed magnitude, ...
    (comp.robotics.misc)
  • Re: Piper Altimatic II autopilots - some can be made to work!
    ... Both the pitch and roll servo motors have a bevel gear which ... The control cables push / pull the servo motors much like a throttle ... I flew an ILS using only the autopilot controls for ...
    (rec.aviation.owning)
  • Re: Two inverter drive questions
    ... Second, more trivial, the specified speed control pot is 2.5K. ... Drives do not like frequent power cycles. ... not like to have someone using a contactor switching under load. ... Supply is Single phase via a 3-phase rotary converter, ...
    (uk.rec.models.engineering)
  • Re: Two inverter drive questions
    ... Second, more trivial, the specified speed control pot is 2.5K. ... I don't have the main manual for the inverter, ... Drives do not like frequent power cycles. ... Supply is Single phase via a 3-phase rotary converter, ...
    (uk.rec.models.engineering)
  • Re: Two inverter drive questions
    ... where the motor is running all the time the lathe is in use. ... Second, more trivial, the specified speed control pot is 2.5K. ... Drives do not like frequent power cycles. ... Supply is Single phase via a 3-phase rotary converter, ...
    (uk.rec.models.engineering)