[SOLVED] PIC18F1230 ICSP Programming

Status
Not open for further replies.

panos_papajohn

Member level 2
Joined
Mar 18, 2011
Messages
46
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,640
Hi everyone,

I am using PIC3 kit to program a PIC18f1230.
Code:
#include <stdio.h>
#include <delays.h>

#pragma config OSC=HS, WDT=OFF, IESO=OFF, XINST=OFF

void main (void)
{TRISB=0;

PORTB=0x00;
 //Delay10KTCYx(0);
 PORTB=0xFF;
//Delay10KTCYx(0);

while (1)
;
}

This is the code I wrote. When I connect a led to the portB nothing happens.
Of course the current should be taken into account, but the thing is that when I measure the voltage on every pin of the portB I get 0 volts. Did i do something wrong?

Thanks for the help
Panos
 

try to check PORTB output after removing PORTB = 0x00. Right now, it'll be going so fast in the while loop that you cannot measure it.
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…