PIC16F84 frequency counter assembly language.

Discussion on projects that are created by users and posted on mikroElektronika website.
Post Reply
Author
Message
Diamond
Posts: 2
Joined: 26 Feb 2015 12:43

PIC16F84 frequency counter assembly language.

#1 Post by Diamond » 26 Feb 2015 12:55

Hello everybody, Hope you are doing great,
I have a PIC16F84 project and i really need your help.
I have been asked to write a PIC16F84 assembly language program which will function as a frequency counter. basically the program should count the number of times an output line goes from logic level '0' to logic leve '1' during 505ms interval, with a number of transition limited to 255. the frequency should then be displayed as a hexadecimal digit on a standard 7-segment display, and if the frequency exceeds 15, the value should be scaled by dividing by 16 allowing the value to fit on a single digit display. It is assumed that the clock frequency is 4MHz.
Thank in advance for your help. :D

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: PIC16F84 frequency counter assembly language.

#2 Post by petar.timotijevic » 27 Feb 2015 15:10

Hi Diamond and welcome to the MikroE forum,,

Instead of using assembler consider using some high programming languages such as C, Basic, Pascal.

Also consider to use some newer MCU with more resources. Legendary PIC16F84A has only 1,75KB of flash memory and 68bytes of RAM.


Best regards,
Peter

Diamond
Posts: 2
Joined: 26 Feb 2015 12:43

Re: PIC16F84 frequency counter assembly language.

#3 Post by Diamond » 27 Feb 2015 19:40

Thank you Peter, but im still vrry lost. I have never used C before...so can somebody show hoe to start or any calculations i need to do

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: PIC16F84 frequency counter assembly language.

#4 Post by petar.timotijevic » 03 Mar 2015 15:37

Hi Diamond,

Please visit our web site LibStock at www.libstock.com there you can find many project and examples. Libstock is a community website created by mikroElektronika, that allows users to share their projects and libraries.


Best regards,
Peter

jayanthd
Posts: 630
Joined: 08 May 2013 18:31
Location: Bangalore

Re: PIC16F84 frequency counter assembly language.

#5 Post by jayanthd » 03 Mar 2015 21:06

Hi Diamond

See my frequency counter here.

http://www.edaboard.com/thread333072.html

Is it ok if I write you code using C and inline assembly ?
[HW:] EasyPIC v7, mikroProg PIC, AVR, STM32, PSoC, Tiva, 8051
[SW:] mikroC PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroBasic PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroPascal PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
Visual GLCD, Visual TFT

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: PIC16F84 frequency counter assembly language.

#6 Post by petar.timotijevic » 04 Mar 2015 09:05

Hi,
jayanthd wrote:Hi Diamond

See my frequency counter here.

http://www.edaboard.com/thread333072.html

Is it ok if I write you code using C and inline assembly ?
Please post your code in MikroE forum topic or on LibStock, this eliminate confusion. Some Web sites require users to log in to view other pages in topic and to view attachments.


Best regards,
Peter

jayanthd
Posts: 630
Joined: 08 May 2013 18:31
Location: Bangalore

Re: PIC16F84 frequency counter assembly language.

#7 Post by jayanthd » 04 Mar 2015 15:09

@petar.timotijevic

Ok.


Here are the files.
Attachments
tachometer 2.png
tachometer 2.png (140.42 KiB) Viewed 4714 times
freq counter ver2 a.png
freq counter ver2 a.png (141.14 KiB) Viewed 4714 times
frequency counters.rar
(1.07 MiB) Downloaded 213 times
[HW:] EasyPIC v7, mikroProg PIC, AVR, STM32, PSoC, Tiva, 8051
[SW:] mikroC PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroBasic PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
mikroPascal PRO PIC, dsPIC, PIC32, AVR, ARM, 8051
Visual GLCD, Visual TFT

User avatar
petar.timotijevic
mikroElektronika team
Posts: 1739
Joined: 19 Feb 2014 13:46
Location: Serbia
Contact:

Re: PIC16F84 frequency counter assembly language.

#8 Post by petar.timotijevic » 04 Mar 2015 15:30

Hi Jayanthd,

Thank You.


Best regards,
Peter

Post Reply

Return to “User Projects”