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.

How can I create 16 bits or more counter in PIC assembly ?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Activity points
9,442
Guys,

How can I create 16 bits or more counter in PIC assembly ?

I have

Code:
      movlw 0xFF
        movwf Counter_1
again decfsz Counter_1
        goto again

How can I make Counter_1 16 bits or more ?

Thanks
 

You don't say what chip you are using. Many of the PIC's have a 16-bit timer (e.g., Timer1 in 12F683). From my reading, you cannot have an 8-bit timer automatically roll over to a second byte without additional code and a few lost cycles.

John
 

I'm using 18F4525 and I can't use timer, I want to use my own counter ( register ), set it and reduce, please see my first post...
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top