| ??? 10/01/09 05:21 Read: 396 times |
#169332 - tried it Responding to: Andy Neil's previous message |
Yes, I tried it. What I found out was that after it came to the correct
Here's the original:
AHUNDS:
MOV A, R0
FZERO:
CJNE A, #0, FONE
MOV R3, #ZERO
FONE:
CJNE A, #1, FTWO
MOV R3, #ONE
FTWO:
MOV R3, #TWO
RET
oaky, let's say it goes into FZERO, and matches #0. it does the next instruction (MOV R3, #ZERO), and then goes to (FONE). since it doesn;t match, it proceeds to (FTWO), where R3 -which originally had #ZERO- gets overwritten by #TWO. Did I get it right? So that's why it's important to do a RET right after R3 is written so it won't be rewritten by the last value. Tell me if my explanation was wrong. Thanks for the idea, by the way. Regards, JR |
| Topic | Author | Date |
| TEMPERATURE MONITORING DEVICE USING AT89C51 | JR Requiroso | 10/01/09 03:26 |
| Divide your problem into parts | Mahesh Joshi | 10/01/09 03:59 |
| ADC is working fine | JR Requiroso | 10/01/09 04:05 |
| 29.9 is what you implemented | Juergen Christoph | 10/01/09 04:17 |
| I don't get it. | JR Requiroso | 10/01/09 04:35 |
| OR this way also | Mahesh Joshi | 10/01/09 04:45 |
| Did you try? | Andy Neil | 10/01/09 04:49 |
| Debugging techniques | Andy Neil | 10/01/09 04:55 |
| tried it | JR Requiroso | 10/01/09 05:21 |
| Test your Display routines using DIP switches | Mahesh Joshi | 10/01/09 04:21 |
| Excellent question | Steve M. Taylor | 10/01/09 06:23 |
| agreed, but one thing missing | Erik Malund | 10/01/09 06:27 |
| 8 data lines for 7-seg | JR Requiroso | 10/01/09 06:38 |
| I see no con2 connections on your schematic and ... | Erik Malund | 10/01/09 07:35 |
| also | Erik Malund | 10/01/09 13:02 |
| CON2 is good. | JR Requiroso | 10/03/09 09:20 |
| 7 segments, plus DP | Andy Neil | 10/01/09 06:46 |
| the 8 data lines are each segment + dot | JR Requiroso | 10/01/09 08:54 |
| Thank you | JR Requiroso | 10/01/09 06:30 |
| Look at your code | Jerson Fernandes | 10/01/09 08:23 |
| You're right | JR Requiroso | 10/01/09 08:53 |
| First try to solve the simplest things like DELAY | KONSTANTINOS L. ANGELIS | 10/01/09 10:46 |
| Problem Solved! | JR Requiroso | 10/02/09 01:11 |
| We ought to have this as an example of a well-framed query! | Richard Erlacher | 10/02/09 08:55 |
| Absolutely | Steve M. Taylor | 10/02/09 12:43 |
| Fix the FAQs? | Andy Neil | 10/03/09 01:40 |
| agreed, but there is one fly in the ointment | Erik Malund | 10/03/09 07:00 |
it's not a big fly | Richard Erlacher | 10/03/09 12:32 |



