CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

18F25K50 ex_usb_hid example
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
dsevgor



Joined: 30 Mar 2013
Posts: 11

View user's profile Send private message

PostPosted: Fri Jul 05, 2013 5:44 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jul 06, 2013 4:31 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Jul 06, 2013 10:21 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group