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.

Frequency Counter/Tachometer

Status
Not open for further replies.

Nrets

New Member
There has been discussion about Tachometers on this website before, but I just came across this frequency counter and was wondering if it could be used as a Tachometer?

Frequency counter with PIC and 4- to 5-digit LED display

I've built the project on my breadboard, and programmed the PIC, but I don't have a frequency input at the moment. I wanted to use an IR 'detector' and just hook up the output to RA4. Would this work with this design?
 
There has been discussion about Tachometers on this website before, but I just came across this frequency counter and was wondering if it could be used as a Tachometer?

Frequency counter with PIC and 4- to 5-digit LED display

I've built the project on my breadboard, and programmed the PIC, but I don't have a frequency input at the moment. I wanted to use an IR 'detector' and just hook up the output to RA4. Would this work with this design?

hi,
The FC should work OK, with a low freq input from a IR detector, is it 38KHz.?

Are you using a 16F628 or a 16F628A.?
 
hi,
The FC should work OK, with a low freq input from a IR detector, is it 38KHz.?

Are you using a 16F628 or a 16F628A.?

16F628A, nothing happens when I connect power using his HEX file. I've looked at the ASM file, but I am having problems building it and I'm not sure exactly why. Perhaps I'm using the wrong compiler. Anyways, I used the HEX file for 4MHz version, common cathode.

My breadboard is such a mess though that the problem could very likely be hardware related.

It could also be that the code does nothing with the displays unless there's a certain frequency input, some threshold. I'll look at it a bit more.
 
16F628A, nothing happens when I connect power using his HEX file. I've looked at the ASM file, but I am having problems building it and I'm not sure exactly why. Perhaps I'm using the wrong compiler. Anyways, I used the HEX file for 4MHz version, common cathode.

My breadboard is such a mess though that the problem could very likely be hardware related.

It could also be that the code does nothing with the displays unless there's a certain frequency input, some threshold. I'll look at it a bit more.

hi,
This difference between the 628 and 628A came up in another Fcntr thread.

I'll have a look around.:)

EDIT:
Look here:

https://www.electro-tech-online.com/threads/help-reading-a-schematic-please.40326/?highlight=16F628A

EDIT2: this is a better link.
https://www.electro-tech-online.com/threads/help-needed-desperately-with-pic-lcf-meter.38935/
 
Last edited:
hi,
This difference between the 628 and 628A came up in another Fcntr thread.

I'll have a look around.:)

EDIT:
Look here:

https://www.electro-tech-online.com/threads/help-reading-a-schematic-please.40326/?highlight=16F628A

EDIT2: this is a better link.
https://www.electro-tech-online.com/threads/help-needed-desperately-with-pic-lcf-meter.38935/

Hmm, very interesting. Thanks!

I think I'll just write my own code. His code is much more elaborate than I need for my own purposes. It shouldn't be difficult for me to modify his code in a way that I know will work with my PIC.
 
Code:
#if (COMMON_ANODE)
 #define SSEG_XORMASK 0xFF  ; since 2005-03-21 ... never tested by the author !
#else
 #define SSEG_XORMASK 0x00  ; for COMMON CATHODE: No bitwise EXOR to the pattern
#endif

Code like this... is it just for the compiler? I don't recognize it at all.

I mean, I know what it does, but it's not part of the firmware, correct?
 
Last edited:
Code:
#if (COMMON_ANODE)
 #define SSEG_XORMASK 0xFF  ; since 2005-03-21 ... never tested by the author !
#else
 #define SSEG_XORMASK 0x00  ; for COMMON CATHODE: No bitwise EXOR to the pattern
#endif

Code like this... is it just for the compiler? I don't recognize it at all.

I mean, I know what it does, but it's not part of the firmware, correct?

hi,
Its a Conditional Assembly statement

Its used to get the correct code during assembly, when using CA common anode or CC or common cathode displays.
The correct SSEG_XORMASK 0xFF,,,SSEG_XORMASK 0x00 is chosen during compliation

Do you follow OK.?:)
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top