0 Members and 1 Guest are viewing this topic.
void main(void){TRISD = 0;PORTD = 1;while(1){}}
Hello everybody.I just bought the PicKit2 44 PIN Demo Board (https://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCMQFjAA&url=http%3A%2F%2Fww1.microchip.com%2Fdownloads%2Fen%2FDeviceDoc%2F41296B.pdf&ei=Sw4LVIbGO4j_OZCngIAG&usg=AFQjCNFmZjaRhRjo1-N-1YA8G9RD0s-pFw&sig2=KBUtjPtvLT_F--s9p8DVgQ&bvm=bv.74649129,d.ZWU) which has the PIC18F45K20 (http://ww1.microchip.com/downloads/en/DeviceDoc/41303G.pdf).Using sofware MikroC I made this very simple program which should light up the 8 LEDs on the Demo Board:Code: [Select]void main(void){TRISD = 0;PORTD = 1;while(1){}}When I try to program the PIC using PicKit2 it doesn't work. I have another .hex file, made by a friend of mine which does work, so the writing process is correct and the Demo Board works. That means there must be some mistake in the code or the MikroC settings. I tried changing Oscillator settings but it doesn't work.What do you think about it?Thank you in advance
PORTD = 1;
Using sofware MikroC I made this very simple program which should light up the 8 LEDs on the Demo Board:....PORTD = 1;.....