Intermediate complexity Main Board built on a perforated board using a Microchip PIC microcontroller.
Contents |
Bill of materials:
Printable version: Single, Double
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 I2C connector, R1 and R2 resistors can also be avoided when you are certain you won't be using I2C.
PIC16F722 is not supported by SDCC yet.
The following code can be assembled using gputils/gpasm.
;=================================================================== ; Sample program for MBP28 using a PIC16F722 ; ; This program configures all available pins as digital outputs. ; You can check that all digital pinsare set at the same voltage as ; the power source using a voltmeter or Module LTIL-A (the LED ; should light up) ; Note: RE3 is an input-only pin ; http://curuxa.org ;=================================================================== LIST P=16F722, R=hex, W=1 INCLUDE p16f722.inc ORG 0x00 GOTO Main ORG 0x04 GOTO Interrupts Main ORG 0x05 MOVLW 0 BANKSEL TRISA MOVWF TRISA MOVWF TRISB MOVWF TRISC loop MOVLW 0xFF BANKSEL PORTA MOVWF PORTA MOVWF PORTB MOVWF PORTC GOTO loop ;=================================================================== ;========================== INTERRUPTS ============================= Interrupts GOTO Interrupts ;do nothing ;====================== END OF INTERRUPTS ========================== END