Problem getting PIC16f818


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2007
    Posts
    14

    Default Problem getting PIC16f818

    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.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jjohannson View Post
    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...

  3. #3
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Typos

    Quote Originally Posted by jjohannson View Post
    @ DEVICE INTRC_OSC_NOCLKOUT,MCRR_OFF
    Hi,

    Its MCLR_OFF and not MCRR_OFF.
    Regards

    Sougata

  4. #4
    Join Date
    Mar 2007
    Posts
    14


    Did you find this post helpful? Yes | No

    Default Thanks a lot

    I copied the code from a different posting and didn't know the there was a typo.

Similar Threads

  1. Problem with ASM IRQ using FSR0 on PIC18F252
    By mytekcontrols in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th March 2008, 20:48
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Hardware problem or what ?
    By Steve S. in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th March 2007, 21:39
  4. PIC16F818 ADC Problem
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 18th July 2006, 14:56
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts