buffallo
Member level 1
- Joined
- Mar 2, 2012
- Messages
- 38
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 1,288
- Activity points
- 1,637
Hi all,
probably you are all tired of reading such threads, so am I.
The issue is as follows:
I had a schematic for a voltage meter using the 16f88. I printed the results on a 7segment LED displays
and used the internal ADC module. I also used the internal oscillator!
The circuit worked well, but I needed the chip for something else to try.
However, some days ago I got my pickit 3 and decided to put back the original voltage meter program on the chip.
I attached the pickit as a programmer and burned the code into the 16f88. However, the circuit wouldnt work now.
My code is as follows:
But something is wrong, i.e. nothing happens. I tried all sorts of configuration bits and OSCCON IRCF bit settings - nothing changes.
ONLY when I write 000 to the IRCF bits the circuit works (in 31.25 kHz). Trying to modify the bits in steps (i.e. one bit at a time) didn't work either.
Also if I try to debug the code, I reach teh line movwf OSCCON and I get an unknown error from the pickit.
So please, folks, bring me out of my misery! I like this chip very much, but this is very frustrating. I have lost 2 days of my life dealing with it and I don't know how much more I can last.
Thanks,
Dimitar
probably you are all tired of reading such threads, so am I.
The issue is as follows:
I had a schematic for a voltage meter using the 16f88. I printed the results on a 7segment LED displays
and used the internal ADC module. I also used the internal oscillator!
The circuit worked well, but I needed the chip for something else to try.
However, some days ago I got my pickit 3 and decided to put back the original voltage meter program on the chip.
I attached the pickit as a programmer and burned the code into the 16f88. However, the circuit wouldnt work now.
My code is as follows:
Code:
LIST P=PIC16F88
#include <p16f88.inc>
__CONFIG _CONFIG1, _CCP1_RB0&_LVP_OFF&_MCLR_OFF&_PWRTE_ON&_WDT_OFF&_INTRC_IO
__CONFIG _CONFIG2, _IESO_OFF & _FCMEN_OFF
errorlevel -302
errorlevel -207
org 0x00
goto setup
org 0x04
goto setup
setup
bsf STATUS,RP0 ; bank 1
clrf ANSEL
movlw b'01110000'
movwf OSCCON ; select 8-MHz INTOSC clock
Stable btfss OSCCON,IOFS
goto Stable
bcf STATUS,RP0 ; bank 0
But something is wrong, i.e. nothing happens. I tried all sorts of configuration bits and OSCCON IRCF bit settings - nothing changes.
ONLY when I write 000 to the IRCF bits the circuit works (in 31.25 kHz). Trying to modify the bits in steps (i.e. one bit at a time) didn't work either.
Also if I try to debug the code, I reach teh line movwf OSCCON and I get an unknown error from the pickit.
So please, folks, bring me out of my misery! I like this chip very much, but this is very frustrating. I have lost 2 days of my life dealing with it and I don't know how much more I can last.
Thanks,
Dimitar