i am usin pic18f4550 with 20Mhz crystal and 22pf caps in my ckt...i wrote a program as follows
#include<p18f4550.inc>
config lvp=off
config debug=on
config wdt=off
config fosc=hs
config mclr=on
clrf trisd
clrf portd
l1:movlw 0xff
movwf portd
nop
nop
movlw 0x00
movwf portd
nop
nop
goto l1
end
is anything wrong with thw program??!!:| i get 0v at pin20..portd...:!:
Hi,
The 0xff and then 0 is fine. You should get around 2v on your multimeter reading and some very high frequency(2-2.5MHz) reading on your frequency meter.
The problem is, you haven't initialized properly. You need to define where to go upon start up/reset, ie, from the reset vector. And, you have to define which microcontroller you are targeting.
So,
oh my mistake!! only mistake was with the oscillator i was using! when switched to internal oscillator it worked just fine...thanks alot for replyin..best forum