Some microprocessors have additional features compared to the AT89C2051/8051.
8032/8052/AT89S8252
AT89S8252
Alternative port-pin functions
80515,80535,80517,80535
80517,80537
89C51+
ADUC812
Using the DAC that also contains an example
The additional interrupts are :
ADCI , I2CSPI and PSMI
To enable them :
ENABLE ADCI, ENABLE I2CSPI, ENABLE PSMI
To disable them:
DISABLE ADCI, DISABLE I2CSPI, DISABLE PSMI
To set the priority to the highest level in addition to the normal priority interrupt sources:
PRIORITY SET|RESET ADCI
PRIORITY SET|RESET I2CSPI
80552
GETAD(channel, prm) where channel is the channel and the prm is a paramter that may be 0 for software trigger only or 32(dec) for trigger by rising edge on STADC too.
To use the PWM of the 80552 :
Dim Pwp As Byte, Pwa as Byte, Pwb as Byte
Pwp = 200 'set output frequency (0 - 255)
Pwa = 50 'set channel 0 (a) pulse width (0 - 255)
Pwb = 0 'set channel 1 (b) pulse width (0 - 255)
Do
Gosub Pwm
Loop
Pwm:
$asm
MOV PWMP , {Pwp}
MOV PWM0 , {Pwa}
MOV PWM1 , {Pwb}
$end asm
Return