#avr Logs

Jul 15 2017

#avr Calendar

12:20 AM day is now known as daey
01:45 AM ferdna_winblows: does anyone uses inventory software to keep track of your parts?
06:40 AM Emil: He left
06:40 AM Emil: But I'm building my own
08:34 AM JanC is now known as Guest43682
08:34 AM JanC_ is now known as JanC
12:07 PM day_ is now known as daey
02:36 PM dan3wik is now known as dan2wik
04:46 PM remkooo1 is now known as remkooo
05:04 PM LeoNerd: Anyone know if there's a standard name for the trick where you link multiple MCUs together by a one-wire bus, using the UART modules? Usually you give the bus a pull-up to VCC, link it to all the RX pins, and use a diode from all the TX pins to pull it low, a little bit like I²C
05:04 PM LeoNerd: It's only half-duplex but with some sort of controller regime it can be pretty reliable
05:09 PM cehteh: dunni .. but avrs have some special mode where one start or stop bit is used to address mcu's
05:09 PM LeoNerd: Yeah that can be useful
05:10 PM cehteh: 19.9
05:10 PM cehteh: Multi-processor Communication Mode
05:10 PM cehteh: in the 328 datasheet
05:10 PM LeoNerd: Right.. but that wasn't my question :)
05:11 PM cehteh: well they name that Multi-processor Communication Mode :) the exact thing you asked, i dont know
05:11 PM LeoNerd: Well, MCM is about using 9-bit communication and the top bit can indicate addressing
05:12 PM LeoNerd: That could be done with many receivers on one transmitter line
05:12 PM LeoNerd: That's orthogonal to (but kinda useful with) the shared-UART bus idea I named
05:13 PM cehteh: i understand, but i still dont know the name :D
06:58 PM BongoShaftsbury: i'm sucking with these interrupts, i'm trying to get pin 0 on port c to interrupt when there is a rising edge
08:04 PM Lambda_Aurigae: BongoShaftsbury, chip? using pin change interrupts or regular intX?
08:06 PM Lambda_Aurigae: http://circuitcellar.com/cc-blog/one-wire-rs-232-half-duplex-ee-tip-135/ LeoNerd, this what you were looking for?
08:07 PM BongoShaftsbury: atxmega256a3bu
08:07 PM BongoShaftsbury: using portc_int0_vect
08:07 PM BongoShaftsbury: i got the interrupts working now
08:07 PM Lambda_Aurigae: BongoShaftsbury, ok...outside my field of expertise...never touched an xmega
08:07 PM BongoShaftsbury: however, i need to figure out how to debounce a reed switch
08:08 PM Lambda_Aurigae: same way you do any other switch.
08:08 PM Lambda_Aurigae: put a cap across it.
08:08 PM BongoShaftsbury: i don't have any caps
08:08 PM BongoShaftsbury: is there another way
08:08 PM Lambda_Aurigae: do it in software.
08:08 PM BongoShaftsbury: so just ignore input for x amount of time?
08:09 PM Lambda_Aurigae: on interrupt, start reading it for a set amount of time...average the reads together over, say, 100 reads.
08:09 PM Lambda_Aurigae: or 1000
08:10 PM Lambda_Aurigae: https://stackoverflow.com/questions/155071/simple-debounce-routine
08:11 PM Lambda_Aurigae: there are as many ways to do it as there are lazy engineers who forget to put caps on switches.
08:12 PM cehteh: rc across the switch, and to gnd
08:13 PM Lambda_Aurigae: yeah....resistor to control inrush current is good too.
08:20 PM cehteh: http://tinyurl.com/yclwf3mm
08:27 PM cehteh: mhm. .. be careful, at boot you get one spurious signal, that must be ignored :D
08:28 PM BongoShaftsbury: i did it in software
08:28 PM cehteh: ok too .. but for interrupt pins i'd rather keep the interrupt load low
08:29 PM cehteh: also you need to care about clearing spurious interrupts while debouncing
08:30 PM BongoShaftsbury: what you mean
08:32 PM cehteh: each bounce may trigger a interrupt, but since you are already in the handler (i suppose) the interrupt is blocked, but the bit will be set again, when your handler returns it instantly gets called again
08:34 PM BongoShaftsbury: the clock expiring is what resets the flag
08:35 PM BongoShaftsbury: and the handler sets it only if the flag is reset
08:36 PM cehteh: when you care for that its ok
09:07 PM Emil: Re:Zero
09:07 PM Emil: Uncensored and original version
09:07 PM Emil: Do watch it
09:09 PM cehteh: was a bit boring
09:10 PM cehteh: (still entertaining)
09:10 PM Emil: lolwtf
09:10 PM cehteh: i dont meant it was bad, just not outstanding
09:10 PM Emil: Off with your head
09:11 PM Emil: Anycase it really resonated with me
09:11 PM Emil: First time ever, I actually felt the pain
09:11 PM Emil: How I would be driven crazy
09:12 PM Emil: It moved me
09:12 PM * cehteh just finished sukasuka ..
09:12 PM cehteh: nice, sad
09:14 PM Emil: There has been one other time a story has shaped me
09:14 PM Emil: And my view of the world
09:15 PM cehteh: than Re:Zero?
09:15 PM Emil: It was when I was reading the Eragon books, where he trains with the elves
09:15 PM Emil: I feel like this is the first time I could feel a story
09:16 PM Emil: this re:zero
09:18 PM Emil: Or at least the pain
10:07 PM BongoShaftsbury: why are floats so difficult
10:33 PM cehteh: because they float :D
10:34 PM cehteh: in the first place: why do you need/want floats?
10:35 PM cehteh: in many cases n00bs dont understand what floats are. thats the problem
10:37 PM Casper: float work with fraction... 5 bits of float is 1/2+1/4+1/8+1/16+1/32
10:47 PM BongoShaftsbury: i solved it was getting 0
10:47 PM BongoShaftsbury: had to add a .0 to a constant
11:00 PM cehteh: dont forget that floats are (often) inexact
11:00 PM cehteh: never compare against 0.0
11:00 PM BongoShaftsbury: i know
11:00 PM cehteh: :D
11:57 PM day is now known as daey