| ||||||||
Technical Support Support Resources Product Information | µVISION DEBUGGER: ANALOG COMPARATOR ON AT89C2051Information in this article applies to:
QUESTIONOn your website you claim to simulate the Analog Comparator for the Atmel AT89C2051. However, in the µVision Debugger this feature is not in your list of peripherals. Do you support this feature? ANSWERYes, the Analog Comparator is simulated. There is no dialog because there are no SFRs for this peripheral. This comparator uses AIN0 (P1.0) and AIN1 (P1.1) input pins for analog input and uses bit 6 of Port 3 (P3.6) for the comparator output result. Because of this, P3.6 is not available for general purpose I/O. The MCU sets the comparator output (P3.6) to 1 when the analog input AIN0 (P1.0) is greater than or equal to the analog input AIN1 (P1.1). You can see the function of the Comparator by setting: AIN0 = 1.0 AIN1 = 1.5 // gives P3.6=0 (verify in the Port3 dialog) AIN0 = 2.0 AIN1 = 1.5 // gives P3.6=1 (verify in the Port3 dialog) SEE ALSOLast Reviewed: Friday, January 12, 2007 | |||||||
| ||||||||