![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Tools | Display Modes |
|
|
#1 (permalink) |
|
I'm just starting with the PIC micros so am learning as I go. I'm using the PICkit2 to program 16F690 micro that came on the PICkit 2 Low Count Demo board. I'm using MicroCode Studio to write the code and the PICkit 2 programmer software to load the hex file into the 16F690. I'm following the online directions for the first program which is supposed to make an LED blink on and off. All that happens is that the first LED, which correlates to C.0, blinks twice very briefly. I can change it to C.0 to C.1 and then the second LED blinks twice. So I can see that the correct LED is blinking but why does it blink twice and stop. I can take the loop & goto loop out and it will still blink twice very quickly. I can change the pause times and it still has no effect on how long the LED stays on and off. What am I doing wrong? Also, does anyone know of a schematic of the PICkit 2 Low Pin Demo board? There is a PDF of the top layer of traces but a similar picture of the bottom layer of traces would be helpful as well. I should note that I do not have an external power supply hooked up to the board but rather it is getting its power through the PICkit 2 programmer which is hooked up to my computer via USB connection. The code is as follows....
TRISC = %00000000 'Sets port C to all outputs loop: High PORTC.0 ' Turn on LED Pause 500 ' Delay for .5 seconds Low PORTC.0 ' Turn off LED Pause 500 ' Delay for .5 seconds Goto loop ' Go back to loop and blink LED forever End |
|
|
|
|
|
#4 (permalink) |
|
Hi,
MCLR is taken care by the programmer for only programming with supplying Vpp, not while executing the program. Is JP5 shorted? Try to short JP5 after programming with PICkit2. What are the configuration settings?
__________________
Superman returns..
Last edited by bananasiong; 2nd December 2008 at 05:54 AM. |
|
|
|
|
|
#5 (permalink) |
|
YES! Is the WDT disabled?
__________________
========================= Futz's Microcontrollers & Robotics ========================= |
|
|
|
|
|
#6 (permalink) | |
|
Quote:
EDIT: Well now that I'm signed in, I see you found it. This happens to me when first cup of coffee has not propped open my eyes. Last edited by nickelflippr; 2nd December 2008 at 02:52 PM. |
||
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Title | Starter | Forum | Replies | Latest |
| code problems for 4x4 keypad | darsin | General Electronics Chat | 27 | 16th July 2008 06:20 AM |
| OLED LCD Code Problems | freeskier89 | Micro Controllers | 0 | 4th May 2007 04:47 AM |
| Input Counter Pic16F84A (Code problems) | loco | Micro Controllers | 4 | 26th September 2006 01:19 PM |
| Work ID reader Track 2 problems with pic code. Need help! | egg0900 | Micro Controllers | 2 | 19th April 2004 06:58 AM |
| 12C508 problems: Verify failed at code address 0000h ! | faz666 | Micro Controllers | 4 | 29th July 2003 12:13 PM |