Use FTDI chip to reset PIC

A small embedded server. Get one for $40, including worldwide shipping.

Use FTDI chip to reset PIC

Postby megabug » Sun Apr 03, 2011 5:06 pm

Hi,

I was wondering why the web platform can't reset the PIC for entering bootloader automatically with the FTDI chip? I mean I am wondering why this wasn't implemented.

I found a reset tab in the ds30 Loader tool which pulls a pin (RTS or DTR) low for reset when you klick on "Download". So I soldered a wire from DTR (pin 2, FTDI chip) to MCLR and tried it:

Image

Worked fine. Now I don't need to press the reset button when I want to upload a new firmware. (that was annoying while developing stuff)

Tested it with external power, too. Works fine. (I had feared that the FTDI chip somehow resets the PIC when not powered by USB or whatever) The PIC resets when powered by external supply and USB is plugged in, but thats not really a problem.

So if you have a steady hand just solder a wire and be happy. :)
Or: you can reset the PIC by serial command... but that doesn't involve soldering, so it's not that cool. :D

best regards
Web platform todo: bluetooth firmware update, some kind of database, GLCD.
Working: RS485 connection, NTP RTC time sync, I2C for portexpanders, Software PWM with timer interrupt, SPI flash(32mbit)
megabug
Newbie
Newbie
 
Posts: 33
Joined: Tue Mar 22, 2011 4:31 pm
Location: Germany

Re: Use FTDI chip to reset PIC

Postby ian » Mon Apr 04, 2011 1:42 am

This would be a great thing to add on the next revision.

The only thing I'd worry about is if the FTDI is left high instead of high-impedance. That could potentially cause issues with the MCLR pin (though you haven't observed any). Microchip doesn't recommend applying power directly to the MCLR pin without a resistor. If we rolled it into a revision I'd probably use a transistor pair to switch between ground and high-impedance instead.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: Use FTDI chip to reset PIC

Postby megabug » Mon Apr 04, 2011 6:47 am

Yes, I normally would use a resistor to connect it to mclr, but since I only have SMD parts I was to lazy to solder wires to my resistors. ;)

To use it you can take a n-channel mosfet to pull mclr to GND and invert DTR in the FTDI Firmware. But I will observe the behavior the next days with the FTDI connected directly.
Web platform todo: bluetooth firmware update, some kind of database, GLCD.
Working: RS485 connection, NTP RTC time sync, I2C for portexpanders, Software PWM with timer interrupt, SPI flash(32mbit)
megabug
Newbie
Newbie
 
Posts: 33
Joined: Tue Mar 22, 2011 4:31 pm
Location: Germany

Re: Use FTDI chip to reset PIC

Postby shuckc » Tue Apr 05, 2011 5:14 am

Ah, this was one of the biggest timesavers when I switched to using the ICD with pickit, not having to lean over and reset the board :-) Nice hack.
shuckc
Newbie
Newbie
 
Posts: 46
Joined: Tue Jan 11, 2011 3:00 pm
Location: London, UK

Re: Use FTDI chip to reset PIC

Postby megabug » Sun Apr 10, 2011 1:38 pm

Just an update from my side: I have been using this for a week now with no problems. :)

Now I wait for my bluetooth module from ebay so I can update my web platform (or my own ethernet boards) via bluetooth. (with reset function!)
Web platform todo: bluetooth firmware update, some kind of database, GLCD.
Working: RS485 connection, NTP RTC time sync, I2C for portexpanders, Software PWM with timer interrupt, SPI flash(32mbit)
megabug
Newbie
Newbie
 
Posts: 33
Joined: Tue Mar 22, 2011 4:31 pm
Location: Germany


Return to Web platform