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
Bookmarks