Technical Support

Technical Support

8051 Series issues

What is ICEˋ(In Circuit Emulator)

Megawin ICE is a powerful and cheap 8051 emulator, only need 4 pins (VCC, SDA , GND , SCL) can direct download/run program, step into, set breakpoint, dump memory...all emulator functions.

Why my ICE can*t work?

Please make sure you have download our setup program, after download file please execute (1) Driver Installer\setup.exe, more detail information please refer user manual.

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?

Vrefp is Vdd, Vrefm is Ground.

Please tell me how fast in ADC?

The fastest ADC conversion speed in Megawin*s MCU is 270 clocks, therefore ADC conversion speed as below:





























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?

When you set PD (PCON.1) MCU will enter 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.

page

top

我們的網站會透過瀏覽器 Cookies 提供您客製化操作體驗、社群媒體功能,並會透過其分析網站流量等統計數據,若繼續使用本網站,代表您同意我們使用瀏覽器 Cookies 為您提供服務。《了解更多