Search the web
Sign In
New User? Sign Up
microchipC_pic16F87x_bootloader · www.microchipc.com PIC16F87x bootloader
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 1 - 91 of 569   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#91 From: "tutorial4u8" <tutorial4u8@...>
Date: Fri Feb 1, 2008 10:34 am
Subject: java architecture tutorial
tutorial4u8
Offline Offline
Send Email Send Email
 
java architecture tutorial
at
http://java3.blogspot.com/

#90 From: "helpss4u226" <helpss4u226@...>
Date: Tue Jan 29, 2008 10:29 am
Subject: know about HelpDesk software
helpss4u226
Offline Offline
Send Email Send Email
 
know about HelpDesk software
at
http://HelpDesk2007.blogspot.com/

#85 From: "cyphez84" <cyphez84@...>
Date: Fri Dec 7, 2007 5:17 pm
Subject: PIC 16F877 troubleshooting
cyphez84
Offline Offline
Send Email Send Email
 
hello
i'm new in the PIC world and trying to build a bootloader using
PIC16F877 series with referring to a application notes.
my problem is that when i writing a new program to the PIC(using
minicom or DOS command )its doesnt work.Sometimes its stop in the
middle of the writting process and sometimes its does not work at all...
If anybody have a solution or even a url side that are relevent with
this problem please share....
thank you

#57 From: "mcclmar" <markdmcclure@...>
Date: Thu Jul 19, 2007 4:47 am
Subject: PIC16F887
mcclmar
Offline Offline
Send Email Send Email
 
Has anyone had success getting a PIC16F887 to work with this
bootloader? From what I read the PIC16F887 is the replacement part for
the PIC16F1877. It has an internal oscilator.

As far as I can tell the program memory seems to line up. Are there any
reasons it shouldn't work?

Using the 16f887 bootloader code I changed the part number and fuses,
compiled and burnt it but it doesnt seem to do anything with the
windows bootloader software.

Thanks,

Mark

#41 From: "romain145" <romain145@...>
Date: Sat Jun 23, 2007 4:33 pm
Subject: Re: 16f877a bootloader not working
romain145
Offline Offline
Send Email Send Email
 
Is anyone there ?

--- In microchipC_pic16F87x_bootloader@yahoogroups.com, "romain145"
<romain145@...> wrote:
>
> Hi everyone !
>
> I spent hours on this bootloader and didn't understand anything.
> My hardware :
> -pic16f877a quartz=8MHz.
> -development card with a FTDI USB-serial interface.
> -2 programmers (LVP and HVP respectively Schaer and JDM type)
> -2 computers... what else ?
>
> Software :
> -picbootplus
> -icprog
> -mplab (of course)
> -bootloader 2.81
>
> What I'm doing : I modified the bootloader code to fit my hardware
> configuration : frequency and baud rate adjusted.
> I loaded the bootloader in the PIC, start picbootplus, load a hex
> file, click on Write and reset the PIC... nothing happened !!
>
> I saw it working for some hours, but since it doesn't work I changed
> PIC, programmer, PC, verified serial communication : all OK !
> What's wrong ??
>
> Please help me.
> Romain
>

#40 From: "romain145" <romain145@...>
Date: Thu Jun 21, 2007 12:11 am
Subject: 16f877a bootloader not working
romain145
Offline Offline
Send Email Send Email
 
Hi everyone !

I spent hours on this bootloader and didn't understand anything.
My hardware :
-pic16f877a quartz=8MHz.
-development card with a FTDI USB-serial interface.
-2 programmers (LVP and HVP respectively Schaer and JDM type)
-2 computers... what else ?

Software :
-picbootplus
-icprog
-mplab (of course)
-bootloader 2.81

What I'm doing : I modified the bootloader code to fit my hardware
configuration : frequency and baud rate adjusted.
I loaded the bootloader in the PIC, start picbootplus, load a hex
file, click on Write and reset the PIC... nothing happened !!

I saw it working for some hours, but since it doesn't work I changed
PIC, programmer, PC, verified serial communication : all OK !
What's wrong ??

Please help me.
Romain

#31 From: "fabien_bp" <fblancp@...>
Date: Fri Feb 2, 2007 4:05 pm
Subject: Bootloader using no MAX232 but transistors not working.
fabien_bp
Offline Offline
Send Email Send Email
 
Hello,

I tried to use the bootloader on a 16F876 without a MAX232 converter,
but instead using 2 transistors for shifting the level of the signals.

