MBP28

From Curuxa

MBP28

Intermediate complexity Main Board built on a perforated board using a Microchip PIC microcontroller.

Contents

Features

  • Based on a PIC16F722
    • 28 pin
    • Power supply: 1.8 to 5.5V
    • Program memory: 3584 bytes (2048 instructions)
    • RAM: 128 bytes
    • 62.5kHz-16MHz internal oscillator
    • Up to 20MHz external oscillator
    • Two 8-bit timers. One 16-bit timer
    • 2x CPP/PWM
    • 8-bit, 11-channel Analog-to-Digital Converter
    • SPP (SPI, slave I2C, master I2C must be implemented in software)
    • AUSART
    • Capacitive sensing module
  • ICSP connector
  • Up to 25 data input/outputs
  • I2C connector with pull-ups
  • Two decoupling capacitors

Electronic circuit

Schematic

Bill of materials:

  • Perforated board of at least 10x21 holes. Individual pads, not copper strips
  • 1x PIC16F722-I/P or PIC16F722-E/P
  • 1x 28-pin PDIP socket
  • 2x 10k, 1/4W resistors
  • 6x Right-angle male headers (usually sold as 40-pin strips)
  • 79x Straight male headers (usually sold as 40-pin strips) (you can also buy double-row strips)
  • 1x 100uF electrolytic capacitor
  • 1x 100nF ceramic capacitor
  • Some thin wire


Layout: top view
Layout: bottom view

Printable version: Single, Double

Optional parts

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.

Construction

MBP28 MBP28 MBP28 MBP28 MBP28 MBP28 MBP28

Test

C

PIC16F722 is not supported by SDCC yet.

Assembly language

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
Retrieved from "http://curuxa.org/en/MBP28"