Why? Were you born knowing how to modify boards.txt? If not (and we both know you were not) you are not even close to "stupid".
You made a mistake. We all do. To be "stupid" you would have to refuse to acknowledge your mistake then correct it. Clearly that is not the case.
So now KnockBang works on Attiny13, whit clockspeeds 9.6 4.8 1.2 and 0.6 MHz.
Excellent!
(Except for 0.6 MHz. I'm surprised that works. As the clock speed is reduced below 1 MHz, the protocol becomes less reliable. At 0.5 MHz it should fail.)
(Except for 0.6 MHz. I'm surprised that works. As the clock speed is reduced below 1 MHz, the protocol becomes less reliable. At 0.5 MHz it should fail.)
Now I have done some more testing at 600 kHz and it is indeed unreliable.
I had a sketch running for more than 40 minutes whitout any errors,
other tests only 4-5 lines before I got a KnockBang error, and most tests between those.
this seems like a really awesome project and exactly what I am looking for. however the sketch doesn't seem to want to compile. I get this error:
In file included from KnockBangReceiver.cpp:36:
TinyISP_SelectBuildOptions.h:175:2: error: #error
I'm on an Uno and IDE v1.0.1. I think it might have to do with TinyISP_BuildOptions.h, that doesn't seem to be in the files included.i did find TinyISP_SelectBuildOptions.h and that seemed right, however settings in there already matched what you said to change.
I seem to be missing something. Maybe I don't fully understand what knock-bang is. Was assuming this was a simple "hello world" type message that you can test this one, could be wrong.
I have selected attiny85 at 8mhz as board and it upload fine and I can even add "!" into debugger and I get "--- Monitor starting ---" but it seems nothing is coming out. Also have 19200 baud set, no line ending. I uploaded the sketch you showed earlier:
But I am not getting anything in the monitor aside from initiated message. On arduino its connected to Tx (though it seems like it would be Rx but all other monitors I have set up use Rx for some reason) and PB3 on the attiny (with 220ohm resistor between). Might be missing something though?
definitely a change, it now says --- Knock-Bang fault: 11 --- instead of nothing. Of course I should clarify, it did indicate the monitor was starting and stopping.
The one of interest is...
fault_timeout_knock = 0x11
The receiver (your Uno) is expecting a low pulse of a certain duration (a "knock"). The pulse is too short to be a knock.
The problem could be caused by the target running at 1 MHz with code built for a processor running at 8 MHz. Which "board" do you have selected? Have you used "burn bootloader" to change the fuses?
The problem could be caused by the target running at 1 MHz with code built for a processor running at 8 MHz.
If it is of any help, I just tried a Attiny85 running at 1MHZ and selected board Attiny85 @ 8MHZ and got:
--- Knock-Bang fault: 11 ---
With the same target and selcting board Attiny85 @ 1MHZ it works as expected (Output to the serial monitor looks as it should)
yeah, I just did this too. It makes sense since the frequency is 8 times faster, would make the signal shorter. I was under impression serial monitor needed to be 8Mhz like normal, but this seems to run differently.
I have it in still and it seems to be working fine. should I leave it? I honestly don't know what it does. I was under impression it just resets arduino so that it can program the attiny, but what that really means I have no idea.
I have it in still and it seems to be working fine. should I leave it?
As long as you use your Arduino as programmer, the capacitor between reset and ground should be connected.
It is there tp prevent your Arduino to reset and then starting the bootloader, instead of talking to the ArduinoISP.
For those using TinyISP with ATTinyx4 etc (specifically i use 84A_PU) and TinyDebugSerial at <=8Mhz
I found that on a new vanilla install (for windows 7 64) of Arduino IDE 1.0.3 (downloaded today 8/feb/2013) you should change the
define for the debug register and bit (see 2 lines below 'Use MISO as TX').
#elif defined( AVR_ATtinyX4 )
#if F_CPU <= 8000000L
// port B bit 0 (PB0)
//#define TINY_DEBUG_SERIAL_REGISTER 0x18 <<<<original settings
//#define TINY_DEBUG_SERIAL_BIT 0 <<<original settings
//use MISO as TX back to host, i.e Port A 5 (PA5) #define TINY_DEBUG_SERIAL_REGISTER 0x1B #define TINY_DEBUG_SERIAL_BIT 5 #else
// port A bit 0 (PA0) #define TINY_DEBUG_SERIAL_REGISTER 0x1B #define TINY_DEBUG_SERIAL_BIT 0 #endif
I am very new to all this (1 week in) so I hope the above is helpful, please reply if this info is erroneous and I'll correct.
PS: Thx very much for TinyISP, makes using 84/85's almost pleasurable