??? 09/27/04 12:44 Read: times |
#78202 - RE: p89c51rd2 ISP Worked Responding to: ???'s previous message |
After setting the ^ST pin of 1232 to ALE I am able to use flashmagic with it.
I was able to run signature and the flash . Now before I load my program I would like know where to put this code AUXR1 DATA 0A2h ; WDTRST DATA 0A6h ; PUBLIC GoToBoot BOOTIT SEGMENT CODE RSEG BOOTIT GoToBoot: mov AUXR1,#020h ;enable boot mov r0,#20 ;oscillator freq = 20Mhz mov r1,#6h ;program status byte mov dptr,#0 ;specify status byte mov a,#0ffh ;nonzero required call 0fff0h jmp $ ;wait for watchdog to reset end I am using mlasm51 it gives me some errors unless I remove the code below PUBLIC GoToBoot BOOTIT SEGMENT CODE RSEG BOOTIT It compiles Say I have a led flashing program $mod51 org 0000h check_ISP: jb p1.1,ISP_boot ; P1.1 triggers ISP mode cpl p1.0 ;p1.0 has led attached to it call Delay ; 10ms delay routine sjmp check_ISP ISP_boot: AUXR1 DATA 0A2h ; WDTRST DATA 0A6h ; GoToBoot: mov AUXR1,#020h ;enable boot mov r0,#11 ;oscillator freq = 11.0592Mhz mov r1,#6h ;program status byte mov dptr,#0 ;specify status byte mov a,#0ffh ;nonzero required call 0fff0h jmp $ ;wait for watchdog to reset end Does this program make any sense ? if so Please tell me how to make it compatible to mlasm51 If I don't use the notouch code wouldn't I be able to re-program the chip again ? Thank you Deepak |