??? 06/17/07 14:54 Modified: 06/17/07 15:03 Read: times |
#140907 - read signature asm code Responding to: ???'s previous message |
Nimish Dave said:
Charles can u give me signature byte routine in assembly.
Please remember, this works for the EZ52 board in the above URL. My adaptation of the C code here. This routine reads 3 signature bytes and prints the bytes to the terminal. I am sure you can figure out the serial routines. Read_Sig: mov dptr,#Sigbits_string lcall outstr mov P0,#0ffh ;make p0 an input setb Vpp ; set Vpp = 5V, clr = 12V setb PROG ; prog high (not pulsed) clr P26 ; set up programming pins clr P27 ; as per datasheet page 73 clr P36 ; clr P37 ; mov dph,#000h ; read addresses 30h, 31h, 32h mov dpl,#030h ; in 89C51, 89C52 mov r7,#003h ; 3 signature bytes to read ;send address high byte first mov a,dph ; addrhi in dph orl a,#080h ; don't interfere with p2.7(prog) mov p2,a ; p2 = addrhi (only uses 6 bits) Read_SigLp: mov p1,dpl ; p1 = addrlo lcall delay10 ; 10uS Delay MOV A, P0 ; read byte to acc lcall printchar inc dptr ; next address djnz r7,Read_SigLp ; do all three bytes ljmp Main ; back to main program ;--------------------------------------------------- Sigbits_string: db 0Dh,0Ah,'Signature Bits: ',0 Good Luck |
Topic | Author | Date |
Signature byte | 01/01/70 00:00 | |
answers | 01/01/70 00:00 | |
ROM or RAM | 01/01/70 00:00 | |
what dioes it matter - you can't read it | 01/01/70 00:00 | |
@ Erik :We do read | 01/01/70 00:00 | |
maybe ROM - but not the code ROM | 01/01/70 00:00 | |
reading signature bytes 89C51 | 01/01/70 00:00 | |
Yes.I do need | 01/01/70 00:00 | |
read signature asm code | 01/01/70 00:00 | |
This is reading a different chip! | 01/01/70 00:00 | |
Thanks Everybody![]() | 01/01/70 00:00 |