Difference between revisions of "DsPIC30F 5011 Development Board"

From OpenCircuits
Jump to navigation Jump to search
 
Line 53: Line 53:
 
===Selected Chip===
 
===Selected Chip===
 
*dsPIC30F, dsPIC30F5011
 
*dsPIC30F, dsPIC30F5011
 +
 +
 +
==Programming Methods==
 +
 +
*There are 2 programming methods: In-Circuit Serial Programming (ICSP) and Run-Time Self-Programming (RTSP)
 +
*ICSP allows the devices to be programmed after being placed in a circuit board.
 +
*RTSP allows the devices to be programmed when an embedded program is already in operation.
 +
 +
===ICSP===
 +
*Two types of ICSP are available: '''ICSP''' and '''Enhanced ICSP'''. Both of them require setting ^MCLR to V<sub>IHH</sub> (9V – 13.25V).
 +
*Standard ICSP
 +
**Use external programmer (e.g. MPLAB<sup>®</sup> ICD 2, MPLAB<sup>®</sup> PM3 or PRO MATE<sup>®</sup> II) only.
 +
**Required low-level programming to erase, program and verify the chip.
 +
**Slower, because codes are serially executed.
 +
**Refer to ''Section 11'' for programming in ICSP.
 +
**Program memory can be erased using ''Normal-Voltage'' (4.5 – 5.5V) or ''Low-Voltage'' (2.5V – 4.5V).
 +
 +
*Enhanced ICSP
 +
**Use external programmer and '''Programming Executive''' (PE).
 +
**PE is stored in the on-chip memory.
 +
**PE allows faster programming.
 +
**PE can be downloaded to the chip by external programmer using the standard ICSP method.
 +
**PE contains a small command set to erase, program and verify the chip, avoiding the need of low-level programming.
 +
**Refer to ''Section 8'' for programming the PE.
 +
 +
