View previous topic :: View next topic |
Author |
Message |
dsevgor
Joined: 30 Mar 2013 Posts: 11
|
|
Posted: Fri Jul 05, 2013 5:44 am |
|
|
no I dont have #include <18F2455.h> at the beginning. instead i
#define USB_HW_GENERIC_18F2455 in the header file and right after the
Code: |
#ifndef __EX_USB_COMMON_H__
#define __EX_USB_COMMON_H__
|
definition i have
Code: | #if defined(USB_HW_GENERIC_18F2455)
#include <18F2455.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN
#use delay(clock=48000000)
//leds ordered from bottom to top
#DEFINE LED1 PIN_A5 //green
#define LED2 PIN_B4 //yellow
#define LED3 PIN_B5 //red
#define BUTTON_PRESSED() !input(PIN_A4)
//see section below labeled USB_CABLE_IS_ATTACHED
#define PIN_USB_SENSE PIN_B2
#define HW_ADC_CONFIG ADC_CLOCK_INTERNAL
#define HW_ADC_CHANNEL 0
#define HW_ADC_PORTS AN0
#endif
|
which i copied from the 4550 example block
and dont know if its related but after i upgraded to version 5 sometimes i get a wierd error in which i cant even select anywhere in the program and pop ups this error
[Window Title]
Error
[Main Instruction]
Access violation at address 00A00D95 in module 'pcw.exe'. Read of address 5355655C
[OK] |
|
|
dsevgor
Joined: 30 Mar 2013 Posts: 11
|
|
Posted: Sat Jul 06, 2013 4:31 am |
|
|
i didnt pay attention to the first line but mine falls over in pic18_usb.c on
#bit USBIE=getenv("BIT:USBIE")
and i couldnt find the register for USBIE in chipedit for 18f2455 and also 18f4550.
And i must say im not a software or electronics engineer and dont understand everything but this is not sopposed to be that hard to compile an usb bootloader hex file, especially from a predesign precompiled example code..
Guyz i dont wanna bother you but ill try my best to solve this. This forum helped me a lot and i believe this time wont be different.
Im always ready to try any suggestions and do my best. |
|
|
oxo
Joined: 13 Nov 2012 Posts: 219 Location: France
|
|
Posted: Sat Jul 06, 2013 10:21 am |
|
|
I think you need to contact ccs about the v5 problem.
For the other compile problem, try version 4.141. That fixed the same problem for me. |
|
|
|