Discussion in "8051 Discussion Forum" started by    marai    Aug 5, 2008.
Tue Aug 12 2008, 12:55 am
#11
The diagram shows the ISO 7816 , I/O pin not used
and Pin 8 connected to the AT89. (which is wrong )

Are you sure you are talking to the card ?


An extract form your code

timer_isr:
push acc
push psw
push 00h
push 01h
push 02h
push 03h
push 04h
push 05h
push 06h
push 07h
djnz 55h,return
pop acc
pop psw
pop 00h
pop 01h
pop 02h
pop 03h
pop 04h
pop 05h
pop 06h
pop 07h
clr EA
clr ET0
clr tr0
jmp sendPTS
return:
pop acc
pop psw
pop 00h
pop 01h
pop 02h
pop 03h
pop 04h
pop 05h
pop 06h
pop 07h
reti

I have to declare I never used the AT89xxx or it's assembler so may be completely wrong here...
but in any other case you would pop registers in reverse order.
IE
pop 07h
pop 06 h
...
pop acc last


The line "jmp sendPTS " worries me. Jumping to main code *might* work,
but don't forget the interrupt "interrupted" running code and you have to get back to it.
Keep interrupt handlers very short and simple.


I noticed these lines remmed out

;org 0003h
;jmp pause_isr

If there is an interrupt to address 03h it really should have a handler, even if only
an reti, better still,a warning that it occurred.


[ Edited Tue Aug 12 2008, 03:52 am ]
 marai like this.
Tue Aug 12 2008, 03:28 am
#12
maybe the schematic is wrong. not sure. haha. since my friend who develop this circuit and draw the schematic.
but i think the board itself working fine as the card give correct response for the apdu listed...yah..probably the schematic is wrong...
maybe this problem is worse than i imagined... :-s
it seem like i gotta check all over again .. thanks ExperimenterUK for apointing this mistake
Tue Aug 12 2008, 03:38 am
#13
thanks ExperimenterUK, i'll try what u suggest. i'm not really familiar with 8051 and asembly too. got to dig out some more...
as long as there's anyone giving out anything i'll try everything.
Wed Aug 20 2008, 05:43 am
#14
the problems for counter in the code has been solved. credit to the original author of this program for writing the whole program and idea and ExperimenterUK for debugging the code

And also a big THANKS to ExperimenterUK for his help in debugging the code and make this code usable and success !dance

cheers

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Richardgar
Sat Apr 20 2024, 11:05 am
AntoniaRoons
Fri Apr 19 2024, 09:59 pm
carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am