⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtdm_readme.txt

📁 说明:该代码为dsPIC33F系列芯片应用范例。它说明在用MPLAB DMCI作实时调试时
💻 TXT
字号:
                     Readme File for Code Example:
               Using RTDM driver for communication with DMCI
               ---------------------------------------------------

This file contains the following sections:
1. Code Example Description
2. Folder Contents
3. Suggested Development Resources
4. Running the Code Example
5. Reconfiguring the project for a different PIC24H, dsPIC30F  and dsPIC33F device
6. Hardware Details:
7. Revision History


1. Code Example Description:
----------------------------
This code example shows how to use Real-Time Data Monitor (RTDM) to create an 
alternative link between Host PC and target device for debugging applications 
in real-time using MPLAB DMCI ( MPLAB 8.10 or higher).  
It is required to include the RTDM.C file and RTDM.h into the application project 
in order to send/receive data through the UART to/from the host PC running under 
MPLAB DMCI environment. 
DMCI included in MPLAB 8.10 or higher is ready and enabled to support data exchange 
between the host PC and target device. Previous versions of DMCI do not support this feature. 
RTDM is currently supported by PIC24H, dsPIC30F and dsPIC33F processors


Function: RTDM_Start()
Overview: Here is where the RTDM code initilizes the UART to be used to
		  exchange data wiht the host PC
Note:	  Some processors may have 2 UART modules, that is why it is required to
		  specify wich UART module is going to be used by RTDM	


Function: RTDM_ProcessMsgs()
Overview: Here is where the RTDM code process the message received and then 
		  executes the required task. These tasks are reading an specified memory
		  location, writing an specified memory location, receive a communication
		  link sanity check command, or being asked for the size of the bufffers.
		  
Function: CloseRTDM()
Overview: Here is where the RTDM code closes the UART used to
		  exchange data wiht the host PC


2. Folder Contents:
-------------------
This folder contains the following sub-folders:
a. C:\Program Files\Microchip\MPLAB C30\support\gld
    This folder will have the device GLD file, it is used for building the project. 
	This file was provided with the MPLAB C30 v3.1 toolsuite.

b. C:\Program Files\Microchip\MPLAB C30\support\h
        This folder contains C header files useful in building this
        project. Device register and bit definitions are provided in
        the *.h file that follows the device name. These files were provided
        with the MPLAB C30 v3.1 toolsuite.

c. C:\Program Files\Microchip\MPLAB C30\lib
        This folder contains library archive files, which are a
        collection of precompiled object files. The file
        named "libpic30-coff.a" contains the C run-time start-up
        library. These file were provided with the
        MPLAB C30 v3.1 toolsuite.Not used in this code example.

d. HEX
        This folder contains three file types - coff, hex and map.
        These are files generated by the MPLAB C30 v3.1 toolsuite on build
        operation performed within MPLAB IDE. The *.map file contains
        details on memory allocation for various variables, constants
        and dsPIC instructions specified in the source and library
        code. The *.hex file contains a binary file that may be
        programmed into the dsPIC device. The *.coff file contains
        a binary file that is used by MPLAB IDE for simulation.

e. H
        There is a RTDM.h file. This header file defines function prototype
		and the baud rate calculator. 
		There is a RTDMUSER.h file. This header file defines the data required
		to run the RTDM on the target devices. Informations such as UART module,
		baud rate, system frequency, etc.

f. SRC
        This folder contains all the C and Assembler source files (*.c)
		used in demonstrating the described example. You will see
		Main.c & RTDM.c files. The RTDM.c file contains required 
		routines for sending/receivind data to/from host PC.

g. OBJ
		This folder contains *.Obj files which are compiled
        	object files generated when the project is built. You will find
		RTDM.obj & Main.obj files.


3. Suggested Development Resources:
-----------------------------------
        a. MPLAB IDE v8.10 or later
        b. MPLAB C30 v3.10 or later
        c. MPLAB ICD2/RealICE 
        e. Explorer 16 Demo board with dsPIC33FJ256GP710 PIM

4. Running the Code Example
-------------------------------------------------------------
	a. Open the RTDM Code Example by double-clicking on the RTDM Code Example.mcw file.

	b. Once the MPLAB work-bench is open COMPILE the project. Select the programmer and program the target device.

	c. Go to the MPLAB main menu then tools>DMCI and then click on the Load profile button. This button
	   is located on the bottom right corner.

	d. Open the DMCI Example.dmci file.

	e. Go to the MPLAB main menu and click on the DMCI > Remote COmmunication.

	f. verify the serial communication settings. The DMCI only communicates through the comm ports 1-4
	   make sure that the settings are COMM PORT:COM1, Baudrate:115200.

	g. COnnect the dsPIC UART (depending on you HW this connector could be a DB9 female connector or a mini USB connector) 
	   to the PC serial port or to a RS232toUSB converter, again make sure that windows assign the COM PORT 1-4 to your serial comm link. 
	   To do so go to windows device manager (right-click on my PC>properties>hardware>device manager) and then click on ports (COM & LTP). 
	   identify your serial port and verify that it has assigned any number from 1 to 4. To change it double-click on the serial device and then go to
	   port settings > advance and modify the comm port number. Select any number from 1 to 4.

	h. Click on the TEST button. The DETECTED message should be displayed. If not make sure that all the RTDM settings are correct. 
	   You can check this on the RTDMUSER.h file, make sure that the RTDM settings match the DMCI comm settings. Check your Hardware and double check the PC comm 	   	   settings again.

	i. Select the "Enable Communication Option" and the "Transmit Individual..." option. Finally click on the OK button.
	
	j. On the DMCI window turn on the "SnapShot" button, this will record the values of MyVariable into the SnapSHotBuffer. On the DMCI window click on the RECEIVE 		   button, this will update the plot. 

	k. You can modify the Frequency and Amplitud by moving up/down the sliders. Also you can turn on or off the board LEDs by clicking 		on the LED buttons. 
	Every time time you wish to update the plot repeat the step j.



5. Reconfiguring the project for a different dsPIC device:
-------------------------------------------------------------
The Project/Workspace can be easily reconfigured for any dsPIC device.
Please use the following general guidelines:
        a. Change device selection within MPLAB IDE to a dsPIC device of
        your choice by using the following menu option:
        MPLAB IDE>>Configure>>Select Device

        b. Provide the correct device linker script and header file for your
        device. Device linker scripts and header files are available in your
        MPLAB

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -