Home Downloads Commands Examples Connections Links Ordering Support

Welcome to WinPicProg BASIC, the latest version of WinPicProg, now with an integral BASIC Compiler. It allows easy programming across a range of PIC micro-controllers using a simple BASIC style language. It compiles the source code to an assembler file and two 'include' files, and then calls MPASMWIN to generate the final executable file. It's a 16 bit positive integer BASIC, which means that numbers can range from 0-65535 decimal, $0000-$FFFF hexadecimal - negative and floating point numbers are not supported.

 To accommodate the BASIC compiler an extra 'Tab' has been added, and two extra buttons on the speed menu. The left hand of the two buttons compiles the BASIC source  to PIC assembler, and the right hand one calls MPASM to assemble the code. Once assembled the code is automatically loaded into the programmer ready for blowing the chip. An extra 'tick' entry in the 'Options' menu allows the compiling and assembly to take place together by pressing just the Compile button, and if the 'Auto Prog' box is checked programming will take place automatically as well. If MPASM finds a problem during assembly, the error file will be displayed in a window so you can identify the problem. The program needs to know the location of the MPASM executable file, this is specified on the 'Hardware' page, under the 'Options' menu.

WinPicProg BASIC is a Shareware program, written in Delphi 6.0 by Nigel Goodwin utilising Compiler Technology by Alan Fuller, it costs only 25 to register and money raised will be put towards further development - please see the order page for details.

Limitations:
To keep the compiled code simple and fast, program and data memory paging was not implemented, this limits available data memory (registers) to those in page 0, and program memory to 2KB - on a 16F628 this is actually the full amount of available memory, or for a 16C84 twice the available memory. However, an amazing amount can be done within these limitations - which in any case are far less limiting than those of the BASIC Stamp.

For the larger chips (16F876 and 16F877) memory use has now been expanded somewhat, all the library routines are now stored in their own page of memory and accessed via 'long calls', and DATA statements are stored in high memory - this leaves the full first 2KB for user code. The code generated is specifically designed to be compatible with bootloader programs, the top 256 bytes is left free for this and the start of memory is specifically written for bootloader use.

Last Updated 03/03/03

You can reach me by email at: nigelg@winpicprogb.co.uk