PicBasic Pro Nedir

Başlatan byka, 18 Ekim 2002, 03:03:37

byka

Pic Yada İntel MCU lar icin program yazma sadece notepad kullanarak assembly dili ile kısıtlı değil
Basic Programlama dilini kullanarak da yazılabilir fakat bunun icin programı işlemcinin anlamasını saglayan Compelier'a ihtiyac var
PicBasic Pro Programıda Bunlardan Biri
DWIN LCD Satış Türkiye email:info@kamantek.com  web:http://www.kamantek.com/shop/index.php

fsan

PicBasic Pro Compiler

PicBasic Pro Compiler from microEngineering Labs
www.microengineeringlabs.com[/b][/color][/u]
Alıntı YapWhat is PicBasic Pro ?
The PicBasic Pro Compiler is the easiest way for you to program the fast and powerful Microchip Technology PICmicro microcontrollers. PicBasic Pro converts your BASIC programs into files that can be programmed directly into a PICmicro MCU.
' PicBasic Pro code for blinking an LED on portB.0
' BASIC code:
' ================================================
BEGIN:
    HIGH 0           ' Turn LED on
    PAUSE 500        ' Wait 500mS (1/2 second)
    LOW 0            ' Turn LED off
    PAUSE 500        ' Wait 500mS (1/2 second)
GOTO BEGIN       ' Loop continuously
' ==================================================
The PicBasic Pro Compiler features: BASIC Stamp II commands, direct and library routine access to pins on PORTA, C, D, E, as well as PORTB, arrays, real IF..THEN..ELSE and interrupt processing in BASIC.
:arrow:

fsan


fsan

MicroCode Studio - PicBasic Pro Editor, IDE & ICD

MicroCode Studio from mecanique
www.mecanique.co.uk
Alıntı Yapwhat is MicroCode Studio ?
MicroCode Studio is a powerful, visual Integrated Development Environment (IDE ) with In Circuit Debugging (ICD) capability designed specifically for microEngineering Labs PICBasic Pro compiler. The main editor provides full syntax highlighting of your code with context sensitive keyword help and syntax hints. The code explorer allows you to automatically jump to include files, defines, constants, variables, aliases and modifiers, symbols and labels, that are contained within your source code. Full cut, copy, paste and undo is provided, together with search and replace features.
It's easy to set up your compiler, assembler and programmer options or you can let MicroCode Studio do it for you with its built in autosearch feature. Compilation and assembler errors can easily be identified and corrected using the error results window. Just click on a compilation error and MicroCode Studio will automatically take you to the error line. MicroCode Studio even comes with a serial communications window, allowing you to debug and view serial output from your microcontroller.

fsan

ProPic2 - PIC Programmer

Alıntı YapWhat is ProPic2 ?
The ProPic 2 programmer is the natural evolution of ProPic, the world wide used programmer.
It can program almost all Microchip PIC microcontroller and the 24CXX series E2PROM memories.

The original ProPic2 Schematics,
bill of materials,
PCB in PDF format

www.propic2.com

fsan

MicroCODE Studio ve PBP compiler Baglantisi

selam,
Picbasic pro icin "MicroCode studio" editörü kullanmanizi tavsiye ederim.
http://www.mecanique.co.uk/code-studio/index.html

MicroCODE Studio ve PBP Compiler baglantisi icin ayarlar
PicBasic Pro'yu c:\pbp icine yerlestirdikten sonra MicroCode Studio programini calistirip asagidaki ayarlari yapin.

VIEW-->PICBasic Options menüde..


Compiler:
"Find Automatically" veya "Find Manually" yazan yere tiklayip  c:\pbp  klasörünü secin

Includes:
Includes altinda "Add" yazan yere tiklayip  c:\pbp ve c:\pbp\inc klasasörleri ekleyin

Assembler:
-  Microchip MPASM, check box taki isareti kaldirin
- [not defined],  default


Pic Basic Pro'da Config ayarlari
MicroCode Studio ile bir Picbasic Pro dosyasi/programi olusturmak isterseniz ve dosyanin baslangic satirlarinin birinde asagidaki sekilde yazarsaniz, yazmis oldugunuz program sorunsuz compile edilir.
@ device pic16F628, XT_OSC, wdt_off, pwrt_on, mclr_off, lvp_off, protect_off

NOT: Yukaridaki _config ayarlari 16F628 icin C:\PBP\ icinde istediginiz chip'in *.INC dosyasini acip "ifdef PM_USED" altinda PicBasic ayarlarin nasil olmasi gerektigini görebilirsiniz.

kolay gelsin

fsan

MicroCode Studio ICD kullanimi

Using MicroCode Studio ICD With The PIC16F628 Microcontroller
Alıntı Yap
Why The Hardware Serial Interface.?

MicroCode Studio ICD uses the PicBasic Pro HSEROUT / HSERIN commands to send / receive serial data between the target PICMicro, and the ICD software. These serial commands require a hardware interface to the PC serial port

If you're wondering why the ICD doesn't support the PIC16F84, it's because this series does not have the internal hardware USART like the PIC16F628, and 16F87x series that's required by the ICD for proper operation.

www.rentron.com


Yukarida Bulunan Devre Semasi 16f628 Ve Benzeri Usart Donanima sahip Islemcilerin  Pc Ile Haberlesmesine örnek Bir Devre Semasidir

fsan

PIC16F877 -->  PIC16F877A Migration

Alıntı YapPIC16F87X ? PIC16F87XA FUNCTIONAL DIFFERENCES

Differences from PIC16F87X
* Two analog comparators with input multiplexing have been added  (1)
* Programmable reference voltage for comparators is provided
* ICSP Programming specifications are different (2)
* User Writes to FLASH program memory in 4-word blocks, instead of 1-word blocks (2)

Note 1:
Although the comparator is a new peripheral on the 16F87XA, the 16F87XA is  defined to maintain 100% pinout compatibility with the PIC16F87X.
This is achieved by mapping the comparator inputs with the existing ADC channels on PORTA.
The comparator is disabled on power-up so that existing PIC16F87X code requires no modification.

Note 2:
Please refer to device data sheet, errata, and the Microchip website for more information on programming specifications and writing to FLASH program memory.
PIC16F877 Datasheet

------------------

16F628 - Datasheet

PIC16F628 Datasheet

---------------

PIC16F84 --> PIC16F84A Migration

Alıntı YapPIC16F84 --> PIC16F84A  FUNCTIONAL DIFFERENCES

OSCILLATOR
The PIC16F84A can use crystals up to 20 MHz, resulting in double the execution speed. No changes to the code, other
than for timing concerns, are required. No changes to the configuration word are required. The crystal loading capacitors
may need to be adjusted for the higher speed crystal, but verifying oscillator operation at the same speed is already
recommended for the transition from the PIC16F84 to the PIC16F84A.

The PIC16F84 oscillator can run up to 10 MHz.
The PIC16F84A oscillator can run up to 20 MHz.

PIC16F84A Datasheet

fsan

Propic2 programmer parameters for MicroCode Studio
Alıntı YapYou can use propic2 programmer with MicroCode Studio for picBasic Pro .

Propic2 programmer parameters: /D:$target-device$ /F:$hex-filename$ /W /Q

fsan

IC-Prog parameters for MicroCode Studio

Micro Code Studio programmer.ini
; *********************************************************
; * Name  : IC-Prog piC16f84                              *
; * Notes :                                               *
; *********************************************************

[IC-Prog PIC-16F84]
Display = IC-Prog PIC-16F84
Filename = icprog.exe
Params = -t131 -l$hex-filename$ -p

; *********************************************************
; * Name  : IC-Prog piC16f628                              *
; * Notes :                                               *
; *********************************************************

[IC-Prog PIC-16F628]
Display = IC-Prog PIC-16F628
Filename = icprog.exe
Params = -t144 -l$hex-filename$ -p

; *********************************************************
; * Name  : IC-Prog piC16f877                              *
; * Notes :                                               *
; *********************************************************

[IC-Prog PIC-16F887]
Display = IC-Prog PIC-16F887
Filename = icprog.exe
Params = -t98 -l$hex-filename$ -p

; *********************************************************
; * Name  : Propic2 programer                             *
; * Notes :                                               *
; *********************************************************

[Propic2 programer]
Display = Propic2 programer
Filename = propic2.exe
Params = /D:$target-device$ /F:$hex-filename$ /W /Q

Micro Code Studio folder icindeki programmer.ini dosyasini edit yapip yukaridaki benim yaptigim gibi yaparsaniz MCS de Compile and program icon'a tiklayinca gelistirmekte oldugunuz picbasic *.bas dosyasi compile edilip elde edilen *.hex dosyasi otomatik olarak ic-prog'a yüklenecek ve sizin programlamayi baslat emrinizi bekliyecektir.
(bu sekilde ic-prog sizin icin dogru pic/device secimini kendiliginden yapmis ve istediginiz hex dosyayi yüklemis olacaktir.. sizede sadece dogru fuse ayarlarini secip OK demeniz kalacaktir)

tabiki önce MSC options programmer menüde programmer secimi yerinde yukaridaki programmer.ini ye yazdiginiz option'lardan birini  ekleyip/secmelisiniz.  

kolay gelsin

Sevgiler, saygilar..
/Fikret

sünger bob

Fikret hocam elinize sağlık yeni öğrenen biri olarak çok işime yaradı.

devkartal

Arkadaşlar ,
Ben bu micro code studio ile  compiler yapamıyorum acaba sorun hakkında yardımcı olacak birileri varsa yardımınız bekliyorum

Oncelikle,
C:driver  'a PBP adlı dosya oluşturdum bu dosyanın icinde ise:  (FB, Dosyası INC, Dosyası,SAMPLES, DOsyası,USB,Dosyası,USB18 dosyaları bulunmaktadır)

Sonra; microcode studio plus 2.2.1.1   adlı compiler PGM'yi  C:\PBP dosyasının içine atarak PGM calıştırdım .

Ve Sonra Daha oncede Yazmış olduğum bir basit ve calışan codu  (.bas) uzantılı  dosyayı  F9 compiler ederek  caliltırdım ve alt kısım da 2 adet hata oluştu aşağıdaki gibi

WARNING: Only one filename allowed on the command line.
ERROR: Unable to open file C:\PBP\PBP247\_KITAP\UGLMA_12_LCD.PBP



Ben nerede hata yapıyorum  yada eksikbir şeymi var bana yardım etmenizi istiyorum

yada hatalı bir  kurulum mu yaptım?

teşekkkurler

Yazmış oduğum Code: ise yanen aşağıdaki gibi;

**********************************************************
             pause   500                'LCD 'nin açıklamasını bekle
        loop:
            lcdout   $fe,1              'LCD ekranını sil
            LCDOUT  "merhaba"           ' "merhaba yaz"
            pause   500                 '0.5sn bekle
            lcdout  $fe,$CO,"Dunya"     'ait satıra dunya yaz
            pause   500
        gotO    loop                      'işlemi devamlı yap
       

ete

MicroCode Studio Plus yerine aşağıdakilinkten MicroCodeStudio isimli programı yükleyin.
PLus olanı paralıdır ve kırılarak kullanılıyor. Plus olmayanı ise ücretsizdir. Plus olanı size fayda yerine zarar vermektedir.
Ayrıca MCS yi kurduktan sonra yukarıda anlatıldığı gibi View menüsünde yer alan Compiler & Program options seçeneği ile PBP nun yerini MCS ye gösterin.

Daha sonra derleme yapabilirsiniz. Sorun çıkarsa yeniden mesaj atın ve sorunuda açıklayın lütfen.

http://www.mecanique.co.uk/software/mcsinstall.exe

ete
Bilgi hazinedir paylaştıkça büyür.            http://etepic.com

devkartal

arkadaşım  çok teşekkur ederim 

Yardımlarınız işe yaradı  dedikleriniz uyguladım  micro code studio plus yerine ( micro code studio) kullandim  genel olarak compiler sorunu cozuldu;


devkartal

tekrar selam;

Konu buraya ait değil ama benim sorumla bağlatılı oduğu için buraya yazmaya karar verdim;

micro code studio  compiler  sorun çozuldu fakat simde de ben  proteus ta  devreyi cizdim ve ilgili .hex dosyasini  ilgili pic içe koydum fakat LCD de ekran aydınlanıyor fakat  "Merhaba Dunya" yazısını goremiyorum
ilgili devre  ise cok basit olarak  proteus Library den Pic 16f84 ve LCD olarakta  LM016L component leri secerek
yapılmış bir devre  belki bunu bir çok arkadaş proteus ta yapmıştır . Fakat ben nedense çalitıramadim

ilgi devrenin resmini eklemek istedim  onuda buraya koymadım ama bunu yazı ile anlatabilirim

animasyon için  proteus ta
PIC 16F84
LM016L
gerekli
                                                             LCD( LM016L proteus kutuphanedeki tanimi )

PIC 16F84 'un

PortA.0       17.pin                       D4          LM016L deki  pin ucları           
PortA.1         18 pin                     D5 
PortA.2         1 pin                       D6
PortA.3         2 pin                       D7 
PortB.3          9 pin                      E

bu ayak bağlantılarını yaptiktan sonra  proteus animasyon yapmaya başliyor  fakat  ben hiç bir yazı goremiyorum sorun bu umarım yardım edersiniz 

NOT: LCD komutu için yazmış olduğum koddaki HATA $CO  doğrusu  $C0 (sıfır olacakmış ben  O harfi kullanmışım)