#avr | Logs for 2014-07-23

Back
[02:36:33] <Broot> So uhm AVR
[02:36:40] <Broot> I bought a TEXAS msp430
[02:36:52] <Broot> THATI WANT TO LEARN TO PROGRAM IN gcc
[02:37:03] <Broot> I've heard that AVR has a "bigger community"
[02:37:05] <Broot> is that true?
[02:39:39] <Broot> anyone..?
[02:41:06] <antto> no idea about texas..
[02:41:27] <antto> avr/gcc surely has a pile of folks
[02:42:06] <antto> my impression is that avr chips aren't the cheapest ones, if that matters
[02:42:20] <Broot> well
[02:42:26] <Broot> I guess its good if im leaving the arduinbo scene right?
[02:42:48] <antto> no idea about this arduino thing..
[02:43:26] <antto> i only have some experience with atmega 162 and 2561, and pretty much no other microcontrollers
[02:43:39] <antto> so i guess i shouldn't be giving advice ;]
[02:44:05] <Broot> oh well
[02:44:21] <antto> wait a bit for someone else to answer
[05:32:48] <jack101> Hi guys, I have a problem what i cant explain.. I have an ISR which is used to Preemt tasks. If i call the ISR from software. After the reti it jumps directly into the ISR again.
[05:35:48] <w|zzy> I have no reason, why it should have been so plain?
[05:38:48] <jack101> Here the preemtion ISR http://pastebin.com/VhUPRgw6
[05:52:46] <Lambda_Aurigae> Broot, msp430 is a newcomer to the microcontroller world. I have heard there is a gcc compiler port for it but haven't tried it yet. AVR has been around a lot longer and has a much larger userbase by an order of magnitude at least I would say.
[06:01:17] <Lambda_Aurigae> jack101, do you have that timer running when you call the ISR manually?
[06:02:22] <Lambda_Aurigae> jack101, and I'm pretty sure you don't put SEI() and CLI() inside your ISR.
[06:02:23] <jack101> Lambda_Aurigae: yes, and every time they ISR is called the timer is reset in the schedule method.
[06:03:26] <jack101> Lambda_Aurigae: but the ISR is naked so u dont have the epiloge and prologe, in the ISR
[06:04:34] <Lambda_Aurigae> looking at the avr-libc manual, the only thing they add to a naked ISR is the reti()
[06:06:14] <jack101> Lambda_Aurigae: but if there are hardware interrupts?
[06:06:37] <Lambda_Aurigae> and you seem to be calling an external routine there, schedule(), from inside the ISR...that's usually a nono.
[06:08:22] <jack101> Whats ur advice there? I need this to select the next task to be scheduled.
[06:08:24] <Lambda_Aurigae> not sure all the way around...just some suggestions. I haven't had my morning glass of milk yet.
[06:09:22] <Lambda_Aurigae> have you looked at RTOS and how it works?
[06:11:47] <jack101> well I read a lot of code these days ^^. But the most have thier ISR written in assembler I think.
[06:12:47] <Lambda_Aurigae> that's probably to make it as small as possible,,and as fast..
[06:13:11] <Lambda_Aurigae> an ISR should be tiny, short, sweet, and to the point.
[06:21:07] <Lambda_Aurigae> my one foray into writing a multitasking OS for the avr ended up with a supervisor task.
[06:22:29] <Lambda_Aurigae> I started by just doing a round robin between tasks then added a supervisor task..so the interrupt always made the jump to the supervisor then the supervisor would setup for the next task and jump to it.
[06:31:26] <jack101> Lambda_Aurigae: I found the problem it was the configuration of the timer. and F_CPU was not set correctly. So after a while the timer would overflow constantly and calling the ISR after the interrupts are disabled.
[06:37:45] <Lambda_Aurigae> see..my useless suggestions helped you look and find the real problem.
[11:45:43] <jhn> What is the recommended chip to adapt 5V SPI to 3V3 CPU? That would be one MISO/MOSI each, and at least two lines for chip selects.
[11:46:39] <kastein> I just did this but I can't remember what the hell I used
[11:50:06] <jhn> Looks like alzheimer desease is wide spread.
[11:50:35] <kastein> I might have alzheimers, but at least I don't have alzheimers
[12:38:02] <Tom_itx> jhn, you can use resistor dividers or NXP makes a nice level translator
[12:39:02] <jhn> tom_itx: part id?
[12:39:56] <Tom_itx> 771-GTL2003PW-T
[12:40:12] <Tom_itx> GTL2003PW
[12:40:28] <Tom_itx> they make from 2 wide to many
[12:40:40] <Tom_itx> that one is 8 iirc
[12:40:59] <Tom_itx> bi directional, no enable required
[12:46:23] <jhn> tom_itx, sweet, merci!
[12:46:36] <Tom_itx> np
[14:57:53] <N1njaneer> Hello AVR folks
[15:01:54] <bss36504> Howdy
[15:02:05] <N1njaneer> Hey bss!!
[15:02:16] <bss36504> Whats new?
[15:02:30] <N1njaneer> Goats, AVR, and Solidworks. An odd combination!
[15:03:44] <bss36504> Sounds like a fun day. I was attempting to repair my weed whacker before a big storm rolled in.
[15:03:56] <bss36504> It *was* working, now it wont start.
[15:04:04] <bss36504> I've never been a very good mechanic
[15:04:43] <N1njaneer> As Mitch Hedberg said "If my car won't start, and the guage isn't on 'E' I'm screwed."
[15:05:23] <N1njaneer> We've got some heavy overcast and misting going on here right now. Moody day.
[15:05:34] <myself> if it ain't broke, fix it 'til it is!
[15:06:12] <bss36504> haha yup, I'm good at breaking engines.
[15:07:05] <bss36504> The primer bulb had a crack, so I replaced that, then found out that the fuel lines were disintegrating. So I replaced those. Then when I started it, it was idling strangely, so somewhere in my effort to fix that issue, I made it no longer start.
[15:08:00] <N1njaneer> "Hello I.T.! Did you try turning it off and back on again?"
[15:08:44] <bss36504> That kind of repair is more my speed ;)
[15:09:27] <bss36504> hey, what IRC client do you guys use on windows? Im using mIRC as a trial right now, it seems much more barren then Colloquy which I use on mac
[15:10:36] <ThiefMaster> mirc
[15:10:59] <ThiefMaster> IMO the best one for windows, unless you have a shell somewhere and like a commandline irc client, then use irssi
[15:11:47] <bss36504> alright, good to know. I'm not liking the default font, but I bet I can change it. I literally installed it and immediately signed on.
[15:12:00] <bss36504> (so i guess it is intuitive enough for me to do that)
[15:20:06] <N1njaneer> bss36504: I've been using mIRC for probably 15+ years now. It's awesome.
[15:20:24] <N1njaneer> You can change the font (or practically anything else in mIRC) very easily
[15:20:41] <N1njaneer> Just right-click on the channel window and go down to fonts
[15:21:01] <N1njaneer> For this window I prefer Bookman Old Style, size 9
[15:23:02] <bss36504> Well If I spent enough time in windows land, I might consider the $20 registration. But it seems like an ok client for now
[15:25:01] <N1njaneer> I'd reccomend supporting it. I actually need to send in the reg myself, since I'd installed the newer version a few months ago. It used to be free, then it got popular. I like supporting good software, though!
[15:26:05] <bss36504> me too! but im unemployed so I shouldnt be shelling out $$ for an IRC client, as nice as you guys are though ;)
[15:27:40] <kastein> I just use irssi
[15:27:48] <kastein> iirc there is a windows build
[15:28:10] <kastein> it has somewhat of a learning curve, but works quite well
[15:28:34] <N1njaneer> Or just keep running the mIRC eval. It just pops up a nag screen on start that then goes away a short while later.
[15:28:49] <bss36504> oh so it's like WinRAR?
[15:28:51] <bss36504> lol
[15:30:55] <N1njaneer> Yeah. Though just use 7Zip these days for all your compression needs. Completely free and open source and supports more options and compression formats than you can shake a stick at, including the every helpful unpacking of .iso images
[15:31:41] <bss36504> neat-O
[15:40:16] <Tom_itx> bss36504, mirc or xchat
[21:16:12] <wip> hi all, is it possible to drive 36 leds using an atmega?
[21:16:34] <wip> i know that each pins can drive up to 40ma, but 36*40ma might be too much for the mc?
[21:16:56] <wip> that's around 1.5A...
[21:19:05] <Tom_itx> no
[21:19:17] <Tom_itx> not without external drivers of some sort
[21:19:33] <twnqx> or time multiplexing :3
[21:20:11] <twnqx> but yeah, the electrical specs define a maximum current across all i/o pins, i seem to remember
[21:20:45] <wip> damn, i would like to pwm 36 leds with a single atmega...
[21:22:29] <wip> twnqx, is this it: DC Current VCC and GND Pins................................ 200.0 mA?
[21:22:56] <twnqx> i guess
[21:23:21] <twnqx> minus the core power consumpton
[21:23:29] <twnqx> consumption*
[21:27:03] <wip> ok, just trying my luck here - i don't know if it make sense:
[21:27:09] <wip> if connecting the leds like so: https://dl.dropboxusercontent.com/u/1455235/ledc.png
[21:27:41] <wip> then i just need to ground the pins to light it, can I do that * 36?
[21:28:07] <wip> grounding by code (firmware) that is
[21:44:37] <twnqx> unlikely
[21:44:41] <twnqx> 36*40 > 200
[21:45:01] <twnqx> well, if oyu use 2mA low power LEDs it might work
[21:45:34] <twnqx> if you use 10mA LEDs you'd need extra precaution to calculate the peak in software
[21:46:02] <twnqx> meh, dropbox is blocked in china
[21:47:15] * twnqx adds to proxy list