Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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
 

raco_rage

Member level 3
Joined
Mar 14, 2011
Messages
61
Helped
18
Reputation
36
Reaction score
18
Trophy points
1,288
Activity points
1,601
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top