Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

If you use the 16F84A for this project the software needs to be updated for bank switching to access the OPTION, TRISA and TRISB registers. The OPTION and TRIS commands compile with a warning in MPIDE but do not execute when burned in the 16F84A microcontroller.


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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top