18f455 pic basic pro derleme sorunu

Başlatan tantalis, 27 Kasım 2010, 19:08:39

tantalis

'****************************************************************
'*  Name    : STEPUSB.BAS                                       *
'*  Author  : [select VIEW...EDITOR OPTIONS]                    *
'*  Notice  : Copyright (c) 2009 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 01.05.2009                                        *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************

' select MCU and clock speed
Device = 18F4550
XTAL = 48
Declare PORTB_PULLUPS 1
' descriptor file, located in \inc\usb_18 - a copy
' is located in the same folder as this file
USB_DESCRIPTOR = "STEPUSBDESC.inc"

' USB Buffer...
Symbol USBBufferSizeMax = 8
Symbol USBBufferSizeTX = 8
Symbol USBBufferSizeRX = 8
Dim    USBBuffer[USBBufferSizeMax] As Byte
Dim sayac1 As Byte
Dim sayac2 As Byte
Dim sayac3 As Byte
' some useful flags...
Dim PP0 As Byte SYSTEM        ' USBPOLL status return
Symbol CARRY_FLAG = STATUS.0  ' high if microcontroller does not have control over the buffer


Symbol ATTACHED_STATE = 6     ' is USB attached
     
' ************************************************************
' * main program loop - remember, you must keep the USB      *
' * connection alive with a call to USBPoll, USBIn or USBOut *
' * every couple of milliseconds or so                       *
' ************************************************************
TRISD = %00000000
TRISD = %00000000
PORTD = %00000001
GoSub bekle
PORTD = %00000011
GoSub bekle
PORTD = %00000111
GoSub bekle
PORTD = %00001111
GoSub bekle
PORTD = %00000111
GoSub bekle
PORTD = %00000011
GoSub bekle
PORTD = %00000001
GoSub bekle


GoSub AttachToUSB
ProgramLoop:
   USBIn 1, USBBuffer, USBBufferSizeRX, ProgramLoop
   PORTD = USBBuffer[0]
   GoTo ProgramLoop
 
' ************************************************************
' * receive data from the USB bus                            *
' ************************************************************
DoUSBIn:
   USBIn 1, USBBuffer, USBBufferSizeRX, DoUSBIn
   Return
   
' ************************************************************
' * transmit data                                            *
' ************************************************************
DoUSBOut:
   USBOut 1, USBBuffer, USBBufferSizeTX, DoUSBOut
   Return

' ************************************************************
' * wait for USB interface to attach                         *
' ************************************************************
AttachToUSB:
   Repeat
      USBPoll
   Until PP0 = ATTACHED_STATE
   Return
bekle:
   For sayac1 = 0 To 255 Step 1
For sayac2 = 0 To 255 Step 1
For sayac3 = 0 To 10 Step 1
Next
Next
Next
Return

arkadaşlar bu kodu birtürlü derleyemiyorum.bana derleyip hex kodunu gönderebilirmisiniz.ayrıca sorunum ne olabilir.
pbp 2.4 ü kullanıyorum.
şimdiden teşekkürler

Evren KILIÇ

slm,

linkteki dosyanın sorununu çözecegini sanıyorum

http://www.yukletr.com/download.php?file=1336d4185668b7d4c038be9dd219c329

ayrıca aşagıdaki linkten direk proje sahibindende yardım alabilirsin

http://www.elektrobilim.org/forum/showthread.php?t=5572
[email]evren1623@hotmail.com[/email]

BenC

-ampasmwin -oq -c -p18F4550 derleme opsiyonu ile derlermisiniz.
ŞEHİT KANIYLA ALINMIŞ BU GÜZELİM VATANIN TOPRAKLARI KARIŞ KARIŞ SATILIYOR!!  VATAN HAİNİ OLMA!!

tantalis

pic basic pro benim bilgisayarda sorun çıkarıyor galiba.ben de proton derleyici yükledim ve orada derlendi.hex dosyasını oluşturdum.aslında proje sahibinede mesaj atıcaktım ama o foruma üye olamadım davetiye istiyor galiba :) .yinede ilginiz için teşekkürler arkadaşlar.