chipKIT® Development Platform

Inspired by Arduino™

MyBoard with 64pin 32MX795F512 - pin numbering

Created Mon, 13 Aug 2012 15:09:53 +0000 by pito


pito

Mon, 13 Aug 2012 15:09:53 +0000

Hi, in RC4 I can see a "Default_64" variant, most probably the suitable for my own pic32mx795F512H (64pin) based board.. The default_100 and default_64 files are almost identical and both includes pin numbers much higher then 64 (?). Does it mean, for example, my pin RE7 shall be referenced in my sketch as 71, RG7 as 103 ? Just need a confirmation I did understand that properly :) Thanks, pito PS: the uC32 board has the pin-identical chip (except a few usb related pins) to the above pic32MX795F512H, with pin numbering 0-46 for digital and 0-12 for analog pins - would not be this scheme more suitable for the 64pin device then?


GeneApperson

Mon, 13 Aug 2012 20:59:17 +0000

The Default_64 and Default_100 variants define the digital pins such that PORTA bits 0-15 are pins 0-15, PORTB bits 0-15 are pins 16-31, etc. They ignore the fact that not all of the PORT/bit combinations actually exist on all chips (or any chip actually).

The differences between Default_64 and Default_100 are primarily in the symbols that give the digital pin numbers for various peripheral functions: e.g. PIN_INT0 is different between the two.

The board variant mechanism provides a number of #define'd symbols (e.g. PIN_LED1) rather than using hard coded 'magic numbers', e.g. 13 that aren't necessarily constant between boards. Many of these symbols are there for future use as we start creating new core functions or libraries to expand the hardware abstraction model to abstract more of the peripheral functions (input captures, pin change interrupts, more complete timer support, etc.).

If your board is close to an Uno32/uC32 in its pin mapping, I would use one of those as the starting point for your board variant. The downside to using the 'default' ones is that there will be holes in the pin numbering.

Gene Apperson Digilent


pito

Tue, 14 Aug 2012 00:11:07 +0000

Gene thanks! So to recap:

  1. I have got a breakout board (bob32), fully incompatible with any board, just plain pcb with pic32MX695F512H (64pin) and pin headers numbered based on chip_pin_numbers
  2. I take uC32 variant folder (because the chips are close and I like the numbering), I copy it to a new bob32 folder (new variant)
  3. I add bob32 to boards.txt, based on uC32 definition, edited properly, with my mcu and ldscript=chipKIT-application-32MX695F512H.ld
  4. That's it and I can try to compile the blink sketch and burn the hex in with pickit, etc., etc.
  5. What I am missing, however, is the: chipKIT-application-32MX695F512H.ld chipKIT-application-32MX795F512H.ld Would it be possible to provide that scripts for those popular chips as well, pls? Thnks, pito