| ??? 01/21/05 08:40 Read: times |
#85468 - How to post code, and possible hang-up Responding to: ???'s previous message |
Please read the Instructions on how to post code:
http://www.8052.com/forum/read.phtml?id=82476 case 2:
Reader_B = LOW; // pull 1_Wire line low
us_Delay(29); // leave it low for 480us
Reader_B = HIGH; // allow line to return high
us_Delay(3); // wait for presence
if(Reader_B) // if line is high
return 0; // no part presence
else
{ // get presence signal
while(!Reader_B); // wait for end of timeslot
return 1; // 1=presence, 0 = no part
}
break;
As I said to you before, You should think about what happens in the event of a fault causing a short-circuit to ground on a 1-Wire bus... As it stands, this will cause your code to hang! |
| Topic | Author | Date |
| sbit | 01/01/70 00:00 | |
| I do not understand | 01/01/70 00:00 | |
| You mean Dallas 1-Wire? | 01/01/70 00:00 | |
| Re | 01/01/70 00:00 | |
| What's the problem? | 01/01/70 00:00 | |
| I think that... | 01/01/70 00:00 | |
| indirect bit addressing | 01/01/70 00:00 | |
| The same iButton on all 3? | 01/01/70 00:00 | |
| sbit | 01/01/70 00:00 | |
| access all 3 , one at a time | 01/01/70 00:00 | |
| I had the same problem | 01/01/70 00:00 | |
| Lets try again | 01/01/70 00:00 | |
| Need ? | 01/01/70 00:00 | |
| Why? | 01/01/70 00:00 | |
| There is always the switch statement | 01/01/70 00:00 | |
| something like this... | 01/01/70 00:00 | |
| Simultaneous example | 01/01/70 00:00 | |
| Use MASK rather than bit address | 01/01/70 00:00 | |
| Oooops, sorry... | 01/01/70 00:00 | |
| Multiple 1Wire | 01/01/70 00:00 | |
| How to post code, and possible hang-up | 01/01/70 00:00 | |
| simultaneous? | 01/01/70 00:00 | |
| would even be better | 01/01/70 00:00 | |
If it worked! | 01/01/70 00:00 |



