PICBASIC dan PICBASIC PRO merupakan dua versi compiler BASIC untuk mikrokontroler PIC, yang dikembangkan oleh Micro Engineering Labs, Inc. dari Inggris. Keduanya berbeda dalam hal kelengkapan yang diusungnya. PICBASIC merupakan pilihan untuk mereka yang cukup terbiasa dengan BASIC Stamp, karena kompatibilitas perintah yang disediakan mendekati 100%.
Ada sejumlah IDE yang dapat digunakan bersama dengan compiler tersebut. Salah satu yang disarankan adalah Microcode. IDE ini sangat sederhana.
Bagaimana dengan setting configuration fuse? Dalam Microcode tidak ada fasilitas untuk merubahnya. Saat kompilasi, Microcode merujuk pada file konfigurasi yang ada di dalam folder instalasi PICBASIC.
Jadi, sebelum memulai menggunakan keduanya, disarankan untuk memeriksa include file yang berisi setting bit konfigurasi tersebut. Pastikan setting tersebut sesuai dengan rangkaian yang sudah dibuat.
Berikut adalah contoh konfigurasi untuk PIC 16F877A yang sudah dirubah:
;**************************************************************************
;* 16F877A.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2003 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 11/06/03 *
;* Version : 2.45 *
;* Notes : *
;* Default : device pic16F877A, xt_osc, wdt_on, lvp_off, protect_off * *
;**************************************************************************
NOLIST
ifdef PM_USED
LIST
include 'M16F87xA.INC' ; PM header
device pic16F877A, hs_osc, wdt_off, lvp_off, protect_off
XALL
NOLIST
else
LIST
LIST p = 16F877A, r = dec, w = -302
INCLUDE "P16F877A.INC" ; MPASM Header
__config _HS_OSC & _WDT_OFF & _LVP_OFF & _CP_OFF
NOLIST
endif
LIST
Berikut adalah configuration fuse untuk PIC 16F877A:
_BODEN_ON Brown-out reset detect enabled
_BODEN_OFF Brown-out reset detect disabled
_CP_ALL All program memory protected
_CP_OFF No program memory write protection
_WRT_256 Upper 256 bytes of program memory write protected
_WRT_1FOURTH First quarter of program memory write protected
_WRT_HALF First half of program memory write protected
_PWRTE_OFF 72-ms time up delay off
_PWRTE_ON 72-ms time up delay on
_WDT_ON Watchdog timer on
_WDT_OFF Watchdog timer off
_LP_OSC LP oscillator type
_XT_OSC XT oscillator type
_HS_OSC HS oscillator type
_RC_OSC RC oscillator
_DEBUG_ON Internal emulator enabled
_DEBUG_OFF Internal emulator disabled
_CPD_ON Data EEPROM write protected
_CPD_OFF Data EEPROM not write protected
_LVP_ON Low-voltage program enabled
_LVP_OFF Low-voltage program disabled
Untuk kelas pelatihan Pemrograman Mikrokontroler PIC dengan Bahasa BASIC dan Pemrograman Mikrokontroler BASIC Stamp silahkan menghubungi NEXT SYSTEM Robotics Learning Center.