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.

16f628A - How do I do this?

Status
Not open for further replies.

Hakachukai

New Member
Hi.

How do I set up a 16F628A to measure the pulse width of a digital signal between 0 and 20khz, and then output the measurement in Hz, or some other useful format? I need it to work in real time, so it must be able to measure them very quickly (around 100 time per second would be nice). Also, I would like to run on the internal oscilator (I want to use the least amount of componets possible)

I'm new to PIC's, but I understand the concept.

I've done x86 assembly, and C programming. Have basic electronics knowlege.

I just dont' know how to use this PIC (I have read some tutorials).

Thanks in advance for your help.

PS. I've Googled for a while now, and haven't found anything that seemed helpful.
 
Just learn to use it.
I've been learning PIC since september of last year. I've done a project with PIC. Now I'm still learning, PIC is so powerful.
Go:
http://winpicprog.co.uk
for tutorial. Not only read them but try them :)
 
Well, I already roughly know how to use it. I've been through some of the tutorials.

What I really need help on is figuring out how to time things. I know that different instructions likely use up different amounts of clock cycles. But these chips are RISC? So does that mean that all instructions use the same amount of clock cycles?
 
Hakachukai said:
So does that mean that all instructions use the same amount of clock cycles?
No, check the Instruction Set Summary in the datasheet.

Hakachukai said:
Also, I would like to run on the internal oscilator (I want to use the least amount of componets possible)
I would suggest to use a crystal, since it's more precise.

BTW are you going to measure the pulse width (high? low?) or the frequency?
 
In this case I am specifically interested in measuring the frequency.

It doesn't matter to me whether or not I read the rising or falling edge of the pulse, as long as it is always the same each time.

Pardon my ignorance, but what is CCP?

I have to adimt that part of my problem here is not being able to understand the datasheet fully. It's a bit complicated for me sometimes. I'll try to find a capture section in that datasheet.

Thanks for the help so far. I'll keep trying.
 
Status
Not open for further replies.

Latest threads

Back
Top