Page 1 of 1

PIC 18F25K80 RB0

Posted: Fri Nov 07, 2014 9:19 am
by Glesto
I'm trying to program the pic18f25k80 with a pickit 2.

I am trying to make pin RB0 high with this simple code:

// --------------------------------------------------------------------------------------------------------------------------------
#include <18F25K80.h>
#device adc=12

#FUSES NOWDT //No Watch Dog Timer
#FUSES SOSC_DIG //Digital mode, I/O port functionality of RC0 and RC1
#FUSES NOXINST //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
#FUSES HSH //High speed Osc, high power 16MHz-25MHz
#FUSES NOPLLEN //4X HW PLL disabled, 4X PLL enabled in software
#FUSES NOBROWNOUT //No brownout reset

#use delay(clock=20000000)
#use rs232(baud=19200,parity=N,UART1,bits=8,stream=PORT1) // reserved space

// --------------------------------------------------------------------------------------------------------------------------------
void main()
{
while(true)
{
output_high(PIN_B0);
}
}

But if I check the voltage between RB0 and the ground I get nothing, the 5V is still between my vss and vdd.

Does someone know what I could change? because I get no errors in the pic-c compiler.

Thanks in regard

Re: PIC 18F25K80 RB0

Posted: Fri Nov 07, 2014 12:58 pm
by Benj
Hello,

Is the MCLR pin connected to 5V using a resistor?

Might help to see a schematic of your setup.

Can't really comment on the syntax of the code as I have not used the compiler your using.

Re: PIC 18F25K80 RB0

Posted: Tue Nov 11, 2014 4:18 pm
by Glesto
Thx, that was indeed the problem.
Everything works fine now.