This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

include for 8051f020

HI!
I NEED HELP , I WROTE PROGRAM FOR C8051F020
IN ASM.
$INCLUDE (C8051F000.INC)

cseg at 0
ljmp main
org 2bh ;t2 inter
ljmp wave
reti

wave: clr tf2
cpl p1.0
mov a,p5
cpl a
xrl p5,a
reti

main: mov oscicn,#06h ;enable-int osc , freq 8mhz
mov oscxcn,#0 ;ext osc disable
mov EMIOCF,#0 ;xram on-chip only
mov xbr0,#00000000b ;
mov xbr1,#00000000b
mov xbr2,#00000000b
mov ckcon,#00100000b;to t2 clk/12
mov t2con,#0 ;t2 - auto reload timer
mov wdtcn,#0a5h ;reset & enable watchdog
/*
CLR EA ; disable all interrupts
MOVWDTCN,#0DEh ; disable software watchdog timer
MOVWDTCN,#0ADh
SETB EA ; re-enable interrupts
*/
mov th2,#0ffh
mov tl2,#(-10)
clr tf2
setb tr2
sjmp $
END

THE PROBLEM IS THAT INCLUDE FILE DON'T HAVE WDT , P5 AND EMOCIF REGISTERS. WHAT ANOTHER INCLUDE FILE EXIT FOT 8051F020

0