software reset

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

Post Reply
bostamy
Posts: 2
Joined: Wed Feb 04, 2009 3:44 pm
Location: Detroit Michigan

software reset

Post by bostamy » Thu Nov 05, 2009 2:23 am

I am trying to get the software reset to work on my PIC 18f2580. I loaded the hex file for the bootloader and when i physically pull the MCLR pin to ground the chip resets and it programs but the software can't seem to do this. Does anyone have a circuit of how I should wire the rs-232 to the pic to enable software reset?

Doj
Posts: 362
Joined: Wed Apr 11, 2007 10:18 pm
Location: East Sussex

Post by Doj » Sat Nov 07, 2009 12:19 am

Hello bostamy,
I am not sure quite where you are coming from when you say "the software reset".
I think you need to do a reset sometime when using a bootloader(which I never have) and I expect this is normally a button on the PCB.

Despite my confessed lack of understanding I have answered the thread as I use the software reset function in my own code as an exception handler when all else fails(works a treat!)

I use the ASM wrapper thus:-

Code: Select all

ASM
    reset
End ASM
You can call it as a function and it does exactly what you might expect.

Jon Chandler
Registered User
Registered User
Posts: 185
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Post by Jon Chandler » Sun Nov 08, 2009 3:01 pm

I believe you're asking about how to make the bootloader automatically do a reset to download the hex file?

The MCLoader (supplied with Swordfish) uses the RS-232 signal DTR to trigger a reset. A schematic is in the MCLoader docmentation file. (I can't figure out how to upload a picture - grrrr)



Jon[/img]

Post Reply