#avr | Logs for 2012-03-26

Back
[03:03:42] <amee2k> anyone here requested ST samples as a student before?
[03:06:45] <amee2k> did it work, and what did you fill out for the company details?
[03:06:55] * amee2k scratches his head
[03:07:05] <ziph> Why would you do that as opposed to buying one?
[03:08:46] <amee2k> because i'm not very hot into paying 20+ eurobucks for a 3$ chip
[03:09:31] <amee2k> i want a PWM controller IC as replacement for fixing a power supply
[03:09:56] <amee2k> some obscure SO20 chip that is a bit hard to find
[03:10:22] <amee2k> so since i only need one i was wondering if i could use a sample to replace it
[03:10:28] <nevdull> amee2k: i haven't as a student, but i've requested samples from stmicro almost every 3-4 months without a problem (so far).
[03:11:05] <ziph> amee2k: Your University isn't able to order them?
[03:11:13] <amee2k> nope
[03:11:17] <amee2k> nevdull: i see. do you know if they have anyhing in writing as to who is eligible for the sample program?
[03:11:51] <amee2k> i'm studying cs and can show paperwork for it though, thats arguably close enough to explain why i'm interrested in samples
[03:12:35] <nevdull> last i checked, they seemed pretty lenient on who could request samples. i don't remember seeing any prohibition of students/faculty, etc.
[03:12:45] <amee2k> okay
[03:13:02] <nevdull> and funny you mention, i got a UC2573D sampled from ti.com (its a buck pulse PWM reg)
[03:13:35] <nevdull> and last two things i got from stmicro were power-related: a MAX6168 and a TC1044SC dc/dc charge pump
[03:14:23] <amee2k> interresting. i'll just fill it out as "software engineer" position and the uni name as company and see if it works
[03:14:39] <nevdull> you wouldn't need it (paperwork) i doubt. i do remember at one company they require you to use a "professional" address and won't let you sign up with a google email. i used my @research.cs.colorado.edu email and not a hitch.
[03:15:42] <amee2k> i've got my own domain, and a university email address that i can use
[03:15:58] <nevdull> that'd probably be perfect
[03:16:01] <amee2k> also, farnell at least wanted to see proof of immatrculation when i signed up
[03:16:11] <nevdull> outrageous
[03:16:38] <nevdull> i haven't had any issue with ti.com, st.com, maxim-ic.com or microchip.com ever.
[03:16:42] <amee2k> pretty odd, but i just showed them and no issues ever since
[03:16:46] <ziph> Farnell does samples?
[03:16:54] <amee2k> ziph: no, but they sell
[03:17:12] <ziph> Do you get some kind of discount?
[03:17:38] <nevdull> yah avnet.com and mouser.com have some sample programs but i think you have to be a high-roller or push a lot of volume thru there to get on their sample list.
[03:17:52] <amee2k> no, but some free news flyer every few months :P
[03:18:10] <amee2k> i'm not ordering nearly enough to get a discount, except for maybe the occasional quantity discount
[03:18:49] <ziph> And yet they wanted documentation to sell you stuff? You Europeans aren't all that fond of money. :)
[03:19:01] <nevdull> arrownac.com occassionally offers free shipping. that's a helluva incentive since a few 100 SMD capacitors weigh an inperceptible amount but you'll still pay like $8 to ship.
[03:19:25] <ziph> Farnell here is free shipping on all orders.
[03:19:35] <nevdull> oh that's a nice deal.
[03:19:38] <nevdull> how are their prices?
[03:19:46] <ziph> Farnellish. :)
[03:19:50] <nevdull> haha
[03:19:51] <ziph> Although not so bad lately.
[03:20:01] <ziph> I think they're trying to match Digikey now.
[03:20:54] <nevdull> i always got tired of them showing me i had 800 items in my search but finding out only 1 page of items were actually in stock at digikey.
[03:21:38] <ziph> There's an "In Stock" button for that.
[03:22:45] <nevdull> yah mouser is sortable by "in stock" too but i usually sort by price or package form
[03:23:25] <ziph> It's a filter, not a sort.
[03:23:39] <nevdull> ah, i see
[03:24:05] <nevdull> it seems like that should sorta be a constant filter
[03:24:53] <ziph> Not if you're buying reels.
[03:25:20] <nevdull> i suppose some people would have a use for checking lead time for out of stock items that aren't supplied by other vendors.
[04:18:13] <amee2k> < ziph> [...] You Europeans aren't all that fond of money. << thats what i think frequently as well >_<
[04:18:33] <amee2k> farnell here is 6EUR shipping, digi is 18EUR (massive facepalm)
[04:30:12] <inflex> free shipping here in AU from Farnell/E14
[04:30:17] <inflex> overnight too, via courier
[05:12:22] <CapnKernel> inflex: e14 sent out an email two weeks ago saying their old deal has finished.
[05:30:28] <inflex> CapnKernel: really... hrmm... didn't get that one
[05:31:18] <CapnKernel> I'll be back in a few minutes, and will show it
[05:31:35] <CapnKernel> inflex: You could go to their website and try to order something :-)
[05:45:23] <inflex> CapnKernel: well, I picked a good time to close my business then
[05:46:15] <inflex> okay, it looks like if it's just under $45
[05:46:18] <inflex> which I think is fair
[05:46:28] <inflex> most of my orders were always $50~$150
[06:07:09] <CapnKernel> Given Australian cost of doing business, I did always wonder how they were making money with a $10 min order and free overnight shipping
[06:07:33] <CapnKernel> It made me think long and hard about how I can do it.
[06:21:55] <inflex> hey CapnKernel, sorry, was fixing a pc
[06:22:03] <inflex> but yeah, $10 was unsustainable imo
[06:22:17] <inflex> probably they hedged on letting it run for 12 months to pull in a lot more new clients
[06:23:28] <CapnKernel> If they'd still had their offer, I would have bought some i2c EEPROMs today :-)
[06:34:51] <phatina> does anyone know about affordable atmel zigbit board?
[08:54:16] <rue_house> zigbit?
[08:54:21] <rue_house> do you mean zigbee?
[09:16:37] <molavy> hi
[09:17:10] <molavy> can i run 2 *16 lcd character via attiny13
[09:17:13] <molavy> ?
[09:17:55] <OndraSter> without external circuitry?
[09:17:55] <molavy> i want create clock with custom date and time
[09:18:02] <OndraSter> parallel interface?
[09:18:15] <molavy> what?
[09:18:45] <rue_house> molavy,
[09:18:48] <OndraSter> with one 595 shift register it will work
[09:19:00] <rue_house> most lcd displays need 6 io lines
[09:19:03] <molavy> i am newbie and what create gift for my wife
[09:19:28] <rue_house> so unless you have a serial display OR use an external chip to do serial to parallel converstion, no.
[09:19:38] <OndraSter> actually, it _has_ 6 pins
[09:19:56] <OndraSter> but one is reset..
[09:20:07] <OndraSter> and once you change it to regular IO, you can not do regular flash anymore
[09:20:12] <rue_house> yes, but he' prolly gonna wanna have some buttons too
[09:20:19] <OndraSter> hmm
[09:20:22] <OndraSter> 595 it is then!
[09:20:39] <rue_house> and two displays woul need 7 io lines, you can only share 5 of them
[09:20:51] <OndraSter> rue_house, it is one display with two lines :)
[09:20:51] <rue_house> yes, 74als595
[09:20:58] <OndraSter> why als?
[09:21:04] <OndraSter> hc/hct :)
[09:21:10] <rue_house> it came out of rnd()
[09:21:13] <OndraSter> ah
[09:21:24] <OndraSter> because LS is old bipolar stuff :)
[09:21:33] <rue_house> BUT THAT ADVANCED!
[09:21:39] <rue_house> :)
[09:22:25] <rue_house> molavy,
[09:22:41] <molavy> yes
[09:22:49] <OndraSter> you can drive 595 with just one IC pin :)
[09:22:52] <OndraSter> to get 7 bits
[09:23:02] <rue_house> tiny13 -> 74hc595 -> lcd display
[09:23:18] <rue_house> 3 pins
[09:23:24] <rue_house> clock, data, strobe
[09:23:38] <OndraSter> you can get away with one :)
[09:23:41] <OndraSter> if you are fine with 7 bits only
[09:23:46] <rue_house> tho there are some fancy tricks to get around some
[09:23:57] <OndraSter> exactly those
[09:24:02] <rue_house> OndraSter, for a schematic?
[09:24:09] <rue_house> for/got/
[09:24:12] <OndraSter> I remember seeing it somewhere
[09:24:25] <OndraSter> where you always had small R-C to latch/strobe pins
[09:24:27] * rue_house waits
[09:24:31] <rue_house> ah yes
[09:24:43] <rue_house> still need a clock tho
[09:24:55] <OndraSter> that is the strobe signal
[09:25:01] <rue_house> molavy, are you getting anything out of this?
[09:25:11] <OndraSter> small 1ns pulse = loading 1, long 10ns pulse = loading 0
[09:25:12] <OndraSter> or so :)
[09:25:22] <rue_house> its asynchronous, you need clock for the data
[09:25:33] <rue_house> ok and latch?
[09:25:42] <OndraSter> even looonger pulse
[09:25:46] <rue_house> hmm
[09:25:46] <OndraSter> like 100ns
[09:26:39] <molavy> i think that is like light up rgb led,but seems it is so complex
[09:27:18] <rue_house> molavy, easier if you can find a schematic and example code
[09:27:27] <rue_house> molavy, tiny13?
[09:27:33] <molavy> yes
[09:27:41] <rue_house> if you use a ... tiny25(?) you can code it in C
[09:28:00] <rue_house> pretty sure you would have to code a tiny13 in asm
[09:28:21] <molavy> i created this : http://blog.kevinmehall.net/2007/rgb-led-rainbow-fader
[09:29:03] <rue_house> ok
[09:31:55] <molavy> but i want create something like spend together clock
[09:33:01] <rue_house> do you have the display already?
[09:33:08] <molavy> yes
[09:33:18] <rue_house> does it have 10 pins on it?
[09:33:47] <molavy> 16 pins
[09:34:10] <rue_house> ok
[09:34:18] <rue_house> I suggest you get a 74hc595
[09:34:22] <OndraSter> sounds about right... you can get away with using only 4 data bits instead all 8, then you can also get away with tying CS to low
[09:34:48] <OndraSter> that leaves few pins to drive with the 595
[09:34:53] <rue_house> how come I only remember 2 rows of 5 pins? huh...
[09:35:37] <rue_house> no drive r/w low, operate cs for byte clocking
[09:36:14] <rue_house> http://www.electronics-lab.com/projects/mcu/015/index.html
[09:41:29] <rue_house> I'm sure ther eis an avr example too, but any sute will give you all the details
[09:50:44] <molavy> rue_house,thanks
[09:51:19] <asteve> sute?
[09:51:29] <asteve> site?
[10:16:26] <OndraSter> hmm either I am stupid, or I did the math wrong
[10:16:42] <OndraSter> I am loading 24 bytes from external memory, doing a lot of stuff with it
[10:16:49] <OndraSter> but it doesn't take definitely 65000 cycles...
[10:16:58] <OndraSter> 62500 cycles
[10:17:05] <OndraSter> let me find the code
[10:19:30] <OndraSter> http://pastebin.com/kdY1t4BZ
[10:19:33] <OndraSter> this
[10:19:53] <OndraSter> this code runs when timer0 OVF happens
[10:20:13] <OndraSter> there is another few lines of code that run when OCR happens and they pretty much just disable the display, nothing fancy, like 20 instructions tops
[10:20:28] <OndraSter> and when I change the value of OCR0 register anywhere below 20h, the brightness doesn't change anymore
[10:20:48] <OndraSter> ergo the code that does the OVF must run so long that the counter counts to 20h
[10:20:51] <OndraSter> which, when using
[10:21:09] <OndraSter> which, when using 32 prescaler from 16MHz, is 62500 cycles
[10:21:12] <OndraSter> .. or not?
[10:21:20] <OndraSter> did I forgot something to count in?
[10:24:28] <OndraSter> guys?
[10:25:17] <OndraSter> HE COULDN'T TAKE ME ANYMORE :(
[10:29:14] <OndraSter> abcminiuser, heya
[10:29:53] <abcminiuser> Greetings
[10:30:25] <OndraSter> abcminiuser, if I have timer set up with prescaler 32 and CPU is clocked at 16MHz, the TCNT value is increased every (16000000/32/256) cycle, right?
[10:33:33] <OndraSter> why nobody wants to confirm my math :(
[10:34:07] <Landon> wait, why do you have /256?
[10:34:21] <OndraSter> because it has to count to 256
[10:34:27] <OndraSter> 8bit timer
[10:34:28] <Landon> timer0 OVF occurs every 16000000/32/256, not a TCNT increase
[10:34:35] <OndraSter> duh
[10:34:36] <OndraSter> really?
[10:35:04] <OndraSter> so each increase happens how often?
[10:35:10] * Landon just saw your last line to abcminiuser
[10:35:13] <OndraSter> 16000000/32/256/256?
[10:35:33] * abcminiuser back, sorry was sending an email
[10:35:34] <OndraSter> I think that ovf happens every 16000000/32
[10:35:41] <OndraSter> and counter increase /256
[10:35:47] * abcminiuser likes to have 2 mins at home to read email before doing more Atmel tech support :P
[10:35:52] <OndraSter> sure :)
[10:36:24] <abcminiuser> OndraSter, no
[10:36:32] <abcminiuser> Each tick is F_CPU/PRESCALE long
[10:36:39] <Landon> pbbbttttbtb, you got me ondraster, I was thinking of the other way around with multiplication instead of division
[10:36:42] <abcminiuser> With an overflow occuring at F_CPU/PRESCALE/TOP ticks
[10:37:01] <abcminiuser> So with your given parameters and an 8-bit timer
[10:37:01] <OndraSter> how can overflow happen faster than just each tick?
[10:37:10] <abcminiuser> OndraSter, Hz, not ms
[10:37:28] <OndraSter> oh!
[10:37:32] <OndraSter> that is the culprit :)
[10:37:35] <abcminiuser> 16000000Hz/32 = 500000Hz
[10:37:48] <abcminiuser> So each tick is 1/500000s long
[10:37:56] <abcminiuser> Overflow occurs after 256 ticks
[10:38:12] <abcminiuser> Or at a frequency of 500000/256 Hz = 1953.125 Hz
[10:38:19] <OndraSter> 2us = tick, 512us = ovf
[10:38:25] <abcminiuser> Yup
[10:38:27] <OndraSter> okay, thanks
[10:38:29] <amee2k> anyone here requested ST samples as a student before?
[10:38:59] <amee2k> i'm filling out their registration form and wondering how i have to fill out the "company info" part in that case
[10:39:06] <OndraSter> ergo my routine to serve data takes about 64us
[10:39:08] <OndraSter> not bad
[10:39:15] <OndraSter> it runs... 1953 times per second
[10:39:38] <OndraSter> that is something around 12.5% CPU load
[10:53:44] <OndraSter> poor word, working with 6000x7000 images scaled down and cut...
[10:53:55] <OndraSter> and not just one
[10:54:09] <OndraSter> even on SandyBridge it has problems drawing the images
[11:11:44] <specing> OndraSter: use LaTeX
[11:11:52] <OndraSter> no.
[11:12:11] <OndraSter> I'd rather harakiri myself
[11:22:04] <amee2k> use a real image editing tool?
[11:22:34] <amee2k> i once almost strangled someone because he emailed me a screenshot as 20MB word document
[11:54:56] <OndraSter> amee2k, screenshots from eagle
[11:54:59] <OndraSter> directly pasted
[11:55:00] <OndraSter> :P
[11:55:05] <OndraSter> printing to PDF anyway
[11:55:10] <amee2k> lol
[13:36:10] <OndraSter> I was wondering why my PCMCIA -> CF card adapter doesn't do DMA
[13:36:19] <OndraSter> (barely 900kB/s speeds, CPU going crazy)
[13:36:23] <OndraSter> well, I took it apart
[13:36:26] <OndraSter> what do you think I found?
[13:36:40] <asteve> i2c
[13:36:44] <asteve> *badump tsch*
[13:36:49] <OndraSter> nothing!
[13:37:03] <asteve> ?
[13:37:07] <Tom_itx> @seen OndraSter
[13:37:08] <z-log> Tom_itx: OndraSter was last seen in #avr 17s ago: <OndraSter> nothing!
[13:37:23] <Tom_itx> ok just trying out the bot a bit
[13:37:42] <Tom_itx> the seen file is empty so that will take a while
[13:38:23] <Tom_itx> @convert 79 F C
[13:38:24] <z-log> Tom_itx: 26.1111111111
[13:38:50] <Tom_itx> @calc Sqrt(128)
[13:38:50] <z-log> Tom_itx: 11.313708499
[13:38:55] <Tom_itx> mkay
[13:38:58] <OndraSter> https://skydrive.live.com/redir.aspx?cid=40bf7833586103ab&resid=40BF7833586103AB!468&parid=40BF7833586103AB!111&authkey=!AOH8MSsoTRvQ2Jw
[13:39:10] <OndraSter> https://skydrive.live.com/redir.aspx?cid=40bf7833586103ab&resid=40BF7833586103AB!469&parid=40BF7833586103AB!111&authkey=!AGioZmdzQua22Vc
[13:39:12] <OndraSter> -.-
[13:39:15] <OndraSter> that's all, folks
[13:39:50] <Tom_itx> what is it
[13:40:05] <Tom_itx> hdd adapter?
[13:40:09] <Tom_itx> cf adapter?
[13:40:11] <OndraSter> PCMCIA -> CF card
[13:40:16] <Tom_itx> mmm
[13:40:37] <Tom_itx> i have one that goes the other way i think
[13:40:43] <Tom_itx> cf > pcmcia
[13:40:53] <OndraSter> PCMCIA-ATA interface is built into the CF cards
[13:42:02] <asteve> pin map?
[13:42:08] <asteve> i'm sure the card cost $20+ too
[13:42:19] <OndraSter> I got 'em from ebay for few bucks
[13:42:20] <OndraSter> 4GB one
[13:42:34] <asteve> i mean the pcmcia -> cf adapter
[13:42:43] <OndraSter> oh
[13:42:44] <OndraSter> no
[13:42:45] <OndraSter> $2.6
[13:48:07] <OndraSter> how hard do you think it would be to find out why BIOS in one IBM NetStation doesn't like cards beyond 2GB?
[13:48:21] <OndraSter> err, ibm netvista
[14:20:30] <carp3> is it possible to use DDR2 rams(for PC ) with lower frequency ? i mean very low. for example 1MHz. ( not in PC of course! )
[14:21:28] <crazy_pete> wow i dunno if knocking them back by a factor of 1000 will make it so they don't refresh
[14:22:19] <crazy_pete> but if you have a problem i would guess it will be with the data getting lost because of the freq being too low to refresh the caps in the memory
[14:23:03] <carp3> i want to read data from memory with AVR
[14:27:52] <crazy_pete> i would look up the minimum refresh rates for the mem chips carp3
[14:29:10] <crazy_pete> http://adrinael.net/wrong12 <---- i wonder if that guy is crippled, he is trying to lift himself and taking the full weight of the saddle and horn on his spine
[14:29:26] <crazy_pete> oops sorry wrong window
[14:30:14] <Steffanx> Suuure?
[14:30:43] <crazy_pete> Steffanx, ???
[14:30:54] <Steffanx> "wrong window"
[14:30:59] <crazy_pete> yes i am sure i meant to post that in a different room (where the photo owner resides)
[14:31:31] <Steffanx> I wondered if you're really sorry :P
[14:31:39] <Steffanx> I think you did it on purpose
[14:31:46] <crazy_pete> i was sorry at the time for a brief moment
[14:32:12] <crazy_pete> but then your response reminded me of how judgemental other people are, so i absolved myself of all responsibility ;-)
[14:32:54] <crazy_pete> In fact i think i will become a woman at heart and refuse all responsiblity and just blame men for everything from now on :-)
[14:33:09] <Steffanx> People say sorry way too fast, most of the time they don't even mean it :)
[14:36:14] <specing> Wtf who let crazy_pete in here?
[14:38:41] <crazy_pete> I do Steffanx but not in the polite sense. :-)
[14:38:46] <OndraSter> carp3, like it was said, DRAMs require refreshing every XYZ miliseconds. If you can accomplish that, you can read it with any (working) speed
[14:39:22] <crazy_pete> Seriously i was embarrassed, then i remembered this is a loosely moderated channel and posting that pic was not a big deal
[14:39:39] <crazy_pete> Do you know how many women it takes to change a light bulb?
[14:40:01] <carp3> so it's ok to feed them with let's say 400MHz Clock and read data with very low speed ? 500byte/second with AVR for example ?
[14:40:06] <OndraSter> one to call his husband, crazy_pete ?
[14:40:17] <OndraSter> carp3, you need more than just clock
[14:40:21] <crazy_pete> "None, if you really loved me you would have just `known' that the light was going to go out before it happened and if you really cared about me you would have already changed it, WAAAAHHHH!" ;-)
[14:40:21] <OndraSter> they are not self-refreshing.. I think
[14:40:37] <OndraSter> one to call her husband****
[14:41:03] <crazy_pete> yes and tbh for all i know you can refresh them at 1MHz
[14:41:21] <crazy_pete> i honestly don't know, i just know that is probably your limiting factor and you need to get that from the RAM data sheet
[14:41:36] <OndraSter> you need each row refresh about 10 times per second, they used to be like 100ms "deadlines" usually... IIRC
[14:41:41] <OndraSter> not sure about DRAMs on DDR2 in computers
[14:41:47] <OndraSter> ye
[14:42:06] <crazy_pete> OndraSter, obviously knows more about it than i do, carp3
[14:42:17] <crazy_pete> honestly i am just stabbing at it :-)
[14:42:17] <OndraSter> not really, I just read once datasheet
[14:42:19] <OndraSter> months ago
[14:42:37] <crazy_pete> well i have never read a RAM datasheet so i stick by my statement ;-)
[14:42:55] <crazy_pete> I am more ignorant than you and i will fight to the death to prove it!
[14:43:02] <crazy_pete> "Uh don't bother, you already did!" ;-)
[14:43:41] <OndraSter> duh, how come that 1GB DRAM chip costs over 8.5€ while 8GB DDR3 costs barely 33 (or 66?) EUR
[14:44:04] <OndraSter> crazy_pete, I didn't read RAM's datasheet, I read the DRAM's that was on the RAM itself :)
[14:44:27] <OndraSter> there is also small i2c EEPROM on the memory chip storing information
[14:44:28] <OndraSter> SPD that is
[14:44:36] <crazy_pete> Isn't 9# a lot less than 33 E?
[14:44:45] <OndraSter> would have to check
[14:45:03] <carp3> OndraSter: like what ? sending a comment ?
[14:45:17] <OndraSter> what comment?
[14:45:17] <carp3> d*
[14:45:20] <OndraSter> what command?
[14:45:21] <carp3> command *
[14:45:29] <OndraSter> you _must_ actually read every single row
[14:45:33] <OndraSter> giving it clock is not enough
[14:45:45] <OndraSter> you _could_ probably get away with using self-refresh if they were in their sleep mode
[14:46:03] <OndraSter> again, I don't remember anymore, if the refreshing in sleep does the DRAM itself or external circuitry
[14:46:18] <OndraSter> 41€ is the cheapest 8GB DDR3 I can find, crazy_pete
[14:46:23] <OndraSter> in one shop here
[14:46:39] <crazy_pete> they are expensive
[14:46:45] <OndraSter> not as DDR1 :P
[14:46:59] <carp3> datasheet says it's Auto refresh and Self refresh
[14:47:13] <OndraSter> carp3, send me the datasheet so I can take a look
[14:47:30] <carp3> http://www.issi.com/pdf/43R83200B-16160B.pdf
[14:47:56] <crazy_pete> wow the euro has fallen against the dollar, but 33 E = 26#
[14:48:01] <carp3> it's DDR not DDR2
[14:48:12] <crazy_pete> you lied to me carp3
[14:48:30] <crazy_pete> everyone lies to me, nobody loves me, all i get is deceit and deception , i am gonna kill myself "BLAM"
[14:48:38] <carp3> lol. i changed my mind. DDR speed is enough for me
[14:49:36] <crazy_pete> Ever hear that ICP "One Day at the Suicide Hotline" "Can you name just ONE person that cares if i blow my brains out, just ONE?" "Yeah, sure, the poor guy that has to clean that mess up, fer crying out loud, go outside!" :-)
[14:49:41] <OndraSter> Average Periodir Refresh Interval -- 7.8us
[14:50:37] <OndraSter> I am not sure if you can read or write data during self-refresh or auto-refresh cycles
[14:50:40] <OndraSter> let me read it again
[14:51:16] <OndraSter> you'd need to read the data and then quickly turn auto-refresh again
[14:51:36] <OndraSter> I am not the best guy to talk about this really :)
[18:08:49] <Roklobsta> ondraster: PCMCIA is basically ISA bus. So the CF card, which I recall supports a mode which ISA bus can drive just fine. ISA/Memory bus != IDE bus. No DMA for you!
[18:09:24] <Roklobsta> In fact I think CF was designed to work on PCMCIA without any glue logic, as you doscovered.
[18:10:33] <Roklobsta> What you need is a proper IDE mode controller.
[18:11:14] <Roklobsta> such as a CF to IDE adapter. The cheap CF to USB adapters should do the proper IDE DMA modes.
[18:13:13] <BlueProtoman> Can anyone help me with burning an Arduino program with avrdude in Ubuntu 11.04? Here's the command I'm using; avrdude -e -c avrispmkii -P /dev/ttyACM0 -p m328p -t -q -v -U signature:r:outputfile.txt:r flash:w:"./bin/Release/Linear_Algebra_Demo.elf.hex":i When I try, I just keep getting timeouts in the terminal (but the Arduino does freeze for a moment). My project is too big for the Arduino IDE and its weird #include system, so I'm us
[18:13:13] <BlueProtoman> ing Code::Blocks instead.
[18:19:14] <BlueProtoman> Anyone?
[18:19:34] <Roklobsta> try it all in upper case.
[18:19:57] <Roklobsta> dunno, someone might reply eventually. patience.
[18:20:29] <BlueProtoman> LIKE THIS?
[18:20:32] <BlueProtoman> (Kidding)
[18:21:51] <Roklobsta> what version of AVRd00d are you using?
[18:22:03] <Roklobsta> 5.10 is ancient history.
[18:22:19] <Roklobsta> 5.11 is latest but there have been quite a few patches since.
[18:22:37] <BlueProtoman> 5.10.
[18:22:41] <BlueProtoman> I should probably find a new .deb.
[18:22:48] <Roklobsta> ubuntu?
[18:22:56] <BlueProtoman> Yes.
[18:24:16] <Roklobsta> https://launchpad.net/ubuntu/precise/+package/avrdude
[18:24:43] <Roklobsta> even though it's for 12.04 it should work on your ubuntu
[18:25:13] <Roklobsta> install it with "dpkg --dry-run -i <package>.deb" to make sur it won't fail.
[18:26:04] <Roklobsta> whoa, linear algebra? WTF?
[18:27:34] <Tom_itx> BlueProtoman you still haven't got it working?
[18:27:39] <BlueProtoman> Nope.
[18:28:03] <Tom_itx> so why are you back to avrispmkii as the programmer?
[18:28:13] <BlueProtoman> I don't know.
[18:28:13] <Roklobsta> are you trying to do SV and LU decomposition?
[18:28:19] <BlueProtoman> Roklobsta: Huh?
[18:28:35] <BlueProtoman> Tom_itx: I don't know. Right now I'm trying to compile and install the latest avrdude.
[18:28:36] <Roklobsta> linear_algebra_demo.
[18:28:52] <BlueProtoman> I don't know what those are.
[18:28:59] <eSoul> sorry guys for the n00b questions, but im trying to get avr studio 5.1 to program an AT32UC3B but I dont seem to be able to add any target devices, or find the window to do this
[18:29:04] <BlueProtoman> I'm just doing basic things, mostly in regards to linear transformations.
[18:29:05] <Tom_itx> mkay, i'm not gonna try to follow mixed threads here
[18:29:23] <Roklobsta> blue: are you using floats?
[18:29:37] <eSoul> I have the MCU booted up in DFU mode, making th device show up in device manager and the device has a driver loaded
[18:29:45] <BlueProtoman> Roklobsta: I'm gonna try both floats and ints, see how the Arduino handles them.
[18:30:08] <BlueProtoman> Especially since I'm limited to a 256x256 window for line rendering.
[18:30:25] <BlueProtoman> The issue is burning the program, not writing it.
[18:30:36] <BlueProtoman> Also, the new avrdude actually compiled and installed effortlessly! That's a first.
[18:31:24] <BlueProtoman> Still getting this line over and over, though; avrdude: stk500v2_ReceiveMessage(): timeout
[18:32:00] <Tom_itx> probably because you specified the wrong programmer
[18:32:10] <Tom_itx> we covered that yesterday
[18:32:19] <BlueProtoman> Let's try avrisp2 again.
[18:32:26] <Tom_itx> let's not
[18:32:36] <Tom_itx> because you don't have one
[18:32:41] <BlueProtoman> OK, so what should we try?
[18:32:50] <Tom_itx> now if you did, it would work wonderfully
[18:32:59] <Tom_itx> arduino is what i was told
[18:33:13] <Tom_itx> did you look at the pdf?
[18:33:22] <BlueProtoman> I do have a USB-A to USB-B cable that came with the Arduino.
[18:33:25] <BlueProtoman> Can I see it again?
[18:33:36] <BlueProtoman> I damn near fell asleep at my keyboard last night, so no.
[18:37:06] <Tom_itx> http://download.savannah.gnu.org/releases/avrdude/
[18:37:14] <Tom_itx> you can find docs there probably
[18:37:47] <BlueProtoman> I did just install the latest avrdude, so we're good there.
[18:38:06] <Tom_itx> but did you read the pdf?
[18:38:21] <BlueProtoman> Not yet.
[18:38:30] <BlueProtoman> What should I be on the lookout for in particular?
[18:39:18] <Tom_itx> the switches you need for your setup to download the hex file
[18:39:25] <Tom_itx> what programmer, what port etc
[18:41:38] <BlueProtoman> OK.
[18:42:53] <BlueProtoman> There's an arduino mode, so I'm gonna go ahead and try that...
[18:42:58] <Tom_itx> if you look at the logs you will see the programmer and port settings that were recomended for you
[18:43:21] <Tom_itx> and i also mentioned access to it in root mode
[18:43:33] <Tom_itx> or you may not get the port
[18:44:04] <Tom_itx> someone else here that's linux savvy can tell you how to do that a different way
[18:44:37] <Tom_itx> for now, sudo su and get on with it
[18:46:10] <CapnKernel> BlueProtoman: tail -f /var/log/kern.log will show you the right device file to use, when you plug in the Arduino.
[18:46:37] <CapnKernel> I did some googling, but couldn't find any article which definitively showed what to do next (and I don't have hardware to do experimenting)
[18:46:52] <BlueProtoman> Looks like ttyACM1
[18:46:57] <CapnKernel> Good.
[18:47:04] <CapnKernel> I did see a lot of discussion about choosing the right baud rate.
[18:47:08] <CapnKernel> with -b
[18:47:21] <BlueProtoman> Yes, someone advised me last night to use B32?
[18:47:28] <Tom_itx> i did
[18:47:37] <BlueProtoman> Ah, OK.
[18:48:08] <CapnKernel> -B is not the same as -b
[18:48:16] <Tom_itx> sure isn't
[18:48:20] <CapnKernel> Just as -P is not the same as -p
[18:49:06] <Tom_itx> In general, the clock frequency should be at least 4 times larger than the target clock frequency. Try "-B 32" if you're having clocking issues, that should handle even 128khz clocks.
[18:49:33] <Tom_itx> You can use the -B option to specify the ISP speed. By default the value is 10 which means 100KHz clock, this is good for target clock speeds > 500KHz. If you want the high speed clockrate (400KHz) for target frequencies > 4MHz you can use "-B 1" to speed up programming
[18:49:34] <BlueProtoman> Log from arduino mode. I get a segfault once I enter pgm. http://pastebin.com/NzCQVsnb
[18:49:52] <BlueProtoman> (pgm continues the programming process)
[18:51:09] * BlueProtoman gets a bite to eat
[18:54:40] <BlueProtoman> Anyone?
[18:54:46] <CapnKernel> BlueProtoman: That looks very promising. The fact that you're getting the device signature is a very good sign.
[18:55:17] <CapnKernel> What is burn.sh?
[18:56:38] <CapnKernel> Can you copy it to pastebin?
[18:56:40] <Tom_itx> User configuration file does not exist or is not a regular file, skipping
[18:56:44] <Tom_itx> fix that.
[18:57:04] <CapnKernel> Tom_itx: I'm not sure that's a problem
[18:57:14] <Tom_itx> it skipped it
[18:57:21] <Tom_itx> but it shouldn't be there
[18:57:28] <Tom_itx> not for avrdude anyway
[18:57:32] <CapnKernel> He can create a .avrduderc in his home dir to override settings. Just means he doesn't have an override file
[18:58:20] <CapnKernel> Let me translate: "If you had an override file, it would be at /home/jesse/.avrduderc, but you don't, so let's keep going.
[18:58:29] <Roklobsta> the existing "/usr/local/etc/avrdude.conf" from his installed 5.10 should still exist
[18:58:48] <Tom_itx> yeah but 5.11 probably has more devices
[18:58:50] <Roklobsta> no still be readable
[18:59:20] <CapnKernel> Signature looks ok, although a little worrying the fuses are all 0.
[18:59:41] <Roklobsta> blueproto: add a "-C <path>avrdude.conf" to use the new 5.11 configfile
[19:00:00] <CapnKernel> So it seems that it's avrdude that is segfaulting
[19:00:16] <CapnKernel> BlueProtoman: Strongly recommend you get a newer avrdude
[19:00:23] <Roklobsta> 5.11.1 is what he's using.
[19:00:26] <CapnKernel> Not to mention a newer Ubuntu :-)
[19:00:34] <Tom_itx> can't get much newer than that
[19:00:40] <Roklobsta> can with SVN
[19:03:11] <CapnKernel> I'm wondering about the segfault. Could it be because ./bin/Release/Linear_Algebra_Demo.elf.hex doesn't exist, so the fopen doesn't work, so the fp is null, which then gets deferenced?
[19:03:38] <CapnKernel> BlueProtoman: What do you get when you run this: ls -l ./bin/Release/Linear_Algebra_Demo.elf.hex
[19:04:08] <BlueProtoman> CapnKernel: I just got the latest version.
[19:04:26] <BlueProtoman> But as for that command, let's find out.
[19:04:57] <BlueProtoman> -rw-r--r-- 1 jesse jesse 74211 2012-03-26 19:34 ./bin/Release/Linear_Algebra_Demo.elf.hex
[19:05:02] <BlueProtoman> That's the output.
[19:05:16] <CapnKernel> ok good
[19:05:31] <BlueProtoman> Also, burn.sh is just #!/bin/bash
[19:05:31] <BlueProtoman> avrdude -B32 -e -c arduino -P /dev/ttyACM1 -p m328p -t -q -v -U signature:r:outputfile.txt:r flash:w:"./bin/Release/Linear_Algebra_Demo.elf.hex":i
[19:05:41] <gkwhc> Hi guys, I am trying to make a wav player. I can barely here a representation of the output sound; it is filled with noise. I suspect this is due to cpu cycles in fetching data from a SD card. How can I decrease the fetching time or increase efficiency?
[19:06:05] <BlueProtoman> CapnKernel: As for newer Ubuntu? Only if I can do so without losing my customizations, software, and personal files.
[19:07:06] <CapnKernel> In general, putting in a new Ubuntu CD and doing an upgrade won't lose any of the personal files you've got in /home
[19:08:03] <Landon> or even through the update manager
[19:08:07] <Tom_itx> it's crazy you need to change the OS to make avrdude work
[19:08:11] <Roklobsta> gkhwc: can you play a sound just fine if it's in RAM or FLASH?
[19:08:18] <Tom_itx> i'd fix one thing before moving on
[19:08:54] <CapnKernel> Tom_itx: We're not saying the OS needs updating to make avrdude work. It's just that bug fixes happen and it's the best way to make sure all those bug fixes are there.
[19:09:00] <gkwhc> Roklobsta: well the song is a few megabytes..so it wont fit there
[19:09:05] <Roklobsta> blue: have you tried any other .hex files, like the arduino bootloader?
[19:09:22] <CapnKernel> No different to "make sure you have service pack xyz installed before trying this"
[19:09:37] <Roklobsta> gkwc: but are you certain that the audio routines are working? just play a short sound from RAM or something and make sure thos eroutines are ok
[19:10:02] <BlueProtoman> Roklobsta: No.
[19:10:02] <Roklobsta> blueprotoman
[19:10:04] <BlueProtoman> Yes?
[19:10:20] <BlueProtoman> CapnKernel: Well, I have the option to upgrade to Ubuntu 11.10 from my Update Manager.
[19:10:27] <Roklobsta> blueprotoman: definitely try the default arduinobootloader for your board
[19:10:37] <gkwhc> Roklobsta: yes, i tried converting input audio ADC to DAC, then output to speakers by DAC to ADC and it works beautifully
[19:10:45] <Roklobsta> before you upgrade or do anyting crazy
[19:10:46] <BlueProtoman> Roklobsta: Where can I find it?
[19:11:03] <BlueProtoman> Anyway, where were we?
[19:11:30] <Roklobsta> in Windows it's in arduino-0022\hardware\arduino\bootloaders
[19:12:15] <Roklobsta> find the hex file for your board. once that works successfully (as it's a known good hexfile) then you can move on to your hex file
[19:12:39] <Roklobsta> gkwhc: and you are sure your SD read routines are OK?
[19:12:39] <BlueProtoman> "ATmegaBOOT_168_atmega328.hex" is the one, right?
[19:12:43] <Roklobsta> i guess
[19:12:47] <BlueProtoman> (Arduino Uno)
[19:13:02] <gkwhc> Roklobsta: yes it works when i write files
[19:13:08] <Roklobsta> how about read?
[19:13:20] <Roklobsta> have you got the byte order correct from the wav file?
[19:13:37] <gkwhc> Roklobsta: read too. I can see the exact same data on the debugger as in the wav file
[19:13:55] <Roklobsta> are they 8 or 16 bit samples?
[19:14:01] <Roklobsta> what DAC are you using?
[19:14:13] <BlueProtoman> Still segfaults when I enter pgm.
[19:14:18] <gkwhc> Roklobsta: 16bit samples converted to 12 bit samples, outputting to internal DAC
[19:14:45] <Roklobsta> gkwhc: ok so is the endianess of the samples correct?
[19:15:17] <Roklobsta> do you need to convert the sampes to signed from unsigned or vice versa?
[19:15:18] <BlueProtoman> http://ideone.com/G4jVr Log
[19:16:56] <gkwhc> Roklobsta: hm ive tried both endianess to no avail. however in regards to converting signed samples, i am not sure..i just used the example code i found. its: (audio[i] + 0x7fff) >> 4
[19:19:48] <Roklobsta> gkhwc: ok, maybe just copy 1seconds worth of sample to RAM and play it in a loop from RAM to rule in or out SD speed and be sure the format sent to the DAC is correct
[19:20:16] <gkwhc> hm okay, ill try that then
[19:20:38] <Roklobsta> you just need to break things down and test each part individually
[19:22:25] <gkwhc> gotchya
[19:23:30] <BlueProtoman> CapnKernel?
[19:26:11] <Roklobsta> gkwhc: you seem to have shown the DAC is working so you need to show that you can get WAV data out the DAC, then move onto reading from the SD to DAC.
[19:29:09] <CapnKernel> BlueProtoman: hi
[19:29:45] <BlueProtoman> CapnKernel: Where were we again?
[19:29:57] <CapnKernel> You tell me
[19:31:05] <BlueProtoman> Ah, yes. I have avrdude 5.11. I have my Arduino's signature. Still don't know why avrdude segfaults after hitting pgm in Arduino mode's shell.
[19:31:17] <BlueProtoman> (avrdude has an arduino option that I've been using)
[19:33:31] <Roklobsta> why do you want -t and if you are using arduino as a programmer is the arduino bootloader installed?
[19:34:02] <Roklobsta> if you have somehow clobbered the arduino bootloader you're stuffed
[19:34:28] <gkwhc> Roklobsta: ah i got it to work with 8bit unsigned samples. it was the signed/unsigned values that were causing the problem!
[19:35:01] <CapnKernel> BlueProtoman: drop -t
[19:35:10] <Roklobsta> gkwhc: oh good.
[19:35:26] <gkwhc> Roklobsta: thanks so much!
[19:37:31] <BlueProtoman> CapnKernel: OK, no more segfault. My Arduino resets, but it seems to be the same program as before.
[19:37:34] <BlueProtoman> Lemme get the log.
[19:37:57] <BlueProtoman> http://ideone.com/QS4MI
[19:41:43] <CapnKernel> Can you show us how you're calling avrdude (as "burn.sh" doesn't tell us anything)
[19:42:01] <Roklobsta> -c is redundant, erase is assumed.
[19:42:07] <CapnKernel> In particular, I'm wondering what outputfile.txt is, and how it relates to hex files.
[19:42:27] <BlueProtoman> burn.sh is just this;
[19:42:28] <BlueProtoman> avrdude -B32 -e arduino -P /dev/ttyACM1 -p m328p -q -v -U signature:r:outputfile.txt:r flash:w:"./bin/Release/Linear_Algebra_Demo.elf.hex":i
[19:42:54] <Roklobsta> whups -e is redundant
[19:42:55] <BlueProtoman> outputfile.txt seems to be empty.
[19:43:14] <CapnKernel> Drop signature:r:outputfile.txt:r
[19:43:16] <Roklobsta> leave -c in
[19:43:46] <CapnKernel> I think you need a separate -U before the flash:w:"./bin/Release/Linear_Algebra_Demo.elf.hex":i
[19:44:28] <Roklobsta> right, simplify tings and don't bother wit hthe signature read for now
[19:44:43] <CapnKernel> Yeah
[19:44:55] <BlueProtoman> Froze, so I reset
[19:45:16] <CapnKernel> What froze?
[19:45:24] <BlueProtoman> The Arduino.
[19:45:26] <BlueProtoman> Is that bad?
[19:45:45] <BlueProtoman> This is my burn.sh so far
[19:45:45] <BlueProtoman> avrdude -B32 -c arduino -P /dev/ttyACM1 -p m328p -q -v -U flash:w:"./bin/Release/Linear_Algebra_Demo.elf.hex":i
[19:45:58] <CapnKernel> BlueProtoman: We can only advise you based on the information you give us.
[19:46:01] <Roklobsta> get rid of the :i it's redundant
[19:46:02] <CapnKernel> Drop the double quotes
[19:46:28] <BlueProtoman> Single quotes instead?
[19:46:34] <CapnKernel> No, no quotes at all
[19:46:46] <CapnKernel> -U flash:w:./bin/Release/Linear_Algebra_Demo.elf.hex
[19:47:44] <CapnKernel> *Just* based on the name alone, I'd have to guess that bin/Release/Linear_Algebra_Demo.elf.hex is an ELF-format binary, in HEX format.
[19:47:56] <CapnKernel> But you don't want to load an ELF-format binary onto your Arduino
[19:48:10] <CapnKernel> Someone tell me I'm wrong.
[19:48:39] <CapnKernel> BlueProtoman: How are you generating the .hex file?
[19:48:50] <BlueProtoman> With my compiler. Lemme get the commands.
[19:48:54] <CapnKernel> Good
[19:49:17] <BlueProtoman> Why would I not want an ELF on there?
[19:49:22] <BlueProtoman> And how can I tell if I brick my Arduino?
[19:49:47] <BlueProtoman> These are my compiler settings;
[19:49:48] <BlueProtoman> avr-objcopy -O ihex -R .eeprom -R .eesafe $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).hex
[19:49:48] <BlueProtoman> avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O ihex $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).eep.hex
[19:52:16] <Casper> the ELF isn't in a format that the avr understand
[19:52:39] <Casper> the elf contain some info for debug and other stuff that mess up with the alignment
[19:52:40] <CapnKernel> Because the ELF format is a lovely thing which allows for the bundling together of lots of different program sections, which as Casper says, the avr doesn't understand.
[19:53:01] <BlueProtoman> Oh, OK, so I'll try one of the other files in the folder.
[19:53:06] <CapnKernel> But the reason your file is called .elf.hex is just because of the way the commands are written. It doesn't seem that it's actually an elf file.
[19:53:15] <Casper> you need the .bin to be "converted" to .hex
[19:53:16] <CapnKernel> So this is not a problem
[19:54:02] <CapnKernel> Casper: I think his avr-objcopy is doing the right thing, just a pity it misleads us with $(TARGET_OUTPUT_FILE).hex
[19:54:16] <BlueProtoman> Sorry about that.
[19:54:24] <BlueProtoman> How can I tell if my Arduino is bricked?
[19:55:09] <Casper> does it reply to any programming command?
[19:55:16] <Casper> after reset or whatever?
[19:55:52] <BlueProtoman> Yes, it responds, but after a previous attempt it froze, and I had to reset it.
[19:55:54] * CapnKernel wonders if there's a blinkenlight .hex file that might be less problematic
[19:56:07] <BlueProtoman> I unplugged it and replugged it, but that's because I have a shield on that blocks the reset button.
[19:56:12] <Casper> if it respond, it is not bricked
[19:56:22] <BlueProtoman> This is the .hex file http://ideone.com/sT5lr
[19:56:30] <BlueProtoman> So I think we're good.
[19:56:52] <Roklobsta> just try a demo in arduino to test for brickyness
[19:57:04] <BlueProtoman> Will do.
[19:57:14] <Casper> also
[19:57:21] <Casper> is your code compiled for the right avr?
[19:57:33] <BlueProtoman> Yes, I've got a 328p
[19:57:56] <Casper> not just for avrdude, but for gcc too
[19:57:57] <BlueProtoman> Yeah, the Arduino IDE tells me "Done uploading."
[19:58:11] <BlueProtoman> Huh?
[19:59:00] <Casper> so you never checked if you are actually making the program for the right part?
[20:00:01] <BlueProtoman> These are my compiler's options; avr-objcopy -O ihex -R .eeprom -R .eesafe $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).hex
[20:00:01] <BlueProtoman> avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O ihex $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).eep.hex
[20:00:09] <BlueProtoman> There's a -mmcu=atmega328p in there, too.
[20:00:19] <Casper> ok good
[20:00:31] <Casper> and the avr actually say atmega328p on it?
[20:01:17] <BlueProtoman> Hold on, lemme confirm it (shield on my Arduino)
[20:02:18] <Casper> there is lots of version of arduino, so what is found online might not be what you actually have
[20:02:40] <Casper> and I hear that some version of arduino actually ignore the part model
[20:02:47] <Casper> so better check on it
[20:03:08] <BlueProtoman> It's hard to tell, the print on my chip is TINY.
[20:03:12] <BlueProtoman> As is the chip itself.
[20:03:53] <BlueProtoman> Ooh, yes, 328p.
[20:04:00] <Casper> ok
[20:04:16] <CapnKernel> BlueProtoman: Not the 4mm by 4mm chip, the one that's about 1cm by 1cm
[20:04:18] <Casper> so it have to be your compilation or your code that is wrong
[20:04:36] <CapnKernel> That's why I'm wondering whether a blinky .hex would be a better idea.
[20:05:00] <BlueProtoman> A blinky hex?
[20:05:12] <BlueProtoman> Casper: So what would you suggest? The code compiles perfectly, remember.
[20:05:22] <BlueProtoman> Well, semi-perfectly. 11 warnings,
[20:05:22] <CapnKernel> Something that does nothing but sit there blinking the LED
[20:05:33] <BlueProtoman> CapnKernel: I've burned one of those successfully.
[20:05:43] <CapnKernel> Using avrdude?
[20:06:19] <BlueProtoman> Yes.
[20:06:24] <BlueProtoman> Well, from the Arduino IDE.
[20:06:32] <Casper> BlueProtoman: maybe those warnings are to be investigated? or... you should try with a makefile that is known to work
[20:06:36] <CapnKernel> Do a blinky from avrdude
[20:07:15] <CapnKernel> The more complexity you have in your setup, the more chance that it's something we can't know just by the little amount of information you give us
[20:07:18] <BlueProtoman> I have a bootloader hex that burns just fine.
[20:07:43] <BlueProtoman> These are my warnings. http://ideone.com/cAL5M
[20:07:54] <BlueProtoman> My codei s on Github.
[20:07:55] <BlueProtoman> Hold on.
[20:08:02] <BlueProtoman> https://github.com/GemstoneGames/Linear-Algebra-Demo/
[20:10:07] <CapnKernel> BlueProtoman: Strongly suggest you read this article and see if you can replicate it on your Arduino. Note, you will have to change several aspects of it, for example, the programming command, and the port where the LED sits. http://capnstech.blogspot.com.au/2010/11/usb-doodad-4-blinkenleds.html
[20:12:37] <CapnKernel> I suspect the LED on the Arduino is connected to bit 7 of port B, whereas on my board, I was using bit 5 of port C.
[20:12:59] <Roklobsta> BTW, anything with floats and certainly linear algebra will run like a dog on arduino
[20:14:00] <Roklobsta> when I was your age I was too busy playing Wizball to program.
[20:15:54] <BlueProtoman> Roklobsta: What if I just use ints?
[20:16:04] <BlueProtoman> And I'm not really using much more than arithmetic, remember.
[20:17:23] <CapnKernel> BlueProtoman: How's your blinkenled program going?
[20:17:41] <BlueProtoman> Not currently doing that.
[20:17:54] <CapnKernel> Then I'm not currently helping you.
[20:18:24] <BlueProtoman> All right, give me a little while.
[20:18:39] <BlueProtoman> I have a few other things to take care of in the next 15 minutes or so, mostly hygeine-related.
[20:20:13] <Roklobsta> blue: dont' forget the native type of the AVR is only an 8 bit integer. Anything bigger is a fiddle and emulated.
[20:21:13] <BlueProtoman> Roklobsta: Noted, I'm going to experiment to see which number type works best.
[20:21:26] <BlueProtoman> I'm not doing super complex linear algebra, it
[20:21:39] <BlueProtoman> it's almost geometry.
[20:23:42] <Roklobsta> regardless, you'll find it's slow - nevertheless GCC will let you use floats and big ints too - just don't expect speed miracles on the arduino
[20:24:21] <Roklobsta> gkwhc: how's the wav player going?
[20:25:15] <BlueProtoman> Roklobsta: What will make it so slow exactly? A certain Gameduino demo gets by just fine.
[20:26:22] <Roklobsta> what do you know about cpu architecture?
[20:26:41] <BlueProtoman> That it varies greatly among different platforms.
[20:26:51] <BlueProtoman> I'm not well-versed in it otherwise.
[20:26:55] <Roklobsta> oih ok
[20:27:02] <Roklobsta> that's fine.
[20:27:10] <Roklobsta> i thikn you should go do some reading though
[20:27:12] <gkwhc> Roklobsta: not bad, i still need to decrease the fetching time and increase the audio quality
[20:27:26] <BlueProtoman> Right now I'm just trying to get my program to burn onto my Arduino, ASAP.
[20:27:30] <BlueProtoman> I'm behind in my school project.
[20:27:31] <Roklobsta> are you using an avr or xmega?
[20:27:39] <Roklobsta> ok
[20:27:54] <BlueProtoman> AVR Atmel 328p.
[20:28:07] <BlueProtoman> Or, rather, ATMega328p.
[20:30:47] <Roklobsta> whups i meant that for gkwhc.
[20:31:26] <Roklobsta> blue: yeah get your project sorted first, computer arch later.
[20:32:27] <Roklobsta> gkwhc: what cpu are you using?
[20:49:52] <gkwhc> Roklobsta: oh im using ARMs actually :p
[22:25:53] <gkwhc> hmm my wav player still isnt playing as clearly...i am guessing its the system clock? but the core & peripherals are running at 24.576MHz, while the SPI bus should be around 12.288MHz...any ideas?
[22:27:21] <Casper> what is the clearity issue?
[22:28:04] <gkwhc> it sounds a bit pixelated
[22:28:23] <Casper> you sure it's not a resolution issue?
[22:28:43] <Casper> and also, check the datarate
[22:28:45] <gkwhc> well playing the 8bit wav file on my computer sounds ALOT better than from the MCU
[22:28:48] <Casper> should be constant
[22:28:58] <Casper> does it have jitters?
[22:29:00] <gkwhc> how can i check the datarate?
[22:29:08] <Casper> oscilloscope
[22:29:15] <gkwhc> oh ok
[22:29:24] <gkwhc> and what do you mean by jitters?
[22:29:33] <Casper> you could have clock stability issue
[22:29:45] <Casper> like it send a burst of data, then halt
[22:29:52] <Casper> then another burst and halt
[22:29:57] <gkwhc> that may be the case
[22:30:10] <Casper> also
[22:30:22] <Casper> your soundcard probably have interpolation algorith
[22:30:28] <gkwhc> since it reads the SD card, gets 1024 bytes of data, output data, then read again
[22:30:29] <Casper> to make the sound better
[22:30:50] <Casper> maybe it halt between the read...
[22:30:51] <Casper> but
[22:31:03] <Casper> usually you would notice a longer runtime
[22:31:32] <Casper> you could maybe feed back the output to your soundcard line in
[22:31:34] <Casper> and record
[22:31:36] <Casper> and compare
[22:31:43] <gkwhc> i see
[22:31:47] <Casper> you'ld be able to see some stuff maybe
[22:31:57] <gkwhc> how can i also decrease jitter?
[22:32:47] <Casper> fix the code :D
[22:33:18] <gkwhc> haha
[22:33:49] <gkwhc> i dont see buffering to be helping, since its still loading the data inbetween audio outputs
[22:34:04] <CapnKernel> gkwhc: Is your playout routine interrupt-driven?
[22:34:37] <gkwhc> CapnKernel: nope its in a while loop
[22:35:00] <CapnKernel> Access to an SD card is not deterministic
[22:35:21] <CapnKernel> The block allocation stuff in the SD card can do anything. You must wait until the data comes back, and that wait is indeterminate.
[22:36:18] <CapnKernel> That's why you must use an interrupt-driven playout routine
[22:36:40] <CapnKernel> Your while loop can read stuff from the SD card and put it into a buffer. The interrupt-driven playout routine picks up from that buffer.
[22:37:02] <CapnKernel> Done properly, the buffer can soak up the jitter from the SD card
[22:37:10] <gkwhc> hmm
[22:37:18] <CapnKernel> Do you know what I mean?
[22:37:27] <gkwhc> not quite
[22:39:09] <theBear> he means periodically top up a buffer before the player, 'cos "reading steadily" from an sdcard is impossible, any given read may take a 'random' amount of time to happen
[22:39:34] <gkwhc> i see
[22:40:06] <gkwhc> hm perhaps DMA would help?
[22:40:18] <CapnKernel> You can set up the timer hardware inside the chip to give you a periodic interrupt. When the timer fires, your playout routine runs and takes some data from the buffer and squirts it to the speaker
[22:40:29] <CapnKernel> Yes, DMA would help a great deal.
[22:40:36] <CapnKernel> Remind me again, are you using AVR or ARM?
[22:40:45] <gkwhc> ARM
[22:41:02] <gkwhc> forgive me for asking on the AVR channel
[22:41:28] <gkwhc> i think the concept applies as well, so thats why i asked here
[22:41:34] <CapnKernel> The majority of ARM chips have DMA controllers.
[22:41:50] <CapnKernel> This is what DMA is for :-)
[22:41:58] <CapnKernel> You should be able to find examples on the internet
[22:42:19] <CapnKernel> How are you getting sound output from the ARM? Do you have a DAC chip?
[22:42:39] <gkwhc> CapnKernel: it is from internal DAC
[22:43:11] <CapnKernel> If it's on-board, then I'm certain your chip will already do what you want. I would suggest reading the datasheet carefully.
[22:44:41] <gkwhc> ok
[22:44:43] <gkwhc> thanks!
[22:45:46] <CapnKernel> What you are trying to do is a form of "polling".
[22:46:22] <CapnKernel> The good news is that conceptually, polling is so simple that even newbies can understand it.
[22:46:58] <CapnKernel> The bad news is that in the real world, with real world problems, polling just doesn't cut it, and only newbies try doing it.
[22:47:09] <CapnKernel> (And they get results like you're finding)
[22:47:45] <gkwhc> haha yes
[22:48:03] <CapnKernel> http://en.wikipedia.org/wiki/Polling_%28computer_science%29
[22:48:45] <CapnKernel> I'm going to assume that your SD card socket is connected to a pin on your micro.
[22:48:55] <CapnKernel> Ideally you can set that pin so it gives you a software interrupt
[22:50:07] <CapnKernel> So in your playout routine, if your buffer is less than a certain amount full, it can initiate the request of more data from the card, and request that an interrupt occur when the data is ready. The playout routine then exists (and your processor goes back to sleep)
[22:50:15] <CapnKernel> exits
[22:51:04] <CapnKernel> When data from the card is ready, it causes an interrupt and your card-data-ready interrupt can go read it into the buffer, hopefully but not necessarily using DMA.
[22:52:01] <gkwhc> interesting
[22:52:09] <gkwhc> i'll have to see how i can implement that
[22:52:21] <CapnKernel> It is a very similar algorithm to the way CD players work
[22:54:46] <theBear> i think we're pretty happy with most chat so long as it involves micros of some kind
[22:56:24] <gkwhc> great :)
[23:57:53] <Roklobsta> yeah my experience with cheap CF showed me you get the data whenever.
[23:58:07] <Roklobsta> especially if the requested block was 'far away'
[23:58:49] <Roklobsta> gkwhc: I don't know about the SD spec. but with CF you can set up multiblock writes/reads where you set the adress once and keep reading ro writing
[23:59:25] <Roklobsta> gkwhc: and you should also do block double or triple buffering when you read.
[23:59:50] <Roklobsta> so you always have data going to the DAC.