PIC18+MCU

toc =PIC18 MCU= PIC18 MCU is an 8-bit architecture from [|Microchip Technologies Inc.] Among myriad of PIC18 MCU we selected PIC18F8628 that matches our requirement.

The MCU is evaluated below and meets all our requirement but for a price as its evaluation boards costs $174. Therefore, it is not recommended for being out of our budget.

Summary of features
Table 1 - Summary of features
 * Architecture || 8 bit ||
 * Operating Frequency || 40 MHz ||
 * Program Memory Type || Flash ||
 * Program Memory (KB) || 96 ||
 * CPU Speed (MIPS) || 10 ||
 * RAM Bytes || 3,936 ||
 * Data EEPROM (bytes) || 1024 ||
 * Digital Communication Peripherals || 2-A/E/USART, 2-MSSP(SPI/I2C) ||
 * Capture/Compare/PWM Peripherals || 2 CCP, 3 ECCP ||
 * Timers || 2 x 8-bit, 3 x 16-bit ||
 * ADC || 16 ch, 12-bit ||
 * Comparators || 2 ||
 * Temperature Range (C) || -40 to 125 ||
 * Operating Voltage Range (V) || 2 to 5.5 ||
 * Pin Count || 80 ||

Special Feature

 * **CCP Modules:** All devices in the family incorporate two Capture/Compare/PWM (CCP) modules and three Enhanced CCP (ECCP) modules to maximize flexibility in control applications. Up to four different time bases may be used to perform several different operations at once. Each of the three ECCP modules offer up to four PWM outputs, allowing for a total of 12 PWMs.


 * **10-bit A/D Converter:** This module incorporates programmable acquisition time, allowing for a channel to be selected and a conversion to be initiated without waiting for a sampling period and thus, reduce code overhead.

PIC18 Explorer Board
PIC18 Explorer Board is an evaluation board for PIC18 MCU. It is available at USD $99.99 [|here].

The PICDEM PIC18 Explorer Demonstration Board has the following hardware features with each feature’s number corresponding to the number in Figure 3 that shows the feature’s location on the board:


 * 1) PIC18F8722 microcontroller – The sample, primary microcontroller mounted on the board.
 * 2) Male header pins for connecting Plug-In Modules (PIMs). A PIM enables an alternate PIC18 device to be connected to the board, as the primary microcontroller.
 * 3) In-Circuit Debugger (ICD) connector.
 * 4) Six-pin, PICkit™ 2 connector.
 * 5) 10 kΩ potentiometer for analog inputs.
 * 6) Push button switch – For external Reset.
 * 7) USB connector – For RS-232 communication.
 * 8) PIC18LF2450 microcontroller – For converting RS-232 communication to USB protocol for attachment of a host PC.
 * 9) 12 MHz crystal – For the PIC18LF2450 microcontroller.
 * 10) RS-232 DB9 socket and associated hardware – For direct connection to an RS-232 interface.
 * 11) Jumper J13 for routing RS-232 communication through either the USB port or the RS-232 socket.
 * 12) Jumper J4 – For selecting between programming the main PIC® device or the PIC18LF2450, used for USB to RS-232 communication.
 * 13) Switch S4 – For designating the main microcontroller as either the board-mounted PIC18F8722 or a PIM-mounted microcontroller.
 * 14) LED – For power-on indication.
 * 15) JP1 – For disconnecting the eight display LEDs.
 * 16) Eight LEDs.
 * 17) 32.768 kHz crystal – For Timer1 clock operation.
 * 18) Two push button switches – For external stimulus.
 * 19) Analog temperature sensor, MPC9701A.
 * 20) 25LC256 SPI EEPROM.
 * 21) JP2 – To enable/disable EEPROM.
 * 22) JP3 – To enable/disable LCD.
 * 23) 10 MHz crystal – For the main microcontroller.
 * 24) PICtail™ daughter board connector socket.
 * 25) SPI I/O expander – For LCD display, MCP23S17.
 * 26) Prototype area – For user hardware.
 * 27) LCD display.
 * 28) J2 three-pin, male header – For selecting between a voltage of 3.3V or 5V.
 * 29) J14 four-pin, male header – For use with a PIM, if required, to connect 3.3V or 5V, VIN and ICE MCLR.



MPLAB ICD 3 In-Circuit Debugger
MPLAB ® ICD 3 In-Circuit Debugger System is Microchip's most cost effective high-speed hardware debugger/programmer for Microchip Flash Digital Signal Controller (DSC) and microcontroller (MCU) devices. It debugs and programs PIC® Flash microcontrollers and dsPIC® DSCs with the powerful, yet easy-to-use graphical user interface of MPLAB Integrated Development Environment (IDE).

The MPLAB ICD 3 In-Circuit Debugger probe is connected to the design engineer's PC using a high-speed USB 2.0 interface and is connected to the target with a connector compatible with the MPLAB ICD 2 or MPLAB REAL ICE systems (RJ-11). MPLAB ICD 3 supports all Emulation header.



Evaluation
This MCU runs at 40 MHz clock speed with throughput of 10 MIPS. It definitely is enough for our application and haptics implementation as we require at least 1 MHz refresh rate.
 * Microcontroller speed (MIPS, clock speed for communications channels, etc.):**

It supports 94 KB flash memory. This amount should be more than enough for our application.
 * The memory sizes (program memory/ Flash, RAM, data EEPROM):**

There are total of general 70-bit I/O pins. This amount is enough for our application. We need to be able to generate PWM from these pins, capture/compare incoming pulses, generate delays using timer/counter. We require at least 10 dedicated PWM pins since we are using 10 servos. Also, we would need some extra pins for collision sensors. Discussed below.
 * The number of I/O pins required:**

This particular MCU supports serial communication interfaces, such as UART, I2C, and SPI. MCU carries total of 2 CCP and 3 ECCP pins. Each of CCP pins can generate one PWM while each of 3 ECCP pin can generate 4 PWM signals, it comes down to total of 14 PWM signals. There are two 8-bit and three 16-bit timers, 12-Bit 16 ADC channels and two compartors.Consequently, this MCU packs more than enough number of I/O pins for our application.
 * Peripherals needed (ADC, Input Capture, Output Compare, Motor Control PWM, SPI™, UART, etc.):**

No explicit size is mentioned but its not our main requirement.
 * Physical Size (form factor/package):**

MCU operates at 2 V or .55 V supply. But it is not our concern as we will use dedicated power supply.
 * Analog Input Voltage Levels:**

MCU uses C language for development of software. There are several debugging tools avaiable, such MPLAB ICD 3 In-Circuit Debugger mentioned above.
 * Programming Language:**

The board costs USD 165.00 at following [|retailer]. It comes down to CAD 174.00.
 * Cost:**