16f818 from 16f628a


Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237

    Angry 16f818 from 16f628a

    Hi....

    Help !!!!

    Have just ported a program fom 16f628 to 16f818 but nw it wont go....
    reason for porting was needing faster clock speed 818 can go at 20Megs 628 only 4 !

    having spent morning getting nowhere thought I would blink an LED... Easy !!

    No Joy.... So somthing wrong with my config. But what ???

    INC File :- I am using MPASM!

    Code:
    ;****************************************************************
    ;*  16F818.INC                                                  *
    ;*                                                              *
    ;*  By        : Leonard Zerman, Jeff Schmoyer                   *
    ;*  Notice    : Copyright (c) 2004 microEngineering Labs, Inc.  *
    ;*              All Rights Reserved                             *
    ;*  Date      : 01/07/04                                        *
    ;*  Version   : 2.45                                            *
    ;*  Notes     :                                                 *
    ;****************************************************************
            NOLIST
        ifdef PM_USED
            LIST
            include 'M16F81x.INC'    ; PM header
            device  pic16F818, hs_osc, wdt_on, pwrt_on, lvp_off, protect_off
            XALL
            NOLIST
        else
            LIST
            LIST p = 16F818, r = dec, w = -302
            INCLUDE "P16F818.INC"    ; MPASM  Header
            __config _INTRC_CLKOUT & _PWRTE_ON & _LVP_OFF & _CP_OFF & _MCLRE_OFF
            NOLIST
        endif
            LIST
    CODE :-



    Code:
    ' Example program from manual to blink an LED
    
    DEFINE OSC 8    'Set oscillator in MHz
    
    trisa  = 0
    trisb  = 0
    adcon1 = 7  
    
    main: High PORTB.5       ' Turn on LED connected to PORT
          Pause 1000       ' Delay for 1 seconds
          Low PORTB.5          ' Turn off LED connected to PORT
          Pause 1000       ' Delay for 1 seconds
            
          Goto main   ' Go back to loop and blink LED forever
          End
    What is wrong here....... PLease help advise !!

    Thank you
    Last edited by andybarrett1; - 25th August 2014 at 12:25. Reason: typo

Similar Threads

  1. Interface for 16f818
    By davekav in forum Serial
    Replies: 4
    Last Post: - 17th April 2008, 11:33
  2. 3.3V not working with 16f818
    By jjohannson in forum General
    Replies: 3
    Last Post: - 8th March 2007, 20:53
  3. ERROR Compling 16F819...l but the 16F818 works fine
    By 4Lewis in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 21st April 2006, 06:47
  4. 16F818 ADCON question
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st February 2006, 10:50
  5. .inc & .bas for 16f818 12fxx
    By a.majid in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 23rd March 2005, 06:49

Members who have read this thread : 1

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

Tags for this Thread

Posting Permissions

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