PDA

View Full Version : Converting from PIC18F452 to PIC18F4550



PJALM
- 1st January 2006, 03:25
I am trying to convert an exsisting project from the PIC18F452 to the new PIC18F4550 but cannot get anything to work. It will compile fine but when I load the new firmware onto the new PIC i get nothing at all. I tried simply just sending fixed characters to the LCD and even that dosn't work.

I am using the Microchip USB Bootloader, I don't know if this may be part of the problem or not.

Has anyone experienced simular problem converting to the new USB PICs?

I am including a scematic of the circuit I am using, I am hoping its just that the ports are not configured correctly for the new PIC.

Thanks for any help.

PJALM
- 1st January 2006, 06:37
Ok i got the LCD working now, I didn't know that the new PIC required CMCON = 7, the PIC18F452 didn't need this.

The next part is the HID or CDC interface, both of which still don't work.

When I compille the PBP code with either of the correct descriptor files the device is recognized by windows correctly ( as either a HID or Virtual COM Port ) but I cannot send anything to the PC from the PIC or the PIC to PC.

Also if i enable the Harware Interrupts, nothing works again.

PJALM
- 2nd January 2006, 07:38
I managed to get all the exsisting code working now on the new pick but i had to remove the USB Descriptor files from the folder and remove all USB related code.

Is there a reason why this pic should behave differently when you enable the USB portion?

yba2cuo3
- 14th January 2006, 22:10
I managed to get all the exsisting code working now on the new pick but i had to remove the USB Descriptor files from the folder and remove all USB related code.

Is there a reason why this pic should behave differently when you enable the USB portion?

Interesting...

I'm attempting to convert to the 18F4550 as well. Obtained a PICDEM FS USB Demo Board which seems to work very well in demonstrating it's USB capabilities. With respect to using the Microchip USB Bootloader, did you have to make any changes to your PBP code to accomodate? Is DEFINE LOADER_USED 1 all that is still required? Previously, I used the TINY bootloader via serial port & everything worked perfectly with the 18F452. Looking to move up to the USB port now for programming my applications directly into the 18F4550; forget the serial port!

Any other advice you may want to share to ease this transition would be greatly appreciated.

Thks,

PJALM
- 28th January 2006, 05:16
Yes it took me a while to figure it out but this is what is needed to use the USB bootloader with PBP.

DEFINE LOADER_USED 1
DEFINE RESET_ORG 800h ' For Microchip USB Bootloader
DEFINE INTERRUPT_ORG 808h ' For Microchip USB Bootloader

sjohansson
- 26th March 2006, 20:26
Yes it took me a while to figure it out but this is what is needed to use the USB bootloader with PBP.

DEFINE LOADER_USED 1
DEFINE RESET_ORG 800h ' For Microchip USB Bootloader
DEFINE INTERRUPT_ORG 808h ' For Microchip USB Bootloader

Thank you very much for this information!!!

Stefan.