I try to program a oic 18f4520, but i get stuck on the clocksetting (I think).
what happens when i program the chip it goes to the first setting of PORTD and then it stops.
I think it has something to do with the clocksettings or the configuration bits.
I tried it with waitms and with a loop both don't work.
This is my code.
I tried to switch over the portD 0 to portd 255 and all it does is execute the first portd assignment. That is al leds burning or no leds burning. ( i have swiched both portd commands)
I am using a real device. I think i am doing something wrong with the clocksettings or something in that direction. I am using no crystal and using the internal oscilator. If i delete the waitms in the code i got a somewhat darker leds. So i think that the code is running,
You should have the MCLR pin tied to V+ through a 10k resistor when you're not using that pin. If you just leave it floating, the chip might mistake the fluctuation for a reset signal. It would help to see the schematic you are using.
If you're not following a basic ICSP schematic then no wonder it's not working! PICs tend to be very picky (no pun intended) about how they're connected. You really should read a datasheet and do some research before experimenting with microcontrollers. Otherwise you risk damaging them (and no, I'm not being over-dramatic here, I'm 100% serious).
But yes, chances are the reason it's not working is because you don't have MCLR tied to V+ with a resistor.