Pond Electronics - Home of the µFlash876 & µFlash876B embedded controllers, µStack & µConnect Bus.

µFlash876B User Manual

Introduction

The µFlash876B embedded controller is the ideal platform for small to medium scale embedded applications. The µFlash876B has built in support for "in system programming", allowing you to download compiled code directly into FLASH memory via the built in serial port for immediate execution. The µStack expansion bus gives you easy access to the µFlash I/O lines and facilitates rapid application development using our growing range of µStack interface boards.The revolutionary new µConnect port allows almost infinite expansion using a buffered I2C protocol on a standard wiring system.

The µTerm module provides an instant
userinterface for the µFlash876B via
the µConnect Bus.

Features

 

Self Programming

The µFlash876B is self programming, no PIC programmer required. The built in bootstrap loader accepts Hex files via the µFlash serial port and stores them in on-chip FLASH memory. Programs stored in on-chip memory are retained even in the absence of power and are automatically run when the µFlash is reset. The µFlash876B can be reprogrammed a minimum of 1000 times.

 

Choice of tools

The µFlash876B is compatible with most PIC software development tools which support the PIC 16F876, including:

Please contact us if you have any queries regarding development tool compatibility.

 

System Requirements

To program the µF876B you will need a W95/W98/ME PC with a standard 9 pin serial port (COM1). You will also need some means of software development for the PIC16F876 ( an assembler or compiler ) as well as the µFlash Driver program

As of ver 3.11 the µFlash and PICulator share a common driver program. Please see the µFlash/PICulator Driver Manual for details of installation & use of the driver.

 

Power Connector

The µFlash876B requires a 9V to 14V DC PSU to operate.

The µFlash876B provides a choice of power input connectors. In addition to the secure latching Molex KK used on other Pond controller boards, the µFlash876 can also use a standard 2.1mm barrel connector ( center +) commonly found on desktop PSUs.

Each µF876B is supplied with a KK terminated flying lead to facilitate easy power connection.

We also stock mains adaptors for some areas. Please see our Components & Accessories page for availability of a suitable mains adaptor for your area.

Both the raw power in and the derived regulated +5V are available for use by external interface circuitry via the µStack header.

 

The RS232 Serial/Programming Port

The µF876B provides one fully buffered RS232 serial port. Access to this port is via a 9 pin D-type female connector. This port can operate at baud rates of up to 57600 baud. Using the µFlash driver program, compiled PIC programs can be downloaded through this port from the PC to the µFlash. Once this is complete the serial port is then available for use by your application program.

PinFunction
1DCD out (Permanently Asserted, -10V)
2µFlash TxD (PC RxD)
3µFlash RxD (PC TxD)
4µFlash Reset (PC DTR)
5Gnd
6DSR (connected to RTS)
7RTS (looped back to DSR & CTS)
8CTS (connected to RTS)
9N.C.

When used by an application it is recommended (though not ALWAYS necessary) that you remove the PGRM jumper located beside the serial connector. This isolates the PC DTR signal from the µFlash reset line thus preventing PC communications functions from holding the µFlash in reset. This PGRM jumper must be reinstalled each time you wish to use the bootstrap loader to burn a new program into µFlash memory.

A straight through 9 pin male to female serial cable is required to connect the µFlash with a PC. This cable is supplied with µFlash starter kits and is also available separately from our component shop.

If you are making up your own cable please note that when viewed from the front, male connectors (such as on the PC) have their pins numbered in a mirror image of the diagram shown to the right.

 

The µStack expansion header

The µStack header allows easy interfacing of the µFlash876B to any of the growing range of µStack interface boards. Each µStack interface board is simply stacked above or below the µFlash876B using the built in µStack header and four 16mm PCB spacers (supplied with each board). In this way you can create an interface in seconds.

The µStack header gives access to 16 of the PIC16F876 I/O pins as well as system power and ground. The table on the right gives the mapping between the µStack pin designation and the corresponding PIC I/O line as well as any alternate function of that pin.

µStack
Pin
PIC PinAlternate Functions
P0RC0Counter/Timer
(T1OSO,T1CKI)
P1RC1Counter/Timer
(T1OSI,CCP2,PWM2)
P2RC2Counter/Timer
(CCP1,PWM1)
P3RC3None
P4RA0ADC (AN0)
P5RA1ADC (AN1)
P6RA2ADC (AN2,Vref-)
P7RA3ADC (AN3,Vref+)
P8RB0Ext Interrupt
P9RB1None
P10RB2None
P11RB3None
P12RB4Interrupt on change
P13RB5Interrupt on change
P14RB6Interrupt on change
P15RB7Interrupt on change

 

µF876 Circuit Description

A quick scan of the µF876 block diagram will reveal a surprisingly simple structure, this is because of the extraordinary power of the µF876's key component the 16F876 microcontroller. In addition to the ample facilities provided by the PIC16F876 the µFlash provides an 8KByte data EEPROM (24LC64) located on an internal I2C bus. This internal bus is buffered by a P82B715P I2C buffer to provide clock and data signals for the µConnect interface. Expansion is also possible via the DS1 interface which is intended for connection to Dallas 1-Wire and touch devices. Additional components include an RS232 buffer (MAX202CPE) and 5V regulator (7805CT) and status LED.

 

