Show Posts
|
|
Pages: 1 [2]
|
|
16
|
Forum 2005-2010 (read only) / Troubleshooting / Re: SPI troubles using the Arduino ATmega168
|
on: August 12, 2009, 04:38:08 pm
|
|
jesus, i never would have figured that out. thank you! i did the mod described in that thread and it worked!
btw, is there a single list somewhere of all the mods one should make to NG or other prior boards to approximate later improvements? e.g. the essentials might be adding pullup resistor from RX, changing 9V label to V-in, and the above resistor fix, and optionals might be adding a capacitor to avoid pressing reset when programming, improved bootloaders to avoid long waits for program to start, etc...
|
|
|
|
|
19
|
Forum 2005-2010 (read only) / Development / Re: Turn Arduino into an ISP programmer
|
on: August 12, 2009, 09:54:10 pm
|
|
i've been trying to figure out the -B option to fix speed of AVRISPmkII. i used this command line and the speed did indeed improve dramatically, it only takes 10 seconds now, here it is in case it helps anyone else [assuming USB and atmega8]:
avrdude -p m8 -c avrispmkII -B 1 -Pusb
seems you have to specify -p (part) even though you're not doing anything with the part, not sure what you do if you have nothing to connect the programmer to.
i just chose 1 for -B value, not really sure what the proper value is, based on this:
-B bitclock
Specify the bit clock period for the JTAG interface or the ISP clock (JTAG ICE only). The value is a floating-point number in microseconds. The default value of the JTAG ICE results in about 1 microsecond bit clock period, suitable for target MCUs running at 4 MHz clock and above. Unlike certain parameters in the STK500, the JTAG ICE resets all its parameters to default values when the programming software signs off from the ICE, so for MCUs running at lower clock speeds, this parameter must be specified on the command-line.
|
|
|
|
|
20
|
Forum 2005-2010 (read only) / Development / Re: Turn Arduino into an ISP programmer
|
on: August 10, 2009, 03:00:18 pm
|
|
so, how long should a USB AVRISPmkII take to burn a bootloader, e.g. ATmegaBOOT_168_ng.hex or ADABOOT_168.hex, with the Arduino 16 IDE Burn Bootloader? (the former is 5700 bytes, the latter is 4800.)
it's taking about 10 minutes on my G4 Mac 10.4. if this is not normal, what is the best way (on a Mac) to increase the ISP comm speed?
|
|
|
|
|
21
|
Forum 2005-2010 (read only) / Development / Re: atmega8 bootloader..
|
on: August 12, 2009, 09:15:28 pm
|
|
can you summarize the best way to upload bootloader on an NG with atmega8 to avod start-up delay? i also looked into adaboot and others but got lost in all the bootloader code. i have an AVRISPmkII and Arduino0016 IDE so it would be easiest to just use Burn Bootloader command, but will use command line avrdude if necessary....
|
|
|
|
|
22
|
Forum 2005-2010 (read only) / Development / easiest way - NG atmega8 with no startup delay
|
on: August 12, 2009, 09:26:47 pm
|
what is the easiest/best way to upgrade bootloader on an NG with atmega8 to avod start-up delay? i did it with atmega168 versions very easily flashing Diecimila bootloader straight from IDE, but that doesn't work with atmega8. i looked into adaboot and others but got lost in all the code revisions trying to figure out what i would need to change to make them work with atmega8's. if using adaboot, would prefer to modify improved version here http://www.1strecon.org/TheShoppe/freeduino/ADABOOT.shtmlrather than original version here http://www.ladyada.net/library/arduino/bootloader.htmlbut not sure if it will be more work adapting the former. the latter seems to say it's compatible with atmega8, but not sure what exactly i need to change to make it work. i have an AVRISPmkII and Arduino0016 IDE so it would be easiest to just use Burn Bootloader command, but will use command line avrdude if necessary....
|
|
|
|
|
23
|
Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Mac OS X uploading troubles (a vague bug repor
|
on: March 15, 2007, 06:09:43 pm
|
|
i'm having the same problem. also ran macosx_setup.command, did not work. program can upload but serial monitor and serial comm don't work obviously. could not find any var or var/lock directories at all. there are many instances of RXTXcomm.jar:
Apps/Processing 0115/libraries/serial/code/ Apps/Processing 0115/libraries/serial/library/ HD/Library/Java/Extensions/
they all seem to be from rxtx-2.1-7pre17
|
|
|
|
|
26
|
Forum 2005-2010 (read only) / Interfacing / Re: conundrum (yet another LED matrix question)
|
on: April 08, 2007, 05:32:04 pm
|
I re-wired the whole thing, no dice. I tried the code you sent me, and - it worked! After some line by line comparison, I found the bug in the built-in example file (examples/leds/led_drivers/max7219_v1) and the playground file. Well, it's not quite a bug, because it only applies to 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. ["For the MAX7219, serial data ... is shifted ... with each rising edge of CLK regardless of the state of LOAD. For the MAX7221, CS [LOAD] must be low to clock data in or out."] This irritates me because i read that the 7221 is identical to the 7219 except that they are high-impedance. but they are also fully SPI compatible. I failed to fully comprehend what that meant when i first read that. 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 } So I humbly suggest the example file should be changed since this way it will work with both the 7219 and the 7221.
|
|
|
|
|
27
|
Forum 2005-2010 (read only) / Interfacing / Re: conundrum (yet another LED matrix question)
|
on: April 07, 2007, 06:52:01 pm
|
okay i'm going to continue having this conversation with myself  ... i tried external power supply (12V 1000mA, with a 7805 voltage regulator) and suddenly all the LEDs went back on! so i thought hm must be a power issue after all, except that it has been running fine off USB power with all LEDs on - and when LEDs were all off, you would expect to see the Arduino reset if too much current was needed, but this was not happening. I measured the current coming from external power to the chip+matrix (with all LEDs on) and it was about 145mA. so not that big a deal. but i did notice voltage regulator was very hot. not sure why it was hot with only 145mA, maybe this points to some problem? i checked for shorts but all seemed fine, arduino program ran for 5 minutes with no visible problem. however - after i switched back to USB power, and nothing lit up, and then switched again back to external power - still nothing! once again the display is blank and no amount of fiddling or resets can make it go on again. the regulator is not hot, only about 15mA being used now, but it is warm, i can't tell if it's more than it should be for sure but from past experience it seems a bit warmer than it should be, however input voltage is actually 13.5V so it could be that. any way, sorry for the boring details, i'm just trying to get to the bottom of this and it's frustrating... 
|
|
|
|
|
28
|
Forum 2005-2010 (read only) / Interfacing / Re: conundrum (yet another LED matrix question)
|
on: April 07, 2007, 06:11:40 pm
|
|
i thought perhaps the load and clock pins were getting toggled too quickly, so i put in a 1ms delay and 1 row randomly lit up. this indicates nothing since the code is supposedly displaying a diagonal line, i.e. only 1 LED per row. i changed delay again and re-programmed and now entire display is blank. i removed delay and display is still blank. i manually applied power to display and LEDs all still work. I replaced 7221 with yet another one, just in case, and display is still blank.
so now i'm thinking all LEDs being on was some weird initial state. and then i tried reversing wires (i.e. DIG/SEG) again, in case i was confused about cathode/anode, but still nothing.
i triple-checked all pinouts and wiring. now i'm really stumped. the fact that at some point all LEDs were on no matter what, and now all are off, suggests the problem is not in the wiring from the chip to the matrix but either in the chip itself or the communication between the arduino and the chip. but code probably not wrong since that should produce consistently wrong results, and of course other people use it and it works for them. what could the problem be?
|
|
|
|
|
29
|
Forum 2005-2010 (read only) / Interfacing / conundrum (yet another LED matrix question)
|
on: April 07, 2007, 05:26:05 pm
|
I've been struggling with driving a simple 8x8 LED matrix. I'm using the recommended MAX7221 (essentially identical to 7219) and the code on the Arduino playground (adapted from the built in 7219_v1 example) found here: http://www.arduino.cc/playground/LEDMatrix/Max7219I'm using a Lite-On matrix (LTP-14188A), it happens to be bi-color but i'm only using one color. http://www.liteon.com.tw/opto/spec/databook.nsf/1646fbcd87a370e948256a9a001f2f9b/8ae9d00ce9cd3401482570ce00253c05?OpenDocument. It is cathode-common on the rows and anode-common on the columns. I have the DIG pins on the 7221 hooked up to columns and SEG pins hooked up to rows. No matter what commands I send, all LEDs are on. (I also tried it the other way but all LEDS were off no matter what.) As you can see in the code, I am not setting Display Test register by mistake. I also am setting Decode Mode register to non-segment, i.e. matrix, display. I have not thoroughly verified the code since many others have reported using it and it works, although it seems to be correct (although the bitshifting in the putByte command could be more elegant). i also tried the original max7219_v1 code in the example led_drivers folder with no success. Load line is pulled to ground with a 10k resistor. I-Set is pulled high with a 22k resistor, which appears to work fine as all LEDs are bright and can run off USB power as well as external power. The 7221 is decoupled from V+ to GND with 220uF and 0.1uF caps. All the LEDs light up when power is applied. they do NOT go off when chip is re-programmed or reset. sending shutdown command manually has no effect. i have even tried a brand new 7221 chip. same thing. if i attach an LED to the data line, clock line, and load line i can see voltage pulses, so they appear to be working. the load line appears to be high more of the time than the others (i.e. no visible flicker on debug LED), whichis what you would expect given that it is low only for a microsecond after both reg and data bytes are sent. (this is my cheap way of debugging without a scope :-) ). i can manually light an LED by placing its anode + leg to a segment pin on the 7221 and its cathode - leg to a digit pin. this makes sense since the datasheet says the SEG sources current, right? so, in summary - i'm stumped!
|
|
|
|
|
30
|
Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: LED matrix
|
on: March 29, 2007, 09:37:49 pm
|
I also have a bi-color 8x8 matrix that I am trying to get working with just one color for now. Lite-On LTP14188A-01. http://www.liteon.com.tw/opto/spec/databook.nsf/1646fbcd87a370e948256a9a001f2f9b/8ae9d00ce9cd3401482570ce00253c05?OpenDocumentit is "cathode column / anode row" (although the "A" in part number suggests it is common anode?). when i wire it as per tutorials with a MAX7219 every single LED is on no matter what. (i thought i had polarities reversed but if i switch, every single LED is *off*.) i see conflicting info in these posts about if LED anodes (pos) should be connected to SEG or DIG pins on 7219, and likewise about row/col. i'm confused by the requirement for "common cathode" with the 7219, since in this matrix the anodes are common on the rows, and the cathodes are common on the columns. so which is it? besides that general theory question, is it not possible to use this matrix with the 7219? can i do some circuit trick to make it common cathode? i happen to have a lot of them very inexpensively :-p...
|
|
|
|
|