Onelock is a project mainly written in C, it's free.
1-wire lock project
1-Wire Lock Project Copyright 2005 by Brian C. Lane [email protected] All Rights Reserved
This project uses a custom PC Board to implement a simple 1-Wire based lock. It runs off of a 32768Hz watch crystal to tune the internal DCO of the MSP430F1101 processor to about 1MHz.
etc.