#avr Logs

Nov 18 2017

#avr Calendar

04:46 AM nuxil: mornings.
04:49 AM nuxil: finally home after a few days away.
04:49 AM nuxil: time to complete my atmega324 programmer. so i can start to mess with it :D
04:59 AM Snert: definately, the left.
05:24 AM nuxil: ye as i though
06:46 AM fooman2011: Hello. I have an Atmega328 running and connected to 3V. I would like to communicate with it using and my laptop USB. I have a (USB) to (Rx Tx VCC GND) cable. I connect the Rx to the atmega rx pin and the Tx to the atmega tx pin but my problem is that I don't know where connect the VCC and the GND pins of the cable. Could you please help me ?
06:47 AM antto: first, cross RX and TX
06:48 AM antto: GND goes to a ground point in your circuit
06:48 AM fooman2011: antto: thanks very much :)
06:50 AM antto: VCC should probably go to the "3V" point you're powering the atmega with
06:51 AM antto: but it's best to check the documentation of your USB-to-serial/uart converter, and see if the "VCC" is an input or output
06:51 AM antto: if it's an output - you better not connect it to the circuit
06:54 AM fooman2011: ok thanks
07:15 AM Jartza: I wouldn't connect VCC at all if you're powering it already
07:15 AM Jartza: GND, TX & RX is enough
07:15 AM Jartza: and yes, cross the tx & rx
07:15 AM Jartza: rx -> tx, tx -> rx
07:45 AM Emil: fooman2011: m328 or m328p
08:32 AM enh: LambdaAurigae is not around? strange...
08:54 AM Emil: That's curious
08:55 AM enh: he was not around yesterday too
08:55 AM enh: First carabia, now LambdaAurigae... Is somebody hunting the trolls?
08:58 AM Emil: Trolls?
08:58 AM Emil: Lambda ain't no troll
08:58 AM enh: :)
10:00 AM polprog: hide your hostname hide your nicks
10:03 AM Emil: polprog: whose coming for them!?
10:03 AM Emil: who's
10:15 AM e is now known as demiurge
12:57 PM enh: cehteh?
12:57 PM enh: https://imgur.com/a/xSOcU
12:58 PM enh: What do you think of this? hexagonal bottom PCB, hexagonal modules above
01:13 PM antto: illuminati confirmed
01:23 PM thardin: bad panel yield
01:35 PM polprog: enh: what kinda software is that? sketchup?
02:25 PM DusXMT: Hey there, one thing I wonder about interrupts in AVR chips, if I call cli to disable interrupts to copy over some data in the main program that an ISR updates, and then call sei to enable them once I'm done, if an interrupt would've occured during the copy, will it be handled after the interrupts are enabled again?
02:25 PM DusXMT: Or will it be lost?
02:28 PM nux_: umm.. why do you disable it in the 1st place ? isr triggers and you do your copy inside the irs function.
02:29 PM nux_: but i guess once you disable the sei. the irs will not trigger again until its reactivated.
02:33 PM nux_: From my datasheet for the atiny85 it says:. "When using the CLI instruction to disable interrupts, the interrupts will be immediately disabled.
02:33 PM nux_: No interrupt will be executed after the CLI instruction, even if it occurs simultaneously with the
02:33 PM nux_: CLI instruction."
02:34 PM nux_: does that answer your question?
02:34 PM nux_: :p
02:34 PM Emil: DusXMT: depending on your interrupt you might lose data, for example with SPI or uart your receive register might be overwritten
02:34 PM Emil: DusXMT: but the actual interrupt will still trigger
02:34 PM Emil: DusXMT: if you don't clear the interrupt flag manually
02:34 PM Emil: nux_: mate
02:35 PM Emil: nux_: read what DusXMT wrote
02:35 PM DusXMT: nux_: This is a little clock program for a "starter kit" at school (with an ATmega128), I have a timer interrupt firing every 0.05s to update a multibyte structure to represent the current time. This multibyte structure I modify (increment/decrement with the timer and adjustment buttons) in the ISR, and disaply the current value (which I copy in a section with interrupts disabled, so it doesn't produce a garb
02:35 PM DusXMT: led mess on the 7-seg. screen, even if only for a fraction of a second)
02:35 PM Emil: DusXMT: it will be updated just fine
02:35 PM DusXMT: Emil: Thanks :)
02:36 PM DusXMT: *display the current value in the main program on a 7-segment display
02:39 PM DusXMT: nux_: "umm.. why do you disable it in the 1st place ?" -- because multibyte copies aren't atomic :)
03:48 PM enh: polprog: Yep, Sketchup
03:49 PM enh: thardin: indeed... bad panel yield
03:50 PM enh: would have to be routed
04:14 PM rue_shop3: DusXMT, most people dont do it right, you turn all the segments off before you switch digits
04:14 PM rue_shop3: then they dont smear
04:14 PM rue_shop3: freq of update is not important as duty
04:14 PM rue_shop3: look at the datasheet for a commercial chip that does it
04:15 PM rue_shop3: or do like all arduino people, do it wrong, and just accept it dosn't completely work properly, but just mostly kinda works usually.
04:19 PM Emil: rue_shop3: wtf no
04:44 PM DusXMT: rue_shop3: Heh, I have no other choice than to "turn all the segments off", as this board can only light up a single digit at a time :)
04:45 PM nux_: multiplexing :)
04:45 PM DusXMT: indeed~
04:54 PM nux_: i used a couple of shitregisters once for 7seg displays. serial to paralell. worked fine :)
04:56 PM nux_: was more of a experiment than doing anything usefull.
05:07 PM nux_ is now known as nuxil
09:15 PM enh: Lambda_Aurigae has not been online for one week. Is he ok?
11:32 PM rue_shop3: so,
11:32 PM rue_shop3: from what I can tell
11:32 PM rue_shop3: DusXMT, I dont think you get it
11:33 PM rue_shop3: turn off all the segments of the digit you just displayed before you chage to the next display
11:33 PM rue_shop3: then turn on the segments for that digit, then turn them off and move along
11:33 PM rue_shop3: anyhow
11:33 PM rue_shop3: I been at it all day
11:34 PM rue_shop3: and the conclusion of a lot of fancy circuit work, is that motors dont need buck converters, cause the internal inductance of them works like a buck filter anyhow
11:56 PM day is now known as daey