#avr | Logs for 2015-09-06

Back
[01:05:20] <gorroth> so, i got my avr working nicely with the rpi now. it turns out that after avrdude uploads a binary to the avr from the rpi's spi pins, it sets the rpi's reset pin to input, which causes occasional 0v to be thrown to the avr, causing sporadic resets
[01:05:45] <gorroth> so i just had to add a couple lines to make makefile to set the gpio reset pin to output high, which fixes all the weird problems i was having
[01:10:44] <Casper> does your avr have a pullup on reset?
[01:16:31] <gorroth> no
[01:16:38] <gorroth> i guess i could've done that instead though
[01:16:56] <gorroth> herpaderp... maybe i'll do that and try that out instead
[01:17:41] <gorroth> that'd be better, because then i don't have to worry about what the rpi is doing when it first boots up
[01:21:12] <gorroth> thanks for the thought, Casper
[01:23:02] <Casper> that pullup is required for proper operation anyway
[01:25:34] <gorroth> yes, you're right
[01:25:42] <gorroth> sorry, i'm kind of new to electronics in general
[01:25:44] <gorroth> but that makes sense
[01:25:48] <gorroth> i've added it, and it works nicely now
[01:26:46] <gorroth> now when the rpi and avr come on, the avr will immediately start operation how it should. the gpio pins on the rpi seem to come up in input mode anyway
[01:26:52] <gorroth> so this fixes that
[01:30:47] <Casper> have you tought about the decoupling cap for the avr?
[01:32:38] <gorroth> no, what do you mean?
[01:33:01] <gorroth> oh
[01:33:03] <gorroth> i looked it up
[01:33:13] <gorroth> i didn't know such a thing existed, but the description of it makes sense to me
[01:33:39] <gorroth> so, in a general sense, i've thought about that, but i didn't really think about how to solve it
[01:34:07] <gorroth> i'll get this basic PWM test code working and doing pulses the way i like, and then i'll start figuring out how to add a decoupler cap
[01:35:11] <Casper> basically, every chip power/ground pin pair should have a small ceramic capacitor
[01:35:16] <Casper> 0.01-0.1µF
[01:35:30] <Casper> located as close as possible to the chip pin
[01:36:53] <gorroth> Casper: you mean i should have a cap between the power/ground pins on the avr?
[01:38:40] <Casper> yes
[01:38:59] <Casper> actually 2 ideally, but the second is less important...
[01:39:27] <Casper> one between VCC/GND, and a second between AVCC and AGND (new datasheet just say GND now...)
[01:41:12] <gorroth> yeah, my m88 sheet says GND and not AGND
[01:41:28] <gorroth> Casper: okay, i'll put something like that
[01:41:39] <gorroth> i'll do it after i get my test code running, because right now i'm trying to figure out how to setup and use the pwm
[01:50:54] <gorroth> i'm gonna head to bed now, but i think i just read and understand ch. 16 of the m88 sheet and follow the pwm sample code for libc avr, i'll be well on my way to mastering the PWMs
[01:51:04] <gorroth> i'll also put into use the decoupling caps, Casper, and learning more about that
[01:51:06] <gorroth> thanks again
[02:12:16] <ferdna> does anyone knows about lasers? co2 and plasma
[03:18:44] <abcminiuser> aandrew: pong
[03:19:34] <abcminiuser> SYN
[03:32:32] <lald> you didn't send him your sequence number
[03:32:37] <lald> *them
[03:32:42] <lald> how are they going to ack
[03:36:07] <abcminiuser> SYN
[12:21:49] <rue_house> gorroth, are you still wrestling with pwm?
[12:50:38] <gorroth> rue_house: yeah, i just woke up and am about to read ch. 16 of the m88 sheet and go over the libc avr code regarding it
[12:50:53] <gorroth> i was starting to understand how they work on the avr a bit
[13:09:06] <rue_house> gorroth, there is a counter, that can turn a pin on and off at particular values
[13:09:16] <rue_house> the counter is hooked to a clock rate genorator
[13:09:24] <rue_house> that works off the system clock divided down
[13:10:58] <rue_house> in general, you set the divider for the pwm rate you want, you set the counter to use it as a source, you set the high and low value of the counter, and how you want it to reset the count, and you enable it to toggle the io pin it controls
[13:11:50] <rue_house> gorroth, that all make sense?
[13:14:09] <rue_house> gorroth, what channel you getting going?
[13:17:21] <gorroth> rue_house: that makes sense and lines up with what i know so far. the only thing i didn't know yet is that the clock will be divided
[13:17:34] <gorroth> rue_house: i need to have two separate channels going so i can drive two externally connected motors
[13:18:11] <gorroth> rue_house: i was going to setup the 16-bit T/C1, but i don't know if OC1A and OC1B will just output the same values or not
[13:24:33] <gorroth> okay, looks like i can setup OCR1A/B as the comparisons in order to get OC1A/B to behave differently
[13:45:29] <rue_house> yup
[13:45:58] <rue_house> amazing how many people suddenly need to get ahold of you and get you to do things *right* when you finish setting up a job to do some welding
[13:58:01] <gorroth> hehe
[13:58:22] <gorroth> well, i'm still working through the demo code and the doc, but i think i'll have something running by tonight
[14:13:09] <gorroth> just one more thing to help me understand, as i think i'm basically starting to understand the data sheet and demo code
[14:13:51] <gorroth> the fastest way to modulate between high/low on the OC1n pin is to set OCR1n to TOP on one timer interrupt and then BOTTOM on the next timer interrupt, and to continue like that, right?
[14:14:23] <gorroth> so basically you control the time you are high on the pins is by writing different values to the OCR1n pins?
[14:14:32] <gorroth> OCR1n registers*
[14:18:22] <Casper> PWM don't even need interrupt
[14:19:19] <Casper> set PWM mode, set prescaller, set top, set output mode... that's about it
[15:32:23] <Chillum> this is interesting: http://sustburbia.blogspot.co.uk/2014/03/further-wanderings-in-low-power-land.html I did not know you could run these on such low voltage
[15:32:57] <Chillum> 31kHz is slow, but if your program does a lot of waiting then it will not matter
[18:54:30] <Shavik> I currently have the Rigol DS1052E Scope and it has served me well while I've been starting out with electronics but I'm now yearning for more and am looking at the DS1054Z (50Mhz, hackable to 100Mhz, 4 channels) and DS2072A (70Mhz, hackable to 300Mhz, 2 channels). I'm so torn on which one to get
[18:54:51] <Lambda_Aurigae> whatever you can afford.
[18:55:01] <Shavik> They both have similar features such as intensity grated display, etc
[18:55:07] <Lambda_Aurigae> wish I could afford even a 10MHz scope.
[18:55:14] <Shavik> They both are in my price range but I'm torn on the 2 vs 4 channel aspect
[18:55:22] <Shavik> The 2072 also has double the sample rate
[18:55:41] <Lambda_Aurigae> kinda depends on what you want to do with it.
[18:55:51] <Lambda_Aurigae> the 4 channel would be nice for doing logic analysis sometimes.
[18:55:54] <Shavik> I have mainly so far dealt with digital signals like i2c, spi, etc but now am working on my first arm device and it uses ddr2 so it's kind of a new area for me
[18:56:16] <Shavik> Well I have a saelae logic analyzer but I was hoping to use the built in analyzer on the Rigol
[18:56:23] <Shavik> Both models have i2c and spi decoding
[18:58:08] <Yoduza> ddr2?
[18:58:37] <Lambda_Aurigae> it takes special gear to diagnose ddr2 signals as I recall.
[18:59:01] <Shavik> Well was mainly thinking with the 2 channel 2072A at 300Mhz I could at least look at the differential clock signals
[18:59:06] <Shavik> since I think they run at 133Mhz?
[18:59:27] <Shavik> And it's only be two signals so the 2 channel wouldn't impede that but 4 channels sure would be nice.
[18:59:33] <Yoduza> better to use esp8266 devboard chip ~$5 and dont fuck the mind with ddr2
[18:59:37] <Shavik> All of this wouldn't be a concern if I could afford the 4 channel model lol
[18:59:53] <Lambda_Aurigae> sitting here installing debian 8.1 on a 2.5GHz core i5 notebook I acquired for free this morning.
[19:00:00] <Shavik> This is for a custom linux controller
[19:00:17] <Shavik> We currently are using off the shelf arm based linux HW but we're looking to move it in house
[19:00:22] <Lambda_Aurigae> Yoduza, ummm...what does the esp8266 and ddr2 have to do with each other?
[19:00:38] <Shavik> lol yeah thats a wifi chip?
[19:00:48] <Shavik> Not sure I see the relation
[19:00:58] <Lambda_Aurigae> one is a microcontroller with wifi built in...the other is ram for much faster and higher end processors
[19:01:10] <Yoduza> that chip have ~5T flops a second..
[19:01:32] <Lambda_Aurigae> the esp8266 doesn't do 5tflops per second.
[19:02:06] <Yoduza> atmega328 have 10Gflops a second
[19:02:14] <Shavik> I've been looking at the Atmel SAMA5
[19:02:22] <Shavik> Their latest ARM I think
[19:02:40] <Shavik> Been using ATMega328's and 324PA's on projects so far
[19:02:47] <Shavik> So this will be quite the step :)
[19:02:52] <Shavik> 2 or 3 BGA packages, etc
[19:03:54] <Lambda_Aurigae> Yoduza, 10 billion flops? 10 billion floating point operations per second?
[19:03:58] <Lambda_Aurigae> no flippin way!
[19:04:10] <Lambda_Aurigae> first off, no AVR has a floating point processor so it would all be done in software.
[19:04:17] <Yoduza> " floating point " = operations "++"
[19:04:26] <Lambda_Aurigae> second, the chip only runs at a max of 20MHz...not GHz.
[19:04:48] <Shavik> That is one reason I was looking at the SAMA5
[19:04:55] <Yoduza> 20MHz chip multiply on 10000 inside..
[19:05:04] <Shavik> It does have floating point hardware along with the new NEON stuff
[19:05:13] <Shavik> so some signal stuff we may do in the future will be faster
[19:05:21] <Yoduza> quartz for Celeron ~8MHz
[19:05:24] <Shavik> It's a "future" thing.. just in case lol
[19:05:35] <Lambda_Aurigae> Yoduza, avr doesn't have floating point hardware....no avr can do 10Gflops...not even cooled with liquid nitrogen.
[19:05:54] <Yoduza> Cortex-M3 have..
[19:05:58] <Lambda_Aurigae> so?
[19:06:00] <Lambda_Aurigae> that's not an avr.
[19:06:21] <Yoduza> Lambda_Aurigae, dont fuck me mind, ok ?
[19:06:44] <Lambda_Aurigae> you are the one that said the atmega328 could go 10Gflops a second.
[19:06:58] <Lambda_Aurigae> I'm trying to set you straight...it can not..nowhere even close.
[19:07:36] <Yoduza> Lambda_Aurigae, try to make simple while/do on ++ and you have 10Tflops on atmega328
[19:07:38] <Lambda_Aurigae> not sure you could even get 1M flops per second on an atmega328
[19:07:52] <Lambda_Aurigae> 10T = 10 trillion.
[19:07:54] <Shavik> This guy is a troll lol
[19:07:56] <Lambda_Aurigae> 10000000000
[19:08:06] <Lambda_Aurigae> avr runs max 10Mhz
[19:08:08] <Lambda_Aurigae> 10000000
[19:08:14] <Yoduza> *10Gflops onatmega..
[19:08:15] <Lambda_Aurigae> 3 orders of magnitude LESS.
[19:08:30] <Lambda_Aurigae> and that's not even flops which is floating point operations.
[19:08:49] <Lambda_Aurigae> or, rather, Floating Point Operations Per Second
[19:08:59] <Lambda_Aurigae> so saying flops per second is kind of redundant.
[19:09:07] <Lambda_Aurigae> as the "ps" is already "per second"
[19:09:22] <Yoduza> ++ = flops on avr chips
[19:09:37] <Lambda_Aurigae> flops is floating point operations...not integer addition.
[19:09:52] <Lambda_Aurigae> and you can't get 10 billion operations per second on an avr.
[19:09:56] <Yoduza> [23:39:10] <Lambda_Aurigae> first off, no AVR has a floating point processor so it would all be done in software.
[19:09:59] <Lambda_Aurigae> at most, 20 million operations per second.
[19:10:17] <Lambda_Aurigae> atmega328 does not have a floating point processor...no atmega or attiny does.
[19:10:27] <Yoduza> dont fuck my mind, ok ?
[19:10:29] <Lambda_Aurigae> possibly some atxmega chips do but that's a different world.
[19:10:50] <Lambda_Aurigae> you are talking flops...Tflops even...that is billion floating point operations per second.
[19:10:58] <Yoduza> use your spi/i2c/dma and go away..
[19:11:15] <Yoduza> i am use only wifi chips ; )
[19:11:36] <Lambda_Aurigae> there are no atmega or attiny chips with wifi built in either.
[19:12:00] <Yoduza> you try to fuck me again ?
[19:12:05] <Lambda_Aurigae> some with other radios but not wifi far as I remember.
[19:13:06] <Yoduza> Shavik, #esp8266
[19:13:21] <Shavik> I don't need a wifi chip but thank you
[19:13:35] <Shavik> Wifi is not reliable enough for my applications
[19:13:44] <Shavik> Required hardwired networking
[19:14:15] <Yoduza> ok, use your spi/i2c on max 1.1Mbit..
[19:14:38] <Shavik> I'm not really sure what you mean
[19:15:00] <Shavik> RJ-45 Ethernet, 10/100 etc
[19:15:12] <Shavik> That is what we are looking to use. So The SAMA5 has that built in which is a nice plus
[19:15:16] <Yoduza> start from 100 pins ?
[19:15:56] <Yoduza> wifi have 0.0 pins :D
[19:16:56] <Lambda_Aurigae> and is prone to interception, latency, and interference.
[19:18:08] <Lambda_Aurigae> and a board or product made with it requires fcc certification in this country to be sold commercially.
[19:18:35] <Yoduza> it easy to make barier in esp8266, when spi/i2c chip fuck the mind with 1000000 pins soldering.. + energy waste..
[20:36:22] <Shavik> Lambda_Aurigae.. That guy was something else... :/
[20:38:13] <Lambda_Aurigae> was, is, and will be again.
[20:38:31] <Lambda_Aurigae> he wanted to do bitcoin mining on an arduino.
[21:03:55] <Casper> lol
[21:05:18] <Lambda_Aurigae> the guy has no clue what a microcontroller is or is capable of.
[21:08:43] <Casper> oh I'm sure you can bitcoin mining on it....
[21:08:50] <Casper> ... but it won't be fast
[21:09:13] <lald> Sure it will. Get a mining ASIC, bitbang PCI with your arduino, and you're golden. :)
[21:09:52] <Lambda_Aurigae> well, apparently they can do like 10Gigaflops on an atmega328
[21:10:20] <Casper> is that he said?
[21:12:36] <Lambda_Aurigae> yes.
[21:13:08] <Casper> lol
[21:13:56] <Lambda_Aurigae> <Yoduza> atmega328 have 10Gflops a second
[21:14:43] <Lambda_Aurigae> then something about an 8MHz celeron.
[21:17:44] <Casper> I wish avr was that powerfull
[21:17:52] <Casper> now...
[21:17:54] <Casper> tell me...
[21:17:58] <Casper> where's my iron?
[21:18:19] <Lambda_Aurigae> in the laundry room on top of the washing machine.
[21:27:20] <Casper> that would be in the ceiling, under the bath
[21:28:55] <O0ddity> So I am trying to repurpose a cheap USBASP
[21:30:02] <O0ddity> Is it possible to use the ISP pins for somthing else
[21:30:04] <Shavik_> Hmm wierd I get disconnected randomly from freenode
[21:30:33] <Lambda_Aurigae> O0ddity, of course..the isp pins are usually used for spi as well.
[21:31:52] <O0ddity> Im using a betamcu USBASP 2011 - Schematics and board layout -> https://github.com/flabbergast/AVR/blob/master/usbasp/betemcu_2011.zip
[21:31:57] <Lambda_Aurigae> they are just gpio pins with extra functionality.
[21:32:17] <O0ddity> ok
[21:32:37] <Lambda_Aurigae> O0ddity, usbasp hasn't really changed over the last 5 or so years.
[21:32:56] <O0ddity> I know, but some boards are diffrent
[21:33:05] <Lambda_Aurigae> v-usb based programmer that works most of the time.
[21:33:25] <O0ddity> basiclly im looking at the source and it hurts
[21:33:45] <Lambda_Aurigae> v-usb is a fun toy but I would never use it for a commercial app myself.
[21:35:34] <O0ddity> I'm hoping to turn it into a cheap controller adpater
[21:36:14] <O0ddity> I'll try to think of a useful question...
[21:36:17] <Lambda_Aurigae> depending on how its wired you should be able to get access to the usart pins.
[21:36:28] <Lambda_Aurigae> v-usb is a real mess though.
[21:41:44] <O0ddity> ok, I am woundering if i reprogram the USBASP via its ISP(?) lines (MISO, MOSI SCK, RST), and the new firmware uses those lines to do stuff. Whill the device be esstianlly bricked, i.e. unprogrammable?
[21:42:42] <Lambda_Aurigae> no
[21:42:48] <Lambda_Aurigae> I do it all the time.
[21:43:04] <Lambda_Aurigae> just make sure whatever is hooked to those lines doesn't take control of them.
[21:43:30] <Lambda_Aurigae> when you put it in programming mode by holding the reset line low for a certain amount of time then those lines go into programming interface mode.
[21:46:15] <Casper> FOUND IT!
[21:46:21] <Casper> in the box with the pneumatic sander!
[21:46:34] <O0ddity> so unless i screw the fuses, holding rst low will always put an avr into programming mode
[21:46:35] <Lambda_Aurigae> right where it belonged.
[21:46:42] <Lambda_Aurigae> yes.
[21:48:22] <Lambda_Aurigae> only way to break that is to turn the reset pin into a gpio pin...
[21:48:33] <Lambda_Aurigae> rst_disable fuse if your particular chip supports that.
[21:48:42] <Lambda_Aurigae> there are other ways to fuck up the programming interface.
[21:48:48] <Lambda_Aurigae> like disabling it
[21:49:01] <Lambda_Aurigae> it is possible to disable ISP.
[21:49:23] <Lambda_Aurigae> it is also possible to screw the pooch on the clock source.
[21:51:21] <Casper> clock source is easyish to recover (just feed a fast enought clock to the chip)
[21:51:31] <Lambda_Aurigae> true.
[21:54:49] * Casper wonders if 145C is enought for toner transfert...
[21:55:18] <Lambda_Aurigae> what brand toner?
[21:55:33] <Casper> HP
[21:55:44] <Lambda_Aurigae> 350F-ish
[21:55:57] <Lambda_Aurigae> that's the melting point anyhow.
[21:56:09] <Casper> ok... so that may also explain the difficulty I got...
[21:56:25] <Casper> now I have some better paper... and just checked the iron temp... so a bit low still..
[21:57:08] <Tom_itx> i found i had to play with things using different papers
[21:57:13] <Tom_itx> not all perform equally
[21:57:38] <Tom_itx> i do know the copper has to be clean
[21:58:47] <Tom_itx> haven't done any in quite a while though
[21:59:13] <Lambda_Aurigae> copper should be ultra-clean.
[21:59:17] <Casper> I bought some specialised paper, press and peel blue, it is supposed to react with the toner and add a second layer, which is exactly the issue I had: too thin...
[21:59:23] <Lambda_Aurigae> I clean it with acetone myself.
[21:59:23] <Tom_itx> ^^ what he said
[21:59:37] <Lambda_Aurigae> and I use press-n-peel blue.
[21:59:37] <Tom_itx> i use a 3m pad AND acetone
[21:59:42] <Tom_itx> i hate that stuff
[21:59:49] <Tom_itx> i've still got some
[21:59:49] <Lambda_Aurigae> and a somewhat modified t-shirt press.
[22:00:03] <Tom_itx> it flattens out the traces too much
[22:00:13] <Tom_itx> if you don't get even pressure on the transfer
[22:00:28] <Lambda_Aurigae> hence, the t-shirt press.
[22:01:22] <Tom_itx> i used a clothes iron
[22:02:05] <Lambda_Aurigae> I used to.
[22:02:56] <Tom_itx> i just used photo paper
[22:02:57] <Lambda_Aurigae> till I got a t-shirt press cheap/free.
[22:04:27] <Lambda_Aurigae> I found old magazines worked better.
[22:05:50] <Tom_itx> i can't complain about these: http://tom-itx.no-ip.biz:81/~webpage/toaster_oven/cont_rev1top.jpg
[22:05:52] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/temp/tiny/tinyboard1.jpg
[22:06:10] <Tom_itx> the latter is a tiny 10
[22:08:00] <Casper> Failure
[22:08:03] <Casper> copper lifted
[22:09:13] <Casper> ... ok.... are they pure junk board... or....
[22:09:58] <Lambda_Aurigae> what board?
[22:10:04] <Lambda_Aurigae> the usbasp?
[22:10:17] <Lambda_Aurigae> cheap chinese made junk most likely.
[22:11:24] <Casper> http://i.imgur.com/BAsnFBe.jpg
[22:12:15] <Lambda_Aurigae> never seen that happen.
[22:12:24] <Tom_itx> me either
[22:12:26] <Lambda_Aurigae> you moved the paper though.
[22:12:50] <Casper> yeah it seems like the paper moved, I see 2 transfert... but... WTH happened to the copper?!?
[22:13:38] <Tom_itx> that's some crap copper
[22:13:46] <Tom_itx> i've never seen that before
[22:15:30] <Casper> or the temp was way too high for too long... the paper browned
[22:15:51] <Lambda_Aurigae> yeah,,,bit too high.
[22:27:16] <Casper> ALMOST!!!
[22:27:36] <Casper> I got transfert everywhere, except in an iron hole...
[22:31:42] <Casper> even better... but a tiny part didn't transfered, so I guess the issue now is to figure out how to get even pressure...
[22:33:48] <Casper> maybe a silicon mat would help... would make more even pressure...
[23:23:29] <Casper> can't get good transfert... hmm
[23:39:05] <gorroth> Casper: oh, okay. well, i thought TOP had to be set to whatever the PWM's TOP was, unless i'm using the mode where i can set TOP to some value in OCR1A
[23:39:21] <gorroth> except i want to have both OC1A and OC2B output two different values