chipKIT® Development Platform

Inspired by Arduino™

reset vs. power cycle

Created Tue, 21 Jun 2011 18:17:57 +0000 by bshapiro


bshapiro

Tue, 21 Jun 2011 18:17:57 +0000

Hi all-- new to Chipkits (and micros in general), but am trying to become familiar with them after using Brian's UBW and UBW32 for some time. As a first practical exercise, I'm using a slightly modified sketch from Adafruit to fade colors on a string of RGB LED's (parallel strip, not individually addressable). After successfully loading the sketch and seeing it function, I disconnected the USB cable, and it continues, as expected (I'm supplying 12VDC for the LED strip through the Chipkit, with MOSFETS between). But pulling external power, and then reconnecting, the string lights briefly in a way not in the sketch, then resumes as expected. Pushing the reset button does not produce this unexpected behavior. Before I start trying to nail down exactly (and how reproducible) the power cycle vs. reset difference is, should I expect any difference?

Bruce


hairymnstr

Wed, 22 Jun 2011 10:08:33 +0000

I've spotted similar things. The difference I think is to do with the FTDI USB->UART chip. When you press the reset button the PIC is reset but the FTDI stays in the same state. Power cycling the board forces the FTDI chip to restart as well. Since the FTDI chip changes the state of RTS on startup and this is connected to the PIC reset line the CPU makes a false start or two.

This is a common issue with development boards from many manufacturers which rely on the UART to control reset.

If it is causing a real issue there is a shorted jumper on the board (JP1) which you could populate and cut the track, then only fit the jumper when you want to program the PIC.