When I try to send/receive data between the computer and the PIC with
my own pic software everything works very well, but when I start the
Downloader (Delphi or C++ version), I got timeouts right after I click
'write'.
I also have to reset the pic several times before it starts to try
writing.

I tried the 9600 and 19200 bauds, using a 4MHZ quartz.

Any idea about the problem ?

Regards,
Fabien

#29 From: "michaeliancollier" <mrmichaelcollier@...>
Date: Wed Oct 11, 2006 10:25 am
Subject: Resistor based serial interface
michaelianco...
Offline Offline
Send Email Send Email
 
Hello,

I am interested in the use of a simple resistor interface to download
to the PIC, removing the need for MAX232.

Has this ever been done with a version of the bootloader before?

The reason I ask is because I have connected PICs to my serial port in
the past using this technique.

Thanks for your help,
Mike.

#28 From: "smt5211" <shane@...>
Date: Mon Aug 21, 2006 7:43 am
Subject: RE: Need to use bootloader with assembly language
smt5211
Offline Offline
Send Email Send Email
 
Hi,

See:

http://www.microchipc.com/PIC16bootload/PIC_bootloader_FAQ.htm#reserve_space

Regards,
Shane Tolmie
DesignREM Ltd.
shane.tolmie@...


> -----Original Message-----
> From: Virendra Pawar [mailto:pawarvirendra2004@...]
> Sent: Monday, August 21, 2006 6:24 PM
> To: shane.tolmie@...
> Subject: Asstistance Required, BOOTLOADER
>
> Hi Shane.
>
> I have programmed your BOOTLOADER in PIC 16f877A , Works
> Excelently with programmes developed in Hitech C. C Code
> test.c works.
> But same code done in ASM  test.asm in (MPLAB) will not execute.
> --------------------------------------------------------------
> -----------------------------------------------------
> //  test.c
> #include <pic.h>
> //for Hi-Tech C only
> #include "delay.h" //make sure that PIC_CLK in this file is
> correctly defined #define BOOT 0x0000 //#define BOOT_START BOOT
>
> main()
> {
>    unsigned int timeout_int;
>    unsigned char timeout_char;
>  unsigned int i;
>     TRISB=0b00000000;
>  PORTB = 0xAA;           //set ports of port B to output -
> o=output, 1=input
>          for( ;; )
>    }
>
>
>
>
> void interrupt isr(void)
> {
> }
>
>
> --------------------------------------------------------------
> -----------------------------------------------------
> ;test.asm
>   LIST P=16f877A
>         ERRORLEVEL  -302
>
>         include <p16f877A.inc>
>                           ORG                 H'0000'
>                           GOTO              MAINLINE
>
> MAINLINE
>
>                            BSF                 STATUS,5
>                            MOVLW           B'00000000'
>                            MOVWF           TRISB
>                            BCF                 STATUS,5
>                            MOVLW           B'10101010'
>                            MOVWF           PORTB
> HERE
>                                  GOTO HERE
>   END
>
> --------------------------------------------------------------
> ----------------------------------------------------
>
> I am writing a air pressure monitoring programme where 24
> pressure parameters have to be regularly loaded. I want to
> save these in the EEPROM .So they can be changed without
> changing the main programme. How do i write the same so i can
> generate Hex format to down load into the eeprom using your
> Downloader.
>
> Thanks
> Virendra D. Pawar
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection
> around http://mail.yahoo.com
>

#26 From: "chia_sc84" <chia_sc84@...>
Date: Mon Aug 7, 2006 2:21 pm
Subject: What are the differences of bootloader for PIC16F877 and PIC16F877A?
chia_sc84
Offline Offline
Send Email Send Email
 
Im was currently develop a new bootloader for PIC16F877A instead of
PIC16F877-20P to be used with GoGo Board.

Since there are changes in the self-programming mechanism for Flash
program memory, where on PIC16F877 devices, Flash programming was done
in single-word erase/write cycles while the newer PIC16F877A devices
use a four-word erase/write cycle.

What is the meaning of single-word erase/write cycle and four-word
erase/write cycle?

Any one know how to modify the PIC16F877 bootloader so that it can be
used for PIC16F877A?

#24 From: "andremiguelrodrigues" <andremiguelrodrigues@...>
Date: Mon May 8, 2006 10:31 pm
Subject: thus anyone have experience with an USB to serial adapter?
andremiguelr...
Offline Offline
Send Email Send Email
 
#22 From: "John Souders" <email@...>
Date: Tue Mar 14, 2006 2:09 am
Subject: piclf876a problems - timeout
jsouders2000
Offline Offline
Send Email Send Email
 
