PDA

View Full Version : USB with 20 pins anyone? PIC18F14K50 issues



ScaleRobotics
- 15th July 2009, 21:10
Has anyone tried USB with the 20 pin PIC18F14K50? Microchip has a Low Pin Count USB development kit with this chip. This chip isn't exactly supported by MeLabs. I made a 18F14K50.INC file and a 18F14K50.BAS file, and with the PBPPIC18 library included, I can compile and run a simple led blink program, but if I include the PBPUSB18 library instead, I get a bunch of warnings about my memory locations:

Warning(219) Invalid ram location specified \PBP\USB18.ASM lines:128, 21, 22, 25 ,etc

In my 18F14K50.BAS file I told it the memory locations were:
BANKA $0000, $005F
BANK0 $0060, $00FF
BANK1 $0100, $01FF
BANK2 $0200, $02FF

What else can I try?

Thanks,

Walter

Free_Flow
- 15th July 2009, 22:27
I use a number of compilers and the only ones I came across that support the 14k50 for USB is C18 and Proton.

Although the Proton you have to be a licensed user to get the latest version.

I think Hitec C supports it now as well now but not 100% sure.

ScaleRobotics
- 15th July 2009, 22:53
Thanks Free_Flow,

I do have CCS and that supports the chip as well.

But I was hoping to find a way to use PicBasic. It looks like I need to tell it what memory to use for USB, or modify the USB18.ASM file. Hoping for some pointers.

This chip has as much ram as the PIC18F2450

Thanks again,

Walter

Free_Flow
- 15th July 2009, 23:18
Its not as simple as just changing values is some memory files.

So good luck!

ScaleRobotics
- 15th July 2009, 23:43
Looks like it is the:


org 0x400

in the USB18MEM.ASM file.

I changed 0x400 to 0x200 (where the USB memory starts in the PIC18F14k50) and presto, and now I can compile. The other chips it supports start at $0400, but the PIC18F14K50 does not. Now I will have to see if I can get some of the usb demo's to work.

Walter

Free_Flow
- 15th July 2009, 23:45
So you can compile but can you enumerate?

ScaleRobotics
- 17th July 2009, 15:39
So you can compile but can you enumerate?
Looks like you are right Free_Flow, I can't get it to connect via USB.