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

Back to Subject List

Thread Closed: Issue successfully resolved

???
12/21/05 05:46
Read: times


 
#105633 - detail
Responding to: ???'s previous message
hi kai klaas,
thanks for your reply,i think code is very small and easy to understand,anyway if you need explanation here is it,the cod e is bulit to just check switch on port3.2 pin,

port1 data 090h
port3 data 0b0h
sp data 081h
ie data 0a8h
tcon data 088h
psw data 0d0h
b data 0f0h
acc data 0e0h
tmod data 89h
tl1 data 8bh
th1 data 8dh
tl0 data 8ah
th0 data 8ch
dpl data 082h
dph data 083h
scon data 98h
sbuf data 99h
led_data data 20h
status data 2fh

org 0000h
ljmp program_start ;bypass interupt table
org 0030h
program_start:
mov port3,#0ffh ;MAKE PORT3 AND PORT1 ALL HIGH
mov port1,#0ffh
mov r0,#7fh ;MOVE TO R0 7FH COUNT FOR RAM
fill_zeros:
mov @r0,#00h
djnz r0,fill_zeros ;FILL ALL RAM WITH ZEROS
system:
jb port3.2,system ;WAIT FOR PORT3.2 TO GO LOW
mov port1,#00h ON LOW MAKE PORT1 LOW
here:
sjmp here
end
waht when i press switch on port3.2,whole port1 should go low but nothing happenes port1 remains high,but if i remove ram clearing code from above code as below
port1 data 090h
port3 data 0b0h
sp data 081h
ie data 0a8h
tcon data 088h
psw data 0d0h
b data 0f0h
acc data 0e0h
tmod data 89h
tl1 data 8bh
th1 data 8dh
tl0 data 8ah
th0 data 8ch
dpl data 082h
dph data 083h
scon data 98h
sbuf data 99h
led_data data 20h
status data 2fh

org 0000h
ljmp program_start ;bypass interupt table
org 0030h
program_start:
mov port3,#0ffh ;MAKE PORT3 AND PORT1 ALL HIGH
mov port1,#0ffh
system:
jb port3.2,system ;WAIT FOR PORT3.2 TO GO LOW
mov port1,#00h ON LOW MAKE PORT1 LOW
here:
sjmp here
end

program works fine i think problem is with ram clear code what where is problem i am unable to find as both programs works in simulator.
shivnai


List of 6 messages in thread
TopicAuthorDate
this code is not working            01/01/70 00:00      
   This is totally useless!            01/01/70 00:00      
   hex            01/01/70 00:00      
   detail            01/01/70 00:00      
      still useless            01/01/70 00:00      
      Easy ?            01/01/70 00:00      

Back to Subject List