You have no items in your shopping cart.

Subtotal: 0.00

User Manual for 8051 Development Kit

Introduction

PRIMER-8051 Kit, is proposed to smooth the progress of developing and debugging of various designs encompassing of High speed 8-bit MCU from NXP/Dallas/Atmel. The board supports 8051 family devices with various memory and peripheral options. It integrates on board two UARTs, LEDs, Relays, Motor Interface, keypads, an ADC input and GLCD/LCD Display to create a stand-alone versatile test platform.

Specifications

MCU

  • NXP's 8051 - P89V51RD2 MCU

Memory

  • 64K Flash – Program Memory
  • 1K SRAM – Data Memory

Clock

  • 11.0592MHz crystal for MCU | 32.768KHz RTC

On-Board Peripherals

  • 40pin-ZIF Socket | 44-pin PLCC Socket
  • 8 Nos. Point LEDs (Logic Output)
  • 8 Nos. Digital Input (Slide Switch)
  • 4x4 Matrix Keypad
  • 2X16 Character LCD (Background Light)
  • 4 Nos. 7-Segment Display
  • 2 Nos. Analog Input (Potentiometer | LM35)
  • Stepper Motor Driver Interface
  • 2 Nos. of SPDT Relay
  • Serial EEPROM (I2C)
  • DS1307 RTC with Battery-Backup
  • 2 Nos. UART(RS232)
  • USB 2.0 Connector ( Power Supply)
  • Buzzer (Alarm), Interrupts Study, Reset Button
  • SPI - Digital / Analog converter
  • 2-Channel SPIAnalog-Digital converter
  • 128x64 Graphical LCD
  • Digital Temperature Sensor (DS18S20)
  • 40-Pin Expansion Connector
  • Traffic Light Controller Modules

Power

  • 9-12V, AC/DC- Adaptors, Power form USB (+5V) (+3.3V, 800mA)

Connectors

  • D-SUB Connector (Serial Port, ISP)
  • 40 – PIN Expansion Connector
  • Ext Analog Input Connector

General Block Diagram


Supported Microcontrollers

SOCKET1 (40-DIP)

  • NXP : P89V51Rxx
  • Dallas : DS89C420/430/450
  • *Atmel : AT89S51/52/8252 and AT89Sxx

SOCKET2 (44-PLCC)

  • NXP : P89V51Rxx
  • Dallas : DS89C420/430/450
  • *Atmel : AT89S51/52/8252 and AT89Sxx MCUs

P89V51 Controller Features

  • 80C51 Central Processing Unit
  • 5V Operating voltage from 0 to 40 MHz
  • 64 KB of on-chip Flash program memory with ISP (In-System Programming) and IAP (In-Application Programming)
  • Supports 12-clock (default) or 6-clock mode selection via software or ISP
  • SPI (Serial Peripheral Interface) and enhanced UART
  • PCA (Programmable Counter Array) with PWM and Capture/Compare functions
  • Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each)
  • Three 16-bit timers/counters
  • Programmable Watchdog timer (WDT)
  • Eight interrupt sources with four priority levels
  • Second DPTR register
  • Low EMI mode (ALE inhibit)
  • TTL- and CMOS-compatible logic levels
  • Brown-out detection
  • Low power modes - Power-down mode with external interrupt wake-up - Idle mode

Jumper & Connector Details

Stepper / Relay

JP3

Internal Supply (+5V)

External Supply(+5V)

LED

JP4

Enable LEDs, Port (P1.16 – P1.23)

Disable LEDs.

Buzzer (P0.6)

JP5

Enable Buzzer

Disable Buzzer

Analog I/P (POT)

JP6

On-Board Analog Input(Potentiometer)

External Analog Input-1 select

Analog I/P (LM35)

JP7

On-Board Analog Input(LM35 Temp sensor)

External Analog Input-2 select

 

Connector Details

40-Pin Expansion Connector



Power Supply

The external power can be AC or DC, with a voltage between (7V/12V,1A output) at 230V AC input. The 8051 board produces +5V using an LM7805 voltage regulator, which provides supply to the peripherals. USB socket meant for power supply only, user can select or control power either USB or Ext power supply through slide switch SW2.

+5V USB/EXT

SW2

Power +5V (EXT through Adaptor)

Power +5V (USB)

 

On-board Peripherals

The Development kit comes with many interfacing options

  • 8-Nos. of Point LED’s (Digital Outputs)
  • 8-Nos. of Digital Inputs (slide switch)
  • 2 Lines X 16 Character LCD Display
  • 4 Digit Seven-segment display
  • 128x64 Graphical LCD Display
  • 4 X 4 Matrix keypad
  • Stepper Motor Interface
  • 2 Nos. Relay Interface | Buzzer
  • Serial EEPROM
  • Real Time Clock (DS1307) with battery backup
  • SPI-ADC | SPI DAC
  • Digital Temperature Sensor(DS18S20)
  • Traffic Light Module (Optional)
  • Two UART for serial communication

