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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/28/09 12:35
Read: times


 
Msg Score: +2
 +2 Good Answer/Helpful
#171980 - Pen and paper really is a good method
Responding to: ???'s previous message
The point was that when you do step through your program with a pen and paper, your code either do rely on the output signals already having a fixed state, or that your code start by setting them in an initial state.

When drawing with pen and paper, it may be a good idea to write an x for an unknown pin state, and a 0 or 1 when you know that the signal is low or high.

If doing that, you would notice that a change from 0 -> 1 represent a rising flank. A change from x -> 1 represent an unknown change, and is not guaranteed to produce the low-to-high clock transition that the datasheet specifies.

That is a reason why you must be methodical when writing programs, and try to write self-contained modules. And when a module do make assumptions, these assumptions must be documented. If the module assume that a signal must be low before you call the module, then that needs to be documented.

List of 31 messages in thread
TopicAuthorDate
74HC165            01/01/70 00:00      
   Document your code            01/01/70 00:00      
      pen and paper            01/01/70 00:00      
         It's still illegible!            01/01/70 00:00      
            code arranged            01/01/70 00:00      
         Why not format your code?            01/01/70 00:00      
            formatted code            01/01/70 00:00      
   Indentation is very Important            01/01/70 00:00      
      "Insert Program Code" Button            01/01/70 00:00      
   what are the expectations...            01/01/70 00:00      
      and the problem is...            01/01/70 00:00      
         your code is ambiguous            01/01/70 00:00      
            succes...            01/01/70 00:00      
               Pen and paper really is a good method            01/01/70 00:00      
                  Thanks & a weird point...            01/01/70 00:00      
                     Not Weird At All            01/01/70 00:00      
                        load pulse timing            01/01/70 00:00      
                           There's a reason why it doesn't say that ...            01/01/70 00:00      
                           Load Not Triggering a Shift Cycle            01/01/70 00:00      
            Working new code part            01/01/70 00:00      
   I think this may help            01/01/70 00:00      
      Same Problem OP First Had            01/01/70 00:00      
         Responding to: Michael            01/01/70 00:00      
            look at a logic diagram of the '165            01/01/70 00:00      
            Oh dear...            01/01/70 00:00      
               To Kai            01/01/70 00:00      
                  No, it never worked!            01/01/70 00:00      
                     try it            01/01/70 00:00      
                        No, the code will destroy the chips...            01/01/70 00:00      
                           Responding to: Kai Klaas's previous message            01/01/70 00:00      
            Responding to: Sherif            01/01/70 00:00      

Back to Subject List