Created Mon, 13 Aug 2012 15:09:53 +0000 by 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?
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
Tue, 14 Aug 2012 00:11:07 +0000
Gene thanks! So to recap: