Thanks guys. I think I've found my issues.
One more question for now though, is the data within the byte transmitted msb first or lsb first from VB?
Thanks guys. I think I've found my issues.
One more question for now though, is the data within the byte transmitted msb first or lsb first from VB?
Hi.
I have tried to compile the source code that is present on the first page of this thread and I obtain the following error message:
the content of the file into the working directory is:Code:Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 301 : Overwriting previous address contents (0000) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 301 : Overwriting previous address contents (0001) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 302 : Overwriting previous address contents (0000) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 302 : Overwriting previous address contents (0001) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 303 : Overwriting previous address contents (0002) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 303 : Overwriting previous address contents (0003) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 304 : Overwriting previous address contents (0002) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 304 : Overwriting previous address contents (0003) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 305 : Overwriting previous address contents (0004) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 305 : Overwriting previous address contents (0005) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 306 : Overwriting previous address contents (0006) Error[118] C:\PIC\MEL\PBP3061\18F4550\USB\PICUSB\PICUSB.ASM 306 : Overwriting previous address contents (0007)
I'm using:Code:24/01/2011 02:45 22.213 DT_HID260.pbp 04/11/2009 11:41 28.721 DT_INTS-18.bas 04/04/2013 10:03 7.665 firmware.zip 04/04/2013 11:52 84.061 PICUSB.ASM 04/04/2013 11:52 1.368 PiCUSB.ERR 04/04/2013 11:52 1.112.440 PiCUSB.LST 04/04/2013 11:52 10.855 PICUSB.MAC 04/04/2013 11:52 4.917 PiCUSB.pbp 21/06/2012 03:06 96.199 usb_dev.asm 21/06/2012 03:06 6.290 usb_dev.inc 21/06/2012 03:06 26.203 usb_hid.asm 21/06/2012 03:06 6.378 usb_hid.inc 21/06/2012 03:06 6.403 usb_mem.asm
Win 7 Ultimate
A 18F4550 that will be run on the PICDEM FSUSB
PBP 3.0.6.1
MCS 5.0.0.3
I have the trial version (15 gg left - I'm waiting to solve some administrative trouble before buy the upgrade)
Attached please find the Directory contents.
Any suggestion will be more appreciate.
Ciao
Leo
Search for OVERWRITING, you get a ton of threads. Start with this one:
http://www.picbasic.co.uk/forum/show...ht=overwriting
Robert
Hi,
I have commented all of that:and all begin to work.Code:;--- if you un-comment these, you must comment the ones in the .inc file --- 'ASM ; 18F2550/4550, 8mhz crystal ' commented all to run , otherwize some error arise ' __CONFIG _CONFIG1L, _PLLDIV_2_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L ' __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H ' __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _VREGEN_ON_2L ' __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H ' __CONFIG _CONFIG3H, _PBADEN_OFF_3H ' __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L 'ENDASM
But there are some conceptual doubt that I have explained on a different thread:
http://www.picbasic.co.uk/forum/showthread.php?t=17877
Last edited by Wirecut; - 7th April 2013 at 01:50. Reason: typo error
Leo
Hi,
thanks to the suggestion of Henrik Ollson on the thread:
http://www.picbasic.co.uk/forum/show...740#post119740
I have substitute the ASM/ENDASM to #CONFIG/#ENDCONFIG as:and now "automagically" all works! GREATH!!!!Code:#CONFIG ; 18F4550, 20mhz crystal __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H __CONFIG _CONFIG2L, _PWRT_ON_2L & _BOR_OFF_2L & _VREGEN_ON_2L __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H __CONFIG _CONFIG3H, _PBADEN_OFF_3H __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L #ENDCONFIG![]()
Leo
Hi all,
I'm trying to use TMR0 however USB does not seem to communicate. I saw in past threads that TMR0 was used for USB polling, I've been examining all files related DT-INTS, DT-HID and soforth, TMR0 does not appear, so I don't know why using this timer would stop things. I'm not using DT-INTS on overflow just monitoring the int flag. By itsself i.e. no USB this little routine works fine. I'm outputing a 50msec (mark) pulse on portB then a second delay of around 300 msec (space). Goal is to adjust the space to vary stepper motor speed.
advice appreciated
Cheers
John
Heres some of the code, this all works fine using simple delay or other timer
Main:
; Check for incomming USB data while waiting
@ ON_USBRX_GOSUB _HandleRX
lcdout $FE, 1, dec Size
pause 2000
if portB.0=1 OR Run=1 then
high porta.3
T0CON.7=1 'start TMR0
mark:
if not match01 then goto mark 'match01 var INTCON.2 '50msec delay
T0CON.7=0 'stop timer
match01=0 'clear interupt flag
INTCON.5=0 'set interupt enable to 0
low porta.3
if plugged then ARRAYWRITE USBTXBuffer, [Size,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] ;send position
GOSUB WaitToSend
time=time+1
lcdout $FE, 1, dec time 'use to check whats happening here
TMR0H=$C9 '300msec
TMR0L=$10
T0CON.7=1 'start TMR0
space:
if not match01 then goto space
T0CON.7=0 'stop timer
match01=0 'clear interupt flag
INTCON.5=0 'set interupt enable to 0
TMR0H=$F6 '50msec pulse
TMR0L=$D8
endif
goto Main
Getting back to USB basics after a 3 year absence. I cant seem to get the code in the first post to run on a 18F2550. I get: ERROR Line 25: Bad BANK number. (DT_HID260.pbp) Apparently this issue didn't exist the first time I ran the code all that time ago.
Any pointers?
Bookmarks