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 support@ccsinfo.com

CDC BOOTLOADER PROBLEM on PIC18F4550

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
abiel



Joined: 27 Jan 2011
Posts: 1

View user's profile Send private message

CDC BOOTLOADER PROBLEM on PIC18F4550
PostPosted: Sun Jan 13, 2019 8:04 pm     Reply with quote

Hi every one,

I've been trying to run CDC Bootloader Example based on version 5.076 but so far, i couldn't.
I compile the ex_bootloader.c, I program the 18f4550, that my computer recognize like CDC usb device, but once i write a little sample to program through the CDC bootloader, the MCU doesn't start. It seems like something happens, but i don't know if it is about the fuses or vector reset.
Of course I include the usb_Bootloader.h file in my test Program.

my test example.
Code:

#include <18F4550.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN,
#device ADC=10
#use delay(clock=48000000)
 
#include "usb_bootloader.h"
#include "Flex_LCD.C"


void main()
{
set_tris_a(0xff);
set_tris_b(0x00);
set_tris_d(0x00);
set_tris_c(0x00);

//Setup ADC
   setup_adc_ports(AN0);
   setup_adc(ADC_CLOCK_INTERNAL);
   

 

   while(TRUE)
   {
     
      output_low(PIN_B7);
      output_high(PIN_B6);
      delay_ms(500);
      output_low(PIN_B6);
      output_high(PIN_B7);
      delay_ms(500);
   
   }
   }

I've seen some advice from Ttelmah but nothing happens, i hope you can guide me to resolve this.

+++++++++++++++++++++++
Ex_usb_bootloader.c and Ex_usb_common.h code removed.

Reason: Forum rule #10:

10. Don't post the CCS example code or drivers, or ask for such code and drivers.

CCS Forum Policy and Guidelines -
http://www.ccsinfo.com/forum/viewtopic.php?t=26245

- Forum Moderator
++++++++++++++++++++++++
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Mon Jan 14, 2019 2:51 am     Reply with quote

Some comments:

If this is the code being loaded 'with' a bootloader, then set

#FUSES NONE

The fuses that will be used, are the ones in the bootloader code. You
can't change fuses in the 'runtime' program.

ADC_CLOCK_INTERNAL, is not recommended for a CPU clock above
1Mhz. Read the data sheet and correct this.

Have you got a pull-up on the pin used to trigger the bootloader?. The
runtime code will only be executed with this pin held high.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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