#avr | Logs for 2014-04-13

Back
[06:34:47] <specing> Aliexpress.com javascript doesen't work anymore?
[07:45:21] <Duality> what do you call those sockets for isp cables (10pin)
[07:46:05] <antto> the 2x5 connector plug thingies?
[07:46:28] <Lambda_Aurigae> 2x5 header
[07:50:36] <Duality> in eagle a header is well a header, but you have those connectors that only fit one way
[07:50:41] <Duality> the one with the notche
[07:50:50] <Lambda_Aurigae> keyed header
[07:51:22] <Lambda_Aurigae> http://www.ebay.com/itm/like/141079049891?lpid=82
[07:51:28] <Lambda_Aurigae> or shrouded box header
[07:52:20] <Lambda_Aurigae> if you search for 2x5 keyed header you will find it.
[07:56:55] <Duality> hmm zif sockets aren't so expensive as they used to
[07:57:50] <Lambda_Aurigae> nope.
[07:57:57] <Lambda_Aurigae> not so good quality either.
[08:03:38] <w|zzy> Any news Lambda_Aurigae?
[08:03:46] <Lambda_Aurigae> not yet.
[08:03:55] <Lambda_Aurigae> hasn't updated since it went through sydney.
[08:05:08] <w|zzy> Sucks!
[08:05:10] <w|zzy> Stupid au post
[08:05:20] <Lambda_Aurigae> that was on the 8th.
[08:05:25] <Lambda_Aurigae> it'll get here I'm sure.
[08:12:14] <Duality> Lambda_Aurigae: what happens if quality is bad then?
[08:13:15] <Lambda_Aurigae> Duality, they break
[08:13:50] <Lambda_Aurigae> or poor contact.
[08:31:32] <w|zzy> Btw those headers sew idc headers
[08:32:01] <w|zzy> See = are
[08:32:34] <Lambda_Aurigae> yeah...that too.
[08:32:57] <Lambda_Aurigae> although I always considered IDC to be the cable end.
[08:33:09] <Lambda_Aurigae> but, technically the board end is too I suppose.
[08:58:38] <antto> i have to increment a 32bit integer (accumulator) with another 32bit integer (coeff) very frequently in a timer interrupt (4800 times per second)
[08:58:53] <antto> and from time to time, i need to change the value of the coeff
[09:00:05] <antto> do i slap an IF, or do i use 2 coeffs (kind of like double-buffering), or do i use a pointer and swap the pointers?
[09:00:42] <Lambda_Aurigae> make the variable volatile and it will be handled properly in the interrupt I think.
[09:01:23] <antto> hm, actually, i need to use double buffering
[09:02:09] <antto> so the question is.. do i copy the value or use pointer and swap the pointer?
[09:03:02] <antto> if (something) { x = x2; } acc += x;
[09:04:02] <antto> if (something) { i^=0x01; ptrx = &x[i]; } acc += *ptrx;
[09:04:54] <antto> are pointers 16bit on the atmegas?
[09:11:28] <Lambda_Aurigae> I would think so..they have to cover 64K of data space even if the chip doesn't have all that onboard.
[09:12:33] <antto> so which approach could be faster?
[09:12:46] <antto> x=x2; or pointer swap?
[09:12:51] <Lambda_Aurigae> no clue.
[09:13:33] <antto> actually, i'm not familiar with what's involved in the "*ptrx" bit
[09:14:55] <antto> if "acc += *ptrx;" is slower (or more complicated) than just "acc += x;" then..
[10:58:32] <Duality> i have a usbtiny and usbasp, anyone know if i could flash firmware on it to make one of em do jtag ?
[10:59:37] <Fleck> I would like to convert usbasp to avr MK II :D
[11:03:24] <Lambda_Aurigae> Duality, probably, if you wrote some software to make it do jtag.
[11:06:06] <Duality> Fleck: no really looking for that , just jtag, doesn't have to be fast. I have to unbrick a few things, and they are damn handy in debugging :D
[11:22:59] <ColdKeyboard> Can someone please help me with HC-06 bluetooth module?
[11:23:20] <Lambda_Aurigae> will try
[11:23:28] <Lambda_Aurigae> if you can send me one it would help.
[11:23:32] <Lambda_Aurigae> what is your problem?
[11:23:56] <ColdKeyboard> I'm recieving all the messages/text I send from my android device, and I get it on terminal but when I send AT commands I don't get any response :\
[11:24:30] <Lambda_Aurigae> somehow it needs to be put into command mode.
[11:26:22] <ColdKeyboard> I've read in the datasheet that I need to pull key pin high during power-on reset
[11:26:41] <ColdKeyboard> I did connect it to VCC after power-on and after that sent AT command and nothing :\
[11:26:49] <Lambda_Aurigae> during
[11:26:52] <Lambda_Aurigae> not after
[11:27:41] <Lambda_Aurigae> has to be pulled high before you apply power to VCC
[11:27:57] <ColdKeyboard> I leave it connected to VCC, is that problem?
[11:28:33] <Lambda_Aurigae> I'm guessing you need to send the AT commands from the local device, not from the android device's bluetooth.
[11:28:57] <ColdKeyboard> I'm sending it from my PC over UART
[11:29:13] <Lambda_Aurigae> ok.
[11:29:28] <ColdKeyboard> I get the codes that I send from android device but no response when I send AT commands from my PC terminal
[11:29:40] <Lambda_Aurigae> not sure beyond that. Not having one here to play with, no way to test and play.
[11:30:40] <ColdKeyboard> I'm waiting for full PCB from eBay, maybe something will be diferent :)
[11:31:09] <ColdKeyboard> It says that it can only work in slave mode, does it mean that it can't transmitt BT messages or what?
[11:31:28] <Lambda_Aurigae> no clue.
[11:31:39] <Lambda_Aurigae> again, never used one, never seen one.
[11:31:48] <ColdKeyboard> ok, thank you anyway :)
[11:32:00] <Lambda_Aurigae> have to go by the datasheet.
[11:32:06] <Lambda_Aurigae> contact the maker perhaps?
[11:32:30] <ColdKeyboard> Will try... :)
[11:33:18] <Lambda_Aurigae> bound to be a website or three out there about it.
[16:43:55] <Lambda_Aurigae> w|zzy, it made it into country...is at JFK Airport in New Jerk city.
[16:44:11] <Lambda_Aurigae> or close to new jerk anyhow.
[17:22:18] <w|zzy> Awesome
[17:22:25] <w|zzy> Hopefully by the weekend.
[17:49:17] <Lambda_Aurigae> yeah.
[17:49:28] <Lambda_Aurigae> too bad I won't have time to do anything with it this weekend.
[17:53:10] <Lambda_Aurigae> might have to put together a portable dev kit again.
[17:53:38] <Lambda_Aurigae> so I can play at lunch during the week.
[19:22:14] <tzanger> Lambda_Aurigae: what're you looking for, the picjug src? I don't have it yet, I dev'd the hw and haven't got to sw yet
[19:22:31] <Lambda_Aurigae> aahh.
[19:22:41] <Lambda_Aurigae> from the webpage it sounded like you had it done already.
[19:22:56] <tzanger> I've got a couple projects like that, need to get another lull in paid work to move ahead on it and at the moment I'm swamped
[19:23:06] <Lambda_Aurigae> I know that feeling.
[19:23:19] <Lambda_Aurigae> have you actually modded m-stack for cdc or is that to be done too?
[19:25:50] <tzanger> I won't be doing cdc
[19:26:10] <Lambda_Aurigae> change of plans I take it?
[19:26:50] <tzanger> it'll have three interfaces: uart, jtag (one of the popular ones that something like avrdude can use) and something vendor specific for the outputs
[19:27:18] <Lambda_Aurigae> uart interface via HID then?
[19:27:23] <tzanger> uart might end up CDC but I don't want to use that if I can get away from it
[19:27:40] <tzanger> sonething. not sure yet but want it "driverless"
[19:27:54] <tzanger> CDC is close but heavy
[19:27:55] <Lambda_Aurigae> in order for it to tie to standard serial port type software it will need to be CDC or have a driver layer on the PC.
[19:28:18] <tzanger> no not every driverless uart is cdc
[19:28:36] <Lambda_Aurigae> what other interface do you use?
[19:28:45] <tzanger> I have some contacts at ms I will confer with
[19:29:38] <tzanger> ideally I'd like to offer jtag, swd and something pics can use too although that's another kettle of fish
[19:30:07] <Lambda_Aurigae> well, let us know when you get something. I'm interested at least.
[19:30:13] <Lambda_Aurigae> and, off to bed for me.
[19:30:21] <tzanger> although I now have a xc8 pro license so that's nice
[19:30:26] <tzanger> understood
[19:30:35] <tzanger> thanks. night
[19:31:50] <mdszy> Are there any reasons the USART wouldn't be TXing data properly?
[19:32:21] <mdszy> No matter what I'm telling it to send, it's sending 0x80 (according to my Bus Pirate)
[19:33:07] <mdszy> oh wait
[19:33:08] <mdszy> hm
[19:35:17] <mdszy> I think I found the problem.
[19:35:27] <mdszy> Seems the baud rate might not be set up properly
[19:36:17] <Tom_itx> woops
[19:36:35] <mdszy> I dunno how, though.
[19:37:39] <mdszy> I'm trying to figure out of the Teensy is running at something other than 16MHz
[19:37:45] <Tom_itx> there's always this: http://www.wormfood.net/avrbaudcalc.php
[19:37:50] <mdszy> It has a 16MHz xtal
[19:38:02] <Tom_itx> what about the ckdiv8 fuse
[19:38:12] <mdszy> Yeah, I thought there could be a fuse.
[19:38:19] <mdszy> how do you read fuses?
[19:38:30] <mdszy> isn't there an avrdude command to do that?
[19:38:31] <Tom_itx> in avrdude?
[19:38:33] <mdszy> yea
[19:38:38] <tzanger> mdszy: parity settings incorrect? too many/few stop bits?
[19:38:42] <Tom_itx> one sec
[19:38:59] <mdszy> tzanger: I've boiled it down to the baud rate being wrong
[19:39:16] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/using_avrdude_index.php
[19:39:16] <mdszy> I'm looking at it with my oscope and the AVR is sending the right data, just slower than the Bus Pirate wants it (9600 baud)
[19:39:26] <Tom_itx> that'll tell ya how to read the fuse bits
[19:39:37] <mdszy> thanks, Tom_itx
[19:39:50] <Tom_itx> sub your programmer and chip of course
[19:41:20] <mdszy> DO you know off the top of your head what programmer I need for the teensy?
[19:41:51] <Tom_itx> it's got an isp header right?
[19:41:59] <mdszy> I believe so
[19:42:02] <Tom_itx> no i'm not sure
[19:42:10] <Tom_itx> but any isp programmer would to
[19:42:18] <Tom_itx> just don't bork his bootloader
[19:43:14] <mdszy> Tom_itx: As long as I'm just reading and not writing fuses I'll be fine, right?
[19:43:40] <Tom_itx> yup
[19:43:47] <mdszy> Thanks
[19:45:19] <mdszy> whoo!
[19:45:20] <mdszy> Figured it out
[19:45:23] <mdszy> turns out it runs at 2MHz
[19:46:09] <mdszy> I'm so freaking glad I FINALLY have this figured out.
[19:46:27] <Tom_itx> ckdiv8 must be set
[19:46:46] <mdszy> Tom_itx: yeah, I looked it up and there's a forum post somewhere saying the default is 16 / 8 = 2MHz
[19:46:50] <Tom_itx> if the xtal is 16Mhz
[19:47:34] <Tom_itx> and you're probably stuck running at 2Mhz with his bootloader
[19:48:01] <mdszy> meh, that doesn't bother me
[19:48:04] <mdszy> I'm just glad I got it working is all
[19:48:08] <Tom_itx> just saying...
[23:16:52] <anton02> would you rather use a photoresistor to detect a line on a toy road or an infrared sensor?
[23:17:07] <bss36504> IR sensor
[23:17:53] <Casper> IR might be less affected by ambiant light
[23:18:11] <Casper> but black may not be black to IR
[23:18:18] <bss36504> Or rather, a photoresistor will most certainly be affected by ambient light.
[23:19:11] <anton02> Casper: i guess it doesnt matter if its black or not
[23:19:18] <anton02> Casper: just need reliable line detection
[23:19:49] <bss36504> The sensor simply has a smaller bandwidth, restricted around the IR spectrum. Black is not black, of course, since we cant see what “black” looks like with IR reflecting off. However, black does absorb more light, so the sensor will still see less intensity over what we percieve as “black”
[23:20:22] <anton02> yep
[23:45:12] <Casper> https://www.flickr.com/photos/93694432@N04/12583714024/ <=== security camera, the blanket moved, but it's the same. left is color, right is IR
[23:45:22] <Casper> black is white there