Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

reading post=what is prescaler?

Status
Not open for further replies.

MrDEB

Well-Known Member
have seen reference to this several times.
then 1:8 or 1:4 etc???
bear in mind this PIC stuff is new to my old mind.
trying to comprehend all this jargen.
planning on visiting Portland Oregon in couple of weeks and buying a book on programming language. Visiting the largest bookstore on the west coast as its several city blocks, several stories tall.
Just decding on basic or C.
Been stating out with Swordfish (seems easy enough ?) but looks very similar to basic C or ??
 
PiC's generally have several on chip periferals called timer/counters. Depending on how they are used we can either count or time events. Please note that timers come in at least 3 flavors.

The prescaler is a divider that goes between signal source and the timer input. A prescaler of 1:4 will reduce the input frequency to 1/4 the source.

The processor datasheets have good diagrams illustrating the timers and the bits used to set them up. There is also processor family datasheet (PIC16F family, PIC18F family) that goes into more detail.

Regarding language. Microchips provides code for TCIP, USB, and Zigbee stacks in C18. Other language vendors may or may not have them.

I try not to be a language bigot. The problem I have with most BASIC languages is that people have a difficult time transitioning from BASIC to other languages. Swordfish is closer to main stream procedural languages.

Another advantage that C has is standard syntax. However there are no standards regarding how the processor registers are accessed and named.

I use C18 and BoostC.

3v0


have seen reference to this several times.
then 1:8 or 1:4 etc???
bear in mind this PIC stuff is new to my old mind.
trying to comprehend all this jargen.
planning on visiting Portland Oregon in couple of weeks and buying a book on programming language. Visiting the largest bookstore on the west coast as its several city blocks, several stories tall.
Just decding on basic or C.
Been stating out with Swordfish (seems easy enough ?) but looks very similar to basic C or ??
 
Last edited:
A simple example.

Lets say we have a 16Mhz oscillator, a counter which we require to count 1,000,000 in one second. Gets a bit difficult.
If we put a 1:16 prescaler between the oscillator and counter, the counter will be clocked at 1Mhz, and so it will count to 1,000,000 in 1 second.

I hope this helps.

JimB
 
As well as what book to purchase
going for basic C

For a book on learning to program, and learning to program in C
"A book on C"

If you already know how to program
The C Programming Language (sometimes referred to as K&R, or the white bible, or K&R2 for the second edition) is a well-known computer science book written by Brian Kernighan and Dennis Ritchie,
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top