??? 12/20/05 15:49 Read: times |
#105602 - this code is not working |
hi all,
here is very simple code which is not working on AT89C2051 mcu 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 mov port1,#0ffh mov r0,#7fh fill_zeros: mov @r0,#00h djnz r0,fill_zeros system: jb port3.2,system mov port1,#00h here: sjmp here end 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 mov r0,#7fh fill_zeros: mov @r0,#00h djnz r0,fill_zeros program works fine i think problem is with ram clear code what where is problem i am unable to find as code works in simulator. shivnai |
Topic | Author | Date |
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 |