background image

7/30/2019

Basys MX3 Reference Manual [Reference.Digilentinc]

https://reference.digilentinc.com/reference/microprocessor/basys-mx3/reference-manual?_ga=2.68739409.1349070004.1564406803-1961480359.…

14/52

Label

Schematic Name

PIC32 Pin

Description

LD2

LED2

SCL2/RA2

Led 2

LD3

LED3

SDA2/RA3

Led 3

LD4

LED4

TDI/CTED9/RA4

Led 4

LD5

LED5

TDO/RA5

Led 5

LD6

LED6

TRCLK/RA6

Led 6

LD7

LED7

TRD3/CTED8/RA7

Led 7

All the pins must be defined as digital output (their corresponding TRIS bit must be set to 0):

TRISAbits.TRISA<0-7> = 0; // LED<0-7> configured as output

In order to turn an LED () on or off, turn the corresponding digital output pin high or low by writing 1 or 0 to the corresponding LATA
register bit.

LATAbits.LATA<0-7> = 1; // turn led on

or

LATAbits.LATA<0-7> = 0; // turn led off

Library functions for using the LEDs are contained in the Basys MX3 library pack, LED () library. However, the user can easily use the
LEDs without the LED () library, as presented above.

Eight switches are provided, labeled SW0 – SW7 on the board and in the schematic, attached to eight digital IO pins of the PIC32. Reading
the switches is done by basic access to an input IO pin. Read more details in Digital Inputs and Outputs chapter.

Figure 4.1 shows the way the switches are electrically connected on the Basys MX3.

3.2. Functionality

4. User Switches

Содержание Basys MX3

Страница 1: ...crochip and was designed to be used with the MPLAB X IDE With an exhaustive set of peripherals students gain exposure to a wide range of embedded systems related concepts while using a professional gr...

Страница 2: ...7 30 2019 Basys MX3 Reference Manual Reference Digilentinc https reference digilentinc com reference microprocessor basys mx3 reference manual _ga 2 68739409 1349070004 1564406803 1961480359 1 2 52...

Страница 3: ...7 30 2019 Basys MX3 Reference Manual Reference Digilentinc https reference digilentinc com reference microprocessor basys mx3 reference manual _ga 2 68739409 1349070004 1564406803 1961480359 1 3 52...

Страница 4: ...7 30 2019 Basys MX3 Reference Manual Reference Digilentinc https reference digilentinc com reference microprocessor basys mx3 reference manual _ga 2 68739409 1349070004 1564406803 1961480359 1 4 52...

Страница 5: ...oard 8 MHz oscillator 512 KB of Program Flash Memory 12 KB of Boot Flash Memory 128 KB of SRAM Four Direct Memory Access DMA Modules Two SPI Two I C and Five UART serial interfaces Parallel Master Por...

Страница 6: ...with volume control Dual H Bridge Motor Driver for up to two 1 5 A Brushed DC Motors or one stepper motor 2 Servo Connectors FIR compatible IrDA Module Potentiometer 3 axis 12 bit accelerometer 4 MB...

Страница 7: ...ework is available on the Basys MX3 Resource Center Links to additional materials from Digilent and Microchip including the Basys MX3 schematic and the PIC32MX370F512L datasheet can also be found on t...

Страница 8: ...ws the direct programming erasing of the microcontroller but it does not provide an environment for writing compiling and debugging the code Please see Microchip documentation for instructions on usin...

Страница 9: ...essed via peripheral registers in the microcontroller There are seven I O Ports numbered A G and each is 16 bits wide Depending on the PIC32 microcontroller some of the I O Ports are not present and n...

Страница 10: ...e other hand some peripheral modules cannot be included in the peripheral pin select feature because it requires special I O circuitry on a specific port and it cannot be easily connected to multiple...

Страница 11: ...ally 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 values c...

Страница 12: ...is present on any of the power inputs A power good LED LD11 driven by the output of the 3 3 volt regulator LMR10515 indicates that the board is receiving power and that the on board supplies are func...

Страница 13: ...max typical 3 3V VCC3V3 PIC32MX370 Pmods and all on board peripherals excluding the LCD backlight RGB LED IrDA LED Servos and Motors IC10 Texas Instruments LMR10515 1 5A NA 3 3V DBG3V3 Onboard Microch...

Страница 14: ...er to turn an LED on or off turn the corresponding digital output pin high or low by writing 1 or 0 to the corresponding LATA register bit LATAbits LATA 0 7 1 turn led on or LATAbits LATA 0 7 0 turn l...

Страница 15: ...F3 1 RF3 SW0 configured as input TRISFbits TRISF5 1 RF5 SW1 configured as input TRISFbits TRISF4 1 RF4 SW2 configured as input TRISDbits TRISD15 1 RD15 SW3 configured as input TRISDbits TRISD14 1 RD14...

