Digilent Cerebot MX7cK REV B Скачать руководство пользователя страница 11

Cerebot MX7cK Reference Manual 

 

 

                                          

 

 

www.digilentinc.com 

 

page 11 of 34

 

 

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

 

PIC32 Peripheral Devices 

 
The following describes the peripheral devices 
available in the PIC32MX795F512L 
microcontroller and how they are accessed on 
the Cerebot MX7cK board. 
 

CPU Clock Source 

 
The PIC32 microcontroller supports numerous 
clock source options for the main processor 
operating clock. The Cerebot MX7cK board is 
designed to operate with either a silicon 
resonator from Discera, IC2, for use with the 
EC oscillator option, or an external crystal, X1, 
for use with the XT oscillator option. Standard 
production boards will have an 8Mhz Discera 
silicon resonator loaded and the EC oscillator 
option should be used. If IC2 is not loaded, an 
8Mhz crystal will be loaded for X1 (on the 
bottom of the board) and the XT oscillator 
option should be used. Oscillator options are 
selected via the configuration settings specified 
using the 

#pragma config

 statement. Use 

#pragma config POSCMOD=EC

 to select the 

EC option and 

#pragma 

config 

POSCMOD=XT

 to select the XT option. 

 
Using the internal system clock phase-locked 
loop (PLL), it is possible to select numerous 
multiples or divisions of the 8Mhz oscillator to 
produce CPU operating frequencies up to 
80Mhz. The clock circuit PLL provides an input 
divider, multiplier, and output divider. The 
external clock frequency (8Mhz) is first divided 
by the input divider value selected. This is 
multiplied by the selected multiplier value and 
then finally divided by the selected output 
divider. The result is the system clock, 
SYSCLK, frequency. The SYSCLK frequency 
is used by the CPU, DMA controller, interrupt 
controller and pre-fetch cache. 
 
The operating frequency is selected using the 
PIC32MX795 configuration variables. These 
are set using the 

#pragma config

 

statement. Use 

#pragma 

config FPLLIDIV

  

to set the input divider, 

#pragma config 

FPLLMUL

 to set the multiplication factor and 

#pragma config FPLLODIV

 to set the 

output divider. Refer to the 
PIC32MX5XX/6XX/7XX Family Data Sheet 
and the PIC32MX Family Reference Manual, 
Section 6. Oscillators for information on how to 
choose the correct values, as not all 
combinations of multiplication and division 
factors will work. 
 
In addition to configuring the SYSCLK 
frequency, the peripheral bus clock, PBCLK, 
frequency is also configurable. The peripheral 
bus clock is used for most peripheral devices, 
and in particular is the clock used by the 
timers, and serial controllers (UART, SPI, I

2

C). 

The PBLCK frequency is a division of the 
SYSCLK frequency selected using  

#pragma 

config FPBDIV

. The PBCLK divider can be 

set to divide by 1, 2, 4, or 8. 
 
The following example will set up the Cerebot 
MX7cK for operation with a SYSCLK frequency 
of 80Mhz and a PBCLK frequency of 10Mhz: 
 

#pragma config FNOSC = PRIPLL 
#pragma config POSCMOD = EC 
#pragma config FPLLIDIV = DIV_2 
#pragma config FPLLMUL = MUL_20 
#pragma config FPLLODIV = DIV_1 
#pragma config FPBDIV = DIV_8 

 
Documentation for the PIC32 configuration 
variables can be found in the PIC32MX 
Configuration Settings guide. This is found 
using the 

“Help.Topics…”

 command in the 

MPLAB IDE. Also, refer to Appendix C for an 
example of setting the configuration variables. 
 
When using the Cerebot MX7cK with the 
chipKIT MPIDE software, the clock source is 
set by the boot loader and no action is 
required. 
 

Ethernet Interface 

 
The Cerebot MX7cK provides the ability to 
interface with 10Mbps or 100Mbps Ethernet 
networks. The PIC32MX795 microcontroller 
contains a 10/100 Ethernet Medium Access 
Controller (MAC). External to the PIC32 
microcontroller, the Cerebot MX7cK board 
provides an SMSC LAN8720 Ethernet Physical 

