Prescaling the clock and creating a time delay

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
DaveRoberts
Posts: 4
Joined: Tue Nov 27, 2007 10:24 am
Contact:

Prescaling the clock and creating a time delay

Post by DaveRoberts »

Hello,

I am totally new to PICS and would like to create a time delay of between 5 or 10 seconds. Obviously with a clock speed of 3MHz a simple count is a big number. I am aware that the clock can be prescaled to give a 1:256 ratio meaning the count would be substantially less. The only problem is I do not know how to write the code for this. The PIC is 16F84A. Can anyone help??

KeithSloan
Posts: 114
Joined: Fri Jul 27, 2007 10:50 am
Been thanked: 1 time
Contact:

Time Delay

Post by KeithSloan »

I think you also posted the same request in the C, ASM forum. Its very bad manners to post the same thing in two forums. See answers in the other forum

DaveRoberts
Posts: 4
Joined: Tue Nov 27, 2007 10:24 am
Contact:

Post by DaveRoberts »

Yes I do post the message in the C ASM forum but this was unintentional. I think the response I received was in C which does not help me as such. I also added that I am using the PIC 16F84A.

Dave

KeithSloan
Posts: 114
Joined: Fri Jul 27, 2007 10:50 am
Been thanked: 1 time
Contact:

Timing delays in Assembler.

Post by KeithSloan »

If C is no help then I assume you are using Assembler. In which case download and install PicLoops as per the thread in the other forum.

Keith

Post Reply