| ??? 01/26/01 17:33 Read: times |
#8663 - Comparison Problem..... |
Hi all,
Horrified with bascoms speed I have shifted to assembly please let me know suppose I am getting some values in tl0, th0 I need to compare these values to some pre known values and give outputs as per the range of freq.I am doing the following but gives useless and erratic response.I have tested tl0,th0 hex values with led's connected to ports they are correct. do_action: clr c ;this is where action to be taken clr psw.3 mov r6,tl0 mov r7,th0 mov a,#0fh mov p1,a mov a,#88h subb a,r6 JC msb1 msb1:mov a,#13h subb a,r7 JC action1 ajmp step1 ;perform action1 action1:mov a,#0Eh mov p1,a sjmp measure_again step1: clr c ;clr psw.3 ;mov r6,tl0 ;mov r7,th0 mov a,#0fh mov p1,a mov a,#58h subb a,r6 JC msb2 msb2:mov a,#1Bh subb a,r7 JC action2 ajmp measure_again action2:mov a,#0Dh mov p1,a ajmp measure_again end The problem here is only action2 gets performed and not action1 even if the freq limit remains between 5khz to 7khz only 7khz step gets performed or more correctly the very last step.please let me know if I am doing something wrong or is there some other way to do this. thanks sanjeev |
| Topic | Author | Date |
| Comparison Problem..... | 01/01/70 00:00 | |
| RE: Comparison Problem..... | 01/01/70 00:00 | |
| RE: Comparison Problem..... | 01/01/70 00:00 | |
| RE: Comparison Problem..... | 01/01/70 00:00 | |
| RE: Comparison Problem..... | 01/01/70 00:00 | |
| RE: Comparison Problem..... | 01/01/70 00:00 | |
| RE: Comparison Problem..... | 01/01/70 00:00 | |
| RE: Comparison Problem..... | 01/01/70 00:00 | |
RE: Comparison Problem..... | 01/01/70 00:00 |