*Hardware Interface
 +
{| border="1" cellspacing="0" cellpadding="5" align="center"
 +
|+ Table 3.1 Pin Used by ICSP
 +
! Pin Label !! Function !! Pin Number
 +
|-
 +
| ^MCLR || Programming Enable|| 7
 +
|-
 +
| V<sub>DD</sub> || Power Supply || 10, 26, 38, 57
 +
|-
 +
| V<sub>SS</sub> || Ground || 9, 25, 41, 56
 +
|-
 +
| PGC || Serial Clock || 17
 +
|-
 +
| PGD || Serial Data || 18
 +
|-
 +
|}
 +
 +
 +
{| border="1" cellspacing="0" cellpadding="5" align="center"
 +
|+ Table 3.2 Available Programmers in the Market
 +
! Product Name
 +
! Interface with PC
 +
! Interface with Device
 +
! Price (US)
 +
! Postage (US)
 +
! Total (US)
 +
|-
 +
| [http://direct.www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010046&part=DV164005 MPLAB<sup>®</sup> ICD 2]
 +
| USB/RS232
 +
| [http://www.microchip.com/Microchip.WWW.SecureSoftwareList/secsoftwaredownload.aspx?device=en010046&lang=en&ReturnURL=http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010046&part=DV164005# 6-PIN RJ-12 connector]
 +
| $159.99
 +
| -
 +
| -
 +
|-
 +
| [http://www.kanda.com/index.php3?cs=1&bc=direct&bw=%2Fbrowse.php3%3Fnode%3D114%26semisupport%3D PRESTO PIC Programmer Plus]
 +
| USB
 +
| ?
 +
| $200.16
 +
| $15.00
 +
| $215.16
 +
|-
 +
| [http://www.etekronics.com/product_info.php?cPath=24&products_id=48  Full Speed USB Microchip ICD2<br> Debugger and Programmer]
 +
| USB
 +
| 6-PIN ICSP connector<br>6-PIN RJ-12 connector
 +
| $72.00
 +
| $12.00
 +
| $84.00
 +
|-
 +
| [http://www.etekronics.com/product_info.php?cPath=24&products_id=47 Mini Microchip Compatible ICD2<br> Debugger and Programmer]
 +
| RS232
 +
| 6-PIN ICSP connector<br>6-PIN RJ-12 connector
 +
| $45.00
 +
| $10.00
 +
| $55.00
 +
|-
 +
| [http://www.inexglobal.com/microcontroller.php ICDX30]
 +
| RS232
 +
| 6-pin RJ-11
 +
| $51.00
 +
| $47.46
 +
| $98.46
 +
|-
 +
| [http://www.sure-electronics.net/englishsite/icd2/icd2.htm Clone Microchip ICD2]
 +
| RS232
 +
| 6-pin flat cables
 +
| $30.00
 +
| $12.00
 +
| $42.00
 +
|-
 +
|}
 +
 +
 +
{| border="1" cellspacing="0" cellpadding="5" align="center"
 +
|+ Table 3.3 DIY ICD 2 Programmer Circuit
 +
! Source !! Schematic !! PIC16F877A Bootloader
 +
|-
 +
| [http://membres.lycos.fr/silicium31/Electronique/PIC/FreeIcdEnglish.htm Patrick Touzet]
 +
| [http://membres.lycos.fr/silicium31/Electronique/PIC/ICD2%20V1.3.pdf Yes]
 +
| [http://membres.lycos.fr/silicium31/Electronique/PIC/ICD2_FW.zip HEX]
 +
|-
 +
| [http://www.nebadje.org/doku.php?id=neblab:icd2clone Nebadje]
 +
| [http://people.ee.ethz.ch/~jbiveron/nebadje/ICD2_DOC.pdf Yes]
 +
| [http://people.ee.ethz.ch/~jbiveron/nebadje/ICD2_FW.zip Zip]
 +
|-
 +
|}
 +
 +
*Software Interface
 +
**The program can be written and compiled in an Integrated Development Environment (IDE) using either Assembly or C. The complied codes are then loaded to the device through the external programmer.
 +
 +
 +
{| border="1" cellspacing="0" cellpadding="5" align="center"
 +
|+ Table 3.4 Summary of IDE
 +
! Product Name !! Features !! OS !! Price (US$)
 +
|-
 +
| [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469&part=SW007002 MPLAB<sup>®</sup> IDE]
 +
| Assembler Only
 +
| Windows
 +
| Free
 +
|-
 +
| [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012 MPLAB<sup>®</sup> C30]
 +
| Assembler and C-Compiler
 +
| Windows
 +
| $895.00 (Free student version<sup>1</sup>)
 +
|-
 +
| [http://linux.softpedia.com/get/Science-and-Engineering/Electronic-Design-Automation-EDA-/Piklab-8099.shtml Piklab 0.12.0]
 +
| Assembler and C-Compiler
 +
| Linux
 +
| Free<sup>2</sup>
 +
|}
 +
# Full-featured for the first 60 days. After 60 days only optimization level 1 can be enabled in the compiler. The compiler will continue to function after 60 days, but code size may increase.
 +
# The current version supports external programmer ICD 2, but not yet tested.
 +
 +
===RTSP===
 +
*RTSP works in normal voltage (^MCLR no need to raise to V<sub>IHH</sub>).
 +
*No literature has mentioned the incorporation of Programming Executive (PE). Presumably, since Enhanced ICSP needs to set ^MCLR to V<sub>IHH</sub>, RTSP cannot use PE.

Revision as of 22:20, 14 November 2006

Introduction

Web Page

  • Microchip
    • dsPIC 16-bit Embedded Control Solutions Brochure
    • dsPIC30F Family Overview

Forum

  • PICList: Discussion on older PIC systems (not dsPIC)
  • PicKit: Discussion on PICkit/PICkit 2 programmers

References

Features of dsPIC

  • Advantages
    • 2.5 to 5V
    • High current/sink source I/O pins: 25mA
    • with DSP Instruction Set
    • Dual programming techniques: ICSP and RTSP
    • UART: up to 2 modules
    • I2C: up to 1Mbps
    • 10-bit A/D, 1.1 Msps
    • 12-bit A/D, 500 ksps
    • around 64K flash, 4K RAM, 1K eeprom
  • Disadvantages
    • No DAC

Selected Chip

  • dsPIC30F, dsPIC30F5011


Programming Methods

  • There are 2 programming methods: In-Circuit Serial Programming (ICSP) and Run-Time Self-Programming (RTSP)
  • ICSP allows the devices to be programmed after being placed in a circuit board.
  • RTSP allows the devices to be programmed when an embedded program is already in operation.

ICSP

  • Two types of ICSP are available: ICSP and Enhanced ICSP. Both of them require setting ^MCLR to VIHH (9V – 13.25V).
  • Standard ICSP
    • Use external programmer (e.g. MPLAB® ICD 2, MPLAB® PM3 or PRO MATE® II) only.
    • Required low-level programming to erase, program and verify the chip.
    • Slower, because codes are serially executed.
    • Refer to Section 11 for programming in ICSP.
    • Program memory can be erased using Normal-Voltage (4.5 – 5.5V) or Low-Voltage (2.5V – 4.5V).
  • Enhanced ICSP
    • Use external programmer and Programming Executive (PE).
    • PE is stored in the on-chip memory.
    • PE allows faster programming.
    • PE can be downloaded to the chip by external programmer using the standard ICSP method.
    • PE contains a small command set to erase, program and verify the chip, avoiding the need of low-level programming.
    • Refer to Section 8 for programming the PE.
  • Hardware Interface
Table 3.1 Pin Used by ICSP
Pin Label Function Pin Number
^MCLR Programming Enable 7
VDD Power Supply 10, 26, 38, 57
VSS Ground 9, 25, 41, 56
PGC Serial Clock 17
PGD Serial Data 18


Table 3.2 Available Programmers in the Market
Product Name Interface with PC Interface with Device Price (US) Postage (US) Total (US)
MPLAB® ICD 2 USB/RS232 6-PIN RJ-12 connector $159.99 - -
PRESTO PIC Programmer Plus USB ? $200.16 $15.00 $215.16
Full Speed USB Microchip ICD2
Debugger and Programmer
USB 6-PIN ICSP connector
6-PIN RJ-12 connector
$72.00 $12.00 $84.00
Mini Microchip Compatible ICD2
Debugger and Programmer
RS232 6-PIN ICSP connector
6-PIN RJ-12 connector
$45.00 $10.00 $55.00
ICDX30 RS232 6-pin RJ-11 $51.00 $47.46 $98.46
Clone Microchip ICD2 RS232 6-pin flat cables $30.00 $12.00 $42.00


Table 3.3 DIY ICD 2 Programmer Circuit
Source Schematic PIC16F877A Bootloader
Patrick Touzet Yes HEX
Nebadje Yes Zip
  • Software Interface
    • The program can be written and compiled in an Integrated Development Environment (IDE) using either Assembly or C. The complied codes are then loaded to the device through the external programmer.


Table 3.4 Summary of IDE
Product Name Features OS Price (US$)
MPLAB® IDE Assembler Only Windows Free
MPLAB® C30 Assembler and C-Compiler Windows $895.00 (Free student version1)
Piklab 0.12.0 Assembler and C-Compiler Linux Free2
  1. Full-featured for the first 60 days. After 60 days only optimization level 1 can be enabled in the compiler. The compiler will continue to function after 60 days, but code size may increase.
  2. The current version supports external programmer ICD 2, but not yet tested.

RTSP

  • RTSP works in normal voltage (^MCLR no need to raise to VIHH).
  • No literature has mentioned the incorporation of Programming Executive (PE). Presumably, since Enhanced ICSP needs to set ^MCLR to VIHH, RTSP cannot use PE.