Data Sheet
10. Compiling a program with PICBASIC PRO
The P-Star is compatible with PICBASIC PRO, a BASIC language compiler from microEngineering Labs that
runs on Microsoft Windows and targets PIC microcontrollers. This section explains how to compile a program
and load it onto the P-Star using MicroCode Studio, the IDE that comes with PICBASIC PRO. PICBASIC PRO
is not free, but there is a trial version that you can try for a limited number of days before deciding whether to
purchase PICBASIC PRO [http://store.melabs.com/cat/PBP.html].
MicroCode Studio with a simple program for the P-Star 25K50 Micro.
1. Download and install PICBASIC PRO from the PICBASIC PRO Compiler 3.0 Downloads page
[http://pbp3.com/download.html].
2. Find “MicroCode Studio (MCSX)” in your Start Menu and run it.
3. If you were using MicroCode Studio earlier, there might be another program already open. In that case,
you should open the “File” menu and click “New” to start writing a new program.
4. Locate the “Microcontroller” dropdown in the upper-left corner, and select “18F25K50”.
5. Copy and paste this code into your program:
Define RESET_ORG 0x2000
Define OSC 48
LED_RED VAR PORTC.6
mainloop:
Input LED_RED
Pause 500
Low LED_RED
Pause 500
Goto mainloop
Pololu P-Star 25K50 Micro User’s Guide © 2001–2017 Pololu Corporation
10. Compiling a program with PICBASIC PRO Page 36 of 38