From 7c2ece0331e0cd9dad9f738698c1d58d04558858 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 24 Jan 2016 16:06:58 +0100 Subject: tut --- avr/1wire.c | 18 ++++++++++++------ avr/main.c | 5 +++-- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'avr') diff --git a/avr/1wire.c b/avr/1wire.c index 5dbca82..affd80d 100644 --- a/avr/1wire.c +++ b/avr/1wire.c @@ -79,15 +79,20 @@ uint8_t w1_bit_io( uint8_t b ) _delay_us( 1 ); if( b ) { - //hard_vcc; - //asm volatile("nop" ::: ); + hard_vcc; + _delay_us(7 ); soft_vcc; + _delay_us( 15 - 1 - 7 ); + } + else + { + _delay_us( 15 - 1 ); } - _delay_us( 15 - 1 ); if( (W1_IN & (1<