#avr | Logs for 2014-04-14

Back
[02:24:31] <megal0maniac_afk> Casper: I hope that's in your own house ;)
[02:25:29] <GargantuaSauce> i have a black sweater that's quite reflective in IR
[02:26:48] <GargantuaSauce> shows as sort of a pale pink to a webcam with the filter removed. very disconcerting.
[03:26:08] <w|zzy> Did you back it megal0maniac_afk?
[03:33:53] <megal0maniac_afk> I have :)
[03:34:00] <w|zzy> Aweseom :)
[03:34:11] <w|zzy> The worst part is waiting :(
[03:34:27] <megal0maniac_afk> The el cheapo option, but you've gathered that by now
[03:35:28] <megal0maniac_afk> I mostly wanted to support nickjohnson. Don't know what I'll actually do with the thing :P
[03:35:45] <megal0maniac_afk> But tools are always handy
[03:50:18] <w|zzy> The early bird one?
[03:50:38] <w|zzy> I've used my current one more than I thought i would
[03:51:02] <w|zzy> Testing power supplies at work mainly
[03:57:03] <megal0maniac_afk> w|zzy: Yeah. I only really with 5V in the mA range :P
[03:57:29] <w|zzy> Even at uni?
[03:57:31] <megal0maniac_afk> You can't really use it for audio amplifiers, right?
[03:58:09] <megal0maniac_afk> w|zzy: Every now and then we play with 3 phase, but not a lot of practical stuff with heavy current. I'm in the computer systems stream so it's mostly programming and light current
[03:58:12] <w|zzy> I don't know. Ask Nick
[03:58:37] <megal0maniac_afk> It's DC. I doubt it
[03:59:08] <w|zzy> So don't know much about analog
[03:59:56] <w|zzy> I wanted to do comp eng :-(
[06:35:44] <clixxIO_> Hi megal0maniac_afk, Hi Lambda_Aurigae
[06:36:03] <Lambda_Aurigae> hello clixxIO_
[06:36:13] <clixxIO_> I got the Attiny85 softuart going - it's nice
[06:37:31] <clixxIO_> I made a little serial terminal where I can turn on and off the pin using a command console
[06:37:58] <clixxIO_> that is, the Attiny85 is the host, haha
[06:38:19] <clixxIO_> back like the good ol' days
[06:38:22] <clixxIO_> https://github.com/clixx-io/clixx.io/tree/master/examples_attiny/serialcontroller
[06:39:17] <clixxIO_> I can do things like 'd1o=1' - turns on Digital-1 output port
[06:39:30] <clixxIO_> to turn on the led for example
[06:40:10] <clixxIO_> to turn it off, I then go 'd1o=0', pretty trivial yeah
[06:40:30] <clixxIO_> but I will connect it up as an Internet-of-Things controller
[06:41:03] <clixxIO_> and get it to make things go bing and bong etc
[06:41:05] <Lambda_Aurigae> use an enc28j60 and make a mini-telnet server.
[06:41:24] <clixxIO_> yeah, could do that
[06:42:12] <clixxIO_> but that would be going back to wired. It's a good idea, but I'm hung up on getting bluetooth working
[06:42:32] <Lambda_Aurigae> but that still requires a PC to be in the line.
[06:42:49] <Lambda_Aurigae> with the enc28j60, it will be a real network connected device.
[06:42:53] <clixxIO_> not really. It could be just an Android phone
[06:43:07] <Lambda_Aurigae> so a mini-pcish-thing.
[06:43:16] <clixxIO_> If it's on bluetooth, it's still a network device
[06:43:50] <clixxIO_> well the Android phones these days often have more grunt than a lot of the older pc's that people still have
[06:44:21] <clixxIO_> I'm not disagreeing. Just that wired is sometimes impractical
[06:45:14] <clixxIO_> except where it has POE
[07:31:55] <clixxIO> does anybody know how to read the input on an attiny85? I would like to read PB2
[07:32:13] <clixxIO> I'm using GCC
[07:32:27] <Tom_itx> Pinx
[07:35:45] <clixxIO> I can find this page - http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=121543
[07:35:59] <clixxIO> but can't really see where I read the pin
[07:41:42] <Tom_itx> clixxIO, http://tom-itx.dyndns.org:81/~webpage/avr/c_bits/bits_index.php
[07:42:21] <clixxIO> Thanks. I think I'm good now.
[07:42:46] <clixxIO> I'm definitely a beginer with these Attiny85's
[07:43:10] <Tom_itx> they're pretty much all the same
[07:46:45] * Lambda_Aurigae is wondering how one would write a software uart without knowing how to read and write i/o pins....
[07:47:34] <clixxIO> just type 'make'
[07:47:51] <Lambda_Aurigae> oh, so you didn't write that software uart you posted then.
[07:47:51] <clixxIO> at the command-line easy*
[07:48:11] <clixxIO> that would take far too much time
[07:48:24] <clixxIO> and concentration
[07:49:19] <clixxIO> People already told me that I'm not such a good programmer
[07:49:52] <clixxIO> I can deal with it
[07:51:10] <clixxIO> as you can see in the project code I use, all the original copyrights are left in : https://github.com/clixx-io/clixx.io/blob/master/examples_attiny/serialcontroller/softuart.c
[07:52:01] <clixxIO> I'm definitely not claiming that I wrote it
[07:58:38] <clixxIO> in one example, somebody is saying "DDRB |= (1<<PB2); " then "PORTB |= (1<<PB2); "
[07:59:01] <clixxIO> but isn't that setting PB2 for output then turning the port high?
[08:00:36] <clixxIO> shouldn't it be more like DDRB &= ~(1<<PB2); ? to set it as input
[08:19:11] <clixxIO> loos like I might be able to figure that out myself
[08:19:59] <clixxIO> next question, the Attiny85 doesn't have a low-power mode. Does this mean that the Atmega328p may have lower power consumption using sleep mode?
[08:20:44] <clixxIO> somebody might know the answer to that quickly, that's why I'm asking first
[08:22:12] <rootB> i feel terrible for programming on the arduino
[08:22:17] <rootB> feels as if everyone is making fun of m
[08:24:18] <clixxIO> why so? what's wrong with Arduino?
[08:24:26] <rootB> everyone semes to bash it
[08:24:31] <rootB> "YOURE NOT LEARNING ANYTHING, ETC ETC."
[08:25:03] <clixxIO> I see them used in Universities as a learning tool
[08:25:13] <rootB> yeah
[08:25:16] <bss36504> Here ya go: It looks like the sky is the limit, then you smash into the glass ceiling. In the process, you learned very little about how a microcontroller works.
[08:25:38] <rootB> I've programmed with bare circuits before
[08:25:43] <rootB> PIC, Atmel
[08:25:51] <rootB> and arduino seems to be pretty good to get a prototype running
[08:26:06] <bss36504> Oh yeah, just as long as it’s not the ONLY exposure you get
[08:26:16] <rootB> i havent program in a while lately.
[08:26:24] <rootB> I do know my basic arduino and so
[08:26:28] <rootB> know how to get it all running
[08:26:30] <bss36504> I dont think it’s terrible as a HW/SW platform, but for learning I think the lower the level the better.
[08:26:44] <rootB> Im gonna probably start programming atmel
[08:26:50] <bss36504> Good
[08:26:55] <rootB> bare atmel from mthe arduino
[08:27:08] <bss36504> yeah that’s not a bad idea
[08:27:15] <clixxIO> times have moved on, knowing the basics is old school
[08:27:24] <clixxIO> just load facebook on, and learn from there
[08:27:43] <rootB> i dont even have facebook..
[08:28:09] <clixxIO> but your great-grandchildren do
[08:28:16] <rootB> im 21..
[08:28:33] <clixxIO> ok, wait a few years
[08:29:11] <rootB> i was trying MSP430 C
[08:29:13] <rootB> But when it came to
[08:29:17] <rootB> I2C
[08:29:21] <rootB> my ship burned down
[08:29:24] <rootB> i couldnt find a lot of info
[08:29:27] <clixxIO> 21 and no facebook, that's not typical. That would mean that you might actually know how to talk to other humans with voice and so forth
[08:29:28] <rootB> and the community seemed very.. dead.
[08:30:01] <clixxIO> Even the MSP430 has a new Arduino type development environment now
[08:30:12] <rootB> tried using that one once
[08:30:14] <rootB> full of bugs
[08:30:17] <clixxIO> with analogWrite and so forth
[08:30:31] <rootB> Im gonna try reading
[08:30:32] <rootB> i mean
[08:30:38] <bss36504> clixxIO: You’re one of those “You kids and your facebooks and your twitters dont know how to do nothin!” people, arent you.
[08:30:40] <rootB> It's better than watching my chinese cartoons.
[08:31:01] <clixxIO> No, I use facebook
[08:31:08] <bss36504> haha alright then
[08:31:38] <rootB> well
[08:31:43] <rootB> seems that the AVR irc seems friendly
[08:31:44] <clixxIO> I even know how facebook works, on mobile platforms
[08:31:48] <rootB> and not dead like the MSP430 avr.
[08:31:55] <rootB> and not dead like the MSP430 room
[08:31:59] <rootB> i think im gonna switch to atmel.
[08:32:30] <clixxIO> The MSP430 is used in lots of professional situations
[08:32:42] <rootB> really?
[08:32:44] <clixxIO> just not so popular with hobbyists I'd say
[08:33:02] <clixxIO> military/healthcare for example
[08:33:12] <rootB> there's not much help around
[08:33:20] <rootB> for the msp430
[08:33:25] <rootB> and the books are p bad.
[08:33:26] <clixxIO> information is classified
[08:34:05] <clixxIO> avr's probably aren't as good but the information is widely available
[08:35:19] <twnqx> hm, i still am trying to figure out if those guys who said "free programming tools available for linux (command line)" were right for one arm
[08:35:26] <twnqx> sadly i forgot which arm in the meantime :X
[08:35:32] <rootB> well
[08:35:34] <rootB> im going to sleep
[08:35:37] <rootB> catch you on the flip side
[08:35:42] <twnqx> i should do that
[08:35:50] <twnqx> but i wonder which time zone you must be in
[08:35:58] <twnqx> (what is even eat of here... australia?)
[08:36:02] <twnqx> east*
[08:38:36] <clixxIO> yes it's bed-time here
[08:39:04] <bss36504> oh man, my day is just starting
[08:39:40] <clixxIO> well programming time is still going at 11:30pm here
[08:39:49] <clixxIO> start of the graveyard shift
[08:40:13] <bss36504> it’s 9:30am here on the east coast, US
[08:40:42] <clixxIO> cool, just after coffee time
[08:43:15] <clixxIO> bss36504: what are you making there ?
[08:52:07] <clixxIO> well, I will go back to coding my eventFramework for my Attiny85
[08:52:51] <clixxIO> and Internet-of-Things, try to get some routing happening
[08:53:17] <clixxIO> bye all
[08:59:40] <The_Coolest> hey guys
[09:51:10] <kastein> so I don't remember who asked me to do this, but I was requested to provide a minimum codebase that exhibits the issue I was asking about - half the port F pins on my AT90CAN64 (bits 4-7) always read low, even when I've verified in hardware that they are at 5V like the rest and their config in the DDRF and PORTF registers are exactly the same.
[09:51:30] <kastein> I'm not enabling *any* specialty I/O in this example, just portf and portg
[09:52:12] <kastein> all VDD and VSS pins check out, I'm not half-powering the chip or anything like I initially suspected since I figured PORTF could be split between two supply domains
[09:52:46] <kastein> http://pastebin.com/VQVRwVcG
[09:53:42] <kastein> if anyone's got any ideas, I'd be rather grateful. otherwise I'm going to keep screwing around with it and see if I can figure it out
[09:55:23] <kastein> ahaha, holy shit
[09:55:30] <kastein> nothing like a fresh mind after the weekend, figured it out
[09:56:08] <kastein> it wasn't anything in my code, which is why I was bashing my head against the wall... it seems when you use ISP mode (and possibly other modes) on the jtagice3 it sets the JTAGEN fuse by default
[09:56:16] <kastein> I could swear that wasn't set when I was using the AVRISP2
[09:56:24] <kastein> alright, now I feel dumb, but I learned something
[09:58:30] <kastein> yep. everything works perfectly with my actual codebase loaded into the flash, my work here is done
[09:59:02] <megal0maniac_afk> Sounds like JTAG
[09:59:14] <megal0maniac_afk> Except obviously not
[09:59:27] <megal0maniac_afk> Oh. I finished reading. It was. Go me :)
[09:59:42] <kastein> yup!
[10:00:22] <kastein> after 4 hours of fucking around with an o-scope and double checking my logic and software config of all the peripheral modules Friday I was pretty sure it was a hardware issue
[10:00:43] <kastein> so I desoldered the damn microcontroller and threw a new one on, PQFPs aren't much fun... then went through it all again
[10:01:12] <kastein> never even thought to double check the fuse bits because all of port F worked great on my last board with this controller, when I was using the avrisp2...
[10:01:32] <kastein> so either I screwed up my fuse bits and never noticed, or it's set by default when using jtagice3, will have to find out sometime
[10:01:45] <kastein> but either way, learned an important lesson, check the damn fuse bits before getting the iron out
[10:01:51] <kastein> lol
[10:03:32] <jacekowski> kastein: JTAGEN is enabled by default
[10:03:56] <jacekowski> kastein: otherwise you wouldn't be able to program fresh uC with jtag
[10:04:10] <kastein> weird, I wonder how the hell my last project board ever had port F work properly
[10:05:04] <kastein> does turning the ADC module on override that or something? because I had the ADC turned on, and F1/2/5/6 as digital outputs with F0/3/4/7 as ADC inputs (it made my board routing much easier)
[10:05:14] <kastein> but that's a good point, and something I'll need to remember
[10:05:22] <jacekowski> i'm not sure
[10:05:34] <kastein> either way, it threw me for a hell of a loop
[10:05:36] <kastein> lol
[10:06:12] <jacekowski> but it's pretty much standard on every uC that all programming interfaces are enabled by default (not only AVR)
[10:06:25] <kastein> yeah, that makes a ton of sense
[10:06:47] <kastein> the sad thing is, I suspected that jtag was on somehow, and checked my software config to make sure it wasn't
[10:06:57] <kastein> because the nonfunctional pins lined up perfectly with it
[10:07:01] <kastein> never thought to check fuses
[10:07:46] <megal0maniac_afk> Is it not possible to disable JTAG in software? Might be a good idea, just in case. Then your firmware will work regardless of the fuse setting
[10:10:52] <kastein> I'm honestly not sure, I'll check
[10:11:00] <jacekowski> unlikely
[10:11:05] <kastein> but if I had to make a WAG, the fuse overrides software
[10:11:05] <jacekowski> although possible
[10:18:14] <Roter> hey guys, i have a lot of beepers from old computers (i believe they are the same as buzzers), how would i be able to use them to create sound with an mcu? I am trying too google, but i cant find a tutorial or a good example.
[10:19:13] <uhsf> I'm starting a keyboard project using one ATMega32U4 breakout board, from SparkFun. I have configured LUFA so when I press a key switch, the letter 'a' is sent to the PC. After giving the avrdude command, the board is recognized as a USB HID keyboard. The problem is that when I press the key switch, no character appears on screen. How to solve this? Can someone here look at my code and tell me what I need to change?
[10:20:21] <kastein> breakpoint your code somewhere in the middle and see if the values you expect are on the i/o pins and in your variables
[10:20:47] <kastein> then work forward or backward toward the i/o input or toward the usb data output end of your code until you find the bug
[10:24:56] <uhsf> kastein: I don't really know how to breakpoint code for a hardware project. Should I blink LEDs? or get output into terminal? or use a multimeter? it's really not as easy as for software only.
[10:28:11] <myself> isn't this what jtag and debugwire are all about?
[10:28:19] <myself> I have no understanding of how that works in practice, though.
[10:33:33] <kastein> ^ he's right
[10:33:47] <kastein> once you have it set up in your dev studio and hardware, it's pretty nice
[10:34:18] <kastein> I haven't bothered yet, since my code's simple enough that I can typically just dump data to one of the UARTs and read it with either an oscilloscope or hyperterm
[10:34:32] <kastein> but last time I used it, it was great
[10:35:36] <myself> Heh. Software debug info via 'scope trace? What is this, 1966?
[10:36:37] <kastein> I know right?
[10:37:05] <kastein> most of the time my code works great first try after it actually compiles, the one time it didn't I just needed the value of one variable to figure it out :P
[10:37:24] <kastein> if I run into a harder bug I'll bother to get debugwire or jtag working
[10:37:49] <kastein> (I was planning on using it for this board and then I realized I routed all the pins for my jtag header wrong. durr)
[10:39:26] <uhsf> I just read a little about debugWIRE. I am using USB for programming and it's much more simple for me that way. What debug features am I missing with USB?
[11:07:35] <uhsf> Casper, rue_shop2, tzanger: I think some of you live in QC. Do you know a place where I can get help for a hardware project? I know about Foulab and echoFab. Do you have something to say about these? I'm also looking for having my project done by a company like GGI International. Do you know if they are good?
[11:35:59] <tzanger> I don't live in QC, I'm in ON
[11:36:05] <tzanger> uhsf: ^^
[11:36:56] <tzanger> also if you're a small time project you may be better off with a smaller contract mfg. I do engineering support for one here in Kitchener, ON. They're very good and will offer a lot of help in the design process with respect to how to make a design that is easily (thus cheaply) manufacturable and testable.
[11:45:26] <uhsf> ty tzanger, so you suggest that I choose a smaller contractor than GGI, so it would cost less. Kitchener is a little too far unfortunately. I will try to ask for help on SparkFun forum, AVR Freak, etc. and see what I can get.
[12:09:46] <Casper> uhsf: I went to foulab, and got deceived there. but it also depend what kind of help you need, you can still ask them, maybe they can help if they wantr
[13:37:57] <bss36504> Hey, can you guys take a look at a snippet of code? http://pastebin.com/SBvu9tyG It’s supposed to set up timer0 as a CTC interrupt. The ISR does not fire properly though, however the BADISR vector does. Cant figure out why though. Micro is a mega32U4
[13:49:20] <bss36504> Well geez, dont all jump up at once
[13:52:15] <myself> Heh.
[13:52:19] <myself> Place is quiet sometimes.
[13:52:23] <bss36504> indeed
[13:52:26] <myself> And some of us have no idea and qisely keep our mouths shut.
[13:52:36] <bss36504> I suppose that is appreciated as well
[13:52:44] <bss36504> but I mean, 158 people who dont know?
[13:52:49] <bss36504> seems unlikely
[13:53:27] <myself> 148 of whom are AFK right now, and 2 of whom are us. :)
[13:54:32] <bss36504> haha
[13:54:38] <megal0maniac_afk> bss36504: Some people are at work, others are asleep, others don't check irc every 5 minutes, others don't know, others were discourages by your sarcastic comment and don't want to help anymore :)
[13:54:52] <megal0maniac_afk> *discouraged
[13:55:09] <myself> Nah, that wasn't sarcastic. It was forlorn.
[13:55:21] <bss36504> wasnt meant as sarcastic. I
[13:55:33] <bss36504> i’m here enough to know that it gets empty sometimes
[13:55:45] <megal0maniac_afk> There are many people in this channel who have never said a word. Don't know if bots or what
[13:56:21] <bss36504> I also usually sign off when i’m not available, I guess I (somewhat incorrectly) assume and/or feel that others do the same.
[14:05:40] <bss36504> i am such an idiot. the code was fine…it helps when you actually type in the correct vector name...
[14:06:24] <myself> Well.
[14:06:30] <myself> Happy to... not have to help!
[14:06:35] <synic> heh, I think there are some ISR examples out there with the incorrect vector name
[14:06:42] <synic> cus I've done the same thing
[14:09:37] <bss36504> haha yeah i felt like such a dummy. I blame the intelli-type in studio for autocompleteing the ISR name for me :P
[22:32:46] <gp5st1> So, I have been playing around with lisp lately and wanted to try my hand at a simple "compiler" I'm still missing a few critical pieces (like ifs and procedures) but I think it's a fun start:) https://github.com/jimktrains/mulic
[22:35:55] <gp5st1> well, and the register allocation algo isn't all that smart