Check out the new projects site for A-i-S www.adventuresinsilicon.com

Thursday, August 14, 2008

When at first you don't succeed, try a thousand more times

Ok, so I am going quickly insane here.

I have a DS1307 (RTC) which has a perchant for I2C (TWI) and Packed BCD. I have set up a nice I2C routine to speak to it and receive back information such as time (hours, minutes, seconds etc).

All looks ok when you feed in 0,0,0 but when I feed in 0:59:30 and wait for it to hit one minute, it then wraps to 0:40:00 and counts up from there.

I have checked the data going in and out and have no idea....

Anyway I left that for a moment and decided to update the code that receives servo position commands on my MEga168V board on my robot. I implemented the cmdline demo from Procyon and it worked flawlessly.

Now I can send "servo 1 75" and it will send servo 1 to the 75% mark. All good I say.

No comments: