This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
pic32mx270f256b [2019/04/25 12:50] sausage |
pic32mx270f256b [2021/12/12 08:28] sausage [What happens if?] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Minimum setup for a PIC32MX270F256B on a Breadboard + PICkit3 ====== | ====== Minimum setup for a PIC32MX270F256B on a Breadboard + PICkit3 ====== | ||
- | After discovering that my PIC32MX170F256B did not sport a USB module, I then purchased a PIC32MX270F256B which did have one. | + | My first experiments with PIC Microcontrollers was on the PIC32MX170F256B. But after discovering that there was no USB module on that controller, I then purchased a PIC32MX270F256B which did have one. |
This article serves as a reminder for the minimum setup for this microcontroller. | This article serves as a reminder for the minimum setup for this microcontroller. | ||
Line 28: | Line 28: | ||
* Pin 2 (RA0) to the positive side of an LED. Negative side of the LED to a 10 Ohm resistor. Then to GND. | * Pin 2 (RA0) to the positive side of an LED. Negative side of the LED to a 10 Ohm resistor. Then to GND. | ||
* Pin 3 (RA1) to the positive side of an LED. Negative side of the LED to a 10 Ohm resistor. Then to GND. | * Pin 3 (RA1) to the positive side of an LED. Negative side of the LED to a 10 Ohm resistor. Then to GND. | ||
- | |||
- | {{ :pic32mx270f256b-breadboard-components.jpg?nolink |}} | ||
On both the Power and Ground rails on the breadboard, add a 0.1uf capacitor each. | On both the Power and Ground rails on the breadboard, add a 0.1uf capacitor each. | ||
- | Also between Pin 20 (CAP) and Pin 9 (VSS) add a 0.01uf capacitor. | + | Also between Pin 20 (CAP) and Pin 19 (VSS) add a 0.01uf capacitor. |
Add a 10k pull up resistor from Pin 1 (MCLR) to Power. MCLR is Master Clear or Reset. | Add a 10k pull up resistor from Pin 1 (MCLR) to Power. MCLR is Master Clear or Reset. | ||
Line 41: | Line 39: | ||
{{ :pic32mx270f256b-breadboard-components.jpg?nolink |}} | {{ :pic32mx270f256b-breadboard-components.jpg?nolink |}} | ||
- | You can also get a diagram of the recommended setup on [[https://docs-apac.rs-online.com/webdocs/1385/0900766b8138548d.pdf|page 28 of the PIC32MX270F256B Datasheet]], Figure 2-1. | + | You can also get a diagram of the recommended setup on [[https://docs-apac.rs-online.com/webdocs/1385/0900766b8138548d.pdf#G3.1116201|page 28 of the PIC32MX270F256B Datasheet]], Figure 2-1. |
Line 67: | Line 65: | ||
In the MPLABX IDE, create a new C project and in the main.c file, add the following before the while loop: | In the MPLABX IDE, create a new C project and in the main.c file, add the following before the while loop: | ||
- | <code> | + | <code C> |
TRISA = 0b00000000; //all PortA pins are output | TRISA = 0b00000000; //all PortA pins are output | ||
PORTA = 0b00000010; //set pin 3 (RA1) to on. (supply 3.3 volts) | PORTA = 0b00000010; //set pin 3 (RA1) to on. (supply 3.3 volts) | ||
Line 119: | Line 117: | ||
^ Component ^ During Programming ^ For Execution ^ | ^ Component ^ During Programming ^ For Execution ^ | ||
| Not using a pull up on MCLR to Positive | No effects | Could cause random resets on the PIC if the pin is floating. | | | Not using a pull up on MCLR to Positive | No effects | Could cause random resets on the PIC if the pin is floating. | | ||
+ | | Pull up on MCLR to Negative | Cannot program | - | | ||
| No 0.1uf bypass capacitors | Unstable effects |No noticeable effect on basic test| | | No 0.1uf bypass capacitors | Unstable effects |No noticeable effect on basic test| | ||
| No External Oscillator | Not required | Internal can be used | | | No External Oscillator | Not required | Internal can be used | |