#avr Logs

Oct 19 2017

#avr Calendar

12:55 AM rue_bed: #define IsHigh(BIT, PORT) (PORT & (1<<BIT)) != 0
12:58 AM rue_bed: #define IsLow(BIT, PORT) (PORT & (1<<BIT)) == 0
12:58 AM rue_bed: #define NOP() asm volatile ("nop"::)
02:13 AM eballetbo: There is a way to print a hexadecimal number inside a ISR, what I want is a replacement for printf("%02x", value) that I can use in a ISR
02:16 AM Casper: sei(); printf(); cli();
02:16 AM Casper: might work
02:16 AM Xark: eballetbo: You can index into a string char hex[16] = "0123456789ABCDEF";
02:16 AM Xark: (per nibble)
02:20 AM eballetbo: ok, thanks, I'll try that
02:47 AM polprog: eballetbo: you just enablr uart in main and then write the value to the data regster, and enable serial decoding on your analzer trace
02:48 AM polprog: this is the fastest way
02:50 AM eballetbo: ah, right, I can attach my analyzer to the uart instead of the spi, yes, that's the better option
02:50 AM polprog: you can attach the analyzer to both spi and uart
02:50 AM polprog: it's a way to add realtime annotations to the traces
02:50 AM polprog: i use it all the time
05:58 AM Lambda_Aurigae: that's what 8 LEDs are for!
06:22 AM A001[m] is now known as A001
08:34 AM eballetbo: polprog: fyi, what I see with logic analyser is the same as in linux side, so something is wrong with my code writting and reading from spi
08:52 AM eballetbo: guess that the fact that the xmega does not have a tx buffer and rx buffer and uses the same for tx/rx it's hitting my head
09:05 AM rue_bed: #define NOP() asm volatile ("nop"::)
09:07 AM polprog: #define IsLow(BIT, PORT) (PORT & (1<<BIT)) == 0
09:08 AM eballetbo: polprog: silly question from a newbie, is correct this code : https://hastebin.com/inipumicux.cpp ?
09:10 AM polprog: looks ok for me, im not sure about the resiters because i never worked wit xmegas. i would add a check for len being 0
09:10 AM polprog: because if it happens to be 0 then that loop will execute 255 times.
09:11 AM eballetbo: right
09:13 AM polprog: how do you define memeory_map in the code?
09:13 AM eballetbo: volatile uint8_t memory_map[SBS_MEMORY_MAP_SIZE];
09:18 AM polprog: well, according to the c standard it should be all zeroes...
09:19 AM polprog: it may be garbage data
09:19 AM polprog: no idea
09:19 AM polprog: gtg
09:19 AM polprog: ill be back at around 1800
10:23 AM Cracki: utc?
10:29 AM polprog: well, i expected 1800 utc +1 but i finished earlier
10:29 AM polprog: so technically, 1800 utc+2
11:08 AM MarkX: hey
11:08 AM MarkX: i remember there was a CTF that had an online avr program with debugger and memory view. the point was to hack your way through levels.
11:08 AM MarkX: IIRC it was for a job recruiting company.
11:09 AM MarkX: anyone know what i'm talking about?
11:26 AM A001: MarkX: https://microcorruption.com ?
11:27 AM MarkX: A001, it was very similar but it was AVR
11:28 AM A001: stockfighter.io ?
11:28 AM A001: it shut down
11:31 AM A001: https://news.ycombinator.com/item?id=11918381
11:32 AM enh: Hi.
11:33 AM enh: I've learnt something very important. You probably already know about it, but I'll mention anyway. m_fMX = (float) nX / DATA_MULTIPLICATION_FACTOR; is *very* different from m_fMX = (float) (nX / DATA_MULTIPLICATION_FACTOR); nX is an int32_t
11:34 AM thardin: yes operator presedence is important
11:35 AM thardin: in most every language
11:35 AM MarkX: A001, that one sounds very familiar. i think that was it. looking for an archive or screenshot now
11:35 AM enh: Re read it, please
11:35 AM enh: DATA_MULTIPLICATION_FACTOR is 1000000
11:35 AM enh: UL
11:36 AM enh: So, in principle, a long, divided by a long, converted to a float is *VERY* different from a long, converted to a float and divided by a long.
11:37 AM enh: In case you happen to have an aliasing problem with your data, this can be the cause.
11:38 AM enh: nX, by the way, if of the order of 1000000 too.
11:39 AM A001: MarkX (IRC): https://web.archive.org/web/20151212233800/stockfighter.io/
11:45 AM MarkX: thanks A001
11:46 AM MarkX: looking for the interface now to see if it is how i remember it
12:27 PM Lambda_Aurigae: I am intel of borg. Division is futile. You will be approximated..
12:27 PM Lambda_Aurigae: or so the first round of pentium-60 chips said.
12:28 PM polprog: error inside
12:36 PM Lambda_Aurigae: yup
12:37 PM Lambda_Aurigae: I got paid a lot of money to open up boxes at walmart and similar stores and replace the first gen pentium-60 chips with a fixed chip.
12:37 PM Lambda_Aurigae: they had a major division rounding error.
12:38 PM polprog: heh
01:07 PM Lambda_Aurigae: something like, anything over 13 significant digits was rounded
01:52 PM polprog: why on some PCBs there are dead end traces?
01:52 PM polprog: im looking at an old NIC and some traces go from the PCI bus and just end somewhere close to the chip, but they dont connect...
01:53 PM polprog: some of them have a via that supposedly connects from the other side but why would you do it if you have a clear way on the first copper side?
01:53 PM Emil: polprog: matching
01:53 PM polprog: matching of what
01:53 PM polprog: impedance?
01:54 PM Emil: yes
01:54 PM Tom_L: it's not a ground pour is it?
01:54 PM polprog: no it's not
01:54 PM Tom_L: impedance matching
01:54 PM polprog: how would a dead end trace impedance match?
01:54 PM Tom_L: but generally that's done with a squiggle trace
01:54 PM Tom_L: no clue
01:54 PM Tom_L: maybe some chinaman farked up
01:54 PM polprog: squiggly traces i get, same length on many traces
01:55 PM Tom_L: they did it just to mess with ya
01:56 PM polprog: but now im watching an n64 teardown, and there are the same, not connected traces
01:56 PM polprog: huh
01:56 PM Tom_L: it gives the extra electrons a place to hide
01:57 PM polprog: hehehe
01:57 PM Emil: polprog: don't you know?
01:57 PM Emil: RF is a magical place
01:57 PM Emil: also dark
01:57 PM polprog: yeah, i know, voodoo
01:58 PM Emil: http://www.ti.com/lit/an/spraar7g/spraar7g.pdf
01:58 PM Emil: http://www.flowcad.ch/cms/upload/bilder/Allegro_PCB_Analog_RF_Option.gif
01:58 PM polprog: rahzrPdEeE8
01:58 PM polprog: gah
01:58 PM polprog: https://youtu.be/rahzrPdEeE8?t=5m58s
01:58 PM Emil: http://iot-bits.com/wp-content/uploads/2017/07/wifi-PCB-Trace-antenna-design-tutorial-1024x714.png
01:58 PM polprog: thanks for the appnotes
01:59 PM Emil: https://nebula.wsimg.com/59865b9b6f9bd6c1514b327a91c6bdfa?AccessKeyId=DAA432FA80C5DABC0234&disposition=0&alloworigin=1
01:59 PM Emil: https://www.sv1afn.com/pcbruler.html
01:59 PM Emil: That's pretty cool
01:59 PM Emil: polprog: anycase
01:59 PM polprog: that first ruler's pretty darn cool
02:00 PM Emil: A single well placed stub can radically affect your electrical characteristics
02:01 PM Emil: polprog: that video :DDDDDDDDDDDDDDD
02:01 PM polprog: got any pdf that explains microwave basics?
02:02 PM Tom_L: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwj5lov-qP3WAhULsFQKHfC9DW4QFggrMAE&url=http%3A%2F%2Fwww.commscope.com%2FDocs%2FMicrowave_Communication_Basics_eBook_CO-109477-EN.pdf&usg=AOvVaw0EjPcxREeK3Q22rj_rmFbg
02:03 PM Tom_L: it's done with smoke and mirrors
02:05 PM polprog: thanks
02:05 PM polprog: Emil: skip to 12:00
02:07 PM Emil: polprog: I watched it al
02:08 PM polprog: i like those odd structures, that's why i wanna learn more about that
02:45 PM polprog: lol
02:45 PM polprog: im reading through what google shows when queried "microwave design"
02:46 PM polprog: some company made a program called "microwave office"
02:54 PM polprog: this is interesting: http://www.ti.com/lit/an/swra367a/swra367a.pdf
03:15 PM Tom_L: why are you interested in microwave? do you have a project for it?
03:16 PM polprog: no
03:16 PM polprog: it's just very fascinating
03:17 PM polprog: right now ill be trying to make a multi drop rs485 bus
03:18 PM polprog: essentially some small stuff like m8 or some attiny with configurable adress and a small output device, a display, led or anything else..
10:01 PM BongoShaftsbury: howdy, any recommendations on a radio w/ a range of > 1 mile. this will be used to transmit telemetry data
10:33 PM tpw_rules: how often
10:33 PM tpw_rules: also i assume you mean like in the air
10:34 PM tpw_rules: have u tried lora
10:37 PM BongoShaftsbury: i have not tried anything yet
10:37 PM BongoShaftsbury: yes in the air
10:37 PM tpw_rules: line of sight yea?
10:37 PM tpw_rules: people have done 10 miles with lora, but it's very low data rate
10:39 PM BongoShaftsbury: what's the rate?
10:41 PM tpw_rules: hundreds of bytes per second
10:41 PM tpw_rules: actually i'm sorry that's only using lorawan
10:41 PM tpw_rules: which is another layer on top of bare lora
10:42 PM tpw_rules: regular lora can get into 10kbps or so i think but that sacrifices range and noise immunity
10:43 PM tpw_rules: it's honestly a pretty nebulous thing due to how it works
10:44 PM tpw_rules: what kind of data rate do you need? and just point to point?
10:45 PM tpw_rules: and line of sight?
10:46 PM tpw_rules: BongoShaftsbury:
11:57 PM day__ is now known as daey