#avr | Logs for 2013-08-11

Back
[08:12:24] <megal0maniac_afk> Tom_itx: Package is supposedly sitting in Miami. Is that where parcels go to die? Or just people?
[08:12:29] <megal0maniac_afk> :D
[08:12:51] <megal0maniac_afk> So... this is interesting http://www.matrixmultimedia.com/flowcode.php
[08:18:13] <Tom_itx> no, it just doesn't get updated once it leaves the country
[08:18:43] <Tom_itx> how long has it been?
[08:18:51] * Tom_itx fires up the other pc
[08:22:13] <Tom_itx> megal0maniac_afk, what name was it under (pm if you like), so i can look it up
[08:41:41] * megal0maniac_afk sigh
[14:26:37] <braincracker> h
[14:27:29] <soul-d> gg
[14:27:36] <soul-d> S
[14:27:37] <soul-d> high between conversions.
[14:27:41] <soul-d> err
[14:28:08] <soul-d> CS\SHDN pin must be pulled\high between conversions.* is wghat i missed in datasheet
[14:28:46] <soul-d> amongst gazillion other things that might explain spi not working ;)
[15:08:42] <BJfreeman> I find this helpful https://sites.google.com/site/qeewiki/books/avr-guide/spi
[15:09:19] <soul-d> what i thought was a clock was my button interferance magic on breadboard i can only trigger on data in but there is no clock
[15:09:49] <soul-d> i now can grap the full code execution from cs low > high
[15:09:55] <soul-d> also using the usart spi
[15:12:21] <BJfreeman> you also have to wait for the CS to settle at the slave
[15:16:00] <soul-d> did make and 1ms loop maybe should dheck the adc had ad specific need
[15:21:15] <BJfreeman> does your ADC SPI have an interupt
[15:44:20] <soul-d> no just a simple start bit with channel seletion and dummy bytes to recieve the conversion but it's clocked on a clock wich i don't measure yet
[15:54:21] <soul-d> http://i.imgur.com/vvc5c3l.png + code http://pastebin.com/
[15:56:24] <soul-d> probably clock thing somewhere maybe should retry manual code again
[15:56:40] <soul-d> or just breadboard magic
[16:05:58] <soul-d> oh
[16:06:09] <soul-d> din't bother to check if the lufa lib was working
[16:06:19] <soul-d> the serial_spi is flawed
[16:08:19] <BJfreeman> I use SPI no problem
[16:26:51] <soul-d> usart spi
[16:27:28] <soul-d> well then you probably are lucky to set the clock to 0 since your not alowed to initiliaze it before enblian usart spi
[16:27:34] <soul-d> etc etc
[16:27:46] <soul-d> also clock port din't get set as out put
[16:27:58] <soul-d> so highly doubt someone uses usart spi from lufa
[16:30:24] <abcminiuser> soul-d, my bad, will patch it tomorrow
[16:30:41] <BJfreeman> have you looked at the link I gave particularly the SPSR register
[16:30:41] * abcminiuser is off to bed
[16:35:20] <soul-d> first checked the code now i have a clock and some output and it doesnt read FF FF anymore so thats a start :)
[18:00:18] <soul-d> arg :)
[18:00:25] <Tom_itx> argv
[18:00:50] <soul-d> 2 hours figuring out how to flip a byte with python and wondering why temperuture is all over place din't need to flip it :(
[18:01:30] <soul-d> mmm or maybe luck to :P
[18:05:55] <soul-d> nope still i do like python :)
[19:00:03] <MarkX_> anyone here have any experience with atmega32u2?
[19:01:10] <Tom_itx> some
[19:01:26] <Tom_itx> ask your question
[19:02:16] <MarkX_> well i wanted to use a potentiometer (multiple actually) with the chip, but i think ... it doesn't have ADC
[19:02:19] <MarkX_> am i mistaken?
[19:02:27] <Tom_itx> no adc
[19:02:30] <Tom_itx> U4 has adc
[19:02:34] <MarkX_> !@#$
[19:03:25] <MarkX_> so is there any way to use a potentiometer with the u2?
[19:05:29] <Tom_itx> not pracically
[19:05:35] <MarkX_> basically i just want to read the pots position and send it over usb to pc
[19:05:41] <MarkX_> i have usb portion done
[19:05:53] <MarkX_> argh!
[19:05:59] <Tom_itx> better to get a U4 and use the code
[19:06:04] <hackvana> External ADC chip?
[19:06:15] <Tom_itx> there's that but still..
[19:06:26] <Tom_itx> i2c or spi
[19:07:01] <MarkX_> ???
[19:07:16] <Tom_itx> to interface to an adc chip
[19:07:55] <MarkX_> oh
[19:08:14] <MarkX_> would just be better to bite the bullet and go with the u4
[19:08:48] <soul-d> im using an exteral adc on usart spi of mega u2 now :P
[19:08:57] <soul-d> also figured out it din't have adc
[19:09:14] <MarkX_> soul-d: im crushed! i thought it was the same as atmega32 but with USB
[19:09:27] <Tom_itx> guess again
[19:09:34] <Tom_itx> data sheets are free
[19:09:57] <MarkX_> yep
[19:10:00] <MarkX_> on it now
[19:11:43] <MarkX_> i have this
[19:11:43] <MarkX_> https://code.google.com/p/micropendous/wiki/Micropendous_32U2
[19:11:48] <MarkX_> im hoping i can just throw in a u4
[19:11:55] <Tom_itx> nope
[19:11:56] <Tom_itx> more pins
[19:12:13] <Tom_itx> 32tqfp opposed to 44
[19:12:16] <MarkX_> :'(
[19:12:36] <MarkX_> looks like i'm stuck getting a teensy then
[19:12:57] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/atmega32u4/atmega32u4_1.jpg
[19:13:04] <Tom_itx> there's one of my U4's
[19:13:16] <MarkX_> nice!
[19:13:23] <Tom_itx> qfn
[19:13:46] <MarkX_> made it yourself?
[19:13:59] <Tom_itx> of course
[19:14:03] <MarkX_> hmmm
[19:14:20] <MarkX_> i could do it, but i don't think i want to go that indepth for a prototype project
[19:14:25] <soul-d> http://i.imgur.com/9xtpgOth.jpg
[19:14:33] <Tom_itx> i don't have any extras
[19:14:34] <MarkX_> i remember you telling me that teensy has a special bootloader or something?
[19:14:36] <soul-d> did whip that up with some coffee
[19:14:42] <Tom_itx> yes
[19:14:47] <soul-d> don't have patience to make nice board and send it out
[19:15:01] <MarkX_> heheh soul-d thats awesome
[19:15:33] <MarkX_> Tom_itx: so is there anyway that can be wiped and run as if it were a stock u4 on a breakout board?
[19:15:56] <Tom_itx> you'd have to put atmel's back on it
[19:16:02] <Tom_itx> you can get it from atmel
[19:16:41] <Tom_itx> ISP program it for the bootloader
[19:16:52] <Tom_itx> not with FLIP or DFU
[19:16:54] <MarkX_> can it be done over USB?
[19:16:55] <MarkX_> damn!
[19:17:12] <Tom_itx> not the bootloader
[19:17:32] <MarkX_> so if i make a custom board, i just get a u4 which will already have the stock atmel fw on it right?
[19:17:33] <MarkX_> s/fw/bootloader
[19:17:46] <soul-d> yes but not the fuses set
[19:19:27] <soul-d> so to set the fuses you need to do chiop erase
[19:19:27] <soul-d> cause by default it's locked
[19:19:27] <Tom_itx> you can set some on the fly
[19:19:27] <soul-d> and you cant set them
[19:19:27] <soul-d> well usaly people have an external crystal on it
[19:19:34] <MarkX_> oh lord
[19:19:40] <MarkX_> i've been trying my hardest to stay away from fuses
[19:19:55] <soul-d> there not to scary if you have a decent programer
[19:20:01] <soul-d> still happy with my dragon
[19:20:07] <MarkX_> i don't even have a programmer
[19:20:12] <MarkX_> i wanted to do it over USB
[19:20:25] <MarkX_> that's how i've been programming my micropendous
[19:20:48] <soul-d> well can;'t you program that to be programmer
[19:20:52] <soul-d> for you new chip
[19:21:04] <MarkX_> ah
[19:21:22] <MarkX_> hmm maybe i can find a teensy like board... that isn't teensy :P
[19:21:22] <soul-d> of is that bootloader stuff
[19:21:37] <soul-d> ssry probably is a bootloader
[19:21:46] <soul-d> cause it needs different usb drivers
[19:22:09] <soul-d> donno acutaly is cause user space also has it's usb nm
[19:22:13] <soul-d> gettting late
[19:22:40] <MarkX_> hehe i'm all confused now :P
[19:24:04] <soul-d> nah you should be able to program it as a programmer was confused a bit where they would want the programmer stuff to be but you could just google probably be done before
[19:24:17] <MarkX_> yep
[19:24:36] <MarkX_> i found a couple of breakout boards, about the same price as i paid for the micropendous from adafruit and sparkfun
[19:24:43] <MarkX_> just gotta make sure i can program over usb
[19:25:25] <Tom_itx> you don't have an isp programmer?
[19:25:35] <MarkX_> nope
[19:25:37] <Tom_itx> you're not gonna go far in avr without one
[19:25:50] <MarkX_> i have an arduino uno
[19:25:54] <soul-d> that be certainly one of my first strusted parts
[19:25:56] <MarkX_> iirc you can use that as one can't you?
[19:26:13] <soul-d> if you program it to be one
[19:26:25] <soul-d> or find someone who did it before you
[19:26:28] <Tom_itx> i think so but i've also heard ppl having trouble with it
[19:26:38] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[19:26:39] <Tom_itx> that's mine
[19:27:09] <Tom_itx> uses a U2 btw :)
[19:27:55] <MarkX_> wait
[19:28:05] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/new_batch/USB_chips.jpg
[19:28:10] <Tom_itx> i've got a couple of em
[19:28:21] <soul-d> im already happy with my dragon
[19:28:21] <MarkX_> so can i use my micropendous as an isp programmer?
[19:28:42] <MarkX_> because i don't really have a use for it once i get the u4 breakout
[19:28:48] <Tom_itx> i suppose his bootloader would work
[19:29:24] <Tom_itx> i don't have one of his
[19:29:28] <Tom_itx> and never will
[19:30:09] <MarkX_> ???
[19:30:14] <soul-d> donno only stole some code to make the origional lufa lib echo back
[19:30:31] <MarkX_> it doesn't use the teensy bootloader iirc
[19:32:31] <MarkX_> hmm i don't know anything about bootloaders but by the looks of it, it has dean's
[19:33:27] <Tom_itx> i'm not sure
[19:33:38] <MarkX_> https://code.google.com/p/micropendous/wiki/Micropendous_32U2
[19:35:00] <Tom_itx> yep, i got one just about like it: http://tom-itx.dyndns.org:81/~webpage/boards/USB_Breakout/USB_Breakout_index.php
[19:35:38] <MarkX_> thats very cool
[19:36:14] <MarkX_> but doesn't it get more expensive printing/making the pcb rather than just ordering one off ebay?
[19:36:44] <braincracker> get ready for the water glider ^^ http://www.youtube.com/watch?v=53SQXLKOZxc
[19:37:24] <Tom_itx> yeah it can get expensive: http://tom-itx.dyndns.org:81/~webpage/boards/new_batch/DSC_0001.JPG
[19:38:18] <MarkX_> neat!
[19:38:31] <MarkX_> and you populate them yourself?
[19:38:37] <Tom_itx> of course
[19:38:55] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/toaster_oven/toaster_oven_index.php
[19:39:37] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/reflow/cooking.JPG
[19:39:50] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/reflow/cooling.jpg
[19:40:25] <MarkX_> using solder paste?
[19:40:30] <Tom_itx> yep
[19:40:42] <MarkX_> cool
[19:40:42] <Tom_itx> i soldered the first ones by hand
[19:40:47] <MarkX_> i have a reflow oven at work
[19:40:57] <MarkX_> well its a convection oven iirc
[19:40:58] <Tom_itx> got tired of soldering
[19:41:08] <MarkX_> but i think it could be used for my own boards
[19:41:19] <MarkX_> bleh getting distracted
[19:41:22] <theBear> "if contents ignite please keep door closed" <grin>
[19:41:22] <MarkX_> gotta find an alternative
[19:41:44] <soul-d> like oven on work for industrial use or food ?
[19:41:55] <MarkX_> industrial
[19:42:09] <MarkX_> we use it after cleaning electronic parts
[19:42:22] <soul-d> :P k nerver know how badly people wanna bake lead in their food supply's
[19:42:45] <MarkX_> heheh
[19:43:22] <Tom_itx> it won't get used for that again
[19:46:04] <MarkX_> now i gotta see if the adafruit one uses the lufa bootloader
[19:46:14] <MarkX_> and if its compatible with FLIP
[19:47:15] <soul-d> mine does now i downloading it from somewhere cause i ofcourse earesed mine and coulnd find a hex for the 32u2
[19:48:04] <MarkX_> hehe
[19:48:12] <MarkX_> did you end up finding a hex?
[19:48:15] <MarkX_> or are you still looking?
[19:48:25] <MarkX_> cause if i can rip mine, i'll send it to you :)
[19:48:41] <soul-d> no found one already
[19:49:11] <MarkX_> nice
[19:50:00] <soul-d> http://u2.mattair.net/code.html
[19:50:06] <soul-d> was what i stumbled upon
[19:50:28] <soul-d> just used he top dfu probably not even latest revision
[19:51:05] <MarkX_> heh
[19:54:18] <MarkX_> awww shiiii
[19:54:19] <MarkX_> http://embeddedwirelesssolutions.com/ews_atmega32u4_breakout_board
[19:57:22] <Tom_itx> get the 16 mhz one
[19:57:26] <MarkX_> ofcourse :D
[19:58:02] <soul-d> probably will be running 5v then wich is geting ancient
[19:58:26] <MarkX_> ???
[19:58:29] <MarkX_> what do you mean
[19:58:41] <soul-d> new design should not run 5b
[19:58:43] <soul-d> 5v
[19:58:46] <soul-d> it's old
[19:58:52] <theBear> pfft, that's what the cool kids say
[19:59:02] <soul-d> everything is 3,3 or lower
[19:59:10] <MarkX_> even usb?
[19:59:19] <soul-d> usb itself is 3,3
[19:59:29] <theBear> still not a lot of things that don't do 5v ttl io
[19:59:59] <MarkX_> ah
[19:59:59] <MarkX_> Choose your regulated voltage using the on-board jumpers: 3.3V or 5V (5V is regulated, not just USB 5V)
[20:00:51] <soul-d> well 16mhz is out of spec for avr below 4,5
[20:00:52] <Tom_itx> they run 5v on the usb part but can run 3.3v io
[20:00:57] <Tom_itx> read the data sheet
[20:00:59] <Tom_itx> once again
[20:01:43] <soul-d> what you mean ?
[20:02:14] <Tom_itx> nevermind
[20:02:24] <soul-d> the usb part probably
[20:02:28] <soul-d> but not the i/io
[20:02:31] <Tom_itx> i thought he was talking about that board
[20:02:47] <MarkX_> that line is from the website for the board
[20:03:05] <Tom_itx> the U2 U4 can be wired for 5v io or 3.3v io
[20:03:27] <Tom_itx> not sure about their board
[20:03:29] <soul-d> well if you use 5v input for 16mhz can toy then run the io at 3,3 ?
[20:03:36] <MarkX_> ah
[20:03:44] <MarkX_> their board has jumpers
[20:04:04] <soul-d> then yes probably for a 3,3 regulator
[20:04:10] <soul-d> but then your running out of spec
[20:04:21] <soul-d> cause avr doesnt do 16 mhz @ 3,3
[20:04:27] <soul-d> max 8
[20:04:36] <soul-d> spec wise
[20:04:45] <Tom_itx> yeah, that's true
[20:04:46] <soul-d> i know they probably can handle some overcloking
[20:05:02] <MarkX_> i don't understand
[20:05:27] <Tom_itx> if you wanna run 3.3v io do it at 8mhz
[20:05:28] <MarkX_> oh
[20:05:31] <soul-d> just saying anything new fabricared usaly does not opperatoe on 5v
[20:05:36] <MarkX_> gotcha
[20:05:46] <MarkX_> just read this line
[20:05:46] <MarkX_> 16MHz (5V) - note: 16MHz at 3.3V is considered overclocked by factory specs, but many do so without issue. Choose wisely when ordering.
[20:06:19] <MarkX_> is that suppose to say "16MHz at 5V is considered overclocked"?
[20:06:30] <soul-d> no
[20:06:39] <soul-d> it says 16(5v) required
[20:06:53] <soul-d> if you run it @3,3 it's out of spec
[20:06:57] <MarkX_> aahhhh
[20:06:58] <MarkX_> ok
[20:07:11] <MarkX_> but why would reducing the voltage be considered overclocked?
[20:07:27] <soul-d> cause factory standarts say it doesnt do 16mhz
[20:07:31] <soul-d> only 8
[20:07:44] <soul-d> and crystals don't change speed with voltagef
[20:08:09] <MarkX_> right but i mean, what does voltage have to do with the MHz of the clock?
[20:08:46] <soul-d> just read the datasheet and a introduction in electronics
[20:09:18] <MarkX_> kk
[20:09:22] <MarkX_> i'll look it up :)
[20:11:02] <soul-d> and's silly actualy cause all the fast things are usaly lower voltage
[20:12:05] <MarkX_> looks like this board is perfect
[20:12:18] <MarkX_> hopefully it doesn't too long to get here
[20:12:20] <MarkX_> :D
[20:13:21] <soul-d> im off to sleep ltrs
[20:13:35] <MarkX_> take care
[20:13:38] <MarkX_> thanks for the help :)
[20:14:04] <MarkX_> Tom_itx: for your USBTiny Mkii, how/where did you get that plastic casing made?
[20:19:40] <Tom_itx> i made it
[20:20:13] <MarkX_> 3d printer?
[20:20:22] <Tom_itx> stock cases and milled them
[20:21:03] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/Boxes/milling2.jpg
[20:23:03] <MarkX_> oh cool
[20:24:47] <MarkX_> excellent
[20:24:51] <MarkX_> so i ordered the new board
[20:25:06] <MarkX_> hopefully porting the existing program over wont take much
[20:25:07] <Tom_itx> u4?
[20:25:10] <MarkX_> yep
[20:25:18] <Tom_itx> just change the header
[20:25:27] <Tom_itx> that will probably be enough
[20:25:41] <MarkX_> iirc some USB initialization related stuff is also required
[20:25:42] <Tom_itx> maybe a couple register changes, I can't remember
[20:25:46] <MarkX_> yea
[20:25:55] <MarkX_> nothing major, just a few lines probably