I have been using the bootloader with non A parts (876) for years. Now
I am trying with 876A parts. I loaded the latest A hex file, for 56000
baud, but get a "timeout of communication" every time I try to bootload.
This happens after loading has started, and at a different place each
time.
I am using PICloader+ under windows XP.

WDT is not emabled on the PIC.

any ideas?

#19 From: "Mian Muhammad Qasim" <muazmi02@...>
Date: Mon Feb 27, 2006 5:44 am
Subject: LOOKING HELP...
muazmi02
Offline Offline
Send Email Send Email
 
HOW CAN I PROGRAME PIC 16F84 AND PIC16F87X IN ASSEMBLY AND C.. CAN
SOME ONE PROVIDE WITH SOME NOTES OR EXAMPLE PROGRAMES.. THANKS YOU ALL

#18 From: "twintower_61001" <twintower_61001@...>
Date: Fri Jan 27, 2006 1:17 am
Subject: pic16f877
twintower_61001
Offline Offline
Send Email Send Email
 
Is it possible to program pic16f877 with c18 compiler? If I want to
use c language to program this pic what software should I use?

thanks,

#17 From: "demotown" <demotown@...>
Date: Wed Jan 18, 2006 7:00 pm
Subject: Just want to program PIC16F877
demotown
Offline Offline
Send Email Send Email
 
Hello All,

I would just like to program the PIC16F877.
I have downloaded MP Lab and I know what values I would like to
program.

Do I need a bootloader for this?
Do I need to build a special circuit to do this?
Is there a generic code available to do this?

This is my first time involved with this sort of thing.
What is the easiest way to do this?


Any Help would be greatly appreciated.
Thanking you in advance,
DemoTown

#16 From: "roombahacker" <engunneer@...>
Date: Thu Jan 12, 2006 6:19 am
Subject: other clock frequencies?
roombahacker
Offline Offline
Send Email Send Email
 
I'm using a PIC 16F876 with a 19.6608 MHz crystal. Can I still use the
bootloader (the 20MHz one)?

I'm using this odd frequency because it is evenly divisible by 19200
baud (19200 * 256 * 4), which means I get 256 instructions between
bits, and my baud rate has 0% error.

Thanks

Roombahacker

#15 From: "guydetienne" <guy.detienne@...>
Date: Sat Jan 7, 2006 4:45 pm
Subject: Problem with start.
guydetienne
Offline Offline
Send Email Send Email
 
Hello,

I'm new with bootloader and I have problems.
I have modified the asm file for 16F876A, 16 Mhz and 9600 Bauds. Here
copy of the declaration in MPLAB.

list p=16f876a
#define ICD_DEBUG 0
#define FOSC D'16000000'
#define BAUD D'9600'
#define BAUD_ERROR D'4'
#define TIME
#define TRIGGER  PORTB,7
#define TIMEOUT  D'2'
#define WATCHDOGTIMER 0

I have copied the .hex file in the Pic.
When I start "Pic downloader 1.08" or "Picbootloader+" I have the
message "Searching for Bootloader" for a long time (a wait more than 1
minute) and nothing more. If I reset the Pic, the program says "time
out" and abort.
I have try with differents baudrate and the two last version (9-40 and
9-30).
With version 9-30 the MPLAB compiler give my a lot of error :

Clean: Deleting intermediary and output files.Clean:
Done.Executing: "C:\Microchip\MPASM
Suite\MPAsmWin.exe" /q /p16F876A "876a_16_96.asm" /l"876a_16_96.lst" /e
"876a_16_96.err"Message[305] C:\PROJETS\BOOTHEX\876A_16_96.ASM 458 :
Using default destination of 1 (file).Message[305]
C:\PROJETS\BOOTHEX\876A_16_96.ASM 570 : Using default destination of 1
(file).Message[305] C:\PROJETS\BOOTHEX\876A_16_96.ASM 572 : Using
default destination of 1 (file).Message[305]
C:\PROJETS\BOOTHEX\876A_16_96.ASM 573 : Using default destination of 1
(file).Message[305] C:\PROJETS\BOOTHEX\876A_16_96.ASM 574 : Using
default destination of 1 (file).Message[305]
C:\PROJETS\BOOTHEX\876A_16_96.ASM 575 : Using default destination of 1
(file).Message[305] C:\PROJETS\BOOTHEX\876A_16_96.ASM 585 : Using
default destination of 1 (file).Message[305]
C:\PROJETS\BOOTHEX\876A_16_96.ASM 619 : Using default destination of 1
(file).Message[305] C:\PROJETS\BOOTHEX\876A_16_96.ASM 621 : Using
default destination of 1 (file).Message[305]
C:\PROJETS\BOOTHEX\876A_16_96.ASM 622 : Using default destination of 1
(file).Loaded C:\Projets\BootHex\876a_16_96.COD.BUILD SUCCEEDED: Sat
Jan 07 17:02:17 2006

