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
PIC 18F25K80 RB0
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PIC 18F25K80 RB0
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel