View Single Post
Old 21st Dec 2018, 5:54 pm   #8
ian_rodger
Pentode
 
Join Date: Jan 2015
Location: Greenock, Inverclyde, UK.
Posts: 161
Default Re: Turntable Stroboscope

Yes that works with attiny 85. I tested it using the attiny's built in oscillator but you would probably want to use an external xtal for stability. There is also the possbility to programme a few selectable frequencies if tou want. If you are not familiar with programming Arduino's (lots of good tutorials on youtube) then I would be happy to program the chip for you. Programme (sketch) below. Assumes an led is connected to pin 7 via a suitable resistor.

/*
Strobe at 300Hz

LED connect from pin 7 to ground via suitable current limit resistor
*/
int LED = 1; // PB1 maps to pin 6 on attiny85
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level)
delayMicroseconds (333); // delay 333 uS
digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW
delayMicroseconds (3000); // delay 3000 uS

}
ian_rodger is offline