My application,loading without bootloader and using serial
communication, works with the terminal of "Picbootloader +".

Could you help to find my errors.

Thanks and regard.

Guy Detienne.

#14 From: "smt5211" <shane@...>
Date: Sat Dec 24, 2005 10:30 am
Subject: Re: Clarification needed for PIC16F877A bootloader
smt5211
Offline Offline
Send Email Send Email
 
Hi,

The 16F87xA bootloader works for both the 16F87x and the 16F87xA.

The 16F87x bootloader does not work with the 16F87xA.

The latest version of the bootloader (v9.50) has been modified to
correct this.

Regards,
Shane Tolmie (BEng. Elec. Hons.)
www.microchipC.com


--- In microchipC_pic16F87x_bootloader@yahoogroups.com, "devyani16"
<devyani16@y...> wrote:
>
> I have recently started using the above PIC-P40 development board and
> have few basic questions. I use this "Shane Tolmie PIC bootloader v9-
> 40 " bootloader and it is working absolutely fine but I read in the
> FAQs that we need to reserve first 256 bytes for the bootloader in our
> programs. I use CCS-C compiler and have not implemented this line:
>
> #org 0x1F00, 0x1FFF void loader16F876(void) {} //protect bootloader
> code for the 8k 16F876/7
>
> in my code , but I can execute my programs.
>
> Thus, I am not sure of the instruction mentioned on
> http://www.microchipc.com/PIC16bootload/PIC_bootloader_FAQ.htm#reserve25
> 6_CCS_C.
>
> It would be a great help if someone could help me on this matter.
>
> Thanks.
>

#13 From: "smt5211" <shane@...>
Date: Sat Dec 24, 2005 10:27 am
Subject: Re: build reset circuit
smt5211
Offline Offline
Send Email Send Email
 
Hi,

You can pull MCLR low with the RTS or CTS pin, when a bootload occurs.
The Windows downloader would have to be modified for this to take place.

Regards,
Shane Tolmie (BEng. Elec. Hons.)
www.microchipC.com

--- In microchipC_pic16F87x_bootloader@yahoogroups.com, "devyani16"
<devyani16@y...> wrote:
>
> It would be great if someone could help in telling how to build a
> reset circuit for the PIC P40 board( PIC16F877A). Its really a pain
> everytime to unplug and plug the board in order to reset it. Sparkfun
> website says to ground the MCLR pin. But do we have to build
> additional circuitry or just a reset switch between MCLR and ground
> pin is enough?
>

#11 From: "devyani16" <devyani16@...>
Date: Tue Oct 18, 2005 4:43 am
Subject: build reset circuit
devyani16
Offline Offline
Send Email Send Email
 
It would be great if someone could help in telling how to build a
reset circuit for the PIC P40 board( PIC16F877A). Its really a pain
everytime to unplug and plug the board in order to reset it. Sparkfun
website says to ground the MCLR pin. But do we have to build
additional circuitry or just a reset switch between MCLR and ground
pin is enough?

#10 From: "devyani16" <devyani16@...>
Date: Thu Oct 13, 2005 8:25 pm
Subject: Clarification needed for PIC16F877A bootloader
devyani16
Offline Offline
Send Email Send Email
 
I have recently started using the above PIC-P40 development board and
have few basic questions. I use this "Shane Tolmie PIC bootloader v9-
40 " bootloader and it is working absolutely fine but I read in the
FAQs that we need to reserve first 256 bytes for the bootloader in our
programs. I use CCS-C compiler and have not implemented this line:

#org 0x1F00, 0x1FFF void loader16F876(void) {} //protect bootloader
code for the 8k 16F876/7

in my code , but I can execute my programs.

Thus, I am not sure of the instruction mentioned on
http://www.microchipc.com/PIC16bootload/PIC_bootloader_FAQ.htm#reserve25
6_CCS_C.

It would be a great help if someone could help me on this matter.

Thanks.

