Electronics

Processor board 3 - PIC16F873A


PIC 16F873A

Fig. 1 PIC 16F873A board

Description:

This is a processor board, and can take various 28 pins Microchip PIC processors. This one is fitted with a PIC 16F873A, but was also tested with a 16F876 and 18F2320.
The 16F873A has enough memory for small projects, hardware UART, I2C and SPI ports, 5 10bits ADC and 3 timers. It is plenty to test a lot of the PIC features.

Its main purpose is to be able to develop on the 16F type processor.
It runs at 16 MHz, has on board voltage regulator (5V), and has 3 8 bits interfaces, 1 I2C, 1 serial, and 1 ICSP connectors.

The board can be powered by an external 8V main power supply block, or PSU3 (8V from USB port).

Specifications:

ProcessorMicrochip PIC 16F873A

Interfaces3x8bits, 1xI2C, 1xRS232

Clock16 MHz quartz (20MHz max)

Power supply8 to 15V

Memory4 K word Flash for program

 192 bytes RAM

 128 bytes EEPROM

Timers3 (2x8bits and 1x16bits)

 2 capture, compare and PWM modules

Analog to digital5x10bits channels

Programmingon board ICSP connector


Schematic:

The components used are mostly components I already have, or recycled from various hardware. Some values are not critical. It is mainly a power supply, and connecting the various interfaces connectors to the processor.

The power supply is filtered by C1 and regulated to 5V with U1. D1 rectifies the supply voltage if needed, and also protects the board if the power supply connection is inverted. The board can be powered by a small main 6 to 12V transformer. U1 might need to be fitted with a heat sink to prevent it from overheating. It can also be powered by the board PSU3, which supplies 8 V from a USB port.

The processor U2 gets its power from the on board regulator or the ICSP programmer. D2 (Schottky for low voltage drop) supplies the power from the regulator, D3 from the ICSP. C3 filters U2 power and needs to be fitted as close as possible to the chip.

The value of the quartz is fairly open, but must be 20MHz maximum. I had a spare 16MHz one. The processor will need to be configured for HS oscillator type. C5 and C6 can be between 15 and 33 pF.

C3, C4, C7 and C8 are filters capacitor. Their value is not critical, but 100 nF is a good one to use. You can use between 10nF and 1 uF.

The usual reset signal is provided with D4, D5, R1 and C9. The led simply shows when the board is powered on.