Страница 16: ...e schematic attached to five digital IO pins of PIC32 Reading the buttons is done by basic access to an input IO pin Read more details in Digital Inputs and Outputs chapter Figure 5 1 shows the way th...

Страница 17: ...val PORTAbits RA15 read BTND Please note that if you want the buttons to trigger a specific functionality proper software debouncing is required Library functions for using the buttons are contained...

Страница 18: ...n These methods are explained in the RGB Led implemented using PWM pulse width modulation and RGB Led implemented using PDM pulse density modulation sections Label Schematic Name PIC32 Pin Description...

Страница 19: ...ll occur often The High pulse is only 1 clock period long but more High pulses can succeed when the register content is close to maximum The RGBLED library from the BasysMX3 library pack contains an e...

Страница 20: ...active A scanning display controller circuit can be used to show a 4 digit number on this display This circuit drives the anode signals and corresponding cathode patterns of each digit in a repeating...

Страница 21: ...AN12 PMA11 RB12 Anode 0 pin AN1 AN13 PMA10 RB13 Anode 1 pin AN2 VREF CVREF PMA7 RA9 Anode 2 pin AN3 VREF CVREF PMA6 RA10 Anode 3 pin CA TRD1 RG12 Cathode A pin CB RPA14 RA14 Cathode B pin CC PMD14 RD...

Страница 22: ...igurations one bit for each segment corresponding to various digits 0 9 A F When the user selects the values to be displayed they are used as index into this segments configuration table and the resul...

Страница 23: ...lay location Display positions can be shifted left or right by setting a bit in the Instruction Register IR The write only IR directs display operations such as clear display shift left or right set D...

Страница 24: ...data DB0 PMD0 RE0 Data bits 0 7 DB1 PMD1 RE1 DB2 AN20 PMD2 RE2 DB3 RPE3 CTPLS PMD3 RE3 DB4 AN21 PMD4 RE4 DB5 AN22 RPE5 PMD5 RE5 DB6 AN23 PMD6 RE6 DB7 AN27 PMD7 RE7 The command pins DISP_RS DISP_RW an...

Страница 25: ...serial communications bus The I2C interface allows master and slave operation using either 7 bit or 10 bit device addressing Each device is given a unique address and the protocol has the ability to...

Страница 26: ...2C communication read write must be implemented over I2C1 The I2C1 interface must be initialized and then accessed through read and write functions The I2C device address of the accelerometer is 0x1D...

Страница 27: ...chronous serial interface and devices can operate as either an SPI master device or as an SPI slave device The four SPI signals are generally called Slave Select SS Master Out Slave In MOSI Master In...

Страница 28: ...CTED7 RC4 SDI2R 0x0A SDI2 RC4 JA4 SPI2_SCK AN16 C1IND RPG6 SCK2 PMA5 RG6 Communication over the SPI2 interface is implemented in the SPIJA library of the Basys MX3 library pack The Basys MX3 comes wit...

Страница 29: ...tions Note that users can visualize the communication with the SPI flash using a connector labeled SPI J6 located on the back of the board under PMOD A connector The PIC32MX370F512L microcontroller pr...

Страница 30: ...vides a USB to UART serial converter via a micro USB connector and uses UART_TX and UART_RX pins of the PIC32 These 2 pins can be mapped to implement UART4 or UART5 functionality See Remappable pins s...

Страница 31: ...perating modes logic low selects IN IN mode while logic high selects PH EN mode When using IN IN mode the logical values of AIN1 AIN2 BIN1 BIN2 control the 4 command signals of a stepper motor A1 A2 B...

Страница 32: ...ic high enables H bridge A BIN1 RPE9 RE9 BIN1 BPHASE IN IN mode Logic high sets BOUT1 high PH EN mode Sets direction of H bridge B BIN2 AN5 C1INA RPB5 RB5 BIN2 BENBL IN IN mode Logic high sets BOUT2 h...

Страница 33: ...digital outputs in this manner They are initialized in a 1 1 0 0 configuration considered an unsigned hexadecimal value 0x0C To perform stepper motor steps the configuration value is rotated left or...

Страница 34: ...nector Label on the Servo Connector Signal Name PIC32 pin Description SERVO 0 PWM S0_PWM AN8 RPB8 CTED10 RB8 The control signal for servo 0 VBAR VBAR The power VBAR 5V and GND provided from the extern...

Страница 35: ...for transmitting over IRDA and IR_RX connected to the RXD pin of the RPM973 and used for receiving data over IrDA Also an IR_PDOWN signal connected to the PWDOWN pin of the RPM973 is used by the micro...

Страница 36: ...d frequency with each pulse potentially having a different width This digital signal can be passed through a simple low pass filter that integrates the digital waveform to produce an analog voltage pr...

Страница 37: ...he corresponding ANSEL bit should be set to 0 ANSELBbits ANSB14 0 Functionality for access to the audio module is implemented in the AUDIO library of the Basys MX3 library pack These are the features...

