Go Down

Topic: ATTiny85 TinyDebugSerial ÿÿÿþÿÿÿÿüÿÿÿÿÿÿÿÿ (Read 3980 times) previous topic - next topic


ok, I see now, the timing is out. I uploaded blink to both the arduino and the tiny. then powered them up at the same time.  They slowly go in and out of sync.

how do I "read them back and verify them?"?

Is this the next step I have to take?

The internal oscillators are not very accurate.  To improve the accuracy of the internal oscillator, you can change the OSCCAL register until a timed event (say flashing an LED every 1 second) actually results in a flash every 1 second.  You could change for example the blink sketch by changing the OSCCAL value in setup:
Code: [Select]

Timing the flashes with a stop watch should tell you whether the oscillator is running fast or slow, increase the OSCCAL value more if it is slow, decrease it if too fast.

It seems as if the Tiny Tuner code varies the OSCCAL value to match the expected bit pattern of a serial transmission of the character 'x'. It is a good automatic procedure, but you need to hook up a serial line that transmits the expected value.  Of course in your case what you really want to do is calibrate the oscillator to give reliable serial transmissions, so the Tiny Tuner is probably the most appropriate method for your situation.


Of course in your case what you really want to do is calibrate the oscillator to give reliable serial transmissions, so the Tiny Tuner is probably the most appropriate method for your situation.

I will certainly be giving this a go when I exhaust all other options, because I think its a simple fix.  Apparently with a crossover wire from reset to ground.  But when I do that I get nothing in the serial monitor

If they slowly go in and out of sync, then it sounds like they are running at the "same" speed, one is just a bit faster.  If the clock is off by 8 or 15MHz, the LED would blink way more slowly.  It would be hugely obvious that one was twice as fast or even eight or sixteen times as fast.  They wouldn't be close at all.

From what I'm seeing, it looks like the chips must be running at a decent speed.  I just don't get why I'm getting messed up feedback at all different baud rates.

Yes just a wire, it keeps the Atmega in constant reset.

The alternative is to remove the chip from the UNO, but I find that too risky.

I have tried a wire, and i get NOTHING in the serial monitor, the TX led also doesnt flash.  If I remove the wire and leave it open the TX led begins to flash again! lol!  I took out the chip and I couldn't get the com port to show up, but I think theres another reason it was doing that.  I will try again without a chip in the arduino when I get some free time.   But so far from what I have read from other people that have experienced this issue, they seem to use a wire from reset to gnd, or they use coding badly's knock library.  I tried setting up his library, but I couldn't work out which was his latest version of TinyISP.  I would totally use it if I could figure out which is the latest version, and how to install it. LOL!!!

Has anyone followed my tutorial?  Thats how I setup the Tinys.  Is this the correct way?  Is there a step in there thats not right?

Here is a image of the results I get:

I will need to try out taking the chip from the arduino again, and test it that way. Have I wired it wrong? Why would the TX light not show up at all with a wire on reset and GND ? Ill have to purchase one of those usb-serial converters.

Thanks very much all of you for helping me out with this nooblike issue.  I really appreciate it! :)
Divide by zero


I would try to remove all wires, except the ground, 5V and the connection from PB3 to TX on the Arduino, like the second picture here:


Note that you should use PIN 1 on Arduino, marked TX->1

Normally I am not a big fan of Fritzing, but your pictures are very clear, +1


Apr 26, 2013, 02:59 pm Last Edit: Apr 26, 2013, 03:11 pm by SadamHu Reason: 1
Ah yes! thats it!  The whole time I was connecting the serial pin out to RX on the arduino! I'm sure I read somewhere to do that! Ah well nevermind.  It is so good to finally be able to debug!  Thank you so much Erni! +1

Divide by zero


Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131