On Fri, Jun 04, 2004 at 04:19:19AM +0200, Lindy Mayfield wrote: > The reason I asked was because last night I got the Dallas temperature > sensor working with a pic. Excellent. > Using the Dallas 1-wire protocol, which is just > exactly what everyone seems to be talking about. > I cheated and used samples from the Serial Communications book (to get > started) It's not cheating if it helps you to get done and you understand how it works. Most people learn by example. The real test will happen later on when you need to do something similar and you need to generate it yourself. > and I was curious why it took 2 I/O pins to do the communication. I > thought 1-wire meant only one. (-: > > I was going to rewrite the code to use only one i/o pin, but I noticed it > wasn't so easy and that I needed to learn more stuff before continuing. This > thread falls right in with that. Thanks for the great explanation! Let me give you a piece of safe advise: Get it to work... THEN LEAVE IT ALONE! There's only two reasons to rewrite: insufficient resources, or excessive cost. Since you're using a 16F877, you have resources galore, and since it's clear that you're a novice hobbyist, cost shouldn't be an issue. So again once it works, leave it alone and move on. There's a whole bunch to more to learn and do. BAJ [SNIP] -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu