| 
	
	|  |  |  
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| abq_guy 
 
 
 Joined: 26 Jan 2009
 Posts: 13
 
 
 
			    
 
 | 
			
				| PIC18F8722 Bootloader----- COLT Bootloader not working |  
				|  Posted: Mon Jan 26, 2009 6:24 pm |   |  
				| 
 |  
				| Hello, 
 I am trying to use the COLT Bootloader for the PIC18F8722.
 
 I programmed my PIC chip with bootloaduart2.hex from the site using the MPLAB ICD2. I want to use this hex file, as I want to use the UART-2 on the PIC chip.
 
 I also added the following to my C code, as suggested.
 
 For models using a 512 byte boot block, add the following directives in you .c file:
 
  	  | Code: |  	  | #build(reset=0x200) #build(interrupt=0x208)
 #org 0x0000,0x01ff
 void bootloader() {
 #asm
 nop
 #endasm
 } // Reserve space for the bootloader
 
 | 
 When I try to load the Hex file for my application using the COLT bootloader, it just gets stuck and does not load anything.
 I am trying to load it at 115kbps.
 
 Any suggestions are welcome.
 
 Thanks,
 
 abqguy
 |  |  
		|  |  
		| PCM programmer 
 
 
 Joined: 06 Sep 2003
 Posts: 21708
 
 
 
			    
 
 |  |  
		|  |  
		| abq_guy 
 
 
 Joined: 26 Jan 2009
 Posts: 13
 
 
 
			    
 
 | 
			
				| colt bootloader for PIC18F8722 |  
				|  Posted: Tue Jan 27, 2009 1:41 pm |   |  
				| 
 |  
				| I am using 0.6B version, which is the latest on the website. 
 Here is what I did.
 
 1) I downloaded the bootload2Kuart2.hex to the PIC chip using the MPLAB ICD2.
 
 2) Then I added the following to my C-code.
 
  	  | Code: |  	  | #build(reset=0x800) #build(interrupt=0x808)
 #org 0x0000,0x07ff
 void bootloader() {
 #asm
 nop
 #endasm
 } // Reserve space for the bootloader
 | 
 3) Then I added the following line to the PICDevices.properties file right underneath the PIC18F8720
 
 PIC18F8722=161,800,7fff,300000,30000d,0,3ff,1,8,64
 
 4) I saw no activity on either of the TX pins of the PIC after turning the power on.
 
 5) I then used the COLT.exe to try to load my C-code on the PIC chip. I have just the Reload Before Program and Reset after Program checked, as I am using WDT in my c-code.
 
 When I press Program, Nothing happens. The program just sits there idle. I am setting the baudrate to 115200. I have tried with 9600 and 19200 and nothing happens there either.
 
 I do see some activity on the PIC R/X pin, but it just some glictches, as I am not able to interpret what it is using an Interpreter.
 
 What am I doing wrong ?
 Any suggestions are welcome.
 |  |  
		|  |  
		| ckielstra 
 
 
 Joined: 18 Mar 2004
 Posts: 3680
 Location: The Netherlands
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Tue Jan 27, 2009 6:23 pm |   |  
				| 
 |  
				| I'm not sure if this will solve your problem, but the code for reserving bootloader memory looks wrong. This code actually loads a NOP at address 0 and might overwrite the first bootloader byte. As a side effect more data will be overwritten because FLASH memory can only be erased in blocks, depending on your chip there will be 16, 32 or more bootloader bytes erased. 
 Try replacing with
 
  	  | Code: |  	  | #build(reset=0x800) #build(interrupt=0x808)
 #org 0x0000, 0x07ff {}    // Reserve space for the bootloader
 | 
 |  |  
		|  |  
		|  |  
  
	| 
 
 | 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
 
 |