#avr | Logs for 2013-03-28

Back
[00:30:29] <inflex> lo folks
[00:30:31] <inflex> hi Tom_itx
[00:30:40] <inflex> hrmm... T10 with C, interesting.
[04:03:22] <sabesto> anyone got any experience with the xmega (128a1) adc at 250ksps and beyond?
[04:03:56] <sabesto> wondering what accuracy to expect
[05:43:08] <jc5134> sabesto, pretty bad I bet
[08:24:26] <OndraSter> steffa
[08:24:43] <OndraSter> everybody is gone
[08:26:14] <OndraSter> if the slovak guy comes again -- tell him "mausel.eu"
[08:26:19] <OndraSter> I was asleep by that time
[08:57:44] <buhman> I'm betting this is a stupid question, but where do I find definitions for various microcontrollers if I'm wanting to write assembly?
[09:02:00] <buhman> or, erm how do I actually write any sort of assembly?
[09:02:20] <buhman> the interwebs seem to show everything except for the microcontroller/toolkit specific stuff
[09:05:20] <buhman> avr-libc comes with an "asmdemo" that uses "-x assembler-with-cpp" dark magic; is that the proper way to do things, or is that just showing off?
[09:11:26] <theBear> erm, by definitions you mean the asm dictionary/spec for that processor ? most of them it's in the datasheet, modern ones at least
[09:11:46] <theBear> pretty sure all avrs list it
[09:25:09] <buhman> so I need to write the definition myself?
[09:38:48] <OndraSter> buhman, no
[09:38:56] <OndraSter> .include "m32def.inc" for atmega32
[09:38:59] <OndraSter> and so on for similar device
[09:38:59] <OndraSter> s
[09:40:30] <buhman> where do those come from?
[09:41:33] <buhman> I don't seem to have any files named like that anywhere on my filesystem
[13:54:33] <Tom_itx> abcminiuser_, studio 6 supports the tiny10 with c now?
[13:57:15] <DagoRed> Tom_itx: Figures he quits right after you ask.
[14:02:32] <Tom_L> http://www.electronicproducts.com/Digital_ICs/Standard_and_Programmable_Logic/Digital_circuit_design_now_available_for_the_masses.aspx
[14:21:42] <OndraSter> I always wondered
[14:21:53] <OndraSter> do you have to use the configuration flash from the original (Altera, Xilinx, ..) manufacturer?
[14:22:07] <OndraSter> or can you use any other with enough flash and same protocol?
[14:22:12] <OndraSter> because - why not
[14:22:20] <OndraSter> the Xilinx/Altera branded ones are usually expensive
[14:23:00] <Tom_itx> i dunno
[14:33:12] * RikusW just soldered a 10 pin 8 resistor (about 1206) smd resistor :)
[14:33:17] <RikusW> was easier than expected
[14:33:46] <RikusW> I actually couldn't get it to bridge.. :)
[14:34:36] <RikusW> YC158 iirc
[14:49:15] <Tom_itx> yep, i used some of those initially on my programmer
[14:49:39] <Tom_itx> maybe not that small a package though
[14:52:37] <RikusW> 3.2x1.6mm YC158
[14:53:56] <RikusW> I actually tried to bridge it and couldn't :-P
[14:54:05] <RikusW> thats a relief :)
[14:54:15] <Tom_itx> mine was bigger
[14:54:22] <RikusW> maybe something to do with my footprint too
[14:54:25] <Tom_itx> i found it took more space than individual resistors
[14:54:48] <RikusW> the GTL2000 was very easy to solder using my EW-103 tip :)
[14:54:53] <Tom_itx> yeah
[14:54:56] <RikusW> placing it was a bit harder...
[14:54:57] <Tom_itx> those are easy
[14:55:11] <Tom_itx> that's why i got my scope back when i was hand soldering them
[14:55:19] <RikusW> mine got 44 pins
[14:55:22] <Tom_itx> tweezers and the scope
[14:55:23] <RikusW> bigger than 2003
[14:55:37] <Tom_itx> yeah, pin count doesn't matter to me
[14:55:45] <Tom_itx> they're easy
[14:55:45] <RikusW> its to long for my tweezers...
[14:55:51] <Tom_itx> sideways
[14:56:27] <Tom_itx> i like the angled tweezers for that
[14:56:47] <RikusW> http://imgur.com/iuoyV4x
[14:57:04] <RikusW> those was made for me by hackvana (aka CapnKernel)
[14:57:34] <Tom_itx> yeah
[14:57:36] <RikusW> with 0.8mm routing
[14:57:38] <Tom_itx> what are they?
[14:57:56] <RikusW> extender boards for my U2S
[14:58:00] <RikusW> to add HVPP
[14:58:00] <Tom_itx> ahh
[14:58:10] <RikusW> and GTL level translator
[14:58:14] <Tom_itx> you wanted them left panelized?
[14:58:23] <RikusW> and TPI PDI ISP JTAG pinouts
[14:58:37] <RikusW> didn't have a choice
[14:58:41] <Tom_itx> really?
[14:58:41] <RikusW> 10x10cm is cheap
[14:58:51] <RikusW> so I made them that way
[14:58:58] <RikusW> it cost $36 for 10
[14:59:00] <Tom_itx> last one i got was all routed
[14:59:07] <RikusW> (11 actually arrived here :))
[14:59:24] <Tom_itx> yeah i usually get a few extra no matter who i get em from
[14:59:35] <RikusW> so I paid for one and got 6 per board
[15:00:01] <RikusW> seems around $18 for 5x5cm
[15:00:11] <RikusW> and smaller is the same price
[15:00:46] <RikusW> I got my GSM and GPRS boards too
[15:00:58] <RikusW> will assemble those tommorow
[15:02:52] <RikusW> Had I done it as 20x3 seperate boards it would have cost more like $18 x 6......
[15:07:48] <Tom_itx> did you ever make an oven?
[15:10:09] <RikusW> no
[15:10:35] <RikusW> for now handsoldering works ok for me
[15:10:45] <RikusW> until I get to qfn that is
[15:17:04] <RikusW> anyone in here ever soldered BGA ?
[15:18:03] <Tom_itx> not me
[15:28:50] <Tom_itx> i forgot how to initialize a var in asm :(
[15:28:55] <Tom_itx> seldom write any
[15:29:06] <OndraSter> a variable in asm?
[15:29:12] <OndraSter> .data
[15:29:15] <Tom_itx> i need to increment a counter
[15:29:29] <OndraSter> .somename: .DW 0x10 ; 32 bytes wide somename
[15:29:36] <OndraSter> err, withotu the .
[15:29:42] <OndraSter> increment a counter?
[15:29:53] <Tom_itx> well add to the var
[15:29:55] <OndraSter> like, LDS R16, TCNT0
[15:29:58] <OndraSter> INC R16
[15:29:59] <Tom_itx> x++
[15:30:04] <OndraSter> STS TCNT0, R16
[15:30:06] <Tom_itx> gotta run..
[15:30:06] <OndraSter> ?
[15:30:09] <OndraSter> ;)
[15:30:24] <Tom_itx> a loop counter
[15:34:36] <RikusW> OndraSter: got my boards :)
[15:34:43] <RikusW> and assembled the U2S ones
[15:35:13] <RikusW> OndraSter: got my boards :) and assembled the U2S ones so far ISP + GTL level translation works
[15:35:23] <OndraSter_> nice :)
[15:35:55] <RikusW> and the GTL .635 pitch was easy to solder too :)
[15:36:07] <RikusW> as was the 1206 YC158 resistor nets
[15:36:53] <RikusW> I tried bridging them and couldn't :-P
[15:39:20] <RikusW> and my HVPP board works as expected :) I etched one myself previously
[15:39:50] <RikusW> but hackvana's one is much prettier ;)
[17:02:25] <andresjk> hi there
[17:03:30] <andresjk> Im working in a project very similar to this one: http://www.youtube.com/watch?v=vL_xcswZx0c
[17:04:50] <andresjk> the programming team have to select the right mcu, due to the amount of ram we are going to be using I dont know if a ATmega644 will handle it
[17:05:09] <andresjk> I was thinking of using a 32 bit avr
[17:05:14] <andresjk> any suggestions?
[17:37:57] <Horologium> andresjk, what is the project?
[17:38:07] <Horologium> and I don't feel like watching some youtube video to find out, sorry.
[17:38:48] <Horologium> the atmega1284p is an 8bit avr with 128K of flash and 16K of sram.
[17:38:56] <Horologium> beyond that the next step up is the xmega series.
[17:39:05] <Horologium> 32bit avr is a whole other world entirely really.
[17:50:53] <powderhound> Do ISR definitions need to happen in the same .c file as the main function?
[17:51:16] <Horologium> no.
[17:51:31] <powderhound> Interesting. Thank you!
[17:55:16] <Horologium> heck, you can put every definition and every function in different files if you want.
[17:55:39] <Horologium> it's even possible, though not recommended, to break a function up across two files but that can cause all kinds of headaches.
[17:56:17] <andresjk> Horologium, I thought migrating from 8 bit to xmega was easier. The instruction set is not very similar?
[17:56:25] <OndraSter_> it is identical
[17:56:29] <OndraSter_> but avr32 is different
[17:56:39] <OndraSter_> xmega = mega on steroids
[17:57:09] <andresjk> is it really that hard to develop for xmega?
[17:57:19] <Horologium> no.
[17:57:28] <Horologium> xmega is just a built up mega.
[17:57:37] <andresjk> another alternative was to have a eeprom/flash externally and also additional ram external to
[17:57:47] <andresjk> i think some avr chip support external ram
[17:57:49] <Horologium> that's doable too.
[17:57:58] <Horologium> yes, up to 64K of external ram on some.
[17:58:06] <Horologium> or you can use serial sram chips.
[17:58:12] <OndraSter_> xmega upto 16MB SRAM/SDRAM :P
[17:58:13] <Horologium> which is what I do quite often.
[17:58:18] <OndraSter_> but gcc does not support natively bank switching :(
[17:58:27] <powderhound> Horologium that does make sense, and is what I expected but just needed to confirm
[17:58:41] <andresjk> and the mapping is straightforward cuz doing a protocol will take for ever in my application
[17:58:45] <Horologium> powderhound, breaking into files is usually done for readability and support.
[17:58:48] <andresjk> that alot actually
[17:59:08] <powderhound> andresjk: I started developing with XMega in about a week
[17:59:21] <powderhound> Without much knowledge of uC's before it
[17:59:28] <OndraSter_> xmega is simple as mega
[17:59:29] <andresjk> really?
[17:59:43] <OndraSter_> the basic registers are +- identical for mega (not all of them, but most of them), the extra stuff is in other registers
[17:59:44] <OndraSter_> yes
[17:59:45] <Horologium> except for soldering.
[17:59:47] <OndraSter_> haha
[17:59:47] <powderhound> The clock system just takes a little getting used to. There is more required to start up, but its really not that much
[17:59:49] <OndraSter_> no DIP indeed
[18:00:00] <Horologium> xmega does not come in a nice dip package..
[18:00:14] <OndraSter_> or does it! (hint: http://myxboard.net )
[18:00:21] <Steffanx> Ask abcminiuser for the xmega in dip package he as :P
[18:00:22] <andresjk> yeah no DIP make it harder for prototyping
[18:00:25] <Horologium> that is an xmega on a carrier board.
[18:00:50] <Horologium> which, while an acceptable alternative, is a bit more expensive.
[18:00:58] <OndraSter_> I can supply dev boards with either xmega256a3u in a DIP pinout (with USB connector builtin + caps + two LEDs + regulator)
[18:01:05] <OndraSter_> or xmega128a4u with SMPS in arduino form
[18:01:31] <RikusW> coco and ?
[18:01:34] <OndraSter_> mini duino :)
[18:01:42] <OndraSter_> OT: Any skilled C(++) programmer can explain me HOW IS THIS POSSIBLE?! http://clip2net.com/s/4PcGIn
[18:01:48] <OndraSter_> how can x be 3?
[18:01:50] <OndraSter_> if it has to be <Width
[18:02:07] <andresjk> nice boards
[18:02:39] <Steffanx> Is it really THERE or is it where te debugger says it is OndraSter_ :P
[18:02:50] <OndraSter_> the debugger says that it is there
[18:02:51] <OndraSter_> and I believe it :P
[18:03:20] <OndraSter_> andresjk, http://clip2net.com/s/4PcKzw
[18:03:23] <OndraSter_> this is the arduino one
[18:04:00] <OndraSter_> Steffanx, who was the guy from the night who asked about mausel?
[18:04:09] <OndraSter_> I have lost it in the backlog
[18:04:12] <Steffanx> mausel?
[18:04:19] <OndraSter_> well
[18:04:21] <OndraSter_> some czech or slovak guy
[18:04:43] <RikusW> OndraSter_: that x=3 doesn't seem quite right...
[18:04:50] <Steffanx> dunno .. his ip said he was from czech so i pointed you to him to help him
[18:04:50] <OndraSter_> RikusW, I know
[18:05:00] <OndraSter_> Steffanx, well I was asleep... :D
[18:05:03] <RikusW> the question is why....
[18:05:11] <andresjk> OndraSter_, do you make those?
[18:05:15] <RikusW> compiler bug ?
[18:05:15] <OndraSter_> and andresjk reminded me of him, maybe because his name is very similar to mine
[18:05:17] <OndraSter_> yes andresjk
[18:05:18] <RikusW> debugger bug ?
[18:05:22] <OndraSter_> RikusW, doubt either of those
[18:05:48] <Steffanx> pebkac RikusW
[18:05:50] <OndraSter_> :D
[18:06:15] <OndraSter_> and yes, the x is raised by the for() loop
[18:06:28] <RikusW> OndraSter_: have you ordered any boards from hackvana ?
[18:06:38] <OndraSter_> I have got still my old stock from... october?
[18:06:42] <OndraSter_> I had school to work on
[18:06:47] <OndraSter_> I have not written a single line of XIDE :(
[18:07:19] <andresjk> OndraSter_, can you do custom boards?
[18:07:30] <OndraSter_> define custom?
[18:08:02] <RikusW> his boards are already custom built ;)
[18:08:43] <OndraSter_> hmm appearantly without { } you can do only 2 deep... lol
[18:08:43] <OndraSter_> happens
[18:09:21] <Horologium> seems somewhat limited.
[18:09:31] <Horologium> I've nested farther than that in C without brackets.
[18:09:32] <andresjk> yeah, I actually in the the SMT to be DIP for a protoboard
[18:09:33] <OndraSter_> hmm it crashes anyway
[18:09:53] <andresjk> I will contact you :)
[18:09:55] <Horologium> ok..off to supper wif da wifey.
[18:09:59] <OndraSter_> ok andresjk :)
[18:09:59] <andresjk> nice work though
[18:10:03] <OndraSter_> thanks
[18:14:52] <OndraSter_> oh, IDIOT ME
[18:14:57] <OndraSter_> I forgot how to multiply matrices
[18:15:03] <OndraSter_> I was multiplying it the other way
[18:15:05] <OndraSter_> :P
[18:15:08] <OndraSter_> no wonder it was failing
[18:15:47] <RikusW> a*b != b*a when it comes to matrices ;)
[18:15:58] <OndraSter_> I know
[18:16:01] <OndraSter_> that is why it was crashing :P
[18:16:31] <RikusW> I did some 3D stuff long ago
[18:16:40] <OndraSter_> I actually wrote a test from matrices on wednesday...
[18:16:47] <RikusW> just toying with DirectX 7 and 8
[18:16:52] <OndraSter_> AX-X=B (where A and B are given and you are supposed to count the X matrix)
[18:16:52] <OndraSter_> well
[18:16:58] <OndraSter_> I did.. (A-E)*X=B
[18:17:07] <OndraSter_> and then I did... X = B*(A-E)^-1
[18:17:08] <OndraSter_> :(
[18:17:15] <OndraSter_> epic fail
[19:13:14] <Tom_itx> what's a good small attiny that has int0?
[19:13:19] <Tom_itx> just need minimal pins etc
[19:13:27] <Tom_itx> besides the attiny10 etc
[19:13:36] <Tom_itx> preferrably in dip
[19:16:23] <Horologium> depends,
[19:16:26] <Horologium> attiny13
[19:16:32] <Horologium> attiny45 if you need more memorys
[19:17:18] <Tom_itx> naw it's a very simple app
[19:17:26] <Horologium> attiny13 works well.
[19:17:34] <Horologium> I think there is a 6pin tiny too.
[19:17:38] <Horologium> but that's not in dip I don't think.
[19:19:13] <Tom_itx> the 6 pin are 4 5 9 and 10
[19:19:25] <Tom_itx> but sot23-6
[19:19:44] <Horologium> attiny13 is the next step up and is available in dip.
[19:19:46] <Horologium> 8pins.
[19:19:51] <Horologium> attiny13 or attiny13a
[19:19:55] <Tom_itx> yep, that should do fine
[19:20:04] <Tom_itx> the a is low power?
[19:20:18] <Tom_itx> internal osc?
[19:20:21] <Tom_itx> i'm sure..
[19:20:28] <Horologium> attiny13a is picopower.
[19:20:37] <Horologium> and, yes, internal oscillator.
[19:20:45] <Tom_itx> 1 or 8mhz?
[19:20:47] <Horologium> and you can change reset to an i/o pin.
[19:20:53] <Horologium> should go up to 8mhz.
[19:20:55] <Tom_itx> no need for this
[19:21:06] <Tom_itx> ok that should do
[19:22:54] <Horologium> The calibrated internal oscillator provides a 4.8 or 9.6 MHz clock source. The frequency is nominal at 3V and 25°C
[19:23:44] <Horologium> datasheet page 25
[19:28:00] <Tom_itx> what's the default startup clock rate?
[19:41:52] <OndraSter_> 9.6 and the divider possibly
[19:42:27] <Tom_itx> k, it may not matter for this app
[19:48:37] <Tom_itx> that would be #define M_CPU 9600000 right?
[19:48:38] <Tom_itx> <Tom_itx> err F_CPU
[19:49:49] <OndraSter_> should be, yes
[19:50:24] <Tom_itx> not sure what the default prescalar is
[19:50:27] <Tom_itx> probably 1
[19:54:15] <Tom_itx> crap
[19:54:20] <Tom_itx> it's got a ckdiv8 fuse too
[19:54:45] <Tom_itx> so default startup is 1.2 mhz
[19:56:17] <Tom_itx> makes sense because they always go for the lowest common freq
[20:02:08] <Horologium> yup.
[20:02:16] <Horologium> gives you much lower power consumption too.
[20:47:42] <Eartaker> anyone else have the usbtiny programmer from adafruit?
[20:48:16] <Tom_itx> no but i have a very similar one
[20:48:32] <Tom_itx> like her ver2 one
[20:48:42] <Tom_itx> with the buffer
[20:50:28] <Eartaker> hmm well did you install the resistors for SpokePOV? I have no idea what it is or if I need it
[20:51:12] <Tom_itx> not sure what that is really
[20:51:22] <Eartaker> =/
[20:51:30] <Eartaker> http://www.ladyada.net/make/usbtinyisp/solder.html
[20:51:31] <Tom_itx> hang on
[20:51:44] <Eartaker> If you are using the UsbtinyISP with a SpokePOV kit, install R4 and R7 (1.5K) as well. If not you may want to switch these resistors for jumpers (see the second photo for a 'finished' shot) as it will mean that target boards with loaded pins can be programmed.
[20:54:38] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/prog/mini_usb_prog_cable.jpg
[20:54:43] <Tom_itx> that's what i have
[20:55:36] <Tom_itx> she could have modded it so you can program the avr with the buffer in place
[20:55:43] <Tom_itx> i'm not sure
[20:55:50] <Tom_itx> i had to preprogram mine before soldering
[20:58:34] <Tom_itx> i'd say put the resistors in and try it
[20:59:48] <Tom_itx> Eartaker, i think those are there as jumpers if you use the SPI for your application and still need in circuit programming
[21:00:25] <Eartaker> hmmm
[21:00:28] <Tom_itx> so the programmer will overcome any load you have on the spi pins
[21:00:36] <Eartaker> ahh
[21:01:03] <Eartaker> http://tom-itx.dyndns.org:81/~webpage/boards/prog/mini_usb_prog_cable buhman
[21:01:05] <Tom_itx> i'd say put em in and try it
[21:01:37] <Eartaker> ill give it a go... we will see
[21:01:37] <Tom_itx> i need to reset my router... hang on
[21:01:41] <Eartaker> brb
[21:10:04] <Tom_itx> Eartaker, i looked at the schematic and i use the 1.5k resistors
[21:10:22] <Tom_itx> never had any problems with mine when i used those
[22:59:38] <Eartaker> should the red light some on when the USB is plugged in?
[22:59:43] <Eartaker> come
[23:00:24] <Eartaker> nevermind
[23:02:41] <Eartaker> where can I find how to wire this thing to the AVR?