WISP : protocol


(relative) up links: my PIC page my WISP page , my personal home page
(absolute) www location of this page: http://www.xs4all.nl/~wf/wouter/pic/protocol.html

highlights

WISP adheres to the the
WBus definition. This allows a number of WISPs or other devices which adhere to this definition to be connected to the same serial line and to share one power supply.

WISP commanding is at the level of the actual programming commands required by a 16f84, or slightly above this level when this makes the communication more efficient.


commands

Besides the standard
WBus-defined commandsthe WISP firmware implements a number of specific commands which are described in the next table, together with the WISP-specific aspects of the WBus-defined commands.

format name effect
0000G Go WISP resets the target and enters the run mode in which it is disconnected from the target circuit as far as possible.
I Increment WISP increments the current memory location pointer.
abcdL Lazy write WISP writes the hex value abcd to the current memory location if and only if the current location differs from abcd. The final W is echoed as W when programming is not necessarry or the programming is succesfull. The L is echoed as ? when programming is necessarry but not succesfull. For program and configuration memory the higer two bits (of a) are ignored. For the data memory the higher 8 bits (a and b) are ignored.
0000P Passthrough WISP resets the target and enters the Passthrough mode in which it passes the serial line signals from the host on to the target and vice versa. In this mode commands are no longer recognised, so this mode can only be left by a serial-line break from the host.
R Read WISP reads the current memory location (4 hexadecimal digits) and copies the content to the communication buffer. For program memory the higer two bits are set to 0. For data and configuration the higher 8 bits are set to 0.
T Type WISP copies its type name (WISP) to the communication buffer.
V Version WISP copies its version number (4 hex digits) to the communication buffer. The current version (01.00) reads as 0100.
abcdW Write WISP writes the hex value abcd to the current memory location. The final W is echoed as W when the programming is succesfull. It will echo as ? when the programming is not succesfull. For program and configuration memory the higer two bits (of a) are ignored. For the data memory the higher 8 bits (a and b) are ignored.
CX Code WISP enters the programming / readout mode for the program memory. The current location is set to the first location of the program memory.
DX Data WISP enters the programming / readout mode for the data memory. The current location is set to the first location of the data memory.
EX Erase WISP removes any code protection and erases all data in the target.
FX Fuses WISP enters the programming / readout mode for the configuration memory. The current location is set to the first location of the configuration memory.

notes:


example

It is the responsibility of the host to issue the correct sequence of WISP commands to activate WISP, to program the target and (if required) to start the target. A typical program - run sequence would be: