| The PICKit 2 Logic Tool |
|
|
| Friday, 15 January 2010 08:21 | |
|
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.
Operation is pretty self-explanatory. The diagram at the lower left shows the connections. Note that the ground connection MUST be connected to the circuit ground. The VDD (V+) connection may be tied to the circuit, in which case the logic levels are automatically set, or VDD can be set on the main PICKit 2 screen and clicked to on. Clicking the input or output radio button sets the direction for each channel. Input levels are shown in the center column. A dark blue box with a 0 indicated a low or ground condition while a light blue box with a 1 indicates a high condition. Outputs are shown in the right-hand column, with a brown square and a 0 indicating a low (ground) condition and a red square with a 1 indicating a high condition. Clicking the indication or using the indicated keyboard shortcut toggles the output level. Clicking the "Enable button turns all the outputs off - to a disconnected state. Keep in mind that connecting two outputs together is a bad idea, so use some caution.
* 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
Comments (3)
Joomla components by Compojoom
|
|
| Last Updated ( Saturday, 16 January 2010 01:11 ) |
Whos Online
- Jon Chandler
- MrDEB
Forum Activity
LCD / 18F1320 - mrdeb Friday, 19 March 2010 07:19 - [0 replies]
A 'throw-away" PIC board - mrdeb Thursday, 18 March 2010 06:19 - [32 replies]
Credit Where Credit's Due - jon chandler Tuesday, 16 March 2010 12:01 - [9 replies]
Marching LEDs - mrdeb Saturday, 13 March 2010 22:54 - [7 replies]
USB 8 Channel Servo Controller - andyo Saturday, 13 March 2010 01:19 - [2 replies]
Dedicated Servo Controller - graham Friday, 12 March 2010 17:58 - [0 replies]
Must have....delta temperature glowies! - graham Friday, 12 March 2010 17:31 - [3 replies]
Recent Comments
- 2010-03-17 22:58:18 Jon C...
Graham, Thanks for fixing the spacing on the array. This is how i...
- 2010-03-17 21:14:34 ASDne...
Thanks Graham, It is a problem with Flowcode because the demo wa...
- 2010-03-17 19:50:32 Graha...
Looks like you've pretty much solved every minor issue that was enc...
- 2010-03-17 11:42:03 Jon C...
The low-cost servo does have one other feature. The origina...
- 2010-03-17 10:56:44 Graha...
I am not familiar with flowcode, though did you try powering the bo...
- 2010-03-15 21:47:55 ASDne...
Hello there, I am still trying to get the LCD to work but I am pro...
- 2010-03-15 13:16:38 Graha...
Hi Hop, I've finally got some time this weekend to delve into the ...
- 2010-03-13 16:36:21 andyo
Very nice - 900,000 packets and 0 errors - can't ask for better tha...




Graham has a tutorial on using the PICKit 2 UART tool in the Swordfish section.
http://digital-diy.com/swordfish/62-swordfish-tutorial -pickit-2-and-uart.html