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
Visit site
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.

Similar threads

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