#avr | Logs for 2015-09-13

Back
[02:48:23] <Jartza> morning
[04:09:37] <sinclair> hmm, if all values i get from ADC are static what could i be doing wrong? trying to read voltage from ADC0
[04:29:41] <antto> sinclair what value is it?
[04:38:05] <sinclair> -9020
[04:54:55] <antto> uh.. what kind of adc is it?
[05:10:44] <sinclair> ADC0 free running?
[05:11:03] <sinclair> connected to a TMP36
[05:28:47] <antto> i mean.. is it possible that the adc module, or just that specific pin is not properly set and it "samples" some fixed value like min/max or so
[05:29:44] <antto> but -9020 looks odd.. differential? how many bits does your ADC have?
[05:37:36] <Xark> IOW, AVR ADC should be only 0-1023 (10-bit). Something is bogus about your ADC results...
[05:41:34] <antto> yeah.. are you flipping the byte order accidentally?
[10:40:18] <akashdeepsingh> hi. I want to toggle two LED's in my arduino-duemilanove using avr-gcc. Can someone suggest a way i can do it with interrupts?
[10:40:46] <Tom_itx> xor
[10:49:09] <antto> xor rox
[10:49:29] <Lambda_Aurigae> start up a timer to generate an interrupt every so often and in the interrupt use xor to change the state of the output pins.
[10:50:29] <Lambda_Aurigae> pretty much the same way you would do it with any avr.
[10:56:04] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/how_to/atmega168/mega168_led_blink_int_index.php
[11:45:29] <lomas> hello ! does anyone know what is the amount of ripple persent on a PC's USB port ?
[11:47:54] <Tom_itx> 3
[11:48:00] <Tom_itx> no
[11:48:04] <Tom_itx> 26
[11:48:11] <Tom_itx> wait...
[11:48:15] <Tom_itx> 358
[11:49:39] <Tom_itx> the point is.. it will vary from one pc to another
[11:49:46] <Tom_itx> measure it
[11:50:49] <Lambda_Aurigae> the 5V output on usb can vary from 4.45 to 5.25 volts.
[11:50:53] <Lambda_Aurigae> by spec.
[11:50:56] <Lambda_Aurigae> I've seen them outside of that.
[11:51:11] <Lambda_Aurigae> as for ripple, that varies from computer to computer.
[11:51:22] <lomas> Tom_itx: okay.. I was getting trouble in designing a filter circuit taking power from USB port.
[11:51:56] <Lambda_Aurigae> usb spec says 4.75 to 5.25 with +/- 5% under load...
[11:52:15] <lomas> Lambda_Aurigae: yeah.. I was predicting same..
[11:52:22] <Lambda_Aurigae> 100mA default with up to 500mA negotiated for usb 1.1 or usb 2.0
[11:52:40] <Lambda_Aurigae> usb 3.0 specs are about the same with higher total current capability by spec.
[11:53:01] <Lambda_Aurigae> on laptops running from battery I've seen usb voltage as low as 4.0V
[11:53:14] <lomas> Lambda_Aurigae:and which value of capacitor can be suitable to put across +5V-0V for stability ?
[11:53:25] <Lambda_Aurigae> now, granted, that was a very old laptop with early usb 1.1.
[11:53:35] <Lambda_Aurigae> that all depends on your application.
[11:54:11] <Lambda_Aurigae> when driving a 3.3V ldo regulator from usb power I usually put a 100nF and a 10uF to 47uF on the input side of the regulator.
[11:54:20] <lomas> Lambda_Aurigae: now we get around 5V from USB 2.0 and I heard that 3.0 can provide current upto 900mA.
[11:54:44] <lomas> my application consumes around 300mA of current max..
[11:55:00] <Lambda_Aurigae> does your usb device negotiate that much current?
[11:55:23] <Lambda_Aurigae> because by default, usb 1.1 and usb 2.0 only provide 100mA...any draw more than that and you can be cut off if you don't ask for it.
[11:56:09] <lomas> I guess so.. coz its desktop on. or am I wrong ?
[11:56:39] <Lambda_Aurigae> some computers will allow more draw by default...but by specification, 100mA is the max without negotiating.
[11:57:49] <Lambda_Aurigae> usb 3.0 specifies 150mA it looks like.
[11:57:55] <Lambda_Aurigae> with 900mA max..
[11:58:01] <Lambda_Aurigae> increasing in 150mA units.
[11:58:22] <Lambda_Aurigae> https://en.wikipedia.org/wiki/USB#Power
[12:00:40] <Jartza> evening
[12:00:56] <lomas> Lambda_Aurigae:thank you very much.. its true..
[12:01:00] <Lambda_Aurigae> Jartza, morning.
[12:01:07] <Lambda_Aurigae> lomas, of course it's true..it's on wikipedia!
[12:02:18] <lomas> okay time to go.. thanks Tom_itx, Lambda_Aurigae :) Will be on chat on confusions.
[12:02:37] <Lambda_Aurigae> confusion say, man who stand on toilet, high on pot.
[12:05:10] <Jartza> just ordered 10 boards of these: http://gerblook.org/pcb/7wiuVGdgwzzrpQgG74ApPW
[12:08:02] <Lambda_Aurigae> and that board will do either mono or color?
[12:09:49] <Lambda_Aurigae> too bad it won't run well at 3.3V
[12:18:31] <Jartza> Lambda_Aurigae: well, I thought the chips are actually one of the cheapest parts, so why make shield for mono
[12:18:41] <Jartza> if people want mono, they might want to make smaller board anyway
[12:18:53] <Lambda_Aurigae> or some jumpers to go this way and that.
[12:19:12] <Lambda_Aurigae> the prg_red/green/blue...those are programming points?
[12:19:23] <Jartza> I thought about it but the jumpers cost almost the same as adding a chip :)
[12:19:28] <Jartza> yeah, programming headers
[12:20:32] <Jartza> same programming header as in tagsu
[12:22:19] <Lambda_Aurigae> could add a programming chip in there!
[12:22:20] <Lambda_Aurigae> hehe
[12:22:24] <Lambda_Aurigae> feature creep!
[12:22:35] <Jartza> heh
[12:23:08] <Lambda_Aurigae> if you are going ardweeny, add a chip or three that can connect the programming pins to the ardweeny spi pins or something...one chip at a time.
[12:24:25] <Jartza> Lambda_Aurigae: https://slack-files.com/files-pub/T02FEAMUS-F03E9QZ93-10761fe7d3/img_20150122_182211_2.jpg
[12:24:43] <Lambda_Aurigae> pogo pins?
[12:25:08] <Jartza> well, sort of. that's spring loaded "board-to-board" connector
[12:25:12] <Lambda_Aurigae> aahh.
[12:25:33] <Jartza> this http://www.avx.com/docs/catalogs/9188.pdf
[12:25:40] <Lambda_Aurigae> yanno, I still like card edge stuff.
[12:26:02] <Lambda_Aurigae> anyhoo, time to go make sawdust.
[12:26:53] <Jartza> I've made myself another version where instead of those straight pins there's this umm... "fish shaped" spring, which holds the connector in place while developing
[12:55:38] <Jartza> I want to make another version which has pins in 0.1" raster
[12:55:46] <Jartza> so the adapters are easier to solder :)
[15:40:34] <gorroth> https://github.com/grimwm/avr -- code i'm writing that i just threw up tbere. it needs cleaned up and lookup tables used in place of the switch-cases, but this was good enough to begin testing everything
[15:40:44] <gorroth> i'll build out a whole lib and get it up there
[15:40:52] <gorroth> anyway, have to go for now. have errands to do today