Light Emitting Diodes

  • Light Emitting Diodes (LEDs) are the most commonly used components, usually for displaying pin’s digital states.
  • The 8051 Kit has 8 nos., of Point LEDs, connected with port pins (P0.0 to P0.7), to make port pins high LED will glow.

 

 

Point LEDs

8051 Lines

LED Selection

DIGITAL OUTPUTS

LED1

P0.0

LED2

P0.1

LED3

P0.2

LED4

P0.3

LED5

P0.4

LED6

P0.5

LED7

P0.6

LED8

P0.7

 

Digital Inputs

  • This is another simple interface, of 8-Nos. of slide switch, mainly used to give an input to the port lines, and for some control applications also.
  • The 8051 Kit, slide switches (SW8 to SW27) is connected with port pins (P2.0 to P2.7), user can give logical inputs ‘LOW’.

 

 

Slide Switch

8051 Lines

Input Logic Selection

DIGITAL INPUTS

SW8

P2.0





SW13

P2.1

SW14

P2.2

SW19

P2.3

SW20

P2.4

SW25

P2.5

SW26

P2.6

SW27

P2.7

 

LCD 2x16 IN 4-BIT MODE

The 8051 Kit, have 2x16 character LCD. 7 pins are needed to create 4-bit interface; 4 data bits (P0.4 – P0.7, D4-D7), address bit (RS-P0.0), read/write bit (R/W-P0.1) and control signal (E-P0.2). The LCD controller is a standard KS0070B or equivalent, which is a very well-known interface for smaller character based LCDs.

Figure below illustrate the LCD part of the design and which pins are used for the interface. The LCD is powered from the 5V power supply enabled by switch SW30.

 

LCD MODULE

8051 LINES

2x16 LCD Selection

CONTROL

RS

P0.0

RW

P0.1

E

P0.2

DATA LINES

D0-D3

NC

D4

P0.4

D5

P0.5

D6

P0.6

D7

P0.7

 

Make switch SW30 to ‘LCD’ label marking position

 

Seven Segment Display

In 8051 Kit, 4 nos. of common anode seven segment displays, The digit select lines are connected to port pin (P3.4- P3.7) and the segment lines of seven segments LED is being terminated at port pins (P1.0-to P1.7). All the common anode displays consume very small amount of current.

The 7-segmend display is powered from the 5V power supply enabled by switch SW30.

 

7-SEG

8051 Pins

7-Segment Display

Digit select lines

Digit - 1

P3.4

Digit – 2

P3.5

Digit – 3

P3.6

Digit - 4

P3.7

Segment Lines

Seg - a

P1.0

Seg – b

P1.1

Seg – c

P1.2

Seg – d

P1.3

Seg – e

P1.4

Seg – f

P1.5

Seg – g

P1.6

Seg – dp

P1.7

 

Make switch SW30 to ‘7SEG’ label marking position

 

128x64 GLCD Graphical LCD

The 8051 Kit is the GLCD. 14 pins are needed to create 8-bit interface; 8 data bits (P1.0 – P1.7, DB0-DB7), two chip select line P3.2(CS1) and P3.3(CS2), address bit (R/S-P3.4), read/write bit (R/W-P3.5) and control signal (E-P3.6) and Reset (RST-P3.7). The GLCD controller is a standard S6B0108 or equivalent, which is a very well-known interface for Graphical based LCDs.

Figure below illustrate the GLCD part of the design and which pins are used for the interface. The GLCD is powered from the 5V power supply enabled by switch SW30.

 

GLCD

8051 LINES

128x64 GLCD Selection

CONTROL L LINES

CS1

P3.2

CS2

P3.3

RS

P3.4

R/W

P3.5

E

P3.6

LCD – DATA LINES

DB0

P1.0

DB1

P1.1

DB2

P1.2

DB3

P1.3

DB4

P1.4

DB5

P1.5

DB6

P1.6

DB7

P1.7

RST

P3.7

Make switch on

SW30 - GLCD | 7-SEG position

 

SW32 to GLCD label marking position

 



4x4 Matrix keypad

Keypads row and column lines are arranged by matrix format. Row lines (P2.0 – P2.3) and Column lines (P2.4 to P2.7) connected directly by the port pins.

 

 

4x4 Matrix Lines

8051 Lines

4x4 Matrix Keypad

ROW

ROW-0

P2.0

ROW-1

P2.1

ROW-2

P2.2

ROW-4

P2.3

COLUMN

COLUMN-0

P2.4

COLUMN-1