Содержание Cerebot MX7cK REV B

Страница 1: ...rence materials and other resources The Cerebot MX7cK is designed to be easy to use and suitable for use by anyone from beginners to advanced users for experimenting with embedded control and network...

Страница 2: ...two analog comparators The Cerebot MX7cK has a number of input output connection options and is designed to work with the Digilent line of Pmod peripheral modules that provide various input and output...

Страница 3: ...nt The following statement must be used to configure the microcontroller for use with the on board licensed debugger circuit pragma config ICESEL ICS_PGx1 The MPLAB IDE may report an error indicating...

Страница 4: ...ommunications with the boot loader and downloads the user s program programming it into the flash memory in the microcontroller When the MPIDE opens the serial communications connection on the PC the...

Страница 5: ...formed the host that they want to consume more current To meet this specification the debugger circuit turns on main board power by driving the PWR_ON signal high after successfully enumerating on the...

Страница 6: ...supplies may occur When the Cerebot MX7cK is operating as a USB host an external power supply connected to either J17 or J18 must be used to power the board In addition to powering the logic on the Ce...

Страница 7: ...between either the unregulated power supply VCC5V0 or the 3 3V main board supply VCC3V3 Place the shorting block in the 3V3 position for regulated 3 3V and in the 5V0 position to use the unregulated s...

Страница 8: ...O Port Writing to the LAT register sets any pins configured as outputs Reading from the LAT register returns the last value written The PORT register is used to read from the I O Port Reading from the...

Страница 9: ...ected to the signal TMS RA0 on the PIC32 microcontroller This microcontroller pin is shared between general purpose I O functions and use by the JTAG controller The JTAG controller is enabled on reset...

Страница 10: ...od connector pins These resistors are primarily intended to provide short circuit protection on the outputs but will also provide limited protection if a 5V signal is inadvertently applied to a non 5V...

Страница 11: ...r and pre fetch cache The operating frequency is selected using the PIC32MX795 configuration variables These are set using the pragma config statement Use pragma config FPLLIDIV to set the input divid...

Страница 12: ...le with the PIC32MX795 MAC and the LAN8720 PHY Microchip also provides numerous example programs illustrating the use of their network protocol stack for various applications When not using the Microc...

Страница 13: ...the USB controller pragma config UPLLEN ON pragma config UPLLIDIV DIV_2 When using the chipKIT MPIDE development environment these will have been set by the boot loader so no action is needed When ope...

Страница 14: ...or configuration these reference designs are suitable to use for developing USB firmware for the Cerebot MX7cK board Digilent has USB libraries available that can be used to develop both USB device a...

Страница 15: ...Digilent 6 pin or 2x6 to dual 6 pin cables can be used to daisy chain Digilent boards together in a CAN network A Digilent 6 Pin cable in combination with a Digilent PmodCON1 Screw Terminal Connector...

Страница 16: ...s only significant for slave devices A master device can use any general purpose I O pin to generate SS to enable the slave An SPI transaction begins with the master device bringing SS low When the sl...

Страница 17: ...each provide two positions for connecting to the I2 C signals power and ground By using two wire or four wire MTE cables available separately from Digilent a daisy chain of multiple Cerebot MX7cK boa...

Страница 18: ...or using the DTWI library via the DTWI1 object class Refer to the Microchip data sheet for detailed information on the operation of this device Analog Inputs The PIC32MX795 microcontroller provides a...

Страница 19: ...Vref 0V Vref 3 3V INTERNAL same as default EXTERNAL Vref 0V Vref voltage at A2 EXTMINUS Vref voltage at A3 Vref 3 3V EXTPLUSMINUS Vref voltage at A3 Vref voltage at A2 Timers The PIC32MX795 microcont...

Страница 20: ...ion chipKIT pin number and microcontroller I O port and bit number for the output compare unit s output pins OC1 JD 02 digital pin 25 RD00 OC2 JD 07 digital pin 28 RD01 OC3 JD 08 digital pin 29 RD02 O...

Страница 21: ...ned to refer to the digital pin numbers used for the external interrupt inputs The following gives connector position chipKIT pin number and microcontroller I O port and bit number Note that INT0 INT1...

