1-wire biblioteki w C lub asemblerze

Loading thread data ...

Krzysztof snipped-for-privacy@poczta.onet.pl> napisał(a):

Zbyt lakonicznie opisałeś , co dokładnie robi Twój program.Powinno być mniejwięcej tak: a)Reset b)Command MatchRom c)Send Address (Rom Code) d)Command Convert Wait -zależne od rodzaju zasilania DS-a e)Reset f)Command MatchRom g)Send Address (Rom Code) h)Command ReadScratchpad i)Receive Jeśli tak robisz i nie działa , tzn. że źle "generujesz" timeslot.To MUSI działać. Jam ma coś takiego ale UWAGA dla kwarcu 4Mhz , ale łatwo przerobić na inny :) _1wread_byte: ;odczyt bajtu mov a,#255 _1wwrite_byte: ;zapis bajtu push b mov b,#08 _next_bit: rrc a acall _1wwrite_bit djnz b,_next_bit rrc a pop b ret _1wwrite_bit: clr _1wbus mov _1wbus,c nop nop mov c,_1wbus push b mov b,#6 _lop6: djnz b,_lop6 pop b setb _1wbus ret Pozdrawiam Piotrek

PS Dla MCS-51 , bo nie wiem o jakim uC mówimy.

Reply to
Piotrek Sz.
Reply to
invalid unparseable

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.