Tiny tuner trouble.

ATTINY85, using an Ardunio ISP.

I have had a project working on this device, but I would like to calibrate the internal oscillator so I can use a faster baud rate for serial coms.

Cannot get this to work.

I first tried the "interactive serial" Tiny Tuner example, but when i power on the ATTINY the serial terminal receives garbage. I assume this is because the tolerance on my ATTINY is too far out to support 9600bps communication?

So I tried the "Save_To_EEPROM" example.

I have an osciliscope on the "LED" pin, when i send an "x" from the terminal, 9600Baud i see a pulse.

The pulse varies from ~16ms down to 2 or so, in a repeated pattern. The LED never turns fully on indicating the optimum calibration value has been found.

But if i look at the code:

while ( KeepGoing )
  {
    KeepGoing = tt.update();

    for ( uint8_t i=0; i < 2; ++i )
    {    
      digitalWrite( PinLED, ! digitalRead( PinLED ) );
      delay( 100 );
    }
  }

It looks like it should be illuminating the LED for ~ 100ms?

I think my code / device is out by a factor of ~ 10?

I have tried the 1Mhz and 8Mhz Tiny core, the result is always the same.

I first tried the "interactive serial" Tiny Tuner example

Stay with the interactive sketch. It's easier to troubleshoot with it.

but when i power on the ATTINY the serial terminal receives garbage. I assume this is because the tolerance on my ATTINY is too far out to support 9600bps communication?

Very likely.

when i send an "x"

How many 'x' characters did you send? Does your terminal application also send line terminators?

Changed back to "interactive" using hyperterminal, holding down the "x" key for a while (minute or so)

holding down the "x" key for a while (minute or so)

About a dozen is enough. Rarely will you need to send more.

What are you using for a USB-to-TTL-serial converter?

FT232RQ

http://www.4dsystems.com.au/prod.php?id=19

Changed to an RS232 - ttl adaptor to try something different.

I have a cro on the RX pin of the adaptor.

When the device powers up I can see a big string of data.

When I press X I can see a few bytes being sent to the PC, these change slightly with each press.

After 15 or so presses a big chunk of data comes back.

Cycle repeats.

On the Arduino terminal it prints about 6 bytes of garbage back for every press of "x".

I think the internal timescale on my ATTINY85 is out of whack by a large margin.

Was playing around with some blink sketches, programmed the 8M bootloader, the 100ms blink was around 100ms.

Try the tiny tuner again and it works :~

Strange. I would swear I have done nothing different this morning from last night. Maybe just needed to sleep on it.

Glad you have it working.

Maybe just needed to sleep on it.

I've been there a few times. :wink: