Maccabee
Joined: 12 Jun 2006 Posts: 6
|
Posted: Sun Jan 28, 2007 3:22 pm Post subject: help needed beginner!! |
|
|
Hello,
im a beginner in the pic.I decided to learn to program the pic.
I use Picbasic Pro 2.46 with microcode studio.And the the pic i intend to use is pic16f628.I dont have made a pogrammer yet so to begin with i downloaded oshonsofts picsimulatoride and i wrote a simple program in PBP and compiled it and loaded the hex file in simulator to test it ,,the code i wrote is
i var byte
FOR i = 1 TO 10
high portb.0
low portb.0
next i
end
it worked perfectly and in the microcontoller view i could see the portb.0 pin blinking for 10 times continuoiusly..
THE PROBLEM BEGINS NOW
I introduced a delay intruction in the above program
i var byte
FOR i = 1 TO 10
high portb.0
pause 1000
low portb.0
next i
end
Now after compilation when the hex file was loaded into the simulator,,in the microcontroller view i could see portb.0 pin keep lighted all the time its not blinking..I tried sevral programs with PAUSE instructions but none of them works.. the simulator keeps running without executing the instructions beyond PAUSE ,same is the case with NAP instruction...
Can anyone help me???
I d be very grateful..
Thanks |
|