Serial Peripheral Interface
The serial peripheral
interface (SPI) allows high-speed synchronous data transfer between the
microcontroller and peripheral devices or between several microcontroller
devices.
One of the most important functions of this interface is connect to the In System Programmer (ISP). It is used to program a microcontroller when it is running program. It is easy to program a microcontroller and development a program faster.
The microcontroller must support SPI before using it. The AT89S53 or AT89S5253 support this interface.
It is a 10 pins connector. The following is the pin assignment of SPI/ISP connector:
|
Vcc |
SCK2 |
PROG |
GND |
GND |
|
1 |
3 |
5 |
7 |
9 |
|
2 |
4 |
6 |
8 |
10 |
|
SS |
MOSI |
MISO |
SCK1 |
Reset |
Let me talk
about the function of the signal pins.
Pin 1:
This is the Vcc (5V).
Pin 2:
This is the Slave port select input
Pin 3:
This is the master clock output 2, slave clock input 2 pin
Pin 4:
This is the Master data output, slave data input pin.
Pin 5:
It is the Program LED. It will turn on the LED when the microcontroller is
programming.
Pin 6:
This is the Master data input, slave data output pin.
Pin 7, 9:
This is the common ground.
Pin 8:
This is the master clock output, slave clock input pin
Pin 10:
This is the reset signal of the module.
In this project, we only use this interface to download the program to
microcontroller. We can reduce the development time.