WinPicProg Forums Forum Index WinPicProg Forums
A forum to support WinPicProg
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help needed beginner!!

 
Post new topic   Reply to topic    WinPicProg Forums Forum Index -> Questions
View previous topic :: View next topic  
Author Message
Maccabee



Joined: 12 Jun 2006
Posts: 6

PostPosted: Sun Jan 28, 2007 3:22 pm    Post subject: help needed beginner!! Reply with quote

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
Back to top
View user's profile Send private message
KC



Joined: 05 May 2006
Posts: 99
Location: Victoria BC Canada

PostPosted: Tue Jan 30, 2007 4:50 am    Post subject: Reply with quote

Remember that most simulators do not operate in realtime. Depending on the speed of your computer, it could take 10 seconds or longer to simulate 1 second of real PIC time.
_________________
KC
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WinPicProg Forums Forum Index -> Questions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group