#9 From: "edysystem" <edysystem@...>
Date: Wed Oct 5, 2005 1:05 pm
Subject: bootloader help
edysystem
Offline Offline
Send Email Send Email
 
Ciao.

Im verry novice with the Pic's, and I need help.

I try to do an application where I wont to use the serial port of
PIC16F876A, 4MHz osc, for communication with PC, and for programming
with a bootloader.

I use a connection like in this schematic
http://www.captain.at/electronics/pic-mmc/, it works for PC
communication, but dont works to programm the pic with bootloader.

For write into pic the hex bootloader programm I use a JDM programmer,
with IC-prog software.

Can anyone help me?

#8 From: "Jim Dahlquist" <jim@...>
Date: Mon Sep 26, 2005 5:01 am
Subject: Why separate bootloaders for 16F8x_ and 16F8xA types?
jimsheet
Offline Offline
Send Email Send Email
 
Why are there two separate bootloaders for the nearly identical
parts(16F87x and 16F78xA)?

Will either bootloader accomodate both pats?

Jim Dahlquist
Palatine, IL 60076
www.dhlqst.com

#7 From: "veryuniqueuserid" <veryuniqueuserid@...>
Date: Wed Sep 7, 2005 12:13 am
Subject: Bootloader w/ Modtronix DEVKIT44B and Linux
veryuniqueus...
Offline Offline
Send Email Send Email
 
I had a little trouble getting the bootloader to work with the Modtronix
DEVKIT44B
using a Linux machine as the host.  The bootloader code for Linux is built with
hardware handshaking (CRTSCTS in linuxio.c:cominit()).  I disabled this and it
now
works fine.

Thank-you for a great tool.

Ed

#6 From: "eyeonsci" <hansknec@...>
Date: Tue Aug 30, 2005 1:38 pm
Subject: EEPROM memory shift Solved.
eyeonsci
Offline Offline
Send Email Send Email
 
Well after some discussion with Shane Tolmie and some trial & error I
realized that if I just check the "EEPROM" button in the bootloader+
it works perfectly.  I honestly didn't even see that option the first
20 times I used the program.  Shane pointed out that there are other
ways of getting my default values in at runtime that I should explore
as well.

I'm quite pleased with this bootloader.
John

#5 From: "eyeonsci" <hansknec@...>
Date: Mon Aug 29, 2005 2:13 am
Subject: EEPROM memory shift?
eyeonsci
Offline Offline
Send Email Send Email
 
I started using your bootloader today.  WOW!  I had it up and running
in only a few minutes after visiting your site.  No more opening up my
chassis to get to the ICD port!  Unfortunately I ran into a problem
and could use some advice.  I use the CCS PCM compiler, so I added the
following line as you recommended:
#org 0x1F00, 0x1FFF void loader16F876(void) {}

No problem there, the program compiles and uploads through the
bootloader.  But I also access the internal EEPROM and set a couple
default values in the hex file.  An example:
_____________________________________________________________
#include <16F876A.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#org 0x1F00, 0x1FFF void loader16F876(void) {}
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7,ENABLE=PIN_A4,ERRORS)
#include <input.c>

// EEPROM reading and writing info
********************************************
#rom 0x2100= {'9'}  //set the initial address to 9 when loading hex file


void main() { //******** MAIN ************************
    char address;
    address = read_eeprom(0);
    do{
    printf("\naddress is %c",address);
    delay_ms (200);
     } while (TRUE);
}
______________________________________________________________

I'm not sure where I'm going wrong.  The CCS compiler also allows me
to access a specific memory location with the read_program_eeprom()
command, but I can't get it to work either.  I have to be honest here,
I really don't understand this memory organization and could use some
advice.  My final program needs to set about 6 bytes of information
when loading the first hex file.  These bytes will be written over
later by a user of the device so the device will retain their personal
settings.
Thanks,
John

#4 From: "smt5211" <shane@...>
Date: Sat Aug 27, 2005 1:22 am
Subject: Bootloader usage passes 2000 usage mark
smt5211
Offline Offline
Send Email Send Email
 
Hi,

Based on downloads of the PIC18F876A bootloader over the past 6 years
(>32,000), there are now approximately 2000 installations of this
PIC16F87x bootloader worldwide.

Although this would not be apparent from the messages in this forum
(we did lose 4 years of forum messages due to hacker bringing down our
server) the bootloader has shown to be remarkably resilient,
generating very few complaints.

Thankyou to everyone involved in this project.

Regards,
Shane Tolmie (webmaster, www.microchipC.com).

