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

µFlash876 User Manual


The µFlash876 embedded controller is the ideal platform for small to medium scale embedded applications. The µFlash876 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.



Self Programming

The µFlash876 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 µFlash876 can be reprogrammed a minimum of 1000 times.

Choice of tools

The µFlash876 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.



The wide feature set of the µFlash lends itself to a multitude of embedded applications including:


System Requirements

To program the µF876 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 µFlash876 requires a 9V to 14V DC PSU to operate. Connection to the µF876 is via a 3 way latching square connector (Molex KK series). Each µF876 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 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 and the auxiliary power header (J5).



The RS232 Serial/Programming Port

1DCD out (Driven by PIC pin RA5)
2µFlash TxD (PC RxD)
3µFlash RxD (PC TxD)
4µFlash Reset (PC DTR)
6DSR (connected to RTS)
7RTS (looped back to DSR & CTS)
8CTS (connected to RTS)

The µFlash 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.

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

µStack PinPIC PinAlternate Functions
P6RA2ADC (AN2,Vref-)
P7RA3ADC (AN3,Vref+)
P8RB0Ext Interrupt
P12RB4Interrupt on change
P13RB5Interrupt on change
P14RB6Interrupt on change
P15RB7Interrupt on change

The µStack header allows easy interfacing of the µFlash876 to any of the growing range of µStack interface boards. Each µStack interface board is simply stacked above or below the µFlash876 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. If you do not wish to use the µStack system, direct connection to the PIC I/O lines can be made to the pins on the back of the µStack header or through the alternate I/O-Power headers (J4-J5).

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.




µ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 a real time clock (DS1307) and 8KByte data EEPROM (24LC64). These are interfaced to the PIC16F876 via an internal I2C bus. Additional components include an RS232 buffer (MAX202CPE) and 5V regulator (7805CT).


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

DeviceI2C Address

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 µFlash876 an internal I2C bus is used to interface the PIC16F876 to an RTC and EEPROM using only two PIC pins RC4 (I2C SCL) and RC5 (I2C SDA) and a simple protocol.

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

Note that on the µFlash876 the I2C bus is only available internally on the PCB, it is not available for external expansion. If you require external access to the I2C bus, this is available on the µFlash876B.

  Slaves address on the µFlash I2C bus

RTC and Battery

The µFlash876 includes a DS1307 battery backed up real time clock. This clock maintains time in seconds, minutes, hours, day of month, month, day of week, and year (with leap year compensation to the year 2100). The time is maintained by a replaceable 3V Lithium battery (Type CR2025), even when the µFlash is powered down.

Access to the RTC is via the internal I2C bus which is shared with the serial data EEPROM.

Please see the DS1307 data sheet (pdf/546K) for detailed operation of the RTC.


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 which is shared with the RTC.

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


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 150mS) 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.




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