| David Prentice 10/07/11 07:02 Modified: 10/07/11 07:05 Read: 219 times Wormshill England |
#184127 - Design your code, make it pretty. Responding to: ???'s previous message |
You want to display patterns on 11 LEDs.
If you write each pattern as a 16 bit number, you could call a subroutine with e.g. 'MOV DPTR,#0b10111101010' for each pattern. The subroutine would light the required LEDs and delay function. Likewise the delay function can have a global parameter that you vary by your 'speed' buttons. But the most important job is to design what you want to do with pencil and paper. Then translate into ASM instructions, with an explanatory comment for each subroutine. If you make the code look attractive, it will be easy for you to read. If you don't, people just ignore you. For example, I glanced at your code, thought it looked messy, and made no further effort to read it. There are some excellent students in Indian universities that do exactly this. Follow their example and you will go far !! David. |
| Topic | Author | Date |
| Speed control of running adancing LEDs | Rajesh Kumar | 10/07/11 05:14 |
| Duplicate Posting | Michael Karas | 10/07/11 06:56 |
| This is just an inadequately understood homework problem | Richard Erlacher | 10/07/11 09:51 |
| Design your code, make it pretty. | David Prentice | 10/07/11 07:02 |
| RE: please suggest some idea | Andy Neil | 10/07/11 07:15 |
| I totally agree with ANDY | Erik Malund | 10/07/11 08:12 |
| Very unhelpful comments | Per Westermark | 10/07/11 09:19 |
| Thank you sir | Rajesh Kumar | 10/08/11 02:00 |
| While analysing the problem | Maunik Choksi | 10/08/11 02:30 |
| Translation into assembler task of programmer. | Per Westermark | 10/08/11 03:20 |
| 'subb' instruction | Stefan KAnev | 10/08/11 11:53 |
| Yes, debounce is definitely good to have. | Per Westermark | 10/08/11 12:11 |
| Got Success ! | Rajesh Kumar | 10/10/11 01:16 |
| What is the final code? | David Prentice | 10/10/11 04:21 |
| homework is done.. | Stefan KAnev | 10/10/11 05:11 |
| Surely not secret, at least for my seniors | Rajesh Kumar | 10/10/11 05:39 |
| Teacher will know | Andy Neil | 10/10/11 05:40 |
| Don't worry | Rajesh Kumar | 10/10/11 05:49 |
| What code? | Andy Neil | 10/10/11 06:15 |
| You must show your effort. | David Prentice | 10/10/11 07:09 |
| yes, it's another "gimmee", yet nobody sees it | Richard Erlacher | 10/10/11 07:22 |
| what's the problem | Erik Malund | 10/10/11 08:03 |
| Why ever source current for driving LEDs? | Per Westermark | 10/10/11 08:15 |
| true enough, but is that what he did? | Richard Erlacher | 10/10/11 22:23 |
| I think everybody saw that? | Andy Neil | 10/10/11 08:03 |
| Cleverness | Per Westermark | 10/10/11 08:17 |
| Stange ! | Rajesh Kumar | 10/10/11 11:29 |
| because it is | Erik Malund | 10/10/11 12:48 |
| Yes, often very obvious when copied code turned in | Per Westermark | 10/10/11 13:02 |
| I agree with Andy | David Prentice | 10/10/11 08:24 |
| the key word is 'help' | Erik Malund | 10/10/11 08:35 |
| May not be an achievement for you | Rajesh Kumar | 10/10/11 11:08 |
| So ... where's the evidence of your struggle? | Richard Erlacher | 10/10/11 22:31 |
| problem can be outside | Stefan KAnev | 10/10/11 11:12 |
| This is certainly correct! | Richard Erlacher | 10/10/11 22:29 |
About sinciarity | Maunik Choksi | 10/11/11 02:58 |



