??? 05/11/04 10:05 Read: times |
#70163 - Simplifying Responding to: ???'s previous message |
Here is my answers
1) "Are the input bits from a pushbutton switch? If so, we need to debounce these inputs first. Do a search on keyboards and debounce." .... Ans:- No the input is not from Push Buttons, Its simply direct High or Low no debouncing is require to considered. Next i have searched and found the link which contains information about state machine using 8 push buttons and eight leds working separately but there are lots of things that iam unable to understand which i also mentioned in my previous posts. 2) "On the falling edge (1 -> 0) of an input bit, you want to output some data onto P1"...... Ans:- My project is simply for two bits P2.0 & P2.1 but i want to design the program in such way that it uses state machines and can be expaned in future. 3) "If the bit is held low for >5 seconds something is reset." Ans:- Yes , but think of this as if p2.0 keeps on showing Low that is no change in logic state for 5 seconds and if high comes before that controller will send data from P1 lets suppose 00000001B but if low stay there for 5 seconds then also controller will sent same data 00000001B. 4) "Each input bit outputs different data" Ans:- Yes, the following is the data but the data is fixed for each bit state , consider this as like P1 is connected with a 7-segment display and at P2.0 low state controller sents data through its memory which the programmer has put in its code. At Low:- P2.0 , at low state , sent via P1 00001001B P2.1 , at low state , sent via P2 0100000B At High or 5 seconds over:- P2.0 sents via P1 00001000B P2.1 sents via P1 01000000B For each bit two types of 8 bits data representing high and low state. 5) "Where does the data to output come from? Is it a table" Ans:- Now this is what i want to know we know what data has to be sent as mentioned above for each state of eahc bit , how to manage this data in writing the code should i look up table be made and using MOVC command this should be done or some other way as one lookup table to check the state of the bits is already be there? 6)"How fast do we expect the input bits to change?" Ans:- Change depends on Human use so the change will not come before 1 second in any case, as the high and low signal depends on the human use. 7) "What happens if both bits go to 0 together? What data do we output?" Ans:- here comes the multi-tasking thing but i guess since HIgh and Low on the input bits depends on human use so that will not be to complicated for the controller to handle but each bit has to be treated separately , the data will be the same as mentioned above but with some time trick and that is what i am looking to learn from here. You are right iam not actually looking for code iam looking for the way i should manage the flow chart of this project that;s why iam writing so long posts:) iam getting registered here and as soon as i do i will post this again but lets hope i have made my self and get some sort of help :) |
Topic | Author | Date |
branching ports through memory mapping | 01/01/70 00:00 | |
RE: branching ports through memory mapping | 01/01/70 00:00 | |
RE: branching ports through memory mapping | 01/01/70 00:00 | |
RE: branching ports through memory mapping | 01/01/70 00:00 | |
Simplifying | 01/01/70 00:00 | |
RE: branching ports through memory mapping | 01/01/70 00:00 | |
Plz close this thread![]() | 01/01/70 00:00 |