marcotulio
Joined: 05 May 2014 Posts: 1
|
Don´t work: PIC18F14K50+ Microchip HID bootloader + CCS CDC |
Posted: Mon May 05, 2014 2:37 pm |
|
|
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 |
|