X hits on this document

30 views

0 shares

0 downloads

0 comments

1 / 4

PIC32 Study Problems

Many of the questions on this study guide refer to the documentation on the “Introduction to the PIC32” page http://hades.mech.northwestern.edu/index.php/Introduction_to_the_PIC32 on the Mechatronics Wiki. Other sources that may be useful are the code that installed with the MPLAB C Compiler for PIC32; the PIC32MX Reference Manual; the PIC32MX Data Sheet; and the PIC32 Peripheral Libraries Manual. These are all referred to by the Intro page. This study guide approximately follows the Intro page.

PIC32 Hardware

  • 1.

    Practice with base 2 (binary), base 10 (decimal), and base 16 (hexadecimal):

    • a.

      Write 0xB15F as a binary number and in base 10.

    • b.

      Write 207 (base 10) as an 8-bit binary number and a 2 character hex number.

    • c.

      Write the result of the bitwise OR 0xA2 | 0x46 in hex.

d. Write the result of the bitwise AND 0x2C & 0xE3 in hex.

2.

  • e.

    Write the result of the shift operation 0x47 >> 3 in binary and hex.

  • f.

    Write the result of the shift operation 122 << 0x02 in binary and hex.

Go to the Microchip homepage, check out the Parametric Table of PIC32’s, and find a PIC with the following specs: 80 MHz max clock speed, 128 K flash (program memory), 32 K RAM (data memory), 4 channels of DMA, 16 A/D converters with 10-bit

resolution, no USB capabilities, 2 comparators, 5 16-bit timers and 1 32-bit PWM channels and 5 input compare channels, 2 UARTs, 2 SPI, and 2 I2C pins,

timer, 5 no CAN

modules, and 64 pins. (e.g., DIP, or different

What is the part kinds of surface

number? What types of packages does it come mount packages, etc.)? How much does it cost

in in

3.

quantity 1? What is the difference in price PIC32MX460F512L? Look at the PIC32 architecture figure showing the

and features

from our PIC,

the

SYSCLK and

the PBCLK. In

one

sentence each, without going shown in the block diagram:

into detail, explain the basic function of the following items Timing Generation; MCLR; SYSCLK; PBCLK; USBCLK;

PORTA...G (and indicate which of these can be used for analog input on Timer{1..5}; 10-bit ADC; Comparators; UART 1,2; I2C 1,2; SPI 1,2; IC 1,5; 1,5; CN1-22; Data RAM; Program Flash Memory; and Pre-Fetch Module.

our PIC); PWM OC

4. 5.

What does "peripheral" mean for the PIC? Most pins on the PIC have many different Some of the most important to us are the

labels, according to the functions they serve. following: ANx (x=0...15), INTx (x=0...4),

OCx (x=1...5), Rxy (x=1,2), SSx (x=1,2),

(x=A...G, y=0...15), SCLx, SDAx TxCK (x=1...5), UxCTS, UxRTS,

(x=1,2), SCKx, SDIx, UxRX, UxTX (x=1,2),

SDOx VDD,

6. 7.

VSS. Explain, in one sentence each, what these functions are. Describe the four functions that pin 21 of the PIC32 can have. How many pins are on our DIP-like NU32 board? How many

of

these

are

directly

connected to the of the PIC's pins

PIC? How many pins on the PIC are left disconnected? are used internally on the board. How many is that?

The

remainder

8.

If the What

NU32 board is powered by a USB cable, what voltage does the USB cable provide? voltage is used to power the PIC on the NU32 board? How do we get the PIC

9.

supply voltage from the USB voltage? On the NU32 board, there are 4 LEDs connected when the digital outputs are high or low?

to

4

digital

outputs.

Are

the

LEDs

on

Document info
Document views30
Page views30
Page last viewedMon Dec 05 05:51:47 UTC 2016
Pages4
Paragraphs129
Words1965

Comments