#3 From: "smt5211" <shane@...>
Date: Sat Aug 27, 2005 1:18 am
Subject: Potential problem with bootloader - and solution.
smt5211
Offline Offline
Send Email Send Email
 
Dear Shane,

Although I'm still very positive about the PIC16F877 boatloader I have
recently expierenced a very nasty side effect I think others should
know about it before they start using it for their rocket detonators,
breathing devices etc.

At the research institute where I work, I have added the bootloader to
the firmware of about a 100 sensors. This has proven to be very handy
for field upgrading, changing calibration tables etc.  But after a
while sensors started coming back. When I readback the code, I noticed
a few bits of code had changed. Very scary !!!

So I spend some of time finding the cause. I made a little 'spurious
write detection' program that compares the lower half of the code
memory with the upper half where I put a mirror of the code. When I
programmed this into a PIC16F877 (using ICD2) and connected the device
to a 'very very dirty power supply' I carried out the following
experiments:

- with a bootloader, Brownout Detect (BOR)=off, Power Up Timer=off,
LVP=on:
spurious writes after a just few power interrupts;

- without bootloader, same config setting: no problem after many power
interrupts;

- with bootloader, with BOR on: also no problems after many power
interrupts;

Conclusion: never use this bootloader with the BOR switched off!

I think you should put this warning very loud and clear to all the
user of this bootloader.

Kind Regards,

Herman Aartsen.

[I have updated the bootloader to v9.40, incorporating these notes - Ed.]

#2 From: "rbgorbet" <rbgorbet@...>
Date: Tue Aug 23, 2005 3:15 am
Subject: programming multiple clients using bootloader / RS485 question
rbgorbet
Offline Offline
Send Email Send Email
 
I have an application where I will have 12 PIC16F876-based controller
boards each controlling a local device, and all communicating with a
host computer via RS485.  I want the end result to be field-
upgradable, so I'm using Shane Tolmie's excellent bootloader.

As a result, I had two questions:

1. Assuming I use some kind of 232/485 translater on the host PC side
and 485 receivers at the controller boards, will the bootloader work
as normal?  I believe the answer is yes because in the end it's all
TTL levels going into and out of the chip anyways, but would
appreciate comment from anyone who's done this before.  I haven't got
the 485 chips to try it yet but will repost when I do.

2. The second question has been solved but might be of use to
others.  It was: "can I broadcast the .hex file to multiple
bootloaders at the same time"?  The answer is no, because the
bootloader process is bidirectional, so having a multi-drop bus will
confuse things.

The way I got around this second problem is the following.  I created
a serial command which tells the PIC to wait a few seconds, then
initiate the bootloader sequence.  The code looks like this (PIC-C):

...
void sw_reset()
{
   // Special software reset routine which first
   // resets the UART receive status register to power-on
   // values.  Then the bootloader is invoked.

   #byte RCSTA = 0x18
   RCSTA = 0; 	 // reset register
   goto_address(0x0);  // run bootloader
}
...
main (){
...
     if (shutdown) { shutdown=0;
       disable_interrupts(GLOBAL);
       printf("resetting CPU in 3 seconds...\n");
       delay_ms(3000);
       sw_reset();
     }

So I send a serial command which causes shutdown to get set, then
press WRITE on the bootloader GUI before the 3 seconds is up.


Because I'm using interrupts on UART RX, I had to disable interrupts
since it seems the bootloader interface polls the device via the
serial line.  Without those disabled, I was never getting to the
reset command since the interrupts kept coming.

Also, jumping to the bootloader at 0x0000 isn't enough.  That will
give you a reset but no loading.  You need to first reset the receive
status register RCSTA to zero as shown.


I can adopt this for multiple clients by using the top 4 bits of the
byte sent as an address and the bottom 4 bits as the reset command.
Devices which aren't being addressed simply ignore the command.  It
means I have to reprogram the devices one-by-one, but at least I can
do it.

Hope this helps someone.

Rob.

#1 From: "smt5211" <shane@...>
Date: Sat May 21, 2005 3:40 am
Subject: Last 3+ years of messages
smt5211
Offline Offline
Send Email Send Email
 
Hi,

Due to an attempted hack on the phpBB forum at www.microchipC.com, the
last 3 years of messages were lost. Apologise to the thousands of
users out there who have lost out - I know the identify of the hacker;
the authorities have his full name, location, and a felony charge for
causing over $120,000 worth of damage.

Regards,
Shane Tolmie
Admin
www.microchipC.com

Messages 1 - 91 of 569   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help