Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Boatloader problem in CCS

Status
Not open for further replies.

ycnr

Newbie level 5
Newbie level 5
Joined
Feb 9, 2015
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
98
I send my ccs program to PIC18F2550 with bootloader. But it is not work. I have tried with PICBASIC and PROTON. They are worked but my program which written in ccs is not work. What is my mistake? This is my program.

#include <18F2550.h>
#fuses HSPLL, NOWDT, NOPROTECT, NOLVP, NODEBUG, USBDIV, PLL5, CPUDIV1, VREGEN
#use delay(clock = 48M)

#build(reset=0x1000,interrupt=0x1008)
#org 0x0000,0x0FFF {}

void main(){
set_tris_b(0xF0);
while(1){
OUTPUT_B(0X0F);
delay_ms(1000);
OUTPUT_B(0X00);
delay_ms(1000);
}
}

What is my problem? Help please. THANKS...
 

I am using usb communication and bootloader provided by microchip. I have already tried codes written with PICBASIC, PROTON and C18. They are work. As you said i tried
#include <usb_bootlader.h>

but program doesn't work.
 

I send my ccs program to PIC18F2550 with bootloader
Means you where able to send it serially? Are you using the bootloader provided with CCS C? It has a different loader end and application base address than your main application, did you edit the CCS bootloader?

Apart from checking the parameters, you can excute the application with bootloader in MPLAB debugger and check what happens. Or read the flash image with MPLAB and check if the application has been downloaded correctly.

- - - Updated - - -
I am using usb communication and bootloader provided by microchip.
I see. The lessest is to assure that the bootloader is using the right reset vector for the main application. It's basically possible to use a Microchip bootloader with CCS main application, I once did it for PIC24. But you have to figure out all necessary details yourself. As said, checking bootloader startup and jump to main application in debugger is a promising way to narrow down the problem.
 

I loaded bootloader to PIC18F2550. And I send my codes several prog. languages. I used theese codes. Only CCS C didn't work. After sebding C codes to PIC, bootloader program gives message like "reset failed". Other programs working nicely.

DEFINE RESET_ORG 1000h //it worked PICBASIC

Declare PROTON_START_ADDRESS = $0800 //it worked proton

#ORG 0x1000, 0x1FFF //it didin't work

#build(reset=0x1000,interrupt=0x1008) //
#org 0x0000,0x0FFF {} // it didin't work

#include <usb_bootloader.h> // it didin't work

****
As you said I checked all header and c files. But i couldn't solve. Help please...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top