MikroE PIC32 Clicker

board configuration for the MikroE PIC32 Clicker More...

Detailed Description

peripheral configuration for the MikroE PIC32 Clicker

see: http://www.mikroe.com/pic32/pic32mx-clicker/ For more information on the board.

Files

file  pic32-clicker/include/board.h
 board configuration for the MikroE PIC32 Clicker
 
file  boards/pic32-clicker/include/periph_conf.h
 peripheral configuration for the MikroE PIC32 Clicker
 

Macros

#define TICKS_PER_US   (48)
 Set how many increments of the count register per uS needed by the timer code.
 
#define EIC_IRQ   (1)
 We are using an External Interrupt Controller (all pic32 devices use this mode)
 
#define PERIPHERAL_CLOCK   (96000000) /* Hz */
 The peripheral clock is required for the UART Baud rate calculation It is configured by the 'config' registers (see pic32_config_settings.c) Note 120MHz is the max F for this device.
 

Functions

void board_init (void)
 Board level initialisation.
 
#define LED1_PIN   GPIO_PIN(PORT_B, 1)
 LED pin configuration.
 
#define LED2_PIN   GPIO_PIN(PORT_B, 2)
 
#define LED1_MASK   (1 << 1)
 
#define LED2_MASK   (1 << 2)
 
#define LED1_ON   (LATBSET = LED1_MASK)
 
#define LED1_OFF   (LATBCLR = LED1_MASK)
 
#define LED1_TOGGLE   (LATBINV = LED1_MASK)
 
#define LED2_ON   (LATBSET = LED2_MASK)
 
#define LED2_OFF   (LATBCLR = LED2_MASK)
 
#define LED2_TOGGLE   (LATBINV = LED2_MASK)
 

Timer definitions

#define TIMER_NUMOF   (1)
 
#define TIMER_0_CHANNELS   (3)
 

UART Definitions

     There are 4 UARTS available on this CPU.

We route debug via UART3 on this board, this is the UART connected to the MikroBUS

Note Microchip number the UARTS 1->4

#define UART_NUMOF   (4)
 
#define DEBUG_VIA_UART   (3)
 
#define DEBUG_UART_BAUD   (9600)