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

bootloader question for 18f452
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








bootloader question for 18f452
PostPosted: Sun Dec 24, 2006 8:14 am     Reply with quote

please help

I have been using my bootloaderwith pic16f877 now i what to change to 18f452 my question is
would the following command still be aplicable to the 18f452 ?

Code:

#ORG 0x1F00,0x1FFF {} //
Guest








PostPosted: Sun Dec 24, 2006 10:47 am     Reply with quote

What bootloader do you use for 18f452?
Guest








PostPosted: Mon Dec 25, 2006 4:49 pm     Reply with quote

I have only used boot loader for 16f877 but i now want one i can use
for 18f452 @ 20mhz
most of the ones i have seen when i did a google search
are for 4mhz
So just wanted to know what you guys use
please help
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Dec 25, 2006 11:15 pm     Reply with quote

Quote:
But i now want one i can use for 18f452 @ 20mhz.

http://www.microchipc.com/PIC18bootload/
Guest








PostPosted: Fri Dec 29, 2006 11:33 am     Reply with quote

Thanks PCM

I saw this one but i was not sure if this was a mistake
the hex file for the bootloader @ 20Mhz has a Baud rate of 12200 Baud
but on the windows downloading program there is no option for that baud rate it has the following 1200,2400.4800,9600 & 19200
Its that a typo ?
Have anyone actually used this loader?

Skinner
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Dec 29, 2006 12:01 pm     Reply with quote

I'm not sure what they mean. Is it a baud rate, or is it some code
number stuck in front of the filename ? The readme file says to go
to their website for full instructions, but then when I go there, they
don't explain it. Their terminal program doesn't support weird baud
rates. I don't know. I used to use their 16F877 bootloader, but when
I bought a Microchip ICD2, I dumped the bootloader and converted all
my proto boards to use the ICD2.
Guest








PostPosted: Fri Dec 29, 2006 12:07 pm     Reply with quote

Am sure someone in this forum would be able to point me to
a bootlader for 18f452 @20mhz
i just want to use one that has being confirmed to work
PCM thanks for you help as usual

Skinner
Guest








PostPosted: Fri Dec 29, 2006 1:49 pm     Reply with quote

I have tried the following with no luck



PIC18bootload
Tiny Bootloader

please help as i need to get my programme going over this weekend

And just to check with you here is the sample programmed i am trying to
bootload to my pic

Code:


#if defined(__PCH__)
///////////////////////////
#org 0x40,0x7F
#else                      For Bootloader
#org 0x20,0x3F
#endif
///////////////////////////////
#include <18F452.h>
#device ADC=16
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7)
#endif

void main() {

   int i;
   long value, min, max;

   printf("Sampling:");

   setup_port_a( ALL_ANALOG );
   setup_adc( ADC_CLOCK_INTERNAL );
   set_adc_channel( 0 );

   do {
      min=0xffff;
      max=0;
      for(i=0; i<=30; ++i) {
         delay_ms(100);
         value = Read_ADC();
         if(value<min)
            min=value;
         if(value>max)
            max=value;
      }
      printf("\n\rMin: %4LX  Max: %4LX\n\r",min,max);

   } while (TRUE);
}
Code:
Code:
Ttelmah
Guest







PostPosted: Fri Dec 29, 2006 3:20 pm     Reply with quote

You need to use the #build directive, or the code will put the boot vector, and (if interrupts are used), the interrupt vector at the base of memory, and overwrite the bootloader. Look at the bootloader example that comes with the compiler, to see how the running program is defined.

Best Wishes
Guest








PostPosted: Fri Dec 29, 2006 4:12 pm     Reply with quote

Ttlemah

i Have just had a look and the only directive i could find was
#include <bootloader.h>
Do i need to include this file?
Ttelmah
Guest







PostPosted: Fri Dec 29, 2006 4:18 pm     Reply with quote

'ex_bootload.c', is an example program to use a bootloader. 'bootloader.h', which this includes, shows how it reserves the base of memory for the bootloader.
Then 'ex_bootloader.c', is the bootloader this uses, with the main code in 'loader.c'.
Look particularly at the build statement in bootloader.h.

Best Wishes
Guest








PostPosted: Sat Dec 30, 2006 5:37 am     Reply with quote

I have given up trying to search for a bootloader
i would experiment with the CCS examples now as there don't seems to
be bootloader readily avaliable for the 18f452 like there is for the 16f877
Guest








PostPosted: Sat Dec 30, 2006 6:57 am     Reply with quote

Ttelmah

i have tried using the example bootloader programme but i keep on getting the message "Timeout while downloading "

This is what i have done so far

1. I complied EX_BOOTLOADER.C and programmed it into my 18f452
using Picstart Plus

2. I then complied EX_BOOTLOAD.C and tried the download it using
siow from the IDE

My circuit has got a keypad wired to port b where RB3 has a pull down resistor to gnd and when i press my switch which is connected to one end of RB3 to RB5 this should pull RB5 down low.
Do i have to enable portb pull ups ?
My project board is Melab LAB-X1 Experimenter Board
Guest








Now Working
PostPosted: Sat Dec 30, 2006 8:03 am     Reply with quote

I finally got the CCS bootloader to work
Christophe



Joined: 10 May 2005
Posts: 323
Location: Belgium

View user's profile Send private message

PostPosted: Thu Jan 04, 2007 6:58 am     Reply with quote

What did you do to solve that? I'm also getting the message ' timeout while downloading' after the first line.

What are your SIOW settings?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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