Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: The PICKit 2 Logic Tool

Re: The PICKit 2 Logic Tool 9 years 8 months ago #15246

The PICKit 2 is an awesome program er for PIC microprocessors and is simple to use.  Adding to its value, it includes a UART tool for serial communications to the PC without the need for a MAX232 chip (or serial-USB chip/adapter) and functions as a 3 channel logic analyzer.  Not bad for $35.

This article will focus on the Logic Tool.

The logic tool has one line that's an input only and three additional lines that can be inputs or outputs (all digital as opposed to analog).  Inputs indicate whether a signal is high (1, +V) or low (0, ground).  Outputs provide a signal that's either high or low.*

 

So what does that do for us?

In the simplest case, the logic tool can substitute for LEDs on a microprocessor board so that you can monitor your program's status and check that certain functions happen.  Outputs can take the place of switches to select options in programs during testing.

You might use the logic tool to simulate operation of a sensor, a remote switch or an external indicator.

In a more advanced case, the logic tool can be used for troubleshooting.  Suppose your program changes the status of an output pin and something is supposed to happen but doesn't.  Is something wrong in the program so the pin doesn't change?  Is something wrong with the circuit so that it's not responding to the change?  You can set the logic tool up as a input to monitor the status of the pin.  Toggle the status of the pin in your program and observe what happens to narrow down the problem.  You might use an output to force a signal high or low but this can be risky if two output pins are tied directly together.

The screen below shows the logic tool screen.

* A note about logic levels:

0 or low indicates a level that is approximately at ground.  There is some wiggle room depending on the type of part used, so the level will be near zero but may not be exactly zero.  1 or high indicates a level near VDD, where VDD is the operational voltage of the circuit.  If VDD is 5 volts, a high logic level may be considered as 4 volts for example.  If the same circuit was operating from 3.3V, the threshold might be 2.7 volts.  Only the data sheet knows for sure! Return to top

 
Read full article...
Time to create page: 0.234 seconds