Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

dsPIC33F set remapable pins

Status
Not open for further replies.

cts_casemod

Member level 4
Member level 4
Joined
Dec 9, 2010
Messages
72
Helped
14
Reputation
28
Reaction score
14
Trophy points
1,288
Location
London
Visit site
Activity points
1,950
Hi folks,

I got myself one of the newer 33F PICs (dsPIC33F12MC202) and it seems that many functions have to be mapped to a pin before being used.

I am trying to map the input compare peripheral to pin RB4/RP4 and have no idea how to do this. I am coding in ASM.

Can someone shed some light, please?
 

I suggest to review the "periperal pin select" chapters 11.6 and 11.7 in device datasheet.

It describes how to program I/O functions by writing to the PPS registers.
 

I suggest to review the "periperal pin select" chapters 11.6 and 11.7 in device datasheet.

It describes how to program I/O functions by writing to the PPS registers.

No chapter 11.6 on the datasheet I have, can you post a link to the document you are using?

It might be usefull to state that I have a coding problem, since I never coded in ASM before
 

why not code in C ? the pin mapping would be along the lines of
Code:
 #include "pps.h"
   iPPSInput (IN_FN_PPS_IC1, IN_PIN_PPS_RP4);       // Input Capture 1 (IC1) to RP4
you could always write time critial code in ASM
 

The part number mentioned in your post doesn't exist, I presume you are talking about dsPIC33FJ128MC202. It has a datasheet downloadable at microchip.com. I was referring to a previous revision D, but also recent revision G has a chapter 11.6 about peripheral pin select.

In any case you'll find a PPS chapter in any datasheet about a chip with respective functionality.

I also don't understand the assembly coding problem. Either if it's a good idea to program dsPIC processors in assembly language or not (I don't think it is), PPS registers aren't different from other special function registers, e.g. IO-ports. So if you are able to achieve any dsPIC activity by assembly language programs, you can also manipulate PPS registers.
 

why not code in C ? the pin mapping would be along the lines of
Code:
 #include "pps.h"
   iPPSInput (IN_FN_PPS_IC1, IN_PIN_PPS_RP4);       // Input Capture 1 (IC1) to RP4
you could always write time critial code in ASM

The device code was already provided in ASM, hence I would have to port the whole thing to C

- - - Updated - - -

The part number mentioned in your post doesn't exist, I presume you are talking about dsPIC33FJ128MC202. It has a datasheet downloadable at microchip.com. I was referring to a previous revision D, but also recent revision G has a chapter 11.6 about peripheral pin select.

In any case you'll find a PPS chapter in any datasheet about a chip with respective functionality.

I also don't understand the assembly coding problem. Either if it's a good idea to program dsPIC processors in assembly language or not (I don't think it is), PPS registers aren't different from other special function registers, e.g. IO-ports. So if you are able to achieve any dsPIC activity by assembly language programs, you can also manipulate PPS registers.

Check the answer above.

Apparently some instructions like multiplication are performed with the ASM commands. Even on C code microchip does add bits in assembler to make use of such instructions.



The device is a dsPIC32FJ. I missed a character
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top