PDA

View Full Version : Problem getting PIC16f818



jjohannson
- 8th March 2007, 02:36
Hi, I've got a problem programming PIC16F818 with EPIC programmer. all I'm trying to do right now is get all/any outputs to turn on. Here is the code I'm running.

INCLUDE "BS2DEFS.BAS"
@ DEVICE INTRC_OSC_NOCLKOUT,MCRR_OFF
DEFINE OSC 4
OSCCON=$60
pause 500
ADCON1=6
TRISA=%00000000
TRISB=%00000000
PORTA=%11111111
PORTB=%11111111

I get an error that MCRR_OFF is not defined.
Without that line the chip after programming just sits there and does nothing.
Any help would be greatly appreciated.

skimask
- 8th March 2007, 02:49
Hi, I've got a problem programming PIC16F818 with EPIC programmer. all I'm trying to do right now is get all/any outputs to turn on. Here is the code I'm running.

INCLUDE "BS2DEFS.BAS"
@ DEVICE INTRC_OSC_NOCLKOUT,MCRR_OFF
DEFINE OSC 4
OSCCON=$60
pause 500
ADCON1=6
TRISA=%00000000
TRISB=%00000000
PORTA=%11111111
PORTB=%11111111

I get an error that MCRR_OFF is not defined.
Without that line the chip after programming just sits there and does nothing.
Any help would be greatly appreciated.

Look in the PIC16F818 datasheet for "Master Clear".... All will become clear at the point...

sougata
- 8th March 2007, 04:53
@ DEVICE INTRC_OSC_NOCLKOUT,MCRR_OFF


Hi,

Its MCLR_OFF and not MCRR_OFF.

jjohannson
- 8th March 2007, 17:03
I copied the code from a different posting and didn't know the there was a typo.