File: /~heha/ewa/PIC16F145x-Urlader/pubio.zip/readme.txt

PUBIO = PIC USB Bootloader Input/Output program, © Henrik Haftmann 2018-2022

This program is a Win32 alternative to the Python program by Matt Sarnoff 2015.
This program communicates with the 512 × 14bit boot loader on PIC16F145x
called bootCDC by Matt Sarnoff, enhanced by me keeping same size,
so you can flash a user-mode “app” into remaining flash area 0x200..0x1FFF
(7.5 KWord), and you are able to twiddle with i.e. port registers
to switch on a connected LED (among endless other possibilities)
	— without writing any line of firmware code.

Putting the bootloader bootCDC itself onto PIC16F145x microcontroller
is a completely different task, see bootCDC.zip.
A (universal) CDC driver for it is there too.
As the first 512 flash words are secured by a fuse against overwriting,
this bootloader remains „bullet-proof“ in the microcontroller
and can only be defeated by a chip programmer that allows bulk erase.

While the PUBIO.exe program is almost self-explaining, some notes on how-to use:
* The program is available in 3 different compilations:
  + x86/: “Standard” Win32 executable, for Windows 2000 and higher
  + x64/: 64-bit Win32 executable, for Windows XP 64-bit edition and higher
  + w9x/: Win32 executable as ANSI (not Unicode) compilation, for Windows 98 and higher,
    lacks for non-ANSI character support in file names.
  Use the one that fits to your system. No additional dependencies.
* The full source code is available in src/, compileable with MSVC6 (*.dsw, *.dsp,
  Targets x86 and w9x) and MSVC2008 (*.sln, *.vcproj, Targets x86 and x64).
  No additional dependencies. Indeed so small. High-DPI support is included.
  The resource file (*.rc) is made by hand and truly a source file too.
* The detected chip line below the selected COM port appears only with (newer)
  bootloader firmware that can read (and write) ID bits.
* Using the UpDown control beneath the SFR (Special Function Register) selection box
  will switch to hexadecimal address input.
  The hexadecimal input can have the following suffixes:
  + “v” (volatile) disables automatic read and enables the “Read” button.
    You may need it when observing an address with side effects when read.
  + “w” (word) interprets the address as 2-byte word address in Little Endian.
    The bit selection checkboxes disappear, and the read value shows a 4-digit
    hexadecimal value. Writing will affect both bytes too.
  + “W” (capital letter) acts like “w” for Big Endian.
    Only one register in PIC16F145x is Big Endian, the USB Frame Counter UFRM.
* RAM addresses will be commented with both linear and banked address
  in a text field below the address selection.
  If a Dual-Port RAM address can be part of the USB Buffer Descriptor Table (BDT),
  it will be decoded as it would be an SFR.
* The list of SFR names changes with the detected PIC type:
  PIC16F1454 has some less SFRs than PIC16F1459.
* To keep the SFR list short, some SFR names are meant to be 16 bit.
  If you select one, the bit selection checkboxes disappear,
  and the read value shows a 4-digit hexadecimal value.
  Writing will affect both bytes. Endianness will be handled automatically.
* Some SFRs are used by the boot loader. Reading them is safe, but writing them
  may disrupt the ongoing communication. A good SFR to watch is UFRM.
* The „Program“ button flashes and verifys the HEX file previously selected,
  and if successful, jumps to the application code.
  As this process is fucking fast, the COM port disappears immediately,
  except the firmware continues to use the bootloader's COM port implementation.
  See bootCDC.zip for details on how to use this code-space-saving feature.
  You must somehow jump back to the boot loader again to continue using PUBIO,
  typically by an external Low on !MCLR input pin.
* PUBIO has a simple command-line interface: Given a file name, it will issue
  „Program“ and terminate after success. So it can be used inside Makefiles.
Detected encoding: UTF-80