8051 Series issues
What is ICEˋ(In Circuit Emulator)
Why my ICE can*t work?
The 8051 external interrupt is Low active or High active?
The standard 8051 is Low active or Falling edge.
If you want set interrupt is Falling edge, please set IT0(1) to 1.
If set Falling edge need set IT0(1) before clear IE0(1), finally enable Interrupt.
Example:
IT0 = 1; //set falling edge
IE0 = 0; //clean External Interrupt flag
IE = 0x81; //enable External Interrupt 0
Do I need set pins when I use ADC function?
Recommend set pins to input mode when you use ADC function.
EX: P1M0 = 0xff, P1M1 = 0x00 can set all P1 to input mode.
What is Vrefp and Vrefm?
Please tell me how fast in ADC?
Frequency | Conversion clock | Conversion time | Conversion frequency |
12Mhz | 270 | 22.5us | 44.4Khz |
24Mhz | 270 | 11.25us | 88.8Khz |
30Mhz | 270 | 9us | 111.1Khz |
What are 4 modes of PCA function?
Detail as below:
1. Capture Mode:
When CEXn input a pulse, Mcu will save CH/CL to CCAPH/CCAPL, and trigger an interrupt.
2. Timer Mode:
Just like use Timer, and this is 16 bit*s counter.
3. High Speed output Mode:
Just like timer mode, but this mode will toggle CEXn when have interrupt, CEXn will output like a clock,
And you can change frequency by CCAPH/CCAPL.
4. PWM Mode:
Output a PWM wave, about this function can refer PWM demo code.
How to enter the Power-Down Mode?
How to wake up 8051?
You have two way can wake up your MCU.
1. Reset 8051 by RST pin.
2. Use External Interrupt(INT0 or INT1) to wake up, but must enable EA and EX0 or EX1.
Example INT0 set IE = 0x81, or INT1 set IE = 0x84.