Show Posts
|
|
Pages: [1] 2
|
|
2
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino Bootloader ATmega* for single sided serial
|
on: August 14, 2009, 12:08:53 pm
|
i read over the 1k bootloader docs, it's cool but it won't work on the atmega8 without some modifications and work. i ended up doing a simple change to the built-in bootloader. here's what i did in case it helps anyone else: make backups of ATmegaBOOT.c and ATmegaBOOT.hex in apps/arduino-001x/hardware/bootloaders/atmega8/ change startup delay by a factor of 2 or 3: in ATmegaBOOT.c change line 52 to #define MAX_TIME_COUNT (F_CPU>>3)that gives about a 2.5 second delay after reset before program starts. use F_CPU>>2 for a 5 second delay, and F_CPU>>4 for a 1.25 second (approx) delay. open Makefile in the same folder and change the DIRAVR path (line 13) to your avr compiler path. if you have CrossPack installed use DIRAVR = /usr/local/CrossPack-AVRif you don't, you could try the one included with Arduino IDE DIRAVR = ../../tools/avrbut when i tried it i got some errors, maybe somebody else can figure that out, i'll paste it at the end of this. in Terminal, cd to that directory (hint - drag the enclosing folder to the Terminal window to avoid typing the path), and type make, e.g. eric:/Applications/arduino-0016/hardware/bootloaders/atmega8 makeconnect your ISP and Arduino or other board with Atmega8 and select Tools/Board/Arduino NG or older w/ Atmega8, then Tools/Burn Bootloader. Done! You can erase all the files generated by the compile except for the .c, .hex, and makefile, of course. the Makefile has a clean command but it doesn't seem to work for me. If you want to remind yourself the bootloader has been altered, you can change the name in arduino-001x/hardware/boards.txt, e.g. atmega8.name=Arduino NG or older w/ ATmega8 - short delayi'm not sure how to make duplicate entries as atmega8.name variable is overwritten. note that a delay of <=2.5 seconds can be very hard to work with if you have to press the reset button manually when programming. i recommend the NG auto-reset capacitor hack described here http://www.arduino.cc/en/Hacking/NGAutoReset, but note there is a mistake on that page and the cap should go on the TOP two pads, not the bottom. e --------------------- NOTE: maybe someone can clarify this so people don't need to have CrossPack installed - error when trying included compiler DIRAVR = ../../tools/avr: /Applications/arduino-0016/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld: address 0x2060 of ATmegaBOOT.elf section .text is not within region text make: *** [ATmegaBOOT.elf] Error 1
|
|
|
|
|
3
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino Bootloader ATmega* for single sided serial
|
on: August 14, 2009, 11:59:09 am
|
i read over the 1k bootloader docs, it's cool but it won't work on the atmega8 without some modifications and work. i ended up doing a simple change to the built-in bootloader. here's what i did in case it helps anyone else: make backups of ATmegaBOOT.c and ATmegaBOOT.hex in apps/arduino-001x/hardware/bootloaders/atmega8/ change startup delay by a factor of 2 or 3: in ATmegaBOOT.c change line 52 to #define MAX_TIME_COUNT (F_CPU>>3)that gives about a 2.5 second delay after reset before program starts. use F_CPU>>2 for a 5 second delay, and F_CPU>>4 for a 1.25 second (approx) delay. open Makefile in the same folder and change the DIRAVR path (line 13) to your avr compiler path. if you have CrossPack installed use DIRAVR = /usr/local/CrossPack-AVRif you don't, you could try the one included with Arduino IDE DIRAVR = ../../tools/avrbut when i tried it i got some errors, maybe somebody else can figure that out, i'll paste it at the end of this. in Terminal, cd to that directory (hint - drag the enclosing folder to the Terminal window to avoid typing the path), and type make, e.g. eric:/Applications/arduino-0016/hardware/bootloaders/atmega8 makeconnect your ISP and Arduino or other board with Atmega8 and select Tools/Board/Arduino NG or older w/ Atmega8, then Tools/Burn Bootloader. Done! You can erase all the files generated by the compile except for the .c, .hex, and makefile, of course. the Makefile has a clean command but it doesn't seem to work for me. If you want to remind yourself the bootloader has been altered, you can change the name in arduino-001x/hardware/boards.txt, e.g. atmega8.name=Arduino NG or older w/ ATmega8 - short delayi'm not sure how to make duplicate entries as atmega8.name variable is overwritten. note that a delay of <=2.5 seconds can be very hard to work with if you have to press the reset button manually when programming. i recommend the NG auto-reset capacitor hack described here http://www.arduino.cc/en/Hacking/NGAutoReset, but note there is a mistake on that page and the cap should go on the TOP two pads, not the bottom. e --------------------- NOTE: maybe someone can clarify this so people don't need to have CrossPack installed - error when trying included compiler DIRAVR = ../../tools/avr: /Applications/arduino-0016/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld: address 0x2060 of ATmegaBOOT.elf section .text is not within region text make: *** [ATmegaBOOT.elf] Error 1
|
|
|
|
|
4
|
Forum 2005-2010 (read only) / Troubleshooting / Re: Arduino Bootloader ATmega* for single sided serial
|
on: August 13, 2009, 01:06:34 am
|
|
thanks. how different is that from lady ada's bootloader? they all seemed to be working on things together, hard to straighten out differences.
but those files don't include an ATmega8 hex file, nor do they include code in the Makefile to compile one, nor do they include a corrected boards file for the atmega8. i was hoping not to have to figure all of that out myself, sigh...
|
|
|
|
|
8
|
Forum 2005-2010 (read only) / Troubleshooting / Arduino 007 serial monitor problem on PPC Mac
|
on: January 17, 2007, 12:01:23 am
|
Hello, first post here. Trying to use a known-good Arduino NG board with 007 on a PPC Mac (10.4.  . Searched forums and some have had similar error but none of the suggestions helped. Uploading sketches works fine. Opening serial monitor gives error: Error inside Serial.<init>() gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) etc...Serial ports shown in IDE are /dev/tty.usbserial-a4000q4n [this one selected] /dev/cu.usbserial-a4000q4n like i said, uploading works so obviously port access is ok. according to forums, this error happens when something else is using port but no other programs are running and i've shut down and restarted. this machine also has a clean install of tiger on it, btw. forum posts all suggest re-running macosx_setup.command file but 007 doesn't use that any more, having supposedly fixed the issue that required it right? i tried downloading 006 and it anyway, which is probably a bad idea, and i got this: niutil: can't get property users in directory /groups/uucp: No such property Finished making changes, you should be all setTIA for any help, - eric
|
|
|
|
|
11
|
Forum 2005-2010 (read only) / Bugs & Suggestions / Bug in MAX7219 LED driver example code
|
on: April 09, 2007, 01:54:23 pm
|
Hello, the code in the built-in example file (examples/leds/led_drivers/max7219_v1) and the playground file http://www.arduino.cc/playground/LEDMatrix/Max7219 have bugs in them. As it so happens, the code will still work with a 7219 but not with an identical, fully SPI-compatible chip like the 7221. In the max7219_put function, the load line should be set LOW to begin, not HIGH. this is not strictly necessary for the 7219, only the 7221. But it is technically wrong regardless. void max7219_put(byte reg, byte data) { max7219_setLoad(LOW); // begin ** in the example this is HIGH, which is wrong! ** max7219_putByte(reg); // specify register max7219_putByte(data); // put data max7219_setLoad(LOW); // latch in data max7219_setLoad(HIGH); // end }
|
|
|
|
|
13
|
Forum 2005-2010 (read only) / Development / Re: Library for Nuvoton ISD1700 chipcorder family
|
on: August 12, 2009, 05:40:09 pm
|
jesus jiminy! it turned out to be a bug in NG board with LED on pin 13 interfering with hardware SPI. i did the fix pictured here http://www.eng.uah.edu/~jdw/avr/arduino_r13_mod.jpg and it works! also did chip.wr_apc1(0x408); // B10000001000 and that seemed to work. however, i still have some questions. when i play a sound and then send stop() in the middle, the sound stops but i get CMD_ERR PU Not_RDY. why is that? fwd() only works if sound is stopped first, otherwise you get CMD_ERR PU Not_RDY. it works in pushbutton mode - is that an SPI thing, or is something wrong? in pushbutton mode, you need FT active (low) to record ANA-IN. the audio is clear and loud until you start recording, but then the audio monitor is turned off despite the change to apc. unless i am not understanding something correctly, i thought D4 monitor bit set to 1 enables audible preview *while* recording. the recorded audio is much lower volume than the feed-through monitor. it's also much noisier. the noise is a big issue, i've added decoupling caps everywhere but still trying to figure out how to follow recommendations for separating all the power and ground on a breadboard. the speaker noise when FT is left active (low) but nothing connected to ANA-IN is very, very noisy. i was hoping to install this somewhere and be able to record new sounds on site by plugging into a jack and hitting record button. but it looks like i will need to keep FT off, so will have to add another external switch? or is something wrong with my circuit if i hear this noise? thanks again to anyone still with me after all of those questions.
|
|
|
|
|
14
|
Forum 2005-2010 (read only) / Development / Re: Library for Nuvoton ISD1700 chipcorder family
|
on: August 12, 2009, 04:17:59 pm
|
great library, thank you for contributing this. however, having some problems - with your example code, i'm getting Not_RDY for every command. ID returns 0. my wiring is: /* SCLK_PIN 13 to ISD1700 pin 6 MISO_PIN 12 to ISD1700 pin 4 MOSI_PIN 11 to ISD1700 pin 5 */ ISD1700 chip(10); // to ISD1700 pin 7 - Initialize chipcorder with SS at Arduino's digital pin 10 i thought for a second i had switched MISO/MOSI, and when i do /* SCLK_PIN 13 to ISD1700 pin 6 MISO_PIN 12 to ISD1700 pin 5 [MOSI] MOSI_PIN 11 to ISD1700 pin 4 [MISO] */ ...i get CMD_ERR PU RDY for every command, and ID returns 11111111. confused about that. the ISD1700 plays/records in pushbutton mode, so i know it works. any ideas on what might be the problem? by the way, the only reason i'm using the SPI library is because Winbond/Nuvoton made the aggravating decision to route ANA-IN by default so you can't record from it. or, i can, but it sounds terrible. (i need to record from an 1/8" computer sound-out.) am i correct that i need to use an SPI command to change routing? from the datasheet it looks i need to change APC register to 0100 0000 1000, or 0x408 (record ANA-IN, with monitoring). so in this library - once i get it working - is the following correct? // change routing to record ANA-IN, with monitoring: chip.wr_apc1(0x408); // but don't change volume // or... chip.wr_apc2(0x408); // set volume to max (000) thanks in advance, e
|
|
|
|
|