Страница 38: ...es adjustable gain that is controlled using a thumbwheel potentiometer labeled MIC VOLUME This dial directly controls the gain of the A_MIC signal going into the PIC32 Table 18 1 below shows the detai...

Страница 39: ...he PIC32 s ADC functionality in the Analog To Digital Converter ADC section of the PIC32 documentation Table 19 1 shows the details about the AIC signal connecting the analog input module to the PIC32...

Страница 40: ...and pin 7 is immediately below Pin 1 is labeled on the Basys MX3 board with 1 and can be recognized by its squared pad both on the main board and on the Pmod device Each row of pins provides a pair of...

Страница 41: ...ts the possible functions available through remapping of each pin This information is also availalble in the Appendix 3 Basys MX3 Pinout In the above tables the highlighted pins displayed in green col...

Страница 42: ...O 7 2 BIN2 AN5 C1INA RPB5 RB5 BIN2 Motor driver Digital IO 15 3 SPI_CE RPF8 RF8 SPI_CE Flash memory Digital IO 6 4 BIN1 RPE9 RE9 BIN1 Motor driver Digital IO 14 5 SPI_SO RPF7 RF7 SPI_SO Flash memory D...

Страница 43: ...Audio out Scope 2 28 AON analog pin A_OUT_N Audio out Scope 2 29 AMIC AN4 C1INB RB4 A_MIC Microphone Scope 1 30 GND GND Scope 1 Peripheral Pin pin name R SFR pin name R bits pin name R Value to RPn Pi...

Страница 44: ...R Value to RPn Pin Selection INT2 INT2R INT2R 3 0 0000 RPD9 0001 RPG6 0010 RPB8 0011 RPB15 0100 RPD4 0101 RPB0 0110 RPE3 0111 RPB7 1000 Reserved 1001 RPF12 1010 RPD12 1011 RPF8 1100 RPC3 1101 RPE9 11...

Страница 45: ...rved 1101 C2OUT 1110 Reserved 1111 Reserved RPG8 RPG8R RPF4 RPF4R RPD10 RPD10R RPF1 RPF1R RPB9 RPB9R RPB10 RPB10R RPC14 RPC14R RPB5 RPB5R RPC1 RPC1R RPD14 RPD14R RPG1 RPG1R RPA14 RPA14R RPn Port Pin R...

Страница 46: ...1 1000 SDO1 1001 Reserved 1010 Reserved 1011 OC5 1100 Reserved 1101 C1OUT 1110 Reserved 1111 Reserved RPG6 RPG6R RPB8 RPB8R RPB15 RPB15R RPD4 RPD4R RPB0 RPB0R RPE3 RPE3R RPB7 RPB7R RPB2 RPB2R RPF12 RP...

Страница 47: ...function of this pin Function The available function s of this pin Pin Full Pin Name Peripheral Schematic Name PPS Function 1 RG15 SSD CE RG15 2 VDD POWER VCC3V3 3 AN22 RPE5 PMD5 RE5 LCD DB5 I O PMD5...

Страница 48: ...ED1 AN0 RPB0 RB0 PROGRAM DEBUG BUTTONS P32_PGD BTNL I O RB0 26 PGEC2 AN6 RPB6 RB6 IRDA IR_RX I O U5RX 27 PGED2 AN7 RPB7 CTED3 RB7 IRDA IR_TX I O U5TX 28 VREF CVREF PMA7 RA9 SSD AN2 RA9 29 VREF CVREF P...

Страница 49: ...U5TX U 53 RPF8 RF8 SPI_FLASH SPI_CE I O SS1 U1CTS U2 54 RPF7 RF7 SPI_FLASH SPI_SO I O SDI1 U3RX IC 55 RPF6 SCK1 INT0 RF6 SPI_FLASH SPI_SCK I O SCK1 U1RTS U 56 SDA1 RG3 I2C SDA SDA1 57 SCL1 RG2 I2C SC...

Страница 50: ...79 RPD12 PMD12 RD12 RGB_LED LED8_G I O OC5 RD12 80 PMD13 RD13 SSD CG RD13 81 RPD4 PMWR RD4 LCD DISP_EN I O PMENB 82 RPD5 PMRD RD5 LCD DISP_R W I O PMRD PMWR 83 PMD14 RD6 SSD CC RD6 84 PMD15 RD7 SSD CF...

Страница 51: ...https store digilentinc com our distributors Our Partners Technical Support Forum https forum digilentinc com Reference Wiki https reference digilentinc com Contact Us https store digilentinc com con...

Страница 52: ...inc https reference digilentinc com reference microprocessor basys mx3 reference manual _ga 2 68739409 1349070004 1564406803 1961480359 52 52 https www reddit com r digilent https www linkedin com com...

Отзывы: