| 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
MARCHING ledS - mrdeb Thursday, 11 March 2010 10:48 - [2 replies]
REALISTIC LED candle flicker - mrdeb Wednesday, 10 March 2010 05:48 - [0 replies]
the LCD demo hello world - mrdeb Wednesday, 10 March 2010 05:41 - [29 replies]
USB problem - jon chandler Tuesday, 09 March 2010 11:31 - [3 replies]
Servo Module - andyo Tuesday, 09 March 2010 03:39 - [3 replies]
pic to ps2 communication - roshan Friday, 05 March 2010 01:30 - [7 replies]
Way Off Topic: Worldwide Ignite Week - jon chandler Wednesday, 03 March 2010 20:33 - [4 replies]
Recent Comments
- 2010-03-11 21:03:32 Jon C...
If this wasn't a class project that had to be done on a PIC16F690 u...
- 2010-03-11 15:30:06 uuu
I am going to send two data from ADC to USART(async mode) to serial...
- 2010-03-05 13:24:23 mrpse...
I was thinking of battery with powered routers or powered for every...
- 2010-03-05 12:17:40 andyo
50 rooms - wow. The XBee modules are very easy to use but I'm not ...
- 2010-03-05 11:46:37 mrpse...
Thanks AndyO. What I have to do is design a device to monitor temp...
- 2010-03-05 03:08:58 andyo
The circuit used for the remote sensor can be found here: [url]http...
- 2010-03-04 07:19:06 renno
plz i need help do u know from where i could download it or how cou...
- 2010-03-04 07:16:05 renno
hello everyone i'm trying to finish my final project and i want to ...




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