#avr | Logs for 2013-11-29

Back
[01:40:17] <Enma_Hinobara> Anybody have any experience with this https://www.sparkfun.com/products/9868 (Breakout Board for ADMP401 MEMS Microphone)?
[02:27:45] <jerkey> Enma_Hinobara from the reviews it "sounds" like nobody likes this microphone and it doesn't work very well
[02:27:57] <jerkey> i would just use an ordinary electret microphone, whats wrong with that?
[02:57:08] <Enma_Hinobara> jerkey: like https://www.sparkfun.com/products/9964?
[03:05:32] <jerkey> yes i think that would be a better option
[03:05:45] <Enma_Hinobara> I see
[03:24:48] <Tom_itx> want a box for your bbb? http://www.electronicproducts.com/Packaging_and_Hardware/Enclosures_Cabinets_and_Chassis/Hammond_launches_design-specific_enclosures_for_credit-card_sized_computers.aspx
[05:48:39] <beaky> hello
[05:55:34] <beaky> should i use sleep_mode() function, or should i manually set registers?
[06:04:12] <beaky> wow ipv6
[06:05:03] <twnqx> yey beaky :)
[06:05:10] <twnqx> where in dubai can i shop for avrs?
[06:07:17] <beaky> theres a big souq near naif park packed with stores that sell electronics components (near the stores that sell satelite dishes)
[06:11:01] <twnqx> wow, walking distance from the hotel
[06:11:19] <twnqx> good, good.
[06:12:33] <twnqx> isn't that the area with all the cellphone repair shops as well?
[06:13:26] <beaky> ywes
[09:28:44] <beaky> should i use sleep_mode() on avr, or should i manually set registers
[13:49:00] <isthatme> could anyone help me with some problems I'm having compiling this program?
[13:56:47] <jerkey> more detail
[13:59:12] <isthatme> okay, pastebin
[13:59:17] <isthatme> http://pastebin.com/agmPwaKB
[13:59:24] <isthatme> that has the compiler output
[13:59:28] <isthatme> and the program
[13:59:47] <isthatme> I really have no idea what's wrong
[14:02:45] <beaky> have you looked at the error messages?
[14:03:12] <isthatme> yeah
[14:04:10] <beaky> they are pretty descriptive, pointing out exactly whats wrong with the code and even suggesting fixes
[14:10:59] <isthatme> .... it says conflicting types for delayTimerLoops()
[14:11:13] <isthatme> but I thought the type declaration
[14:11:25] <isthatme> ("type" function())
[14:11:40] <isthatme> defined what the function returned?
[15:19:25] <Essobi> ffs...
[15:30:53] <ThiefMaster> hm, i'm sending data from an avr to my raspberry pi.. works fine but the first message i receive starts with a NUL byte for some reason
[15:31:17] <ThiefMaster> of course i could easily ignore it but i wonder why that happens
[15:32:06] <ThiefMaster> (i don't write a null byte to UDR0 ever and even modified my send function to send another char in case it's called with a null character)
[16:02:08] <ThiefMaster> interesting.. i just stripped most code so i just send a simple test message.. if i write something to the UART immediately after initializing it I receive nonsense ("¦T.Tþþ")
[16:05:31] <Duality> hey question what is EEDEVADR ?
[16:05:41] <Duality> itś related to twi
[16:05:59] <Duality> but I can't seem to figure out what it meens stands for or do
[16:08:41] <hjohnson> hrmm.. how hard is it to bitbang a TWI master?
[16:11:39] <tzanger> not hard at all
[16:12:02] <tzanger> Duality: that is for when you want to be an I2C slave and have hardware support
[16:12:18] <tzanger> Duality: i.e. you get an interrupt when the I2C slave controller sees a request for the I2C address you've stored there
[17:28:47] <ThiefMaster> http://electronics.stackexchange.com/questions/92233/why-do-i-need-to-wait-a-few-moments-before-sending-serial-data-on-my-avr
[17:30:23] <malinus> ThiefMaster, have you looked in the datasheet? Maybe it needs afe uSec to stabilize.
[17:30:35] <ThiefMaster> i haven't found anything in there
[17:30:55] <ThiefMaster> and most example code on the net also doesn't wait
[17:42:39] <timemage> ThiefMaster, you know the error isn't on the receiving end?
[17:44:45] <ThiefMaster> not for sure, but i'd say it's very unlikely - how would that end even know what the first transmission is (it happens everytime i reset the avr)
[17:48:51] <timemage> ThiefMaster, have you tried putting in a delay and then resending the text to see if it will reissue the 0x00 without a reset? in any case, i don't see a problem with your code.
[17:50:11] <ThiefMaster> well my example basically does that - not the exactly same message but with a delay and there's no 0 byte
[17:51:23] <timemage> i mean repeat the entire show in a loop with maybe a 5 second delay between trials.
[17:51:39] <ThiefMaster> ah, including the uart initialization?
[17:52:50] <timemage> ThiefMaster, hmm. try with and without. i'm not really sure what i'm looking for. like i said, i don't see anything wrong wih the code. that's partly why i asked about the receiver.
[17:53:13] <timemage> ThiefMaster, it'd also be interesting to drop a scope probe on the output of the divider.
[17:55:01] <timemage> ThiefMaster, the theory, as weak as it is, is that the serial signal is bad near the start an that having recently been non-idle (having just sent something) somehow brings in into spec.
[17:58:50] <ThiefMaster> ok.. if i clear TXEN0 and wait 100ms before re-enabling it i get the nonsense once again - if i re-enable it immediately after disabling it i don't get it
[17:59:54] <timemage> ThiefMaster, well, there's a start i guess.
[18:00:33] <timemage> ThiefMaster, is enabling/disabling TXEN0 enough to make gibberish come accross the line or does it require an actual attempt to transmit?
[18:02:03] <ThiefMaster> that's a good question, i was always reading full lines so if that was the case i never noticed it. testing it now
[18:06:10] <ThiefMaster> just enabling it only causes a \0 to be sent
[18:07:09] <timemage> ThiefMaster, yup. it may have as much to do with the divider as anything.
[18:07:09] <ThiefMaster> if i transmit anything else it turns into gibberish ('A' ends up as '\xd0')
[18:08:01] <ThiefMaster> hmm i guess i could try hooking it up with my programmer's serial gateway.. that way i can test it with a 5v-capable receiver
[18:09:25] <timemage> ThiefMaster, i'm not sure what that means.
[18:10:08] <ThiefMaster> my ISP programmer also contains an usb=>rs232 chip
[18:10:39] <ThiefMaster> (i don't think my pc still has a serial port and even if it did i'd have to use a max232 to connect the avr to it)
[18:10:48] <timemage> ThiefMaster, i see. you mean you want to vet the AVR and code independent of your divider and rpi.
[18:10:56] <ThiefMaster> exactly
[18:11:23] <timemage> ThiefMaster, yeah. it's a good idea. i suspect you'll find it works correctly though. only one way to find out.
[18:27:17] <ThiefMaster> indeed, it worked
[18:27:48] <timemage> ThiefMaster, do you have a scope?
[18:31:19] <ThiefMaster> hmm even with the divider it worked.. but maybe the chip on the programmer is better than the one on the pi
[18:31:46] <ThiefMaster> i have an usb scope.. iirc. it wasn't very good (it's been a few years since i used it the last time)
[18:33:19] <timemage> ThiefMaster, well, i was just thinking maybe your divider needs to be stiffer.
[18:35:45] <ThiefMaster> "stiffer"?
[18:36:03] <tzanger> yeah you don't want a floppy divider
[18:36:26] <timemage> heh
[18:36:56] <timemage> ThiefMaster, may be local vernacular. smaller resisters, same ratio.
[18:37:29] <ThiefMaster> ah.. so 330/180 instead of 3.3k/1.8k.. i can give that a try
[18:39:00] <timemage> ThiefMaster, my mind is a bit fried to just say "yeah go for it" with those values. just make sure you're not exceeding the drive capability of the avr tx pin.
[18:39:15] <timemage> ThiefMaster, but, that is the basic idea.
[18:52:57] <ThiefMaster> same problem :/
[18:55:37] <ThiefMaster> well, i guess i'll have to keep the delay for now
[18:56:05] <ThiefMaster> and maybe get a proper level shifter the next time i buy stuff and give that a try
[19:12:01] <timemage> ThiefMaster, does the python program just have to open a serial port or does use some special gpio module to handle the serial?
[19:13:01] <ThiefMaster> nothing special
[19:14:38] <timemage> ThiefMaster, ok. just wondering. i have an rpi. haven't done anything with it yet except use it as a small system.
[19:15:20] <ThiefMaster> heh, i'll mainly use it as an overly fancy serial<=>network gateway
[19:16:48] <ThiefMaster> (i'm building a small device with a bunch of rotary switches which i then want to use to control e.g. my pc's speaker/headphone/winamp volumes)
[19:18:13] <Tom_itx> use an encoder
[19:21:05] <ThiefMaster> hm?
[20:32:03] <DanFrederiksen> I recall seeing an inexpensive PCB cad software that could do 45 degree chips and curved paths for RF and stuff. I thought it was diptrace. anyone know such?
[20:32:37] <hjohnson> define inexpesnive
[20:33:26] <Tom_itx> eagle will 45deg chips
[20:33:43] <hjohnson> yeah, I run eagle myself
[20:34:05] <tzanger> eagle does all that
[20:52:43] <jerkey> altium is on the pirate bay
[20:53:01] <Tom_itx> i don't consider that free
[20:53:49] <Tom_itx> or encourage piracy here
[20:54:22] <Tom_itx> altium and pads will both do it but they're far from free
[20:55:57] <jerkey> i use kicad for all my boards because it is free, but it can be a really challenging piece of software
[20:56:25] <jerkey> like i think some of the price of altium goes to bribing the kicad developers to make it impossible to use
[21:08:51] <timemage> jerkey, heh
[21:16:31] * jerkey opens kicad right now
[22:08:49] <DanFrederiksen> hehe
[22:09:12] <DanFrederiksen> jerkey, tried diptrace? it looks fairly promising and they have a free version
[22:09:51] <DanFrederiksen> looks way more professional than Eagle
[22:13:13] <jerkey> i mean free as in speech, not free as in beer. they're all free as in beer if you have bittorrent
[22:44:40] <DanFrederiksen> jerkey, tomato, tomato :)
[23:11:58] <jerkey> no there's a huge difference.