Hi
I have bought a ICD2 and made a target board for it, with a PIC16F870 microcontroller in it. I have had a few problems with connecting with mplab, but i think it works now.
If i connect to ICD2 and programming the target board i get this message:
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device PIC16F870 found, revision = a1,a2
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 ready for next operation
Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x1A)
Verifying...
...Program Memory
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
11-Feb-2009, 17:23:00
MPLAB ICD 2 ready for next operation
But when i pull my cable out off the target board, and tryes to run my microcontroller. the pins RC4 and RC6 is constant ON! And my program should only toggle the RC4 pin ON and OFF every 2 sec. Somebody who can help me?
My program in C-CSS:
#include <16F870.h>
#device adc=8
#use delay(clock=4000000)
#fuses NOWDT,XT, NOPUT, NOPROTECT, NODEBUG, BROWNOUT, LVP, NOCPD, NOWRT
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=9)
#use fast_io(B)
void main()
{
set_tris_c(0b00000000);
while(true)
{
output_high(PIN_C4);
delay_ms(2000);
output_low(PIN_C4);
delay_ms(2000);
}
}
I have bought a ICD2 and made a target board for it, with a PIC16F870 microcontroller in it. I have had a few problems with connecting with mplab, but i think it works now.
If i connect to ICD2 and programming the target board i get this message:
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device PIC16F870 found, revision = a1,a2
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 ready for next operation
Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0x1A)
Verifying...
...Program Memory
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
11-Feb-2009, 17:23:00
MPLAB ICD 2 ready for next operation
But when i pull my cable out off the target board, and tryes to run my microcontroller. the pins RC4 and RC6 is constant ON! And my program should only toggle the RC4 pin ON and OFF every 2 sec. Somebody who can help me?
My program in C-CSS:
#include <16F870.h>
#device adc=8
#use delay(clock=4000000)
#fuses NOWDT,XT, NOPUT, NOPROTECT, NODEBUG, BROWNOUT, LVP, NOCPD, NOWRT
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=9)
#use fast_io(B)
void main()
{
set_tris_c(0b00000000);
while(true)
{
output_high(PIN_C4);
delay_ms(2000);
output_low(PIN_C4);
delay_ms(2000);
}
}