Here is some code to run on an ATtiny85 with a 4Mhz crystal. I first tried using the internal oscillator but thet was running about 4% fast. I suspect that the version with the crystal will be good enough but only you willl know as you won' t tellus HOW accurate your application requires. The software has three outputs . 1 second active high pulse on pin 5. 1 second active low pulse on pin 6. And a 0.5 hz square wave on pin 7 to check the timming accuracey. I have written this in assembler as I find it easier than C.
Just program it using a usbasp programmer (Or similar.) and avrdude software. Note you need to change the low fuse setting from the default of 62 to 6A to use an external crystal. Let me know if you want me to post the source code.
Just program it using a usbasp programmer (Or similar.) and avrdude software. Note you need to change the low fuse setting from the default of 62 to 6A to use an external crystal. Let me know if you want me to post the source code.
Attachments
-
407 bytes Views: 0