Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: PICkit 2 Logic Tool Trap

PICkit 2 Logic Tool Trap 11 months 3 weeks ago #17869

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 329
  • Thanks received: 340

PICkit 2 Logic Analyzer - 300pxThe PICkit 2 logic tool/analyzer is a handy tool to have around, especially since the price is right!  The analyzer mode can show the timing of signals, and the logic tool can be used to monitor the output status of a few bits or to exercize a few inputs.  The logic analyzer and UART tool are reasons why I don't upgrade to the PICkit 3.

I'm working on a simple monitor that will record and display the status of 8 test points.  In the piece of machinery being monitored, a number of conditions can lead to shutdown, but the only indication a technician troubleshooting the issue is that one or more of these conditions caused the shutdown but not which particular faults occured.  A couple of the fault conditions are temperature-related, so a technician arriving some time after  a shutdown has occurred has little to go on for troubleshooting.

The monitor I am building will show what faults have occured, and the sequence in which they occurred.  It should be a powerful tool for the technicians.

I need to simulate the fault conditions to develop the software.  As I get it refined, I'll need to generate 8 signals, but for the initial work, simulating a few inputs will be sufficient.  I am using port B of the 18F26K22 to monitor the eight signals.  RB6 and RB7 are the ISCP programming pins, but there won't be a programmer connected in the field.  Using the PICkit 2, I can easily exercise RB6 and RB7 without making any changes in connections.  It's pretty slick.

Read more...

PICkit 2 Logic Tool Trap 11 months 2 weeks ago #17870

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 329
  • Thanks received: 340
There's another gotcha with the PICkit 2 connected to port pins you're using for something else. A couple actually,

For my testing, I moved on to a switchbox with 8 SPST toggle switches; the switches are connected to ground and the lines are pulled high with a 10k resistor. At first, I thought a couple of my switches from the Happy Captain Switch Company (the best 10 pack of switches you can buy for five bucks) might be shorted. Bits 6 and 7 (the ICSP data lines) showed low in both positions - the other 6 switches preformed as expected and my monitor illuminated the LEDs as expected. Then I thought back to those notes on the logic analyzer screen. Pulled down with a 4.7k resistor. Ok, a 4.7k pulldown wins over my 10k pullup. Disconnect the PICkit and all is good with my switches (and my code).

With my switch box connected, I started getting errors when trying to program the PIC. "Device not found." I'll cut to the chase - if the switches for bits 6 and 7 are on, shorting the lines to ground, the ICSP data lines are shorted to ground. Oops.
Time to create page: 0.257 seconds