#avr Logs

May 17 2017

#avr Calendar

12:12 AM day__ is now known as day
01:22 AM Jartza: morning
01:24 AM inflex: Anyone used the FTDI USB-RS232 bridge chip and had issues with capturing 7-bit data?
01:54 AM impulse: inflex: what's your issue?
02:18 AM inflex: impulse, I can read the data from my multimeter (9600 7N1)fine through a normal 62550 com port etc, but when I use a rs232-usb bridge chip like PL2303 or FTDI it just doesn't work, it's like it's clobbering the data or misreading the frames or something
02:18 AM inflex: The data is consistent, but wrong
02:19 AM impulse: are you on linux?
02:19 AM inflex: yes
02:19 AM impulse: did you use stty to set the correct baud rate on the device file?
02:20 AM inflex: stty -aF /dev/ttyUSB0 seems to show it in CS7 mode, and I use raw/-cooked, no luck :(
02:21 AM inflex: tried in minicom too
02:23 AM inflex: Going to see if Windows does the same
02:23 AM inflex: almost half wondering if the USB-serial driver in linux hasn't been completed for 7-bit
02:24 AM impulse: hmm maybe
02:25 AM impulse: it works fine with 8 bits?
02:39 AM inflex: yes, works perfectly fine for normal coms, just the data from this 7-bit device doesn't
02:42 AM inflex: tried 4 different units, 3 of them are PL2303, one I ordered from Farnell/E14 is a genuine FTDI
02:43 AM inflex: Might just pay for me to dig through the kernel driver source and see what happens to CS7 requests
02:47 AM gnom: cutecom has the convenient interface
02:47 AM gnom: http://cutecom.sourceforge.net/
02:51 AM inflex: tx, I'll try that too
02:54 AM inflex: interesting, same results in Windows with the butchered data
02:54 AM inflex: wonder if this output device is just violating too many things causing the bridge chips to get upset
02:58 AM inflex: tx gnom cutecom is a vastly nicer program to work with... hasn't solved the issue, but definitely nicer
03:04 AM Emil: inflex: I'd make or buy a translation device
03:05 AM inflex: Emil, you mean like putting small AVR or something on the data line to convert 7 -> 8 bit?
03:24 AM Emil: I would if normal drivers dont work
03:30 AM dMMd is now known as |DM|
03:40 AM inflex: http://ctpc.biz/p608.png <=- that's the wiring setup they use
03:40 AM inflex: Just interesting it works with a traditional 62550 type (or is that 62250?) COM port
03:41 AM inflex: oh well, might just convert it to USB directly in that case, design & etch out a new replacement PCB in the optical coupler
03:43 AM inflex: could try rewire it as a true nullmodem
03:45 AM inflex: ... or realistically, just buy another multimeter (though this is a very nice large display 50,000 count unit :(
04:29 AM Emil: inflex: what model?
04:29 AM Emil: Pro somwthing?
05:04 AM julius: hi
05:06 AM julius: any of you guys do programming in c++/c#/java? are there ways to verify a software after it is finished to check if it meets the costumers requirements? apparently theres selenium for web applications and other tools....
05:06 AM Emil: no
05:06 AM Emil: please not here
05:06 AM julius: ok
05:06 AM Emil: :D
05:06 AM Emil: If you want tests you write tests
05:17 AM inflex: Emil, Protek 608, old meter now
05:18 AM inflex: Emil, I've already written a bunch of code that decodes the data fine and displays the nice meter output, but that's only when it's on a standard old serial port
05:19 AM inflex: soon as I change over to USB-serial bridge *bleah* it clobbers the data. I did see once that the right data *started* to show up for about 2 bytes before being clobbered, so I'm thinking the USB bridge isn't detecting the framing being generated by the adapter. Oh well, really is just a case of I should change meters
05:20 AM inflex: else I'm giong to burn a lot of time/money for something that's not that important (it's only for my openbroadcaster when I do live-streams)
05:27 AM Emil: inflex: I have a protek, too
05:27 AM Emil: but it sends 8n1 :D
05:27 AM inflex: and probably data that's actually meaningful and can be somewhat read from the stream
05:27 AM inflex: This 608 just sends a running dump of what ever is being sent to the LCD data port
05:27 AM Emil: Yeah
05:28 AM Emil: It's a super cheap way to do it :D
05:28 AM inflex: https://pbs.twimg.com/media/C_2fcieV0AAA-km.jpg:large
05:28 AM Emil: I should write my own decoder
05:28 AM inflex: That's what I've written up
05:28 AM LeoNerd: Emil: While I think of it totally randomly, you might have some insight: Any idea why serial implementations vary on the size of the stop bit? Why offer the choice of 1 or 2 (or even 1.5 sometimes)?
05:28 AM LeoNerd: DMX512 uses 2 stop and I've never really worked out why
05:29 AM inflex: line noise stability?
05:29 AM Emil: It allows for increades processing time for example
05:29 AM Emil: increased*
05:29 AM LeoNerd: Ooh, hmm.. if you had a software UART implementation, that might matter..
05:30 AM Emil: many older mcus used 2 bit stop iirc
05:30 AM inflex: Emil, just switched back to the dedicated COM port hardware machine... all runs nice.... so I'm a bit sad :D
05:30 AM Emil: 1.5 is just cancer though
05:31 AM Emil: inflex: try cp2102
05:31 AM Emil: inflex: the driver should support everything
05:31 AM Emil: pl is cancer
05:32 AM LeoNerd: Ooooh... stackoverflow has some nice thoughts. If you set transmitters to 2 stop bits but receivers at 1, then it gives an extra bit of timing gap to allow slight variations in clock drift time to resynchronise again
05:32 AM Emil: yeah
05:32 AM LeoNerd: Effectively the second stop bit is some idle time that the receiver can use to catch up if it's slightly behind
05:32 AM Emil: yup
05:32 AM LeoNerd: Which again makes a lot of sense for DMX
05:32 AM LeoNerd: Likely lots of cheap receivers over a long cable run
05:39 AM inflex: Emil, I tried FTDI today
05:40 AM inflex: http://au.element14.com/webapp/wcs/stores/servlet/ProductDisplay?catalogId=15001&langId=43&urlRequestType=Base&partNumber=2352019&storeId=10184
05:40 AM inflex: ^- that thing. Was very surprised it didn't go with that
06:28 AM Jartza: hallo
06:39 AM Lambda_Aurigae: ollah
06:46 AM Jartza: what's up?
06:46 AM Lambda_Aurigae: me, I think.
06:51 AM Lambda_Aurigae: aaand, off to worky.
07:55 AM LeoNerd: What idiot called it a "UART" and not a T/ReX anyway?
07:58 AM inflex: If you knew your history, you'd realise UARTs were around before the dinosaurs.
08:05 AM LeoNerd: Serialius Peripherus Interconnexaurus was comparitively young
08:07 AM rue_bed: ..... it just keeps raining.....
08:08 AM LeoNerd: You in UK? It's raining here too
08:10 AM Lambda_Aurigae: rue_bed, another storm headed up your way I believe...it his here this afternoon and is moving northeast.
08:29 AM inflex: Emil, I think it might actually be a problem with power/current delivery in to the data device
08:30 AM inflex: Emil, I changed the caps and suddenly it's changed its behaviour
08:31 AM Emil: inflex: lol
08:32 AM inflex: Emil, so I'm suspecting the poor USB bridge isn't giving this device enough omph
08:32 AM inflex: not sure what I can do to resolve that
09:40 AM day: i want a nice little project ;.;
09:42 AM Emil: day: you want a nice little project?
09:42 AM Emil: day: code your own nrf24l01+ driver
09:49 AM LeoNerd: Yay another one
09:51 AM Emil: hehe
09:53 AM LeoNerd: Something I keep meaning to get around to writing sometime, is a WS2812 driver which uses some of the NOP timing cycles to do real work
09:53 AM LeoNerd: Where "real work" might involve things like alpha-multiplication of the incoming data
09:53 AM LeoNerd: Saves time overall by applying the final overall brightness calculation *during* data streaming
09:55 AM Emil: Wait
09:55 AM Emil: you mean mixing multiple channels?
09:55 AM Emil: pretty HC
09:56 AM LeoNerd: Not so much mixing, no. Just applying a final brightness calculation
09:57 AM LeoNerd: So, rather than rendering an RGB array, then doing x = (x * intensity) >> 8; on every value before writing it out, do that multiply operation *during*
09:57 AM LeoNerd: Use up some of the NOP slots while writing a byte, to be pre-calculating the next byte
10:03 AM Emil: hmm
10:04 AM Emil: Yeah it's doable
10:04 AM Emil: and not even too bad
10:04 AM LeoNerd: Oh I'm sure it's doable, I've just not got around to writing it yet
10:04 AM Emil: 8x8 multiplication takes only 2 cycles
10:04 AM Emil: 8bit x 8bit *
10:04 AM LeoNerd: And the >> 8 operation comes for free ;)
10:04 AM Emil: yeah
10:04 AM Emil: hehe, imagine if you are compiling with -O0
10:05 AM Emil: LeoNerd: you have confirmed that the >>8 operation is translated to just memory access, right?
10:10 AM LeoNerd: I'm reasonably sure it is sure. But in practice in theabove it'd be written in assembly
10:10 AM LeoNerd: Wherein that value comes out of the r0:r1 pair
12:16 PM Lambda_Aurigae: http://www.strangecosmos.com/content/item/202443.html full size hotwheels vending machine...I bet they didn't use ardweeny on that one!
01:33 PM twnqx: poor Casper
01:33 PM twnqx: but a least a good taste in operating systems
01:45 PM Casper: twnqx: ?
01:46 PM twnqx: your struggle with gentoo :P
01:48 PM Casper: yeah I'm sure it is a stupid thing
02:27 PM Casper: ... some people are really stupid... *drring dring* "(store name) how may I serve you?" 'I'm calling to pay for a computer[...]' "There is nothing at this name here" 'am I at (another store name)? at (another city)' "No you are at (store name, this city)" 'Oh? So you ain't (other store name)?' "no" 'and you are not connected together?' ....
02:40 PM enhering: Hi Casper. Warmer out there?
02:41 PM Casper: enhering: if I wanted to say what I want to say, I would be rude. A/C is broken
02:41 PM Casper: :D
02:43 PM Emil: LeoNerd: I'm sure they used as cancerous PLC solutions
02:43 PM Emil: Or some horrible bubblegum code
03:00 PM enhering: Broken A/C is very bad karma, Casper. Very bad.
03:01 PM enhering: Our house here does not need A/C. Wind flows most of the time. Hell is when it stops.
03:04 PM Casper: enhering: computer repair shop, no window open, only the door, which is on the wrong side of the wind...
03:05 PM enhering: bad...
03:05 PM Casper: today it is fortunatelly a calm day, so only 4 pc + 4 monitors are open
03:05 PM Casper: so what... 600-800W of heat?
03:06 PM enhering: 1200 BTU per human being + appliances
03:07 PM enhering: in some places in brazil people drill 100mm holes near the ceiling and near the floor. The air flow keep the environment around 25C
03:07 PM enhering: holes to the outside.
03:07 PM enhering: s/keep/keeps/
03:09 PM enhering: In the inner states of brazil people have developed very nice passive cooling technologies integrated with architechture
03:11 PM Emil: I'd die if the tempearture was constantly >25C
03:11 PM Emil: >=*
03:11 PM enhering: I hate that too
03:11 PM Emil: A comfortable sleeping temperature is 18-19C
03:11 PM enhering: I love 4 seasons
03:11 PM Emil: Me, too
03:12 PM enhering: Unfortunately I'm stuck here at the moment.
03:16 PM Casper: emil: actually, it the temp was always high, you would be fine with it...
03:16 PM Casper: the issue is the cold and hot
03:21 PM Emil: Casper: no, I woudln't :D
03:21 PM Emil: because I don't like being without a shirt / with just a teashirt
03:22 PM Emil: t-shirt
03:22 PM Emil: teashirt what the actual fuck
03:22 PM enhering: always warm is borint
03:22 PM Emil: I must be going senile
03:22 PM enhering: boring
03:22 PM Emil: yeah
03:22 PM Casper: emil: your body would adapt
03:23 PM enhering: I cannot even wear a t-shirt at home. Always sweating. And if you go out in the sun around noon you fry.
03:23 PM enhering: cars need air conditioner full time.
03:23 PM Casper: like when I'm perfectly fine at 10C in short, without t-shirt, washing the car barefoot
03:24 PM Casper: that is after winter
03:24 PM enhering: yep
03:24 PM enhering: the sun is opressive here. We feel the radiation pressure.
03:25 PM enhering: But of course there are amazing beaches. Hot sea water.
03:25 PM enhering: Not only of beaches lives a man.
03:26 PM enhering: Now that the sun is gone, I can go out with relative confort. 17:00
03:26 PM enhering: Three showers a day are not enough
03:50 PM Emil: Casper: I doubt
03:58 PM Casper: current temp inside: 30°C
04:00 PM Emil: I would die
04:00 PM Emil: Definitely
04:03 PM Casper: that's why I have my turbo fan at second speed
04:03 PM Casper: else I'ld have to close the shop
04:03 PM Casper: I'm trying to mop the floor
04:04 PM Casper: water is now cold
04:14 PM Emil: How many minutes and it's warm/hot?
04:52 PM _habnabit: hi! moved from #arduino: i'm trying to link a binary for an atmega328p with avr-gcc is giving me "relocation truncated to fit: R_AVR_7_PCREL against `no symbol'" and i don't know what i should try to fix it. searching the error gives a smattering of "rearrange your code until it works" and "it's a bug in gcc/binutils". i'd rather not do the former (yet), but as far as i can tell my gcc/binutils are new
04:52 PM _habnabit: enough that they're not affected by any linking regressions for avr. gcc 6.3.0, binutils 2.28
05:06 PM cehteh: do you do some weird tricks? linker options/script .. do you have the source of all your code or is somet library binary only?
05:08 PM _habnabit: cehteh, shouldn't be weird tricks.. i'll post the linker invocation in a sec
05:10 PM _habnabit: cehteh, https://gist.github.com/habnabit/47760042c3c6e729c9b8ac467766f61c
05:14 PM cehteh: dunno, thats not the whole code, why dont you try to define the interrupt table in the normal C way?
05:14 PM _habnabit: cehteh, i'm not using C
05:14 PM cehteh: i see that :D
05:15 PM cehteh: that might be the problem
05:15 PM cehteh: prolly needs some more options, but you have to debug it
05:15 PM _habnabit: cehteh, sure. i just don't know enough about avr (yet) to figure out where to dig into from here
05:16 PM cehteh: see datasheet
05:18 PM _habnabit: cehteh, well for example the two relocations it's complaining about are a 'breq' and a 'brne'; both are R_AVR_7_PCREL, and there's other R_AVR_13_PCREL relocations which are 'rjmp' which aren't mentioned in the error
05:19 PM _habnabit: cehteh, so maybe if it's all R_AVR_13_PCREL it'd be ok?
05:19 PM cehteh: i dont know
05:19 PM _habnabit: ok
05:26 PM _habnabit: perhaps a related question: is there a linker flag to allow R_AVR_7_PCREL to be rewritten to R_AVR_13_PCREL on linking? i don't know if that's done or forbidden by default if it's an option at all
06:26 PM Lambda_Aurigae: using the gcc suite to do assembly is,,,painful.
06:31 PM Emil: Lambda_Aurigae: what do you use to compile asm?
06:31 PM Lambda_Aurigae: gavrasm
06:31 PM Lambda_Aurigae: http://www.avr-asm-tutorial.net/gavrasm/index_en.html
06:36 PM Lambda_Aurigae: http://www.avr-asm-tutorial.net/avr_en/index.html was the first avr programming page I learned from.
06:45 PM Lambda_Aurigae: this guy has kept it up for 18 years...started in 2000 and keeps adding and updating stuff all the time.
09:49 PM LiaoTao: Lambda_Aurigae: That's commitment
09:51 PM LiaoTao: "This page is member in the AVR-Webring:@
09:51 PM LiaoTao: "
09:51 PM LiaoTao: Ah, webrings