Frequency Counter Source Code Modification

Status
Not open for further replies.

km

Junior Member level 3
Joined
May 26, 2004
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
322
weeder frequency counter



This is quote at the "Weeder Frequency Counter PIC 16F84 port by Peter Cousens" website.

http://www.piclist.com/techref/piclist/weedfreq.htm

Can anyone tell me how to modify the code to fit in PIC 16F84A?
 

frequency counter source

Salam,

It's easy

There are two methods to access (TRISA, TRISB and OPTION) registers.

Example if you want set porta as input
So you must load 0xff to TRISA register.

Movlw 0xff
tris porta


The above is equal to TRISA=0xff

To write the same with switching bank method.

First TRISA at bank 1
So you switch to bank 1
then change TRISA
then return to bank 0

Here is the code

bsf status,rp0 ' go to bank1
movlw 0xff
movwf trisa
bcf status,rp0 ' return to bank 0


the above code is equal to TRISA=0xff too

This is method is the same for option and trisb registers.

If you want i can change the code for you, tell me.

Bye
 

weeder+frequency counter

hi,
anyone have the original pcb design?
 

Salam,

I have edit all tris and option commands.
Here is the code.

Don't forgot to set the configuration bits correctely.


Bye
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…