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

PIC 18F2455 and usb bootloader

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



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PIC 18F2455 and usb bootloader
PostPosted: Tue Nov 28, 2006 4:06 am     Reply with quote

Hello,
I was told it is possible to use 18F4550 USB bootloader also in 18F2455.
But if I want to use it I have to remap interrupt vectors.
Is is possible and how to do it with CCS compiler?
thanks in advance
M.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 28, 2006 11:43 am     Reply with quote

Quote:
But if I want to use it I have to remap interrupt vectors.
Is is possible and how to do it with CCS compiler?

Yes, you can do this.

Look at the #build directive in the the CCS manual.
Download the manual from this page:
http://www.ccsinfo.com/downloads.php

Also search this forum for many threads on this topic.
Use these keywords: #build bootloader
Set the search engine to "search for all terms".
http://www.ccsinfo.com/forum/search.php
Also search for your keywords: interrupt vectors
It's all in the archives.
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Thu Nov 30, 2006 8:31 am     Reply with quote

thank you very much for reply.
I will go through it.
BR M.
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

Problem
PostPosted: Mon Dec 04, 2006 8:09 am     Reply with quote

EDIT :
After few minutes of investigating i found some mistakes:
1) build directive was pointed to wrong reset address
#build(reset=LOADER_END+1, interrupt=LOADER_END+9)
2) Bootloader had protected memory writing in configurating bits.

It seems be working now.
------------------------------------------------------------------------------------

I have successfully flashed the 18F4550 bootloader to 2455. Now I want to download my own code (below) over the PDFSUSB.exe , device seems to be connected. When I load the hex file into the program I obtain warning that fuses are not the same - I think it is.

If I try to download the hex file, it tells me:
WARNING - Failed to program CONFIG DATA
MESSAGE - Programming CONFIG DATA...
WARNING - Failed to program FLASH
MESSAGE - Erasing and Programming FLASH...

I use version 3.242
Thank you, BR M.

Code:
#include <18f2455.h>
#include "main.h"
#device ADC=10
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL1,CPUDIV1,VREGEN,NOPBADEN,WRTB,MCLR,NOCPD
#use delay(clock=48000000)
#use rs232(baud=9600,xmit=PIN_C6, rcv=PIN_C7, PARITY=N, BITS=8, STREAM=RS232)

#define LOADER_END   0x7FF
#define LOADER_SIZE   0x6FF

#build(reset=LOADER_END+2, interrupt=LOADER_END+9)
#org 0, LOADER_END {}
char textbuffer[29];
void main()
{
   unsigned long value;
   int a;
   setup_adc_ports(AN0);
   setup_adc(ADC_CLOCK_INTERNAL);
Jacques95
Guest







PIC 18F2455 and usb bootloader
PostPosted: Thu Aug 16, 2007 1:46 am     Reply with quote

I got the same problem and I can not solved It....
Did you solved this problem?
Jacques
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