Show Posts
Pages: 1 ... 507 508 [509] 510 511 ... 912
7621  Using Arduino / Programming Questions / Re: ArduinoISP on: January 21, 2012, 03:14:35 pm
Quote
To use the arduino as programmer under Linux I added a 10uF capacitor between reset and gnd pin to avoid resetting when the port is openned.

Immediately after uploading the ArduinoISP sketch?
7622  Using Arduino / Programming Questions / Re: Multiple source files and global variables on: January 21, 2012, 02:46:08 pm

Almost...

"int foo;" -> defines the variable and causes memory to be allocated, but the content is undefined initialized to zero
7623  Using Arduino / Programming Questions / Re: Use define, const, or enum? on: January 21, 2012, 02:23:31 pm
Quote
Somewhere I read that enum is an int, is that true?

Essentially, yes.


Quote
Is it possible to make the enum and uint8_t?

You have a two choices...

  • Modify the Arduino IDE so "-fshort-enums" is passed to the compiler.  If you choose this option please ask for the changes to be merged.
  • Using your example above, simply change the type of state (extern uint8_t state;).  The rest of your code will work unaltered.


Edit: Cosmetic changes.
7624  Using Arduino / Programming Questions / Re: Cannot use the ArduinoISP to program attiny85. on: January 21, 2012, 01:59:20 pm
after reading one thread I initialize the first global var to non-zero in case someone uses the sketch with 1.0.

You did what?
7625  Using Arduino / Programming Questions / Re: serial monitor input without hitting send ? on: January 21, 2012, 01:43:35 am

I suspect you will be better served with a different terminal application.  My personal favourite is Terminal by Br@y++.
7626  Using Arduino / Project Guidance / Re: Help with coding on game project on: January 21, 2012, 01:40:24 am

I have great news!  You get to learn about "finite state machines"!

You've described three states: showing the goal (button 1 clicked), collecting the user's guess (button 2 held), displaying the results (don't care about the buttons).  Your code essentially has two states: showing the goal and "other" (collecting the user's guess and displaying the results lumped together).  You need split "other" into two separate states.

Mull over the junk above.  If that isn't enough to help, report back.
7627  Using Arduino / Microcontrollers / Re: Can Michael Smith's PCM Audio be ported to AT Tiny 45/85? on: January 21, 2012, 12:14:10 am
Quote
but the Arduino environment doesn't seem to support them using Arduino as the programmer

Huh?
7628  Using Arduino / Programming Questions / Re: Cannot use the ArduinoISP to program attiny85. on: January 20, 2012, 09:08:31 pm

http://arduino.cc/forum/index.php/topic,87951.msg660665.html#msg660665
7629  Using Arduino / Microcontrollers / Re: upload bootloader including sketch, at the same time using arduinoisp on: January 20, 2012, 04:17:10 pm

http://arduino.cc/forum/index.php?topic=57143.0.html
http://arduino.cc/forum/index.php/topic,55245.0.html
7630  Using Arduino / Microcontrollers / Re: upload bootloader including sketch, at the same time using arduinoisp on: January 20, 2012, 03:06:04 pm

Yes.
7631  Using Arduino / Microcontrollers / Re: Arduino as ISP / ATtiny85 "protocol" Errors on: January 20, 2012, 03:05:28 pm
I believe so - this is an UNO so I'm using a capacitor between reset and ground.

Applied just after uploading the ArduinoISP sketch.

Quote
Thats what you meant right?

Yes.
7632  Using Arduino / Microcontrollers / Re: Arduino as ISP / ATtiny85 "protocol" Errors on: January 20, 2012, 03:04:39 pm

http://arduino.cc/forum/index.php/topic,82011.0.html

Or, you can try the latest version of ArduinoISP...
https://github.com/rsbohn/arduinoisp


Or, you can lower the baud rate to 9600...
http://code.google.com/p/arduino/issues/detail?id=661
https://github.com/arduino/Arduino/tree/master/build/shared/examples/ArduinoISP
https://github.com/arduino/Arduino/commit/80a2154279a02fd69f995ef6ff9eb889363c73ca
7633  Using Arduino / Microcontrollers / Re: Bootloaders and bare chips on: January 20, 2012, 01:20:49 pm
It seems that the Uno is not supposed to be able to be used to burn a bootloader to a new chip.

That's a lie.  It works fine.


Quote
but it might work if my existing boot loader version on the Uno is the latest version of Optiboot.

The latest version of optiboot helps (you do not need to disable auto-reset) but is not required.


Quote
So, my question - how can I tell what revision of optiboot I am running on my Uno?

I believe westfw includes a version in the image and a sketch that returns the value.  However...

Quote
I am relatively new to Arduino, buying my first board (Uno) just after Christmas and using Arduino 1.0 from day one.

...makes it very likely your board has the latest bootloader installed.  Assuming you purchased an authentic board.


Quote
Can anyone say definitively if I can use my Arduino Uno as an ISP to program a bare chip?

You can.
7634  Using Arduino / Microcontrollers / Re: Arduino as ISP / ATtiny85 "protocol" Errors on: January 20, 2012, 01:16:28 pm

Did you disable auto-reset on the Uno?
7635  Using Arduino / Programming Questions / Re: Custom cores question/problem on: January 20, 2012, 03:28:47 am

In my opinion you are always better off using C++ (instead of extern/C).  The syntax is "tighter".  Many (most? all?) of the implicit type conversion problems are eliminated.  Name mangling alone is worth using C++ compilation.

I have not used straight-C in ... well ... let's say a few years and I have not once missed it.
Pages: 1 ... 507 508 [509] 510 511 ... 912