The PIC16F876 Microcontroller

The 16F876 is one of the more powerful versions of the popular PIC range of microcontrollers from Microchip Technologies. It includes such features as 8K (by 14 bits) of on board Flash program memory, 393 bytes of RAM, 256 bytes EEPROM, multi-channel 10 bit ADC, multi-channel counter/timer/PWM module, UART, brownout detector, watchdog timer and high current digital I/O.

On the µFlash the 16F876 is clocked by a 20MHz crystal, this results in a peak execution rate of 5 MIPS (million instructions per second).

Unfortunately it is not possible to program the configuration fuses of the PIC16F876 using a bootstrap loader. Configuration of the watchdog timer is therefore only possible with a PIC programmer. For this reason the watchdog timer on the standard µFlash is permanently disabled. As of Ver 3.11 of the bootloader the µFlash is also available with the watchdog timer permanently enabled. If you have access to a PIC programmer you can download the bootloader from the Pond web site and burn it into the PIC on your µFlash (at your own risk!). Alternatively we can supply a PIC preprogrammed with watchdog enabled bootloader for a small fee or by special request (at time of order) we can supply your µFlash with the watchdog enabled. Please contact us for details.

Please see the PIC16F876 data sheet (pdf/3.7M) for details of facilities and operation.

 

The Internal I2C expansion Bus

The I2C bus (Inter IC Bus) provides a simple method of interfacing between an embedded microcontroller and a number of peripheral chips using only two signal lines. The bus uses synchronous serial communications at up to 100KBits/sec to move data between a master controller chip and a number of slave peripheral chips. Each slave chip is allocated a different I2C address allowing it be uniquely selected on the bus. On the µFlash876B an internal I2C bus is used to interface the PIC16F876 to an 8KByte EEPROM using only two PIC pins RC4 (I2C SCL) and RC5 (I2C SDA) and a simple protocol. These signals are also buffered and brought to the µConnect port allowing easy I2C expansion of the µFlash.

The CCS PIC C compiler range (PCM/PCW) include built in functions for driving the µFlash I2C/µConnect port (i2c_start(), i2c_stop(), i2c_read() i2c_write()).

 

Serial Data EEPROM

A 24LC64 serial EEPROM provides 8KBytes of non-volatile data storage on the µFlash.

The EEPROM is accessed via the internal I2C bus and is located at I2C address 0x50.

Please see the 24LC64 data sheet (pdf/208K) for detailed operation.

 

The µConnect Bus

The µConnect Bus is a buffered I2C interface with standard RJ45 connector. Low cost UTP patch cables carry both signal and power to remote peripheral modules (up to 16 modules on the bus). Each module can have multiple I2C peripheral chips.The buffer extends the I2C range out to 30m at full speed (100KBits/sec). Remote peripherals can be based on standard I2C ICs or on I2C equipped microcontrollers.

µConnect modules under development

Please see the µConnect user manual for details of the specification and operation of the bus.

 

The DS1 Interface

DS1 interface allows direct connection to Dallas 1 Wire and Touch devices. The Dallas 1 wire protocol must be implemented in software in order to drive these devices. Dallas 1 wire devices include:

 

The on board status LED

The on board status LED is controlled by PIC I/O pin RA5. To turn the LED on the RA5 must be initialized as an output and set LOW. This can be done in CCS PIC C using a single command:

output_low(PIN_A5); // turn LED on

To turn the LED off make pin RA5 HIGH. In CCS PIC C:

output_high(PIN_A5); // turn LED off

 

Testing the µFlash

To test the µFlash:

  1. Connect the µF876 to your PCs serial port using the RS232 serial cable.
  2. Connect the µF876 to an appropriate power source.
  3. Ensure that the jumper labeled "Pgrm" is installed.
  4. Launch the driver (Double click on the µFlash driver icon). You should see the window opposite:

The µFlash driver software runs under Windows95/98/ME, it can be launched from inside the PCW/PCM IDE, by "drag and drop" or from the Windows console.

Please see the µFlash/PICulator Driver manual for details of installation and use of the driver.

 

How the µF876 works

The 16F876 used on the µF876 includes 8K by 14 bits of on chip Flash program memory, this is usually programmed using a standard PIC programmer, however an unusual feature of the 16F876 is its ability (with the right software) to program itself. The 16F876 supplied on the µF876 is preprogrammed with a bootstrap loader, each time the µFlash is reset the bootstrap loader is automatically run, the loader sets up the µF876 serial port (9600 Baud,8 bits, no parity) and waits for a 6 byte signature, if this signature is received then the µFlash will enter programming mode, if the signature is not received within a short timeout (about 100mS) the µFlash will run the current user program. To allow the PC to place the µF876 in programming mode at any time, the reset pin on the 16F876 is connected (via the PGRM jumper) to the DTR line of the serial port.

When you run the µFlash driver software it resets the µF876 by asserting the DTR line. After reset it will send the 6 byte signature required to place the µF876 into programming mode. The driver software can now program the on chip Flash using the µFlash programming protocol. Once programming is complete the driver again resets the µF876, this time however it does not supply the signature and so after a short delay the µFlash automatically runs the user program.

 

Differences between the µFlash876 & µFlash867B

 

 

Home | Products | Technical Info | How to Order | Contact Us | Links