Main Board built on a perfboard using a Microchip PIC microcontroller. This is intended for applications where many data pins, a lot of memory or complex integrated peripherals (EEPROM, CCP, PWM, I2C, SPI, EUSART...) are required.
Bill of materials:
Both decoupling capacitors can usually be left out of the board, but it's not recommended. They stabilize the voltage from the power supply and filter small voltage peaks/drops. Capacitive or inductive loads such as motors require decoupling capacitors.
The three I2C connectors, R1 and R2 resistors can also be avoided when you are certain you won't be using I2C.
Ground and Vcc lines are redundant. That means current can take two different paths. You can re-route the circuit and avoid redundant lines, your board would be simpler, but the circuit electrical response will be a bit worse.
There is an independent power connector. You can avoid it because you will probably not use it, but you also have enough room for placing your own extra power connectors if you want.
There is some empty room at the corners so you can clamp your MBP40 somewhere.
The following code can be compiled using SDCC.
/*================================================================== * Sample program for MBP40 with Curuxa libraries * * This program configures all available pins as digital outputs. * You can check that all digital pins are set at the same voltage as * the power source using a voltmeter or Module LTIND-A (the LED * should light up) * Note: RE3 (pin 1) is an input-only pin * * http://curuxa.org *=================================================================*/ #include <MBP40.h> ConfigBits1(_CP_OFF & _DEBUG_OFF & _FCMEN_OFF & _IESO_OFF & _CPD_OFF & _LVP_OFF & _BOR_OFF & _MCLRE_OFF & _PWRTE_ON & _WDT_OFF & _INTOSCIO); void main() { //set all pins as digital, instead of analog inputs AdcDisable(); //set all digital pins as outputs TRISA=AllDigitalOutputs; TRISB=AllDigitalOutputs; TRISC=AllDigitalOutputs; TRISD=AllDigitalOutputs; TRISE=AllDigitalOutputs; while(1) { //set all digital output pins at Vcc PORTA=0b11111111; PORTB=0b11111111; PORTC=0b11111111; PORTD=0b11111111; PORTE=0b11111111; } }
Another very good example for blinking LEDs on all pins can be found as an LTIND-A example.