Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/13/06 09:18
Read: times


 
#126372 - program ...
Responding to: ???'s previous message
                       org    2010h

	FIRMWARE_BIT equ 010h   ;flag for checking whether the program is 
			      ; exceuting for the forst time or not	
			      ; 0 for first time executing 
	
	mov	r4, #080h	; LSB of 3200h
	mov	r5, #0c0h	; MSB of 3200h

	acall	FLASH_SUBROUTINE

		org  3200h
	sjmp	START

FLASH_SUBROUTINE:
	push	ie
	clr	ea
	mov	a, cmod	; for checking of watch dog
	mov	r2, a
	jnb	acc.6, CLEARED_WATCHDOG
	anl	cmod, #0bfh

CLEARED_WATCHDOG:
	anl	fcf, #0fch ; enable boot sector
	jb	FIRMWARE_BIT, READ_FWARE ; if initially program has runned then user 
					  ; has changed the firmware passoword.
	mov	r1, #02h	; for writing  flash
	sjmp	AHEAD

READ_FWARE:
	mov	r1, #03h ; reading flash byte

AHEAD:
	mov	dpl, #r4
	mov	dph, #r5

	;Question now is ... with the use of above statement
	; is my subroutine ie. START will be called and the control
	; is transfered to START or what is else is happening here
	
	
	mov	a, r7
	
	; here is my question is ... if I have to write more numbers
	     ; take for eg ... 1, 2, 3, 4 then how can I be writing using 
	     ; one single register. if I can use more registers then in a single
	     ; accumulator register how can i acomodate it.
	     ; will I have to call the IAP for four times, unlike I have 
	     ' called once below		
	
	

	call	01ff0h
	mov	cmod, r2
	orl	fcf, #001h
	pop	ie
	ret

;************************************************

START:
	jb   FIRMWARE_BIT, AHEAD

	routines for lcd and matrix keyboard	


Also the the flag FIRMWARE_BIt I am using will be having

address below 2000 or above 2000h ...

Definately there are many mistakes in this program, so please make a point on each.

regards
AS

List of 50 messages in thread
TopicAuthorDate
how to write in EEPROM in P89V51RD2 ?            01/01/70 00:00      
   there is no such thing as an EEPROM            01/01/70 00:00      
   eh?            01/01/70 00:00      
      I mean FLASH ...            01/01/70 00:00      
         FlashMagic            01/01/70 00:00      
            I have flash magic            01/01/70 00:00      
               that IS what FlashMagic does            01/01/70 00:00      
                  All of them ...            01/01/70 00:00      
                     I'm at a loss            01/01/70 00:00      
                  Probs is password storing ...            01/01/70 00:00      
                     you have not, see above            01/01/70 00:00      
                        just give me an idea            01/01/70 00:00      
                           datasheet            01/01/70 00:00      
                     clear question will help            01/01/70 00:00      
         read the ... datasheet            01/01/70 00:00      
            P89V51 IAP (access)            01/01/70 00:00      
         Unfortunate terminology!            01/01/70 00:00      
   I read data sheet            01/01/70 00:00      
      read about IAP!!!            01/01/70 00:00      
         IAP code example...            01/01/70 00:00      
            this is NOT for P89V51RD2!            01/01/70 00:00      
               Use 89S52 / 89S8252            01/01/70 00:00      
                  I\'d guess...            01/01/70 00:00      
            few questions ...            01/01/70 00:00      
               Do you read my posts?            01/01/70 00:00      
   I have tried but failed ...            01/01/70 00:00      
      corrupted???            01/01/70 00:00      
         Dont know            01/01/70 00:00      
            How do you know that they are corrupted?            01/01/70 00:00      
            Refer the application notes for the P89V51RD2            01/01/70 00:00      
               Detail Problem ...            01/01/70 00:00      
                  think!            01/01/70 00:00      
                     program ...            01/01/70 00:00      
                        ehm....            01/01/70 00:00      
                           Well confused!            01/01/70 00:00      
                              one has to start somewhere...            01/01/70 00:00      
                                 Flowcharts            01/01/70 00:00      
                                    I don't think it's a good idea...            01/01/70 00:00      
                        Jan ... Guide me more            01/01/70 00:00      
                           where to place the code            01/01/70 00:00      
                  BIBLE TIME            01/01/70 00:00      
                     BASICs            01/01/70 00:00      
                        A very basic question            01/01/70 00:00      
                           to Arvind            01/01/70 00:00      
                           if you mean BASIC52/RD2 v1.4beta4...            01/01/70 00:00      
      the dangers of uncharted waters withou a pilots            01/01/70 00:00      
         maybe            01/01/70 00:00      
            I would not dare that            01/01/70 00:00      
               sunset...            01/01/70 00:00      
                  Mr. Shrivastava you are Wasting other's time            01/01/70 00:00      

Back to Subject List