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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/13/07 03:26
Read: times


 
#130763 - Tell me something I don't know!
Responding to: ???'s previous message
Purushottam,

You've manged to piss off two people in very short time. One, learn to read - the code I posted wasn't written for a 2051/4051! That was left to Ralph to figure out.

And I don't store messages in rom as hex! There was a routine called 'pstring' - load dptr with the code address and call. The string is terminated by a null.

And, yes, there's a ton of ways I could've saved a few cycles here and there - my time is best served solving the problem and writing code that works - I've probably been doing this for many more years than you have. One day you'll understand that writing the tightest, most efficient assembler doesn't get the job done faster - especially when we're talking about a LCD - so what if you save 5uS for something that you have to wait for anyway! If you looked closely, my method of doing the nibble stuff means I can use any port pin - I traded some flexibility for code size.

The project that code came from had 8k flash - the code came in at 6k, then a new part came out with 62k flash, so I rewrote the code in 'c' - 12k code - and still worked comfortably on a 12mhz,12clock cpu - saving cycles meant little overall and writing in 'c' means other engineers can modify and maintain the code easily without having to tackle assembler. I'm sure I know how to 'and' and 'or' - would you like me to show you how to design a cpu from 7400 'nand' gates?

My days of squeezing code into a '2051 stopped 10 years ago - and I used to do this a lot. Nowadays, there's plenty of cpus with a stack of flash and ram for little money - why write in assembler? If you like the intellectual challenge - fine, but what is the exercise? For me it is getting the job done in the least time - my wage is expensive compared to the cost of the cpu. If the software costs $15000 to write, that buys a few cpus - mind you, if you're making 100,000 units then saving some dollars on the cpu is wise.

So, please, don't tell us how to 'suck eggs' - you added nothing to the discussion. You could've posted your own code for critical acclaim and solved Ralph's problem.



List of 44 messages in thread
TopicAuthorDate
How to create wr rd for E strobe on LCD            01/01/70 00:00      
   No research!            01/01/70 00:00      
      Wrong plenty of research            01/01/70 00:00      
         clock speed?            01/01/70 00:00      
            Erik it is 12 clocker            01/01/70 00:00      
               the question is moot ...            01/01/70 00:00      
         Wrong!            01/01/70 00:00      
            My error            01/01/70 00:00      
               Asm code            01/01/70 00:00      
                  missing boldface            01/01/70 00:00      
                  4051 has no port 0            01/01/70 00:00      
                     Tell me something I don't know!            01/01/70 00:00      
   when posting a schematic PLEASE do not do it in a            01/01/70 00:00      
      This why Erik            01/01/70 00:00      
         upset?            01/01/70 00:00      
            Your 1 True Love            01/01/70 00:00      
               I don't what happen but see below            01/01/70 00:00      
   AT89C4051 hardware            01/01/70 00:00      
      A better schematic post            01/01/70 00:00      
         Understanding the schematic will help.            01/01/70 00:00      
            Thanks for the your reply            01/01/70 00:00      
               Which ports you use doesn't matter ...            01/01/70 00:00      
   LCD interface            01/01/70 00:00      
      Thanks for the comment            01/01/70 00:00      
         Cant post code?            01/01/70 00:00      
      Yikes, that interface is old-skool !            01/01/70 00:00      
         yikes, your attitude sucks            01/01/70 00:00      
         You don't like my idea            01/01/70 00:00      
            It is here!            01/01/70 00:00      
               don't quite understand            01/01/70 00:00      
                  I can            01/01/70 00:00      
                     commodore 64            01/01/70 00:00      
   STOP - THINK - START OVER            01/01/70 00:00      
      Thanks for your comments            01/01/70 00:00      
         You must know what is required            01/01/70 00:00      
            an addition            01/01/70 00:00      
               shortcut            01/01/70 00:00      
                  in response to Andy, there is now one worse            01/01/70 00:00      
                     That's why these queries continue to appear HERE!            01/01/70 00:00      
                     Mapquest            01/01/70 00:00      
   Nice Thread. Lots of passion.            01/01/70 00:00      
      This was a popular PIC demo about 15 years ago            01/01/70 00:00      
         We're dating ourselves a bit arent we?            01/01/70 00:00      
            Well ... Yes ... maybe ... those were the days ...            01/01/70 00:00      

Back to Subject List