#avr | Logs for 2012-02-18

Back
[02:39:00] <inflex> you know what I oculd do with... a wireless AVR programmer
[02:39:25] <inflex> that is, the USB link is wireless
[03:36:26] <Kevin`> anyone here work with an rfm22b by chance? i'm having really weird problems
[04:07:09] <Kevin`> http://pastebin.com/pFALR84s *sigh*
[04:09:22] <grummund> there's a gcc warning for redundant code
[04:10:25] <Kevin`> huh, I don't remember seeing it, and apparently -Wall is on
[04:12:52] <wollw> -Wall doesn't actually turn on all warnings
[04:12:55] <grummund> -Wunreachable-code
[04:20:23] <Kevin`> yeah, that did it
[04:20:52] <wollw> I'm not seeing -Wunreachable-code in the GCC manual's warnings section
[04:20:55] <wollw> hmm
[04:21:50] <grummund> which version?
[04:22:13] <wollw> whatever the current one is i guess: http://gcc.gnu.org/onlinedocs/gcc/
[04:22:59] <wollw> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html in particular
[04:25:56] <grummund> looks like it dissapeared between 4.4.6 --> 4.5.3
[04:26:31] <wollw> must be in there for compatibility still or something, 4.6.1 isn't complaining about it as an option
[21:13:54] <dirty_d> well thats that gerbers sent
[21:14:58] <Tom_itx> uh oh
[21:15:04] <iR0b0t1> Tom_itx: Sorry, it is an excerpt.
[21:15:10] <iR0b0t1> erm
[21:15:16] <iR0b0t1> Tom_L
[21:15:20] <iR0b0t1> Well, he's not here.
[21:15:24] <Tom_itx> yeah he's here
[21:15:51] <Tom_itx> you wanted to know why it's not firing though and didn't supply the full code
[21:16:01] <Tom_itx> the sei() would keep it from firing for sure
[21:22:20] <iR0b0t1> http://paste.pocoo.org/show/553287/
[21:22:33] <iR0b0t1> Tom_itx: Well, my other interrupts are firing.
[21:22:55] <iR0b0t1> I know because I can receive signals from an old-style radio controller - using timer 1
[21:23:40] * CapnKernel1 has now caught up, yay.
[21:24:18] <Tom_itx> iR0b0t1, is it spelled right?
[21:24:25] <Tom_itx> look at the device header file for sure
[21:24:31] <Tom_itx> i run into this all the time
[21:24:56] <iR0b0t1> No, no, it compiles is the thing.
[21:25:01] <iR0b0t1> It is simply not triggering.
[21:25:07] <dirty_d> iR0b0t1, what interrupt isnt working?
[21:25:13] <iR0b0t1> TIMER2_OVF_vect
[21:25:14] <Tom_itx> does the timer get started?
[21:26:17] <iR0b0t1> How would one do that? I am inside of the arduino environment, so I thought a lot of that stuff was automatic. I tried enabling it via the power-saving register, but saw no difference.
[21:26:36] <dirty_d> yikes
[21:26:43] * iR0b0t1 admits he is an idiot
[21:26:44] <Tom_itx> i don't know what arduino does with it
[21:26:52] <Tom_itx> i personally would ditch it
[21:26:53] <dirty_d> it almost seems like that aduino stuff makes things harder
[21:26:56] <Tom_itx> but that's just me
[21:27:04] <iR0b0t1> I'm trying to :(
[21:27:06] <dirty_d> the device is so simple as it is
[21:27:20] <dirty_d> it just seems like it makes sense to start from scratch
[21:27:24] <Tom_itx> what chip is it?
[21:27:28] <iR0b0t1> atmega328
[21:27:29] <Tom_itx> 328?
[21:28:55] <Tom_itx> well it's spelled right it appears
[21:29:14] <Tom_itx> look at the list file and see if it get's compiled in
[21:29:22] <Tom_itx> vector 9
[21:29:23] <dirty_d> i was going to use one of those or 324 for servo pulse measuring, but i switched to xmega because it has pulse width measuing built into the timer peripheral
[21:31:47] <iR0b0t1> hmm
[21:31:48] <Tom_itx> iR0b0t1, i bet you find the arduino stuff is messing with it
[21:31:58] <iR0b0t1> Yeah I started from scratch.
[21:32:14] <Tom_itx> there are plenty here to help get you thru it
[21:32:22] <keenerd> Ugh. I can not write an event loop for the wikireader with proper debouncing.
[21:33:14] <Tom_itx> iR0b0t1, there are some simple examples here that may help a bit: http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[21:34:41] <Tom_itx> umm, does _BV( read or set a bit?
[21:34:52] <iR0b0t1> It can be used for either.
[21:34:58] <iR0b0t1> It supplies 1 << arg
[21:35:00] <Tom_itx> i don't care for those macros
[21:35:06] <Tom_itx> i prefer that method
[21:57:30] <iR0b0t1> What is _SFR_BYTE?
[21:58:27] <Tom_itx> dunno that one
[22:03:30] <wollw> apparently used for accessing special function registers
[22:44:33] <iR0b0t1> okay can someone link me to a tutorial for compiling for the atmega328?
[22:44:38] <iR0b0t1> I had no luck on google.
[22:47:24] <wollw> iR0b0t1: What is your development setup?
[22:48:10] <Tom_itx> iR0b0t1, look at my tutorial
[22:48:28] <Tom_itx> pull one of the makefiles and edit the chip from a 168 to a 328
[22:48:37] <Tom_itx> it should work fine
[22:49:15] <Tom_itx> are you using windows?
[22:49:20] <iR0b0t1> No, linux.
[22:49:26] <iR0b0t1> But I didn't see makefiles, I'll look harder.
[22:49:42] <Tom_itx> at the bottom of each tutorial is a link to the files
[22:51:03] <iR0b0t1> If I am using the arduino bootloader, how would I add that in?
[22:51:33] <Tom_itx> i'm not really sure
[22:51:41] <Kevin`_> iR0b0t1: code can be uploaded using the arduino bootloader with avrdude like normal
[22:51:42] <Tom_itx> i'd ditch it if it were me
[22:51:46] <Tom_itx> and never look back
[22:51:59] <Kevin`_> iR0b0t1: if you want to have your makefile upload it automatically, it should be a pretty easy modification from whatever the default is for programming
[22:52:12] <iR0b0t1> oh right
[22:52:14] <iR0b0t1> wrong step
[22:52:31] * iR0b0t1 does not have a real programmer
[22:52:41] * Tom_itx has dozens of them
[22:54:49] <wollw> Any recommendations for a programmer that can do TPI mode? I'm just bitbanging with a FTDI chip right now.
[22:55:20] <Kevin`_> wollw: avr dragon or Tom_itx's programer or the official one it's based on
[22:55:51] <Kevin`_> bitbanging over usb must be painful
[22:56:00] <Kevin`_> do you not have any local serial or parallel ports?
[22:56:10] <wollw> It is
[22:56:11] <Kevin`_> those are a good thousand times or so faster
[22:56:22] <Tom_itx> wollw, i sell some
[22:56:46] <wollw> The only computer I have with a serial or parallel port right now is an old PC from ~2000
[22:56:54] <wollw> Tom_itx: I'm looking at it now.
[22:56:59] <Tom_itx> wollw, http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[22:57:50] <wollw> PDI too huh
[22:58:12] <Tom_itx> does all 3 protocols
[22:58:21] <Tom_itx> down to 1.75 or 1.8v
[22:58:31] <wollw> What do the AVR32s need?
[22:58:34] <Tom_itx> tested to 1.75 advertized to 1.8
[22:58:39] <Tom_itx> they use jtag
[22:58:54] <Tom_itx> far as i know they are jtag only
[22:59:01] <wollw> not surprising
[22:59:03] <Tom_itx> i may be wrong but i haven't used them
[22:59:21] <Tom_itx> this covers all the 8bit avrs
[22:59:26] <Tom_itx> attiny 10 etc for tpi
[22:59:30] <Tom_itx> xmegas for pdi
[22:59:33] <Tom_itx> the rest for isp
[23:00:25] <wollw> As for in circuit programming the data sheet makes it look like I just need to add some resistors between the pins and the rest of the circuit
[23:00:53] <Tom_itx> it's been done that way
[23:00:53] <Kevin`_> sometimes you don't even need that
[23:00:58] <Tom_itx> not the best but it works
[23:01:10] <wollw> what would be a better way?
[23:01:26] <Tom_itx> for parport? i'd use a 74hc244 buffer
[23:02:07] <Kevin`_> if you are, for example, using the isp pins for spi (as it's the hardware spi port), they have the same data direction and won't interfere. just have pullups on cs lines unless you don't mind sending data to everything
[23:03:16] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/misc_stuff/par_prog1.jpg
[23:03:24] <Tom_itx> that top one is a parport programmer
[23:03:42] <Tom_itx> with the buffer
[23:04:11] <Tom_itx> stk200 i think is what you use with avrdude
[23:04:22] <Tom_itx> i haven't used it in a loooong time
[23:04:49] <Kevin`_> avrdude can be configured to with with any pin configuration for bitbanging-style io
[23:07:35] <wollw> resistor will probably be good for this attiny10 project anyway since I'm just using it to control some LEDs
[23:07:51] <wollw> and i need the resistors anyway
[23:08:27] <Tom_itx> the tpi is different than isp though
[23:08:37] <Tom_itx> i haven't tried it
[23:08:59] <wollw> I was talking about the t10's datasheet before
[23:09:04] <wollw> that's where I saw that example
[23:09:09] <Tom_itx> hmm
[23:09:23] <Tom_itx> i think the protocol sends data both ways on the same pin
[23:09:48] <wollw> page 98
[23:10:09] <wollw> yeah, on TPIDATA, pin 1
[23:11:45] <Tom_itx> inflex has done quite a bit with the t10 i think
[23:12:00] * wollw is setting up a circuit to test right now.
[23:12:39] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/temp/tiny/tinyTPI1.jpg
[23:12:43] <Tom_itx> there's my test board
[23:12:50] <Tom_itx> i added a pullup on reset since
[23:21:19] <wollw> not to surprising but the small value resistors ~100ohm don't work
[23:21:23] <wollw> 10ks did though
[23:22:16] <Tom_itx> using them to isolate the programming from the circuit?
[23:22:22] <wollw> yeah
[23:22:47] <Tom_itx> what are you programming with now?
[23:22:51] <theBear> seriously, 100r didn't work ? oh, not the programmer from the everything, just from the circuit on the board eh ?
[23:22:57] <wollw> bitbanging over ftdi
[23:23:03] <Tom_itx> oh
[23:24:21] <wollw> I just put some resistors between the legs of an RGB LED and the t10's pins
[23:24:27] <wollw> and hooked up the ftdi chip
[23:24:55] <Tom_itx> what are you using the t10 for?
[23:25:25] <wollw> controlling the color of rgb leds
[23:25:39] <wollw> and fading
[23:26:04] <wollw> using one pin as an input to determine state
[23:26:10] <Kevin`_> anyone know why lufa's hid bootloader is rebooting to itself instead of to application code and how to fix it?
[23:26:37] <Tom_itx> haven't used it
[23:26:47] <Tom_itx> i'd ask dean tomorrow when he logs in
[23:27:23] <wollw> I'll be using the t4 probably since i'm not using the adc or even close to 1024 bytes
[23:27:37] <Tom_itx> are they that much cheaper?
[23:27:44] <Tom_itx> all i have is the t10
[23:28:01] <wollw> not sure off the top of my head
[23:28:32] <Tom_itx> sometimes it's hardly worth getting the lesser chip
[23:28:36] <wollw> but i'about 25 cents less
[23:28:45] <wollw> about 25 cents less that is
[23:28:47] <wollw> on mouser.com
[23:29:04] <wollw> $0.63 each for 25 t4
[23:29:13] <wollw> $1.02 for the t10
[23:29:31] <Tom_itx> yeah if you're getting alot of em that would be worth it
[23:30:00] <wollw> yeah, I'll need one for each led
[23:30:25] <Tom_itx> do you need adc?
[23:30:34] <wollw> not at the moment
[23:30:35] <Tom_itx> does the t5 or t4 have it
[23:30:37] <Tom_itx> ?
[23:30:40] <wollw> the t5 does
[23:30:41] <Tom_itx> one lacks adc
[23:30:44] <Tom_itx> k
[23:30:57] <wollw> the t4 and 5 have 512 bytes sram
[23:31:02] <wollw> the 9 and 10 have 1024
[23:31:02] <Tom_itx> yeah
[23:31:09] <wollw> evens have no adc, odds have it
[23:31:18] <Tom_itx> i knew that part, just forgot which one had adc
[23:31:21] <wollw> err
[23:31:28] <wollw> 4 and 9 have no adc
[23:31:29] <wollw> heh
[23:38:35] <wollw> Tom_itx: Can I combine order for a USBTiny Mkii and the ATTiny10 recovery board in one order somehow?
[23:38:40] <wollw> combine the order
[23:38:52] <Tom_itx> pm