Страница 22: ...andshaking signals not used on the Cerebot MX4cK board J2 USB Serial converter UART connector This USB micro AB connector is used to connect the FT232R serial converter to a USB port on the user PC J3...

Страница 23: ...ct USB devices to the board when using the PIC32MX795 microcontroller to implement an embedded USB host JP1 JP2 CAN or Pmod Select These jumpers select microcontroller signals RF12 and RF13 for use wi...

Страница 24: ...elect This jumper is used to select which host connector is powered when host power is enabled Place the shorting block in the MICRO position to supply power to the USB micro AB OTG Connector J19 Plac...

Страница 25: ...g FPLLODIV DIV_1 PLL output divider pragma config FPBDIV DIV_8 Peripheral bus clock divider pragma config FSOSCEN OFF Secondary oscillator enable Clock control settings pragma config IESO OFF Internal...

Страница 26: ...ERXD0 INT1 RE8 19 JF 07 45 RE09 AERXD1 INT2 RE9 20 N A 59 RB05 AN5 C1IN VBUSON CN7 RB5 USB VBUSON 21 JA 03 3 RB04 AN4 C1IN CN6 RB4 22 JA 02 2 RB03 AN3 C2IN CN5 RB3 23 JA 01 1 RB02 AN2 C2IN CN4 RB2 24...

Страница 27: ...RD8 Ethernet PHY 69 JD 01 25 RD09 SS1 IC2 RD9 70 JD 04 28 RD10 SCK1 IC3 PMCS2 PMA15 RD10 71 N A N A RD11 EMDC AEMDC IC4 PMCS1 PMA14 RD11 Ethernet PHY 72 JD 02 26 RD00 SDO1 OC1 INT0 RD0 73 N A N A RC1...

Страница 28: ...Manual www digilentinc com page 28 of 34 Copyright Digilent Inc All rights reserved Other product and company names mentioned may be trademarks of their respective owners 99 JB 04 12 RE03 PMD3 RE3 100...

Страница 29: ...RE4 3 JB 08 14 RE05 PMD5 RE5 4 JB 09 15 RE06 PMD6 RE6 5 JB 10 16 RE07 PMD7 RE7 6 JC 01 17 RC01 T2CK RC1 90 JC 02 18 RG00 C2RX PMD8 RG0 89 JC 03 19 RG01 C2TX ETXERR PMD9 RG1 84 JC 04 20 RD07 ETXCLK PM...

Страница 30: ...AETXEN SDA1 INT4 RA15 I2C1 20 N A 59 RB05 AN5 C1IN VBUSON CN7 RB5 USB VBUSON 80 N A 60 RD13 ETXD3 PMD13 CN19 RD13 USB Overcurrent detect 7 N A N A RC02 T3CK AC2TX RC2 CAN2 8 N A N A RC03 T4CK AC2RX R...

Страница 31: ...nce Manual www digilentinc com page 31 of 34 Copyright Digilent Inc All rights reserved Other product and company names mentioned may be trademarks of their respective owners 91 N A N A RA06 TRCLK RA6...

Страница 32: ...CN3 RB1 debug PGD 23 JA 01 1 RB02 AN2 C2IN CN4 RB2 22 JA 02 2 RB03 AN3 C2IN CN5 RB3 21 JA 03 3 RB04 AN4 C1IN CN6 RB4 20 N A 59 RB05 AN5 C1IN VBUSON CN7 RB5 USB VBUSON 26 JA 04 4 RB06 PGEC2 AN6 OCFA R...

Страница 33: ...PMD3 RE3 100 JB 07 13 RE04 PMD4 RE4 3 JB 08 14 RE05 PMD5 RE5 4 JB 09 15 RE06 PMD6 RE6 5 JB 10 16 RE07 PMD7 RE7 18 JE 07 37 RE08 AERXD0 INT1 RE8 19 JF 07 45 RE09 AERXD1 INT2 RE9 87 N A N A RF00 C1RX ET...

Страница 34: ...Reference Manual www digilentinc com page 34 of 34 Copyright Digilent Inc All rights reserved Other product and company names mentioned may be trademarks of their respective owners 1 LD4 54 RG15 AERX...

Отзывы: