18F4550.BAL, PBPL, and USB
Hi all,
There are two versions of the file 18F4550.BAL. One is for USB use and the other one is for PBPL use. The two files are shown in the next thread (thank you DT).
http://www.picbasic.co.uk/forum/show...8949#post68949
I'm working in a project that combines PBPL and USB. The problem that I have is that if I use the 18F4550.BAL PBPL version then I get the following errors
Code:
ERROR: Macro USBINIT? not found in macro file.
ERROR: Macro USBSERVICE? not found in macro file.
ERROR: Macro USBIN?CBBL not found in macro file.
ERROR: Macro USBOUT?CBBL not found in macro file.
But, if I use the USB file version then I get errors like
Code:
ERROR: Unable to fit variable Var_Name
where Var_Name is a LONG variable. I worked out a "fix" for this problem by modifying the 18F4550.BAL file the following way
BANKA $0000, $005F
BANK0 $0060, $00FF
BANK1 $0100, $01FF
BANK2 $0200, $02FF
BANK3 $0300, $03FF
BANK4 $0400, $04FF
BANK5 $0500, $05FF
BANK6 $0600, $06FF
BANK7 $0700, $07FF
EEPROM $F00000, $F000FF
'LIBRARY "PBPPI18L"
LIBRARY "PBPUS18L"
include "PIC18EXT.BAS"
PORTL VAR PORTB
PORTH VAR PORTC
TRISL VAR TRISB
TRISH VAR TRISC
include "PBPPI18L.RAM"
So far, my setup is been working fine. However, the PIC uses BANK 4, 5, 6, and 7 for the USB module, so by me enabling these BANKS I suspect I'm doing something horribly wrong. The USB interface is been working fine like I said before, but this might be pure luck.
Is there a better fix for this PBPL and USB problem? If I only disable BANKS 4 and 5, would that be a better fix? Why is the "EEPROM $F00000, $F000FF" line disabled in the original files?
Thank you all for your help.
Robert
"No one is completely worthless. They can always serve as a bad example."
Anonymous
Bookmarks