CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Re: PIC DRO

on 2000-04-05 16:32:08 UTC
It is true that even with the F877, the databook says you shouldn't poll the port if you are using the interrupt on change feature. So, I use the upper nibble for the two encoders, I use the INT0 pin ( RB0 ) for a different external interrupt, and the other 3 pins for outputs so there's no polling necessary of the port. ( well other than in the ISR to look at the encoder's value )

The reason for not polling is polling the upper nibble clears the internal register than would trigger an interrupt. So, you could poll and miss the interrupt.


later,
Larry E.





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



------------------------------------------------------------------------------



------------------------------------------------------------------------------
Welcome to CAD_CAM_EDM_DRO@...,an unmoderated list for the discussion of shop built systems in the above catagories.
To Unsubscribe, read archives, change to or from digest.
Go to: http://www.onelist.com/isregistered.cgi
Log on, and you will go to Member Center, and you can make changes there.
For the FAQ, go to http://www.ktmarketing.com/faq.html
bill,
List Manager



[Non-text portions of this message have been removed]

Discussion Thread

Larry Edington 2000-04-05 16:32:08 UTC Re: [CAD_CAM_EDM_DRO] Re: PIC DRO