P2.5

COLUMN-2

P2.6

COLUMN-3

P2.7

 



Note: While using Keypad ensure slide switches (SW8-SW27) to off position.

Stepper Motor

The ULN2003A is a high-voltage, high-current Darlington transistor array. The device consists of eight NPN Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads.

ULN2003 is used as a driver for port I/O lines, drivers output connected to stepper motor, connector provided for external power supply if needed.

 

 

Stepper Motor(5V)

8051 Lines

Stepper Motor PWR Select

STEPPER MOTOR

COIL-A

P0.0

COIL-B

P0.1

COIL-C

P0.2

COIL-D

P0.3

Make switch SW30 to SM/RL label

marking position.

 



For Motor/relay section obtain power from on-board (internal) or external supply through jumper JP3.

Relay and Buzzer Interface

ULN2003 is used as a driver for port I/O lines, drivers output connected to relay modules. Connector provided for external power supply if needed. Make port pins to high, relay will activated

A small piezoelectric buzzer on the 8051 Kit, P0.6 make the pin high, current will flow through the buzzer and a relatively sharp, single-tone frequency will be heard.

 

 

RELAY SPDT

8051 Lines

RELAY Power Select

RELAYS | BUZZER

Relay-1

P0.4

Relay-2

P0.5

Buzzer

P0.6

Note : Relay | Buzzer selection make switch SW30 to SM/RL label marking position

 

For Motor/relay/buzzer section obtain power from on-board (internal) or external supply through jumper JP3.

Serial EEPROM

The AT24C01A/02/04/08/16 provides 1024/2048/4096/8192/16384 bits of serial electrically erasable and programmable read-only memory (EEPROM) organized as 128/256/512/1024/2048 words of 8 bits each. The device is optimized for use in many industrial and commercial applications where low-power and low-voltage operation are essential.

Features of AT24Cxx

  • Internally Organized 128 x 8 (1K), 256 x 8 (2K), 512 x 8 (4K)
  • 2-wire Serial Interface
  • Bi-directional Data Transfer Protocol
  • 100 kHz (1.8V, 2.5V, 2.7V) and 400 kHz (5V) Compatibility
  • Write Protect Pin for Hardware Data Protection
  • 8-byte Page (1K, 2K), 16-byte Page (4K, 8K, 16K) Write Modes -Data Retention: 100 Years.
 

I2C EEPROM

8051 Lines

Serial EEPROM

AT 24xx

SCL

P2.0

SDA

P2.1

Make switch SW28 to I2C label marking position.

 

Real Time Clock (DS1307)

The Real Time Clock (RTC) is a set of counters for measuring time when system power is on, and optionally when it is off. It uses little power in Power-down mode. On the 8051, the RTC can be clocked by a separate 32.768KHz oscillator, or by a programmable prescale divider based on the VPB clock. Also, the RTC is powered by its own power supply pin, VBAT, which can be connected to a battery or to the same 3.3 V supply used by the rest of the device.

Features

  • Measures the passage of time to maintain a calendar and clock.
  • Ultra Low Power design to support battery powered systems.
  • Provides Seconds, Minutes, Hours, Day of Month, Month, Year, Day of Week, Day of Year.
  • Dedicated 32kHz oscillator or programmable pre-scalar from VPB clock.
  • Dedicated power supply pin can be connected to a battery or to the main 5V/3V3.

 

 

RTC

8051 Lines

Real Time Clock

DS1307

SCL

P2.0

SDA

P2.1

Make switch SW28 to I2C label marking position.

 



Digital Temperature Sensor (DS18S20)

The DS1820 digital thermometer is well suited to environmental temperature measurement, having a temperature range of –55C to 125C and an accuracy of +/-0.5C.

Features

  • Unique 1-Wire interface requires only one port pin for communication
  • Multi-drop capability simplifies distributed temperature sensing applications
  • Can be powered from data line. Power supply range is 3.0V to 5.5V
  • Measures temperatures from -55°C to +125°C (-67°F to +257°F)
  • ±0.5°C accuracy from -101°C to +85°C
  • 9-bit thermometer resolution, Converts temperature in 750ms (max.)
 

Temp Sensor

8051 Lines

Digital Temp Sensor

DS18S20

Dout

P2.2

Make switch SW28 to 1-WIRE label marking position.

 

Analog-Digital Converter (SPI)

The Microchip Technology Inc. MCP3202 is a successive approximation 12-bit Analog-to-Digital (A/D) Converter with on-board sample and hold circuitry. The MCP3202 is programmable to provide a single pseudo-differential input pair or dual single-ended inputs. Differential Nonlinearity (DNL) is specified at ±1 LSB, and Integral Nonlinearity (INL) is offered in ±1 LSB (MCP3202-B) and ±2 LSB (MCP3202-C) versions. Communication with the device is done using a simple serial interface compatible with the SPI protocol. The device is capable of conversion rates of up to 100ksps at 5V and 50ksps at 2.7V.

 

SPI - ADC

8051 Lines

SPI - ADC

MCP 3202

CS

P2.4

CLK

P2.5

MISO

P2.6

MOSI

P2.7

Make switch SW28 to ADC label marking position.

 

Analog Inputs Select

ADC Select

ADC Inputs

Header

ADC Select

 

LM35

CH0

JP7

 

POT (R19)

CH1

JP6

 



Digital-to-Analog Converter (DAC)

DAC Features

The Microchip Technology Inc. MCP492X are 2.7 – 5.5V, low-power, low DNL, 12-Bit Digital-to-Analog Converters (DACs) with optional 2x buffered output and SPI interface.

The MCP492X are DACs that provide high accuracy and low noise performance for industrial applications where calibration or compensation of signals (such as temperature, pressure and humidity) are required.

Features

 

  • 12-Bit Resolution
  • ±0.2 LSB DNL (typ), ±2 LSB INL (typ)
  • Single or Dual Channel
  • SPI™ Interface with 20 MHz Clock Support
  • Simultaneous Latching of the Dual DACs w/LDAC
  • Fast Settling Time of 4.5 µs
  • Selectable Unity or 2x Gain Output
  • 450 kHz Multiplier Mode
  • External VREF Input
  • Extended Temperature Range: -40°C to +125°C

 

 

SPI - DAC

8051 Lines

SPI - DAC

MCP 2491

CS

P3.5

CLK

P3.6

MOSI

P3.7

Note : Measure DAC output at J2 PTB connector.

 



Traffic Light Controller

Traffic light controller section consists of 12 Nos. point leds are arranged by 4Lanes. Each lane has Go(Green), Listen(Yellow) and Stop(Red) LED is being placed. Each LED has provided for current limiting resistor to limit the current flows to the LEDs.

 

LAN Direction

8051 Lines

LED’s

Traffic Light Controller

NORTH

P3.2

D8-Stop

 

P3.3

D9-Listen

P3.4

D10-Go

WEST

P3.5

D11-Stop

P3.6

D12-Listen

P3.7

D13-Go

SOUTH

P1.0

D14-Stop

P1.1

D15-Listen

P1.2

D16-Go

EAST

P1.3

D17-Stop

P1.4

D18-Listen

P1.5

D19-Go

Note : Make SW32 to “Traffic” label marking position

 



RS-232 | Interrupt Communication

 

  • RS-232 communication enables point-to-point data transfer. It is commonly used in data acquisition applications, for the transfer of data between the microcontroller and a PC.
  • The voltage levels of a microcontroller and PC are not directly compatible with those of RS-232, a level transition buffer such as MAX232 be used.

 

 

UART DB-9 Connector

8051

Processor Lines

Serial Port Section

UART0(P1)

ISP PGM

RXD0

P3.0





TXD0

P3.1

UART1

(P2)

RXD1

P1.2

TXD1

P1.3

Note : RXD1 and TXD1 lines are only available in Maxim-Dallas Microcontrollers DS89C4xx series.

 



Interrupts

In 8051, two external interrupts lines are terminated at (EXINT0-P3.2) and (EXINT2-P3.3).

 

 

Interrupts

8051 Lines

Interrupts

Tactile Switch

 

 

 

 

DS1307

SW29 – (INT0)

P3.2

SW31 – (INT1)

P3.3

 



Board Layout

Easy Programming Steps - NXP Microcontrollers

Software Settings

1. Open “Flashmagic” ISP software

Step 0 : Go to “Options” Menu, then choose “Advanced Options”, Advanced options windows appears.Choose “Hardware Config” tab, Deselect “Use DTR to Control RST” checkbox.





Step1 : Select Com Port E.g COM1 or COM2

  • Set baud rate “9600”
  • Select Device “89V51RD2” Interface “None(ISP)”

Step2 : Check “Erase all Flash”





Step3 : Load or locate your Hex files

Step4 : Select options you want like above figure, verify, erase, security bit.

Step 5: Press “Start” button





Press Hardware “RST” Button SW3. Now it starts, Erasing, Program & Verifying.





Dallas Microcontrollers

Hardware Settings





Select Dallas MCU “DS89C450”





1. “Options” – Menu

Select com port and set baud rate to 9600





2. “Target” – Menu

 

  • Open Com1at 9600
  • Connect to Loader

 

We get window like this

3. “File” – Load Flash

…\Examples Code\LED Blink\Out\LEDBlink.hex





Execution Mode

Set DIPSWITCH SW1 – ‘EXE’ Mode