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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/10/06 10:11
Read: times


 
#119960 - think positively
Responding to: ???'s previous message
Neil Kurzman said:
The problem with sample code for HW testing is it assumes the same HW. The same Ports used, The same Xtal, sometimes the same variant CPU.

Of course. The snippet has to be written in a smart way, to be as portable as possible, with very clean indication, what has to be changed to adopt it to a different hardware.
Remember, the best thing about '51's is that they really keep a high degree of backward compatibility, so, usually, there is little to be chenged for testing the rudimentary features.

Neil Kurzman said:
Ex an LCD Many types, 4 and 8 bit mode.

Of course, 2 different snippets for these.

Neil Kurzman said:
The 4 X 4 matix keyboard: There are several ways to wire it. The code will vary depending on the use. Single press, Multi Press, Auto repeat.

Multipress, autorepeat - those are not needed for rudimentary tests. Might perhaps been contained in separate snippets, if one wants to test those (no reason for autorepeat but multipress might be interesting for fully decodable matrix (with diodes)).

Neil Kurzman said:
What languge should the code be in?

All available languages :-) IMHO it is easy to port assembler to C of any kind for short tests, isn't it? If written in some of the freely available asms (asem, metalink's), one could quite easily donwload, "install" and produce the hex for modified "snippet".

Andy Neil said:
You need to adopt a methodical, structured, scientific approach to debugging:
http://www.8052.com/forum/read.phtml?id=118587

Good point. However, a good example is worth 1000 tutorials+guidelines.

Andy Neil said:
Even with test software, you need to adopt a methodical approach - you run the test, observe the results - then what?

Another good point. The snippets should contain "what should it do" and "what might be wrong if it does not do what expected" sections.

Andy Neil said:
This is why you should be sleeping at 3am, and not trying to debug - debugging needs a clear head!
OT: Sometimes my head is cleanest at 3am... In fact, the best pieces I ever wrote I wrote during night. There is too much distraction during the day - even the artificial noises from the street. At least this is how it works with me.

Andy Neil said:
Sending a character to PC (If you can see it, your serial comm is well configured)

Flashing Led (If it flashes, your port is well configured)

The internet is already awash with such stuff!

The problem is, it is "stuff". To be of any value, it must be a masterpiece in 10 lines, carefully hand crafted, wrapped with the appropriate information.

Teaching is a hard work!

Jan Waclawek


List of 18 messages in thread
TopicAuthorDate
IMPORTANT FOR TESTS            01/01/70 00:00      
   Establish telephone connection (Voip)            01/01/70 00:00      
   We had no internet!            01/01/70 00:00      
      More            01/01/70 00:00      
         1) just visulaize 2) baloney            01/01/70 00:00      
         An old chinese wisdom says...            01/01/70 00:00      
            English version            01/01/70 00:00      
            I am just waiting for the inevitable            01/01/70 00:00      
               lunar lander            01/01/70 00:00      
   snippets            01/01/70 00:00      
      Good Idea or Not, Not a Job for the Pros            01/01/70 00:00      
   The problem with sample code.            01/01/70 00:00      
   Strategy            01/01/70 00:00      
      think positively            01/01/70 00:00      
         Non-trivial            01/01/70 00:00      
            who said it is trivial?            01/01/70 00:00      
            He said "just"..            01/01/70 00:00      
               He never attempted to do it...            01/01/70 00:00      

Back to Subject List