dsPIC33FJ256GP506A micro-controller for many purposes

Discussion in 'Embedded Systems and Microcontrollers' started by alphaxindia, Jul 8, 2012.

  1. alphaxindia

    Thread Starter New Member

    Apr 7, 2010
    6
    0
    Thanks reading my query.

    I want to run 8 dc motors (forward, reverse and brake). 8 Potentiometers to get digital position of output shaft. I also want to control voltage of DC motors (all 8) so that its RPM can be manipulated.

    DC motors are small size 6vdc upto 500mA current drain.
    Standard analog potentiometers are to be used.

    I want to control above devices from ethernet (ENC28J60-Ethernet-Module) with SPI.

    I want to Program dsPIC33FJ256GP506A microcontroller for this purpose.

    Is my selection of MCU correct? Can I control 8 motors and 8 A-D values of Potentiometers by connecting ethernet?

    MCU has Memory of 256Kb, and RAM 16384 bytes. Other specs are:



    Analog-to-Digital Converters (ADCs):


    Up to two ADC modules in a device
    10-bit, 1.1 Msps or 12-bit, 500 Ksps conversion:
    - 2, 4 or 8 simultaneous samples
    - Up to 32 input channels with auto-scanning
    - Conversion start can be manual or synchronized with 1 of 4 trigger sources
    - Conversion possible in Sleep mode
    - ±2 LSb max integral nonlinearity
    - ±1 LSb max differential nonlinearity

    Timers/Capture/Compare/PWM:


    Timer/Counters, up to nine 16-bit timers:
    - Can pair up to make four 32-bit timers
    - 1 timer runs as Real-Time Clock with external 32.768 kHz oscillator
    - Programmable prescaler
    Input Capture (up to 8 channels):
    - Capture on up, down or both edges
    - 16-bit capture input functions
    - 4-deep FIFO on each capture
    Output Compare (up to 8 channels):
    - Single or Dual 16-Bit Compare mode
    - 16-bit Glitchless PWM mode

    3-wire SPI (up to 2 modules):
    - Framing supports I/O interface to simple codecs
    - Supports 8-bit and 16-bit data
    - Supports all serial clock formats and sampling modes
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    So to read 8 position pots you need 8 "AN" inputs. Check.

    To drive 8 outputs you could use a PWM output which the "CN" outputs provide. Check.

    SPI interface for ethernet use. Check.

    Forward/Reverse will need a line to drive it as will the brake. That's 16 more general purpose I/O lines.

    What you should do at this point is print out one of the pin diagrams and pencil in the function each pin will serve. If you run out of pin requirements before you run out of pins to use you should be good. Do leave the program data and clock lines free to give yourself the ability to debug this while it's running.

    PICs like the dsPIC33FJ256GP506A have lots of program space to run a bunch of motors.
     
Loading...