#avr | Logs for 2016-12-23

Back
[02:58:54] <Vikinger> in avr-gcc once we go into the interrupt are we supose to turn off global interrupts, or is that done by the compiler ?
[02:59:34] <Vikinger> like, SREG &= ~_BV(7)
[02:59:52] <Vikinger> and turn it on just before exit ?
[03:01:05] <Casper> no need to touch it
[03:17:40] <Vikinger> ok
[03:18:05] <Vikinger> Casper: is it done by the compiler or the funtion, etc ?
[04:22:25] <sabor> Vikinger: it is done by the hardware
[04:31:55] <Vikinger> ok
[04:32:16] <Vikinger> im used to pic where you have to do that plus clean flags
[04:47:19] <rue_shop3> http://wormfood.net/avrbaudcalc.php
[04:47:39] <rue_shop3> http://www.engbedded.com/fusecalc/
[06:42:29] <inflex> Anyone got a Vostro 270s or Inspiron 660 desktop handy? I need a voltage reading : (
[07:11:56] <Lambda-Aurigae> I only buy acer or asus or build myself...no dell deskytop here.
[07:12:07] <Vikinger> why is that ?
[07:12:28] <Lambda-Aurigae> acer and asus I've found to be decent....dell and hp I've always had issues with.
[07:13:10] <Lambda-Aurigae> but for desktops I always build myself as I like gigabyte motherboards and can't get those in name brand machines.
[07:14:12] <Lambda-Aurigae> http://i.imgur.com/ilYaLry.png ghost gas!
[07:14:26] <Lambda-Aurigae> I'm thinking the water content in the petrol there might be a weeedle bit high.
[07:27:01] <Vikinger> i have always built my desktops
[07:27:41] <Vikinger> i dont even know what it is to buy a complete assembled desktop
[07:28:14] <Vikinger> and nowadays there are shops that make your costume laptop, im saving for that
[07:32:10] <Lambda-Aurigae> custome
[07:32:12] <Lambda-Aurigae> err
[07:32:14] <Lambda-Aurigae> custom
[07:32:25] <Lambda-Aurigae> costume is something you wear at halloween
[07:40:45] <Lambda-Aurigae> Vikinger, if you need to turn global interrupts on and off, don't set the bit in SREG...use the sei() and cli() commands...but not needed within interrupt routines.
[08:03:58] <Vikinger> Lambda-Aurigae: i know the sei() funtion, but what is the cli() exactly ?
[08:05:35] <Lambda-Aurigae> clear interrupt
[08:05:41] <Lambda-Aurigae> sei turns on global interrupts
[08:05:45] <Lambda-Aurigae> cli turns them off
[08:08:23] <Vikinger> ic
[08:09:03] <Vikinger> got it
[08:10:12] <Vikinger> is there a #pic channel ?
[08:10:35] <LeoNerd> If only there was some way you could find out
[08:13:44] <Lambda-Aurigae> Vikinger, there is.
[08:13:50] <Lambda-Aurigae> and not
[08:13:52] <Lambda-Aurigae> no #pic
[08:13:59] <Lambda-Aurigae> but there is a pic microcontroller channel.
[08:14:07] <Lambda-Aurigae> too bad irc doesn't have a list channels command.
[08:16:14] <eballetbo> ##pic
[08:16:43] <Lambda-Aurigae> shhh
[08:16:45] <Lambda-Aurigae> dangit!
[08:18:04] <eballetbo> ups :P
[08:55:00] <twnqx> Lambda-Aurigae: maybe a laptop disguised as a book or a leather bag could count as a costume laptop
[11:30:49] <Vikinger> in witch situations should the BOD circuit be used ?
[11:31:26] <cehteh> when you need it
[11:33:55] <cehteh> 1. you can accept/handle resets 2. the additional power draw by the BOD stuff is no issue 3. you cant monitor the voltage by some other means
[11:34:02] <cehteh> .. and maybe some more reasons
[11:35:39] <Vikinger> im thinking im using a cell battery cr2032, is it going to save me any power in this situation or on the contrary
[11:37:43] <cehteh> the bod circruit needs power
[11:38:45] <cehteh> dependin on usage a battery will drain slowly and predicable, if you can affor it better use the adc to measure battery voltage infrequently (once a hour or so)
[11:38:58] <cehteh> and turn of the ADC to safe power afterwards
[11:39:44] <cehteh> and/or what would happen in your thing when the battery drains? when it just goes dead without bad effects, just do nothing
[11:46:04] <Vikinger> yes
[11:46:13] <Vikinger> its a very small aplication
[11:46:26] <Vikinger> if its finished end of story, replace it
[11:46:35] <Vikinger> better to just turn off everything
[11:46:37] <Vikinger> then
[11:46:54] <Vikinger> and save power
[11:47:41] <cehteh> when voltage drops the mpu may execute errorneously, doing weird stuff or crash
[11:47:56] <cehteh> and before that writing to eeprom gets garbled
[11:48:06] <cehteh> that should be your main concerns
[11:55:44] <Vikinger> no problem then not using eeprom
[15:15:30] <Jartza> hallo
[15:18:16] <Lambda-Aurigae> ollaH
[17:17:59] <Jartza> I didn't get new attiny5 for christmas
[17:18:05] <Jartza> UPS happened, again
[17:18:06] <Jartza> https://wwwapps.ups.com/tracking/tracking.cgi?tracknum=1ZWA47970408209891
[17:18:36] <Jartza> probably earliest is 27th day they try again
[17:18:42] <Lambda-Aurigae> aaawww.
[17:18:46] <Lambda-Aurigae> my stm32 boards came today.
[17:19:05] <Jartza> UPS facility in destination city = finnish post
[17:19:16] <Jartza> they couldn't even deliver christmas postcards in time this year
[17:19:33] <Jartza> and 15% of packages were not delivered
[17:19:39] <Lambda-Aurigae> fun fun
[17:22:32] <learath> wow.
[17:42:33] <Casper> Jartza: atleast you have an ETA
[17:42:52] <Casper> mine I got an update 2 days late saying it left the facility
[17:50:20] <Casper> I won a price... and the tracking is quite meh
[17:50:30] <Casper> I was hopping to get it for xmas.. no go
[19:02:09] <Jartza> d'oh