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

Don´t work: PIC18F14K50+ Microchip HID bootloader + CCS CDC

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



Joined: 05 May 2014
Posts: 1

View user's profile Send private message

Don´t work: PIC18F14K50+ Microchip HID bootloader + CCS CDC
PostPosted: Mon May 05, 2014 2:37 pm     Reply with quote

As related in:
http://www.ccsinfo.com/forum/viewtopic.php?t=50423&view=next

I'm using Microchip HID bootloader (Version:v2.90a ) with PIC18F14K50 and CCS version 4.120

The firmware based on CCS CDC example loaded to the chip without HID bootloader is working.

The CDC serial emulation firmware from Microchip is working.

The Virtual Serial Port is create in PC host (Windows 7 32bits)

I could detect that don´t connect:

Code:
  while(!usb_cdc_connected())


The firmware don´t save config bits with bootloader

Complete firmware:
Code:

#fuses HS,NOWDT,NOLVP,NODEBUG,NOBROWNOUT,PLLEN,USBDIV1,CPUDIV1,NOMCLR,NOFCMEN,NOIESO,NOLVP,NOPUT   
#use delay(clock=48000000)

#build (reset=0x1000, interrupt=0x1008)
#org 0x000, 0xfff { } //0xfff = 1000 -1


// Includes all USB code and interrupts
#include <usb_cdc.h>

char c_recebido;

void main()
{
   
   usb_cdc_init();   
   usb_init();   
 
   
   while(!usb_cdc_connected())
   {
 
   }   
   output_high(PIN_B7);   
  while(1) 
  {
  usb_task();     
      if (usb_enumerated())
        {   
       
         if (usb_cdc_kbhit())         
            {                 
            c_recebido = usb_cdc_getc();
            usb_cdc_putc(c_recebido);
            }
        }   
 
  }
}


The hardware schematic is here:


http://www.bitguides.com/_/rsrc/1344235584199/pic18-Guides/getting-started/basicConnection.png?height=346&width=400

Thank you in advance for help
Marco
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