The 3 8 bits interfaces connect port A, B and C to an 8 bits type bus, common across the various boards. Port A only provides RA0 to RA5. Pins 6 and 7 are not connected.
Pins 6 and 7 from port B are isolated with a resistor (R2 and R3, 4.7k, but not critical) on the interface, so the various boards plugged in will not interfere with programming. (RB6 and RB7 are used on the ICSP connector to program the processor.

The RS232 (TTL level with Rx and Tx signals) and I2C interfaces just take their signals from the appropriate pins of the processor.
The interrupt signal from the I2C interface is connected to signal Int0 (RB0)


Board 3 schematics

Fig. 2 Board 3 schematic


Construction:

The processor boards are build on prototyping strip boards. It can be a bit long, as they are many signals to route. Use the schematic and replicate it on the board. Use a socket for the processor U2.

K7 is for the RS232 interface. The signals are TTL level, and a converter can be fitted on it to provides proper RS232 signals. A pin from the header needs to be remove (pin 4)

Once all the components are soldered, you can test the board as described below before inserting the processor in its socket.

Interfaces pinout
Power supply8 BitsI2CRS232ICSP
1 V+ 1 Vcc 1 Int 1 Gnd 1 nc (LVP)
2 Gnd 2 bit 7 2 Vcc 2 Vcc 2 RB6
  3 bit 6 3 Sda 3 Tx processor 3 RB7
  4 bit 5 4 Scl 4 NC 4 Gnd
  5 bit 4 5 Gnd 5 Rx processor 5 Vpp
  6 bit 3     6 Mclr
  7 bit 2      
  8 bit 1      
  9 bit 0      
  10 Gnd      
Board 3 Component list
C1: 470 uF
C2: 10 uF
C3, C4, C7, C8: 100 nF
C5, C6: 22 pF
C9: 1 uF
R1: 33 K
R2, R3: 4.7K
R4: 1k
U1: 7805, LM1086-5.0 or equivalent
U2: PIC 16F873 or compatible, with 28pins socket
D1: 1N4004
D2: BAT42
D3, D4, D5: 1N4148
LED1: led 5 or 3 mm
Q1: 16 MHz (4 to 20 MHz)
K1: Connector AMP MT 2pins male
K2, K3, K4: Connector AMP MT 10pins male
K5: Connector AMP MT 5pins male
K6: Connector AMP MT 6pins male
K7: pinheader 5 pins

How to use / Testing:

To check the board, leave U2 out of its socket, and check voltage across pin 8 and 20, then 19 and 20 when the board is powered on. It must read 5V.
Check the power supply pins of the various connectors (K2 to K7).
To check the board fully, you need to fit the processor in its socket and run one of the tutorial projects (8 bits counter for example).


Files and links:

Eagle schematics file for board 3.
Eagle pdf file for board 3.
PIC Tutorials.
Microchip PIC 16F873.

Processor board 4 - PIC18F2320


PIC 18F2320

Fig. 1 PIC 18F2320 board

Description:

This is a processor board, and can take various 28 pins Microchip PIC processors. This one is fitted with a PIC 18F2320.
The board is comparable to board 3, but uses a PIC 18F type processor. The differences are the regulator is gone, so the board can be powered from 2.5 to 5V. It has an SPI interface connector, and a 20 MHz oscillator instead of the quartz. It has enough memory for small projects, hardware UART, I2C and SPI ports, 10 10bits ADC, 4 timers and nanoWatt technology. It is plenty to test a lot of the PIC features.

Its main purpose is to be able to develop on the 18F type processor.
It runs at 20 MHz, and has 3 8 bits interfaces, 1 I2C, 1 serial, 1 SPI and 1 ICSP connectors.

The board can be powered by one of the PSU boards (powered from USB port), or between 2.5 to 5V.


Schematic:

Specifications:

ProcessorMicrochip PIC 18F2320

Interfaces3x8bits, 1xI2C, 1xRS232, 1xSPI

Clock20 MHz oscillator

Power supply 2.5 to 5V

Memory4 K word Flash for program

 512 bytes RAM

 256 bytes EEPROM

Timers 4 (1x8bits and 3x16bits)

 2 capture, compare and PWM modules

Analog to digital10x10bits channels

Programmingon board ICSP connector

The components used are mostly components I already have, or recycled from various hardware. Some values are not critical.

The power supply is filtered by C1. D1 protects the board if the power supply connection is inverted.

The processor U2 gets its power from the board power or the ICSP programmer. D2 (Schottky for low voltage drop) supplies the power from the regulator, D3 from the ICSP. C3 filters U2 power and needs to be fitted as close as possible to the chip. D2 can be removed and shorted, which mean the full project will be powered on when programming. With D2 in, the minimum power voltage is 2.5V, which will be around 2V on the processor.

I used an 20MHz oscillator I had for the clock. The processor will need to be configured for ECIO or HS oscillator type. ECIO type will free RA6 as a general IO pin.

C2, C3, C4 and C5 are filters capacitor. Their values is not critical, but 100 nF is a good value to use. You can use between 100nF and 1 uF.

The usual reset signal is provided with D4, D5, R1 and C6. The led simply shows when the board is powered on.

The 3 8 bits interfaces connect port A, B and C to an 8 bits type bus, common across the various boards. Port A only provides RA0 to RA5 or RA6, depending on the oscillator's configuration. Pin 7 is not connected.
Pins 6 and 7 from port B are isolated with a resistor (R2 and R3, 4.7k, but not critical) on the interface, so the various boards plugged in will not interfere with programming. (RB6 and RB7 are used on the ICSP connector to program the processor.

The RS232 (TTL level with Rx and Tx signals), SPI and I2C interfaces just take their signals from the appropriate pins of the processor.
The interrupt signal from the I2C interface is connected to signal Int0 (RB0)
The SPI interface uses SPI slave select input (RA5) for CS0, Interrupt signal Int1 (RB1) for CS1 and generic IO (RC2) for CS2. 


Board 4 schematics

Fig. 2 Board 4 schematic


Construction:

The processor boards are build on prototyping strip boards. It can be a bit long, as they are many signals to route. Use the schematic and replicate it on the board. Use a socket for the processor U2.

K7 is for the RS232 interface. The signals are TTL level, and a converter can be fitted on it to provides proper RS232 signals. A pin from the header needs to be remove (pin 4)

Once all the components are soldered, you can test the board as described below before inserting the processor in its socket.

Interfaces pinout
Power supply8 BitsI2CSPIRS232ICSP
1 Vcc 1 Vcc 1 Int 1 Gnd 1 Gnd 1 RB5 (LVP)
2 Gnd 2 bit 7 2 Vcc 2 Sck 2 Vcc 2 RB6
  3 bit 6 3 Sda 3 MISO 3 Tx processor 3 RB7
  4 bit 5 4 Scl 4 MOSI 4 NC 4 Gnd
  5 bit 4 5 Gnd 5 CS0 5 Rx processor 5 Vpp
  6 bit 3   6 CS1   6 Mclr
  7 bit 2   7 CS2    
  8 bit 1   8 Vcc    
  9 bit 0        
  10 Gnd        
Board 4 Component list
C1: 10 uF
C2, C3, C4, C5: 100 nF
C6: 2.2 uF
R1: 8.2 K
R2, R3: 4.7K
R4: 680
U2: PIC 18F2320 or compatible, with 28pins socket
D1: 1N4004
D2: BAT42
D3, D4, D5: 1N4148
LED1: led 5 or 3 mm
Q1: 20 MHz oscillator (4 to 20 MHz)
K1: Connector AMP MT 2pins male
K2, K3, K4: Connector AMP MT 10pins male
K5: Connector AMP MT 5pins male
K6: Connector AMP MT 6pins male
K7: pinheader 5 pins
K8: Connector AMP MT 8pins male

How to use / Testing:

To check the board, leave U2 out of its socket, and check voltage across pin 8 and 20, then 19 and 20 when the board is powered on. It must read around the power supply voltage (minus the voltage drop in D2).
Check the power supply pins of the various connectors (K2 to K8).
To check the board fully, you need to fit the processor in its socket and run one of the tutorial projects (8 bits counter for example). Just make sure you set the switch on JP1 to suit the power supply used.


Files and links:

Eagle schematics file for board 4.
Eagle pdf file for board 4.
PIC Tutorials.
Microchip PIC 18F2320.
Copyright 2011. Poker Games. Copyright © 2012 riaDesign