CAD CAM EDM DRO - Yahoo Group Archive

Re: PIC DRO

Posted by beer@s...
on 2000-04-05 15:32:41 UTC
On 5 Apr, CAD_CAM_EDM_DRO@egroups.com wrote:
> Message: 24
> Date: Wed, 5 Apr 2000 17:07:57 -0700
> From: "Larry Edington" <larrye@...>
> Subject: Re: PIC DRO
>
>
> 2. What's the LS7166 for? Since the F877 has an interrupt on change function of the upper
> nibble of Port B, and since two encoders only need 4 lines to read, you can use the PIC
> for the counter. Anytime the encoder changes it generates an interrupt which the PIC then
> updates the count from. I'm also doing this in a very noisy environment with brushed motor
> attached to the machine that has the encoders so electrical noise hasn't proved to be an issue
> on my project.


Larry;

Are you using the LOWER nibble of PortB for anything ?

I ask because I had the same brainstorm - high AND low going interrupts
sure sounds like a quadrature input !

I was going to use a C63. ( I have a drawer full of them AND I needed
the extra I/O for other "stuff")

Only after much frustration did I discover that there is errata on
earlier PICs that says basically that the IOC feature was designed to be
used to wake the device from sleep.

If IOC was used in normal operation and the lower nibble was polled,
"erratic operation might result" . They were right, erratic operation
DID result. I ended up not using the IOC feature as a result. I wonder
if the newer PICs have fixed that.


Good news on the noise. I was a bit concerned that it MIGHT be a
problem, so I used a differential driver at the encoder end to drive a
differential receiver at the PIC. Not sure now that it was necessary.


Alan

--

Alan Rothenbush | The Spartans do not ask the number of the
Academic Computing Services | enemy, only where they are.
Simon Fraser University |
Burnaby, B.C., Canada | Agix of Sparta

Discussion Thread

beer@s... 2000-04-05 15:32:41 UTC Re: PIC DRO