RE: [bascom] OT: 2051 Analog Comparator
Hi Steve,
BTW, your subject is NOT off topic, device questions are very much a part of
the valid discussions that take place on this list.
1. The comparator in the 89C2051 is on at all times.
2. Yes. See 1 above.
3. In order to use the comparator you must set P1.0 and P1.1. This places
them in a HI-Z state, as there are no pull-up resistors for these two pins.
Then you read P3.6 for the state of the comparator.
The App note for the A/D function is, in fact, VERY crude, but gives
excellent insight into working with the onboard comparator. If you need
further information, please do not hesitate to email me, or this list.
Michael Akers
M. Akers Enterprises
----------
From: stevem@tanisys.com [SMTP:stevem@tanisys.com]
Sent: Thursday, September 30, 1999 9:51 AM
To: bascom@grote.net
Subject: [bascom] OT: 2051 Analog Comparator
Please forgive the OT question. I have searched the Atmel web site but cannot
find any details about the analog comparator within the 2051.
1. How do you enable or disable it?
2. I know that the output can be read from P3.6. Is the comparator
always ON?
3. Do I simply have to write 1'S to the Port 1 pins? Or do these two
pins not have the pullup function?
I saw an APP NOTE on the Atmel site about doing a crude A/D with this
feature. However, in looking at the code, I did not find the analog
comparator
initialization routine.
Thanks for your help.
---- Steve Miller