#avr | Logs for 2016-06-30

Back
[00:06:41] <_ami_> iwancoppa: i hv a no problem in paying taxes. problem is the delay in processing.
[00:07:36] <_ami_> back to work though. need to finish a task.
[00:11:03] <anonnumberanon> Is there an arm development channel just like #avr???
[00:25:33] <_ami_> anonnumberanon: there are very few people at #arm
[00:25:44] <_ami_> not sure if they talk much! :P
[00:43:19] <anonnumberanon> yeah that's weird, I find it very interesting actually
[00:43:34] <anonnumberanon> now I want to know why, and why their topic is so cheesy
[00:49:10] <Casper> http://i.imgur.com/S8y3ZUT.jpg <=== now THAT'S a macro!
[00:49:27] <Casper> (a 10 cents canadian)
[00:51:08] <Mr_Sheesh> #arm or ##arm?
[00:52:52] <Casper> good question, ain't they at the #2?
[00:53:29] <anonnumberanon> both
[03:37:55] <l9> so if i have a atmega328 i have the same as a arduino whitout a programmer?
[03:38:00] <l9> ad crystal
[03:38:46] <rue_bed> the programmer is the firmware
[03:38:53] <rue_bed> so, you have more than you think
[03:39:15] <rue_bed> if you have one arduino, you can use it as a programmer for other m328 and make more arduino
[03:39:26] <skz81> you lacks the USB<->Uart though
[03:39:30] <rue_bed> while(1);
[03:39:36] <skz81> that is used for programming
[03:39:55] <rue_bed> ok, but those are $2ea on ebay
[03:56:10] <l9> i have a usbtiny i bought of Tom_itx awhile back, just before i moved from my old aparment a year ago. just started too get my workshop up and running, so still sorting boxes
[03:56:49] <_ami_> l9: u could use it to program avr chips
[03:56:56] <_ami_> i hv a usbasp
[03:57:10] <_ami_> i will be making my own usbasp soon :)
[04:01:02] <l9> i wonder have a atmega32A PU what can i do with that, wife always complains that i use money and she sees nothing in return for it...
[04:02:01] <_ami_> l9: same situation is here.
[04:02:18] <_ami_> my wife thinks that i am wasting my time on this :/
[04:03:14] <l9> yeah same here thats why when the sun is shining i spend most my time outside with her doing gardning stuff...
[04:06:27] <woife> oh dear
[04:06:53] <_ami_> :)
[04:07:10] <_ami_> l9: what do you plan to do with avr or arduino?
[04:08:56] <l9> _ami_: well the arduino i was thinking of setting up as a controller for my greenhouse temp/humi/light and so on but i wrote the whole thing in python and loaded it into a raspberry pi i had lying around
[04:10:32] <l9> now i am considering something with wifi
[04:10:52] <_ami_> nice
[04:14:20] <l9> is there any money too made of this or am i barking up the wrong tree?
[04:16:27] <_ami_> l9: it depends
[04:16:41] <_ami_> if you come up with some idea, then u could sell this as product.
[04:17:01] <_ami_> its again depends upon where you live. is it easier to start a startup in your area?
[04:17:15] <_ami_> you need to find investors too
[04:19:07] <l9> well no dont think norway is particullary easy too start anything new in, labor cost kills here
[04:21:59] <_ami_> hrm
[04:25:23] <_ami_> l9: i hv not started a company yet. but i know few people who actually did and they are doing pretty well. i hv a permanent job and this avr stuffs is just a hobby
[04:27:52] <l9> my brother has his own software company now it took him 3 - 5 years building the foundation now he is sailing in the wind making money, he works 12 - 18 aday and i think it has taken some of the joy out of it for him.
[04:30:12] <l9> i have a goverment sallary now and i get by on that. hopefully my basement will be my workplace the rest of my days
[04:58:02] <iwancoppa> l9: Bit of a late reply :P Startups in electronics aren't too expensive; design your product so you can do all the fabrication in China with pick and place fab houses
[04:58:12] <iwancoppa> Most of your effort will be actually marketing and selling the thing
[04:58:36] <iwancoppa> And of course, there's always kickstarter if you want to dupe gullible fools into paying for your initial capital :)
[05:00:58] <_ami_> iwancoppa: :)
[05:01:37] <iwancoppa> As someone who is currently in the middle of starting a startup, I know aaaaaallll about these things :P
[05:02:02] <_ami_> iwancoppa: nice, good luck with that! :)
[05:02:10] <_ami_> please guide me! :)
[05:02:25] <iwancoppa> Well, in my case
[05:02:38] <_ami_> i want to start something but don't know what should i do first.
[05:02:44] <iwancoppa> I can't really divulge much since NDAs, but it's a product in a niche market that's also not very complicated electronics-wise
[05:03:09] <iwancoppa> The only competitor on the market is more expensive and inferior
[05:03:21] <_ami_> iwancoppa: hire me if you need help ;) freelancing :D
[05:03:45] <iwancoppa> lol
[05:03:51] <_ami_> i can hack anything ;)
[05:04:00] <iwancoppa> All I can say is that software/apps are a great value add
[05:04:16] <iwancoppa> our competitor product is two individual units. Ours is a unit + smartphone app
[05:17:51] <Snert__> what does the competitor product do?
[05:18:28] <Snert__> if it's in the wild, then it ain't no secret.
[06:20:29] <iwancoppa> Is there a way to parametric search for AVRs with LIN transceivers?
[06:34:44] <Lambda-Aurigae> iwancoppa, atmel.com
[06:35:23] <Lambda-Aurigae> http://www.atmel.com/products/microcontrollers/avr/default.aspx
[06:35:32] <Lambda-Aurigae> click on "Product Search" tab
[06:35:35] <iwancoppa> Lambda-Aurigae: The parametric search doesn't include a column for LIN controllers. Not to worry though; if you scroll through the listing page for megas and tinys, you can spot the ones with LIN
[06:35:51] <Lambda-Aurigae> click on Show/Hide Parameters
[06:35:53] <Lambda-Aurigae> it's in there.
[06:35:56] <Lambda-Aurigae> looking right at it.
[06:36:30] <iwancoppa> Doh! I'm a dick.
[06:36:45] <iwancoppa> Of course it's the big, obvious, brightly colored button too
[06:36:46] <Lambda-Aurigae> nope.
[06:36:54] <Lambda-Aurigae> just ignorant...but ignorance can be cured.
[06:43:21] <Lambda-Aurigae> it's stupidity that is terminal.
[06:43:38] <Lambda-Aurigae> or, at least, should be.
[07:24:13] <LeoNerd> Woo.. My CH340s arrived
[07:24:16] <LeoNerd> ... they're tiny :/
[07:35:47] <skz81> LeoNerd, ha ! That "scary" chip :))) (I was scared my 'duino nano's USB link would not work at all until I realized chineese clones had that one)
[07:39:40] <skz81> <iwancoppa> our competitor product is two individual units. Ours is a unit + smartphone app >> baby phone !
[07:51:36] <iwancoppa> Well, it's time to do that noob thing and ask why my USART isn't working
[07:51:54] <iwancoppa> I'm using the code snippet from the datasheet for the AVR for the receive and transmit functions
[07:51:58] <iwancoppa> transmit works fine, receive does not receive
[07:52:17] <iwancoppa> 9600 baud, 8N1, AVR running at 8mhz off internal RC
[07:52:31] <LeoNerd> Internal RC isn't necessarily accurate enough to do UART
[07:52:34] <LeoNerd> Gotta be careful with those
[07:54:59] <iwancoppa> Only spare crystal I have is a 5.0688mhz thing hacked out of god knows what, unfortunately
[07:55:40] <LeoNerd> Any crystal is fine. Crystals tend to have error margins measured in parts per million, whereas RC will be a percent or two
[07:56:07] <LeoNerd> As long as you know *what* the crystal frequency is it doesn't matter too much what that number actually is; you can set the baud rate from it
[07:57:25] <iwancoppa> fortuitously this crystal actually has an integer divisor for 115200 baud
[07:58:07] <LeoNerd> Yup
[07:58:26] <LeoNerd> I often use 14.7456 for that reason. Fastest baud-divisor chip below the 16MHz, which is the limit of most AVR chips
[08:04:27] <iwancoppa> oh dear, I think I broke something
[08:05:04] <LeoNerd> Was it the entire country of the United Kingdom?
[08:05:33] <iwancoppa> farage <3
[08:07:02] <iwancoppa> I don't think I have enough space on the breadboard to actually get this stuff all wired up without leads shorting out on the crystal case
[08:22:38] <iwancoppa> well now I've done it. can't the the bloody crystal to work
[08:23:17] <LeoNerd> correct fuses?
[08:23:39] <iwancoppa> I do believe they are
[08:26:19] <iwancoppa> external clock, SPI programming enabled, etc
[08:26:45] <LeoNerd> External clock is not a crystal
[08:26:50] <LeoNerd> You want crystal
[08:27:05] <iwancoppa> Oh shit.
[08:27:06] <LeoNerd> external clock is "some oscillator or clock generator is going to provide a square wave on the CKIN pin"
[08:27:14] <iwancoppa> Oh, that's alright then
[08:27:29] <LeoNerd> You can recover it by providing a clock there to make it ISP'able
[08:27:44] <iwancoppa> Good lord, shat myself my a moment there
[08:28:20] <LeoNerd> :)
[08:28:23] * LeoNerd hugs HVSP
[08:28:34] <LeoNerd> There's a reason the first thing I made is an HVSP programmer
[08:28:37] <iwancoppa> so I need to provide a clock on XTAL1
[08:28:44] <iwancoppa> yeah, I do intend to make one at some point
[08:29:29] <iwancoppa> especially when I start to dick around with those 8 pin tiny85's
[08:29:46] <LeoNerd> Just buy one of mine ;)
[08:29:55] <LeoNerd> https://www.tindie.com/products/leonerd/avr-hvsp-programming-bus-pirate-adapter/
[08:30:37] <iwancoppa> 2/10 not a crusty veroboard piece of junk made with a fusion of 80's vintage and aliexpress parts :P
[08:32:58] <iwancoppa> alright, now I'm reading a device sig of 0x1e950f which is an error if I'm not mistaken
[08:34:29] <iwancoppa> baud rate! Dopey me.
[08:34:45] <LeoNerd> 1e950f sounds plausible
[08:34:59] <LeoNerd> 1E = Atmel
[08:35:46] <LeoNerd> What chip is this?
[08:35:50] <iwancoppa> 1e9308 is the device
[08:35:55] <iwancoppa> mega8535
[08:35:58] <iwancoppa> in 40PDIP
[08:36:09] <LeoNerd> Ah.
[08:36:34] <LeoNerd> Idon't have the DS on that one. But yah; those numbers sound plausible for a device signature
[08:36:59] <iwancoppa> It's not the expected signature, but I'm tempted to ignore that and write the fuse bits anyway
[08:37:27] <LeoNerd> hmm... sounds a little risky
[08:37:42] <LeoNerd> What speed clock are you feeding into it? Don't forget it has to be at least.. er.. some multiple of the ISP frequency
[08:37:47] <LeoNerd> Iforget the multiple - maybe 4 or 8
[08:38:03] <LeoNerd> If you're just on the edge it might not work
[08:38:19] <LeoNerd> So you might have to slow the ISP programmer down
[08:38:59] <iwancoppa> The frequency I am feeding in to it? good question
[08:39:39] <iwancoppa> 83.33khz
[08:39:43] <LeoNerd> If all else fails just slow the programmer anyway
[08:39:44] <LeoNerd> Hah!
[08:39:53] <LeoNerd> Yes; that sounds a bit slow. You'll have to ISP it a lot slower
[08:39:54] <iwancoppa> I reckon that's a... weee bit too slow. lol
[08:40:07] <LeoNerd> There's no lower bound.. you can happily do 1 bit per minute over ISP if you have to
[08:40:24] <LeoNerd> .. though I think it would take most of a day at that rate just to reset fuses
[08:45:22] <iwancoppa> I have a feeling that my arduino with ArduinoISP on it
[08:45:27] <iwancoppa> is ignoring my avrdude speed settings
[08:45:52] <LeoNerd> Wouldn't surprise me
[08:48:20] <iwancoppa> aha! We have success. Feeding in a faster clock, we're now reading properly
[08:48:44] <iwancoppa> Or not. appears we're only just fast enough
[08:49:57] <LeoNerd> \o/
[08:50:02] <LeoNerd> Well, progress anyway
[08:50:12] <iwancoppa> Now I'm getting random device signatures
[08:50:27] <iwancoppa> Next project is making a bloody function generator!
[08:52:10] <LeoNerd> One of the things on my project heap is a clock generator
[08:52:37] <LeoNerd> Not a generic funcgen, just specifically a TTL clock. So no offset, no duty cycle, no amplitude besides a simple 3.3/5V selection or somesuch
[08:52:55] <iwancoppa> ^
[08:53:02] <iwancoppa> basically what I need right now
[08:53:15] <LeoNerd> I have a nice PLL chip for it - the Si5351
[08:53:18] <LeoNerd> Looovely chip
[08:56:47] * twnqx needs to start hunting 100mhz +-100ppm clocks :X
[08:58:34] <iwancoppa> 11 tabs open on Atmel.com
[08:58:38] <iwancoppa> send help
[09:03:58] <iwancoppa> Great success. We're now running on the bloody crystal
[09:09:11] <rue_house> whats the reason for the precision clock?
[09:11:58] <iwancoppa> Alrighty. The USART still refuses to read, and I think I can confidently say it is not a timing issue
[09:12:15] <LeoNerd> :/
[09:12:31] <iwancoppa> Actually nope, I haven't changed FOSC yet
[09:16:14] <l9> why the friggen hell is the eclipse arduino IDE so god damb buggy... it is
[09:22:18] <iwancoppa> Alright. This is getting pretty annoying.
[09:22:19] <iwancoppa> http://pastebin.com/hn1UQx5Z
[09:22:55] <iwancoppa> just does not want to work
[09:27:39] <bss36504> l9: Two reasons 1) Eclipse 2) Arduino
[09:31:11] <iwancoppa> what the hell
[09:31:14] <iwancoppa> my '9600' baud serial
[09:31:25] <iwancoppa> is running at 43.5hz
[09:31:49] <aandrew> LeoNerd: how'd the software UART go last night?
[09:31:51] <bss36504> is your clkdiv8 fuse set without you meaning to have it set?
[09:32:16] <iwancoppa> it shouldn't be...
[09:32:23] <LeoNerd> aandrew: Haven't started yet :/ Got distracted into BOM management and deciding that google drive sucks
[09:37:44] <iwancoppa> I don't think the mega8535 even has a clkdiv8
[09:42:23] <bss36504> Oh my mistake
[09:43:13] <bss36504> Why are you using an 8535?
[09:43:29] <iwancoppa> Because I have one.
[09:43:51] <bss36504> haha fair enough
[09:44:12] <bss36504> Those things are friggin old/
[09:44:25] <iwancoppa> I'm trying to do the allegedly simple task of implementing the USART code example provided in the datasheet. You'd think it'd work
[09:44:31] <iwancoppa> Yeah, no PCINTs on this sucker
[09:46:17] <bss36504> I looked, there is no clkdiv8 fuse.
[09:46:47] <iwancoppa> I just verified that the chip is running at the correct speed
[09:47:07] <iwancoppa> I've also tried manually setting UBRR to the correct value(32) manually
[09:48:51] <iwancoppa> Aha! It's now working. I believe the code snippet in the datasheet is doing something very, very wrong
[09:49:57] <iwancoppa> No it is not. Now is where I admit the stupid mistake of copying the synchronous, not asynchronous, code snippet
[09:50:10] <iwancoppa> and then wondering why my serial is running at the same speed as the dominant electrical noise in my room
[10:21:48] <bss36504> hahaha
[10:21:52] <bss36504> Happens to the best of them
[10:25:24] <LeoNerd> Hah. Yes, that would explain it :)
[10:25:40] <LeoNerd> So in lighter news, my last component arrived and meets papertest. So now I can feel happy ot order my board
[10:25:50] <LeoNerd> I may be about to make the first 328PB breakout boards :
[10:25:51] <LeoNerd> :)
[10:27:40] <bss36504> Oh you dont do it how I do? Where you make footprints and blindly order boards and components, and just hoping everything lines up? That's what I did for my reflow controller and then I found out that I transposed (and totally messed up the spacing) on one of the components because they drew the diagram as if you were looking at it from the bottom
[10:27:40] <bss36504> of the device.
[10:28:16] <LeoNerd> Hehe
[10:28:26] <LeoNerd> Oh I've done that before. Done all sorts of mistakes. That's why I now papertest them
[10:28:53] <bss36504> Maybe I should be less eager haha
[10:29:27] <bss36504> And also not make footprints at 2am. When I got the parts I looked at the datasheet, and very clearly in bold text it indicates that the drawing is from the bottom of the package.
[10:29:40] <bss36504> Thats so dumb though, who even draws packages like that?!
[10:29:57] <LeoNerd> Ahyes, that chestnut
[10:48:03] <l9> http://pastebin.com/yaawaf5t what am i missing since this dosent compile...
[10:52:14] * l9 needs coffee
[10:52:33] <skz81> l9 with only the output, and with your own native languiage ("Fila eller mappa finnes ikke") => hard to say
[10:53:36] <l9> skz81: it says it cant find the files
[10:56:23] <skz81> l9, so that the problem... You're missing some dependency to trigger le .o build, or a path is wrong somewhere so it can't find the file...
[10:59:26] <l9> http://s2.quickmeme.com/img/06/062a3d02882ff7088ab5beb12b5de116fe2bfd92f32984e3feea747253e39384.jpg
[10:59:34] * l9 gone fishing
[13:03:51] * LeoNerd orders another board, thus making 3 PCBs inflight
[13:04:00] <LeoNerd> Gotta keep that pipeline going :)
[14:43:05] <inkjetunito> have any improvements been made since avr-g++ 4.8? i mean, this thing is doing a bitwise and during runtime instead of using cbi...
[15:28:22] <carabia> http://www.hotmcu.com/hystm32f1xxcore144-coredev-board-p-2.html
[15:28:54] <carabia> This thing is a godsend
[19:33:15] <rue_house> gcc is really smart at reducing things to bitwise instructions
[19:47:47] <Casper> yes it is, unless you try to outsmart it, then hell break loose
[19:50:48] <iwancoppa> Aha!
[19:50:55] <iwancoppa> I have solved my USART problem.
[19:51:53] <Casper> PICNIC? PEBCAK? Code13? ID: 10t?
[19:52:00] <iwancoppa> It would appear that the CH340 on the nano arduino I was using as a serial<>USB bridge was not driving the Rx line low enough for the AVR to register a logic low
[19:52:09] <Lambda-Aurigae> standard i/o error.
[19:53:43] <Casper> I have a small project that scare me
[19:53:49] <Casper> usb...
[19:53:51] <Lambda-Aurigae> take more meds.
[19:54:11] <Casper> yes, I'll take some more tonight... advil will be usefull
[19:54:21] <Lambda-Aurigae> I was thinking valium
[19:54:31] <Lambda-Aurigae> All Hail Prince Valium! Yaaaawn.
[19:57:46] <Casper> I'm thinking to make a motorised antenna to put in the attic
[19:58:06] <Casper> possibly with 2 sdr dongle to it, and an avr to control the servo
[21:13:53] <jaggz> Why your USB project scare you Casper?
[23:42:30] <Casper> jaggz: usb scare me :D
[23:43:56] <iwancoppa> Casper: Why?
[23:44:32] <Casper> complex, I'm not too good at programming
[23:48:29] <Casper> but I guess the project would be simple enought...
[23:48:37] <iwancoppa> Eh, whack a generic usb<>uart on it and call it a day
[23:49:24] <Casper> yeah
[23:51:21] <Casper> still wondering how to install a new window in existing poured concrete foundation...
[23:51:33] <Casper> all I find appear to be hack jobber..