About this Blog

This blog is an engineering log book; for me to record the progress on my many projects and hopefully to inspire you.

Some projects do not get off the ground, they remain as interesting thoughts, a select few get some work done on them, even fewer get close to completion, and none get completed because unfortunately I subscribe to the theory: "If something ain't broke then it doesn't have enough features". If you'd like to collaborate on some work to get something to a useable state then send me some communications.

Being a blog, posts are listed in chronological order. However I usually have multiple projects on the go and will try to post some of my earlier work. With this in mind I'll try to add labels to each post so all posts relevant to one project can be easily extracted.

Enjoy and happy hacking.

Thursday, August 21, 2008

Some hurdles

So the PIC has no spare pins. Therefore to get a single wire serial bus to the device we must use the existing input wire and pin. The most common one wire bus is that of Dallas semiconductors and their 1-wire bus. No point reinventing the wheel (well not yet) so I plan to implement it on the PIC.

The 1-wire bus works by the master or slave device pulling the bus low for varying amounts of time to communicate 1's and 0's. No clock is required as each device is assumed to have a relatively stable clock source.

While reading the PIC datasheets I discovered a problems that will make the 1-wire bus difficult to implement. Pin-4, the one connected to the control wire has no output driver. It is an input only pin. This makes it impossible to pull the bus low.

Ok! So two options here. Put in a more modern micro-controller without these restrictions, like the Atmel ATtiny range. Unfortunately the power pins are not the same as the PIC - so messy rewiring needed.

The second is to change the pin. But there are no spare pins. Well actually the PIC has an internal RC oscillator, so the external 8MHz resonator isn't required. Yay two extra pins. One for the 1-wire bus and one for an LED too :).

Ofcourse this all depends on if I can actually reprogram the PIC.

No comments: