Home > Advanced Projects > Serial Reader
SERIAL READER

Modified: 15:19, 27 October 2013

by Phil Townshend 2009

This project was built through the need to monitor exactly what was being sent from the serial port on my laptop. Since a few projects use serial control, and the laptop provides these, I needed something that could independently show serial data.

It can display bytes in Hex, Decimal or ASCII, set via the menu and Baud speed can also be set from 9.6K to 1.25M.

It is all driven by a PIC16F627, by far one of the most versatile PICs made.

CIRCUIT DETAILS
SPECIFICATION:
  • 128 byte buffer
  • Baud rates: 9.6K, 19.2K, 38.4K, 57.6K, 115.2K, 250K, 625K, 1.25M
  • ASCII, Hex, Decimal display modes
  • Power supply: 7v to 12v
  • Adjustable contrast
  • Auto-repeat facility
  • 20MHz crystal clock
CIRCUIT DIAGRAM

DESCRIPTION

The 20MHz oscillator is a encapsulated type that fits a 8pin DIL configuration. All that's needed is a pull-up resistor of about 1K. This is fed to the CLKIN input of the PIC.

The buttons are PCB click type - same as used in a computer mouse - and have pull-up resistors on each input to the PIC

The serial buffer needs to convert the negative input as a logic 1 and a positive input as logic 0. Also it needs to keep the Rx input to the PIC high when no input is connected otherwise the PIC will repeatedly try to receive a byte resulting in a frame error. This is accomplished simply by using a transistor inverter, with diodes in reverse bias to prevent damage to the transistor.

Finally the LCD display is a 16x2 dot matrix, alpha-numeric display - meaning it has a dot matrix output in 5x7 blocks for letters and numbers. Communication can be by 8-bit or 4-bit connection - I have used the 4-bit since it simplifies PCB routing. Only RS and Enable signals are needed to control the 4-bit data input. PR1 controls the contrast of the display.

* NOTE: R9 is used to illuminate the display. This wasn't used in the end with the prototype as the 78L05 regulator got quite warm and it wasn't essential to the function. However it does look better when the LED backlight is on and can be run safely from a 9v PP3 battery.

Current consumption is about 10mA without the LED backlight.

OPERATION

The bytes can be viewed using the "-" and "+" buttons to scroll the data left and right. The offset points to current byte (0 to Len-1)

The Menu button brings up the OPTIONS display.

The options, to clear the memory, change Text mode, change Baud rate or return are accessed by pressing one of the buttons.

The Text Mode menu.

The Baud Rate menu.

PCB DETAILS
As much as possible was mounted on the PCB to make it a handheld or stand alone unit. Standard 2.1mm PCB power socket and 9pin D-type female sockets were used for connections to power and serial input.

The PCB measures 137mm x 60mm, (5.4" x 2.35").

DOWNLOADS

The PIC IC for the project will soon be available on the SHOP page. There are downloads of the PCB and circuit diagram in various formats below.

PCB Layout - (PCB Wizard)
Circuit Diagram - (LiveWire)
Circuit Diagram - (JPEG)
PCB Track Layout - (Word)

    EDUTEK LTD.
    22 STROUD LANE,
    BOURNEMOUTH.
    DORSET, BH23 3QU
    Tel./Fax: 01202 474720
    Tel: 07714 096258

    Contact us by email.
    www.edutek.ltd.uk - Working Electronics For Students & Teachers