AllanJH wrote: > > In a message dated 98-03-12 01:43:56 EST, you write: > << Hello all, > I'am new to PIC's and I've read the data sheet for the 16c84. And I > can't figure out how to use the counter,it says to set the tocs bit!! > But it doesn't tell how to set it, I'am sure it very simple if you > know > what your doing. Also how do set it to inncrement on the leading > edge? > > Thank you for any help, > Rod Haller >> > > Rod, > The "tocs" bit is located in bit 5 of the option register. To set it, > a 1 is > written to bit 5 of the option register. To write to the option > register you > must switch to bank 1, move the correct 8 bit number into the W > register, then > move the W register into option register. It "reads" alot harder than > it is. > It would be something like the following: > bsf status,rp0 --switch to bank1 > movlw b'10110000 --setup timer/counter > movwf option --write to option register > > Clear bit 4 of the option register to increment on rising edge of > external > clock signal. > Look on your data sheet for the option register description. Hope > this > helps. > > Allan > AllanJH@aol.com Thank you to all who replied to this. I've got it working!!! I knew it wasn't as hard as I was making it. Again thank you for your help. Rod Haller