#avr | Logs for 2016-07-18

Back
[03:20:58] <Jartza> https://www.theguardian.com/business/2016/jul/18/arm-holdings-to-be-sold-to-japans-softbank-for-234bn-reports-say
[03:37:10] <carabia> Well, good move
[04:12:02] <Grogdor> alrighty, sticking my first avr on a board so here goes:
[04:12:24] <Grogdor> im going to be doing icsp but also having other device (probably just the SD card) on the spi bus
[04:12:56] <Grogdor> some places recommend a series resistor on the spi lines, others say that may affect bus speed and recommend an external pullup on each slave's SS instead
[04:16:09] <Grogdor> it's a low-power, not too noisy device so how big of a pullup can i get away with?
[04:50:50] <carabia> Grogdor, your avr's at 5 volts?
[04:51:33] <carabia> because if you run it at 3v3 you won't be needing any series resistors
[04:52:24] <Grogdor> im still debating, do have 3v3 available but likely end up at 5
[04:52:33] <Grogdor> how does lower vcc eliminate possible spi bus contention?
[04:52:53] <carabia> oh, you're talking about programming it
[04:53:20] <Grogdor> yeah ICSP with other devices on the SPI
[04:53:30] <carabia> well, i've never ran into trouble actually programming a device with other devices hooked on the same spi
[04:53:35] <carabia> so, *shrug* really
[04:54:14] <Grogdor> do you employ the bus series or ss pullup resistors?
[04:55:06] <Grogdor> i think if i run 5v vcc and yank main power during programming the sd card wont even be powered during programming
[04:55:17] <carabia> Neither, and I'm still too sleepy to figure out how series resistors on the bus help
[04:55:32] <carabia> If you want to be ultra-safe I guess drop a pullup on the cs's
[04:55:59] <carabia> Well no, yeah, I actually figured it out.
[04:56:21] <Grogdor> do tell im just going by the datasheet haha
[04:57:01] <carabia> "yank main power"?
[04:58:36] <carabia> I've used a wide and varied selection of sd-cards and avrs, none of which I've had any problems not implementing bus termination or external cs pullups. But as I said, if you want to be really sure, just drop that pullup resistor on the chip select
[04:59:55] <carabia> And I've tried a pullup on the line, when I had issues with specific cards (wasn't related to the cs in the end however), 10k will do just fine, tried it at least up to 10 MHz
[04:59:59] <Grogdor> yeah if the power is off, theres no 3v3 for the sd card and the arduino can power from the programmer
[05:01:01] <carabia> And you won't be running any faster SPIs than 10 MHz with attinys or atmegas
[05:01:03] <Grogdor> alright thanks ill give it a shot
[05:01:17] <carabia> Grogdor, yeah sure it works, if the 3v3 is separate from the +5
[05:01:22] <carabia> v
[05:02:11] <carabia> also, Grogdor the sd-cards inputs aren't really 5v-tolerant
[05:02:36] <Grogdor> yes there will be a level translator :)
[05:02:59] <carabia> You don't need like an elaborate bidirectional "level translator"
[05:03:05] <carabia> You can just use a simple buffer
[05:03:30] <carabia> avr will happily register 3v3 levels of MISO
[05:03:35] <carabia> at 5 volts, that is
[05:04:32] <carabia> or, like what I initially meant was that you can use a series resistor to limit the current so the clamp diodes on the card wont go bust if you wanna run it straight 5v
[05:05:23] <carabia> resistor on the sck mosi and cs lines, that is
[05:05:32] <Grogdor> yep i gotcha
[05:06:28] <Grogdor> was looking at the different parts, ive got 1v8 and 3v3 uarts that'll need interfacting and was wondering how the SD card would just get away with a buffer
[05:06:35] <Grogdor> could*
[05:07:28] <Grogdor> from some reading, it seems a series resistor can affect the spi speed
[05:08:01] <Grogdor> probably just try it a few ways and do whatever saves me the most different/parts heh
[05:10:43] <carabia> from experience, i know a cd4050b is good up to 5 MHz
[05:11:31] <carabia> it's a hex buffer, so you can use that to cover the sd cards and at least one uart granted you're not using handshaking
[05:11:40] <carabia> sd card rather
[05:11:56] <Grogdor> 74hc4050d is what this breakout board has...
[05:12:18] <Grogdor> yeah the 3v3 uart is just rx/tx
[05:12:39] <Grogdor> but the 1v8 will likely need.. a lot more
[05:13:29] <carabia> should be alright.
[05:14:00] <Grogdor> anyway thanks for your time, nice when things are making sense
[05:25:40] <carabia> yeah sure, no probs
[07:52:10] <_ami_> is there any vim scripts for avr asm code?
[07:53:02] <_ami_> got it.
[08:39:20] <_ami_> apparently, founder of arm is not happy. https://twitter.com/hermannhauser/status/755008815553273858
[09:29:49] <inflex> so it seems.
[10:35:32] <_ami_> inflex: yup.
[10:36:24] <_ami_> there are two ways to look at this
[10:37:01] <_ami_> ARM is future and will grow more.
[10:37:38] <_ami_> on the other hand, UK biggest company sold out
[10:37:51] <_ami_> to non-uk company.
[10:38:33] <_ami_> 31b us dollar is damn too good to ignore.
[10:45:47] <kre10s_> how do I get from avrdude.conf.in to avrdude.conf?
[10:57:39] <cehteh> running all the setup lore .. autoconf/automake & friends
[10:58:38] <cehteh> .in should be a m4 thing, but i dont know what it includes, if its really simple one can possibly do that manually
[12:18:37] <ferdna> i would like to add a magnet to a pcb board
[12:18:40] <ferdna> how can i protect it...
[12:18:48] <ferdna> its only for holding it to metal surfaces
[12:18:51] <WormFood> Protect what, from what?
[12:19:11] <WormFood> Protect the magnet? The PCB? Something else?
[12:19:59] <WormFood> You want to attach a magnet toe a PCB, and protect the magnet, so it doesn't scratch up shit, and doesn't break your magnet, right?
[12:20:36] <ferdna> no... so it doesnt damage the electronics
[12:20:57] <ferdna> i was thinking something like this:
[12:21:13] <WormFood> huh? So the glue? epoxy? What doesn't what electronics?
[12:21:14] <ferdna> http://tinyurl.com/jkxmk6s
[12:21:40] <WormFood> You don't have permission to access "http://www.homedepot.com/p/MASTER-MAGNETICS-10-lb-Round-Base-Pull-Latch-Magnets-2-Piece-per-Pack-96694/203613206?" on this server.
[12:21:55] <WormFood> sooooo......
[12:22:31] <ferdna> so will a magnet being close to electronics damage them?
[12:22:53] <WormFood> I guess home depot thinks that I couldn't possibly be a customer of theirs, since I'm in China....I'm guessing that is why I'm blocked (and not because I'm not using javashit)
[12:23:02] <WormFood> Damage what? How?
[12:23:27] <ferdna> general electronics
[12:23:28] <WormFood> The magnetic field can affect some things, like a hall effect sensor, or a reed switch.
[12:23:31] <WormFood> No
[12:23:43] <ferdna> cool
[12:23:47] <WormFood> It would have to be extremely strong, before it started to disrupt things.
[12:24:18] <WormFood> An ordinary magnet won't hurt any electronics, but pay attention, to things like what I just said.
[12:30:24] <WormFood> I enjoy looking at all the different shapes of rare earth magnets that I can buy, and wonder what some of them can be used for.
[13:53:57] <bss36504> I mean, if a stationary magnet could harm solid state electronics, it could probably pull iron out of your body, so you're fine.
[13:54:22] <liwakura> i just joined recently
[13:54:37] <liwakura> and the cut off part of the conversation i witnessed throws some questions
[13:54:46] <liwakura> what the fuck are ya talkin bout
[13:54:59] <bss36504> "could a magnet on a PCB harm the electronics"
[13:55:12] <bss36504> paraphrasing
[13:55:14] <liwakura> interesting question.
[13:55:29] <bss36504> Short answer: "No"
[13:55:36] <liwakura> could a magnet permanently pull a relais switch?
[13:56:18] <bss36504> I suppose, but since field strength decreases exponentially, I would think that any PCB-mounted magnet would practically be too small.
[13:56:43] <bss36504> (too small to have a strong enough field to influence a relay some non-trivial distance away)
[13:57:30] <Emil> Hmm
[13:57:50] <Emil> What data goes between a PS/2 keyboard and a computer so that numlock etc will light?
[13:58:19] <liwakura> gosh
[13:58:22] <grog> keyboard scan codes?
[13:58:25] <bss36504> is that not a keyboard side thing on PS2?
[13:58:31] <liwakura> nah
[13:58:49] <liwakura> there is some code that allows the computer to enable each of the 3 led's at will iirc
[13:59:34] <grog> well ps2 is bidirectional and the computer can toggle its own caps/num/scroll lock so...
[15:21:17] <_ami_> which pcb design software is best to start with?
[15:25:35] <LeoNerd> I quite like kicad
[15:26:37] <_ami_> LeoNerd: thanks.
[15:27:03] <inkjetunito> is the free version of eagle gone now?
[15:27:22] <LeoNerd> The free version is quite restricted. Board area, layer count, can't use it for "commercial purposes"
[15:29:13] <inkjetunito> yeah, i also use kicad now, but i find it quite crappy
[15:29:50] <LeoNerd> Any particular issues? I'm generally familiar with it.. could just be a case of features being hard to find
[15:35:07] <cehteh> i like kicad, but one has to get used to it
[15:35:37] <inkjetunito> LeoNerd: so far, i've only used the schematics editor and the library editor. the library editor problem can be fixed quite easily i think. adding new parts is just painful
[15:35:50] <_ami_> i think learning these tools has a fairly steep learning curve.
[15:35:51] <LeoNerd> Well it doesn't have a concept of "parts" like Eagle does
[15:36:09] <_ami_> i might need to invest fair amnt of hours
[15:39:55] * _ami_ installing kicad
[15:40:57] <inkjetunito> _ami_: make sure it's the latest stable version
[15:41:54] <_ami_> inkjetunito: ok, installing from ubuntu repos. 16.04
[15:42:20] <_ami_> version: 4.02
[15:42:26] <inkjetunito> yeah, that's the one
[15:42:56] <LeoNerd> Oh I build it from source.. :) More up-to-date then
[15:43:20] <eszett> what kind of version is BZR6298
[15:43:38] <LeoNerd> The 6298th commit into revision control
[15:43:50] <LeoNerd> So, just newer than 6297 but just older than 6299
[15:43:51] <LeoNerd> :)
[15:44:03] <eszett> and this resembles to which version, V4?
[15:46:06] <eszett> or in other words, which BZR number does correspont to which version number?
[15:46:41] <LeoNerd> Ah; dunno. I presume the help button tells you a version
[15:47:06] <eszett> doesnt
[15:47:22] <LeoNerd> Heh.. curiously not
[15:47:37] <LeoNerd> 4.0.0 6336
[15:47:40] <LeoNerd> says bzr tags
[15:47:50] <LeoNerd> 4.0.0-rc1 6188
[15:47:54] <LeoNerd> So, somewhere between those
[15:48:05] <eszett> ah thats answers my question thx
[15:48:18] <_ami_> time to sleep,
[15:48:20] <_ami_> nn
[15:48:31] <eszett> so I don't need to install a newer version, V4 is good enough
[16:12:09] <antto> guys, how do i use the parallel port with avrdude and linux? it doesn't give me permission cuz i ain't root
[16:12:36] <LeoNerd> surely: gain access to the parallel port?
[16:12:43] <LeoNerd> There's presumaly some group you can be in
[16:12:47] <antto> i remember i had similar issues with using USB-serial, i had to add myself to the "serial" user group, or was it "dialup" group
[16:13:05] <LeoNerd> Find out what group the device node is in; probably /dev/lp0 or similar
[16:15:52] <antto> avrdude tries to use /dev/parport0
[16:16:03] <antto> as far as i can tell, it's owned by root
[16:17:21] <LeoNerd> ls -l /dev/parport0
[16:18:16] <antto> it says crw-rw-r-- 1 root lp 99, 0, june...
[16:18:26] <LeoNerd> OK, so the "lp" group then
[16:18:39] <LeoNerd> so you ought to be able to use it if you're in that group
[16:22:12] <Snert> get root.
[16:22:19] <Snert> be bothered no more.
[16:23:29] <Snert> praps sudo would work too.
[16:24:08] <LeoNerd> Or... use the groups like you're supposed to :P
[16:24:44] <antto> okay, it worked after i logged out
[16:25:16] <antto> i made myself another stk200 programmer ;P~
[16:25:21] <LeoNerd> Yes; groups are set on a per-process basis.. usually only login processes gain them
[16:25:26] <antto> just need to test it.. soon
[16:25:30] <LeoNerd> For testing new group stuff sometimes I just ssh localhost :)
[16:26:30] <antto> i butchered a USB cable for it ;P~
[17:14:00] <xa0z> So, in my arduino script, I'm using the digispark keyboard library and I was wondering if there is a way to make sure the device registers to a computer as a keyboard (or HID device) before it attempts to execute the script?
[17:14:14] <xa0z> I want to ensure it actually is working before I make another function work.
[17:27:05] <miosz> hi all, i'm playing with v-usb and attiny85 with internal clock 16,5MHz. Unfortunetly computer recognize my device only sometimes, usually it looks like this (log from dmesg): http://pastebin.com/BdGt1n5M Here is my circuit: http://codeandlife.com/wp-content/uploads/2012/02/tiny85_schematic2.png except that i have switched PB1 with PB2 (i switched it in config too, so thats not a mistake). Any idea what may be wrong?
[18:07:01] <cehteh> miosz: there are some hacks to syncronize the RC osc with the usb clock do you use that?
[19:12:05] <miosz> cehteh: i think so, i have this: http://pastebin.com/BvMXXdND
[19:13:56] <cehteh> try it simpler, i once played with OSCCAL too tried to make it smart and it turned out to be bad :D
[19:14:32] <cehteh> just add a deadband around your target frequency because osscal is quite coarse
[19:14:58] <cehteh> and then OSCCAL++ or OSCCAL-- while you are not within the deadband
[19:17:08] <cehteh> https://github.com/micronucleus/micronucleus/tree/master/firmware they do some osscal stuff for v-usb too
[19:19:15] <miosz> huh, their osccal stuff is even harder :D
[19:21:00] <miosz> sorry for such a noob question
[19:21:22] <miosz> but what do you mean by my "target frequency"
[19:21:39] <miosz> i mean, from where i can get it (or calculate)
[19:23:23] <cehteh> target would be your framelength which you use to sync with
[19:23:32] <cehteh> http://git.pipapo.org/?p=muos;a=blob;f=src/muos/hw/atmel/avr/clock.c;h=6de92fedcbf41f02393b340af27378e44a22e7bd;hb=HEAD#l44
[19:23:42] <cehteh> thats my stuff, but doesnt use v-usb
[19:24:48] <cehteh> well your code looks basically ok, i think, but bit overcomplicated and i'd add some extra check at the end if the final value is really correct, for debugging at least
[19:25:18] <cehteh> run it a second while watching usb packets and compare how far off you are
[19:27:58] <cehteh> i cant help much more, maybe the problem lies somewhere else, maybe on reset the usb isnt properly reinitalized/disconnected leaving the state on the computer side wrong, maybe needs a bit wait before you restart again? dunno
[19:32:33] <miosz> here is the beggining of my program: http://pastebin.com/HRw5jKn6 It's mainly copied from here: http://codeandlife.com/2012/06/18/usb-hid-keyboard-with-v-usb/
[19:38:47] <miosz> wireshark shows this: GET DESCRIPTOR Response DEVICE[Malformed Packet]
[19:47:12] <miosz> do you think that it might be caused by switching PB1 and PB2?
[19:54:08] <cehteh> you only switched the ports or also their configuration and circruity?
[19:54:48] <cehteh> usb is a bit unusal as it 'normally' uses differential signals but in some cases the lines are not driven symetric
[19:55:06] <cehteh> you cant just switch D+ and D-
[19:55:42] <cehteh> v-usb should account for that, but i dont know the details
[19:56:05] <miosz> ok, i'll try to unswitch them, maybe it will help
[19:56:30] <miosz> thanks for your help (:
[19:59:23] <cehteh> how do you connect it electrically? and does your tiny run at 3.3v?
[19:59:51] <cehteh> usb signals are 3.3v and not 5v tolerant
[20:00:48] <cehteh> and the connection is not symetric https://www.obdev.at/Images/vusb/circuit-zoomed.gif D- has a pullup, D+ dont
[20:01:08] <cehteh> (and when you running at 5V you need to do level shifting as well, possibly with some zeners)
[20:01:51] <cehteh> http://rn-wissen.de/wiki/images/4/4e/Level-conversion-with-zener.gif
[20:05:32] <miosz> yeah, tiny run on 5V and i have 3v6 zeners
[20:08:29] <miosz> the point is that on "model" circuit D+ is connected to PB2 and D- to PB1 (via 68Ω resistors and D- i pulled up by 2k2Ω) and on my circuit D+ is connected to PB1 and D- to PB2, but D- is pulled up and D+ not, as they should
[20:08:43] <miosz> I also changed config in vusb
[20:09:32] <Lambda_Aurigae> you can't just switch D+ and D- on vusb or on hardwareusb.
[20:09:33] <miosz> and it works.. sometimes, but usually there is "device descriptor read/64, error -32"
[20:09:45] <Lambda_Aurigae> specially on v-usb because it relies on specific timing and interrupts.
[20:10:24] <miosz> ok, so it's like D+ have to be connected to INT0 pin?
[20:10:27] <Lambda_Aurigae> you need to follow the pin/port connections pretty specifically with v-usb because of the way it hacks the usb commmunications.
[20:10:33] <Lambda_Aurigae> yeah..
[20:10:46] <Lambda_Aurigae> if you read the source comments it tells you exactly why.
[20:10:55] <miosz> ok, thank you so much
[20:11:13] <Lambda_Aurigae> I don't understand why people won't read.
[20:11:40] <miosz> i did it by mistake and i was hoping that i'll be able to fix it without resoldering and rearraging pcb
[20:11:59] <miosz> but now it's clear why it doesnt work
[20:12:11] <miosz> thank you (:
[20:12:15] <Lambda_Aurigae> welcome.
[22:47:16] <carabia> referencing an earlier comment on arm, mr hauser was "founder of arm", he was a CO-FOUNDER of acorn, which in turn was one of the companies that put ARM together
[22:47:31] <carabia> so surely mr hauser has contributed to britain, but he was one of many.
[22:48:02] <carabia> mr hauser wasn't "founder of arm"
[22:48:07] <carabia> *