#avr Logs

Jan 01 2018

#avr Calendar

01:59 AM rue_mohr: HAPPY NEW YEAR!!!!!!!!!!!!!
02:32 AM _ami_: rue_mohr: Happy new Year!!
02:32 AM rue_mohr: :)
02:38 AM gnom: i wish all a Happy New Year
02:42 AM polprog: best whishes!
02:47 AM polprog: time for breakfast
02:47 AM polprog: if i put scrambled eggs thru a descrambler, will i get eggs?
02:53 AM rue_mohr: you might get chicks
03:04 AM _ami_: finally this i2c thing worked for INA219 on stm32.
03:07 AM rue_bed: oo I'v not yet done i2c on the stm32
03:08 AM rue_bed: whats ina219?
03:09 AM _ami_: http://www.ti.com/lit/ds/symlink/ina219.pdf its a i2c sensor measures current/voltage.
03:09 AM rue_bed: ah
03:09 AM rue_bed: were the stm32 librarys much help to do the i2c?
03:10 AM _ami_: i am using libopencm3.
03:10 AM _ami_: its pretty decent IMO
03:10 AM _ami_: a c wrapper library.
03:11 AM _ami_: https://www.aliexpress.com/item/Free-shipping-Zero-drift-CJMCU-219-INA219-I2C-interface-Bi-directional-current-power-monitoring-sensor-module/32379404350.html -> i have this one.
03:18 AM rue_bed: sounds right
05:22 AM antto: is this really asking for donations for a chat client?
05:24 AM thardin: good thing /ignore exists
05:26 AM antto: that's like.. when the sh*t level goes up above the nose - good thing i can close my eyes
06:33 AM Thedarkb1 is now known as Thedarkb
07:13 AM nuxil: what kind of bs is this ?
07:23 AM nuxil: and who the f... uses weechat anyway.
07:23 AM thardin: more like weebchat amirite
07:27 AM * nuxil wounders how many in this channel sitting home with a hangover today.
07:33 AM polprog: oh great the are pming as well
07:33 AM * polprog is not
07:34 AM antto: nor me
07:34 AM antto: i drank mirinda ;P~
07:35 AM polprog: haha
07:35 AM thardin: today is hangover day
07:36 AM nuxil: im so lolz to the people comming to me asking if i have any "new year's resolution" or however you translate it. like exmple they ask if im gonna start exercising more, eat less snack and more healty.
07:36 AM nuxil: and i always say No. and they Why not ? and i say its simple.
07:36 AM polprog: surely 1st jan is the peak traffic day for gyms
07:37 AM nuxil: because., i need to stop doing 1 thing i like. "which is negative" and replace it with another thing i dont like "a negative thing" so i get double negative effect doing something like that :p
07:37 AM * polprog is burning a full slackware dvd since the CD he had is not complete, and networkmanager doesnt even get dhcp... still, there are many cool fonts to choose from
07:38 AM nuxil: thardin, yea. today is the international hangover day
07:39 AM polprog: hmm but that spam must be some universal color eyerape script
07:39 AM nuxil: i onlly drank a few beer and 2 small glass of hennessy fine de cognac :)
08:39 AM dev1990: my car broke at foreign country, so my happy new year gone sad :(
08:41 AM dev1990: but now I'm at home and I'm happy I reach it by today
08:43 AM dev1990: my road assistance work only on my country side so I was unhappy to heard about it, probably I must go for extended assistance service next time
08:55 AM _ami_: dev1990: glad that you made it to home :)
08:55 AM _ami_: happy new year!
08:55 AM _ami_: i have been hacking i2c today on stm32.
08:57 AM _ami_: i2c master is done. now time to learn on how to do i2c slave. especially the data transfer/recieve mode. probably i need interrupts on dma line
08:57 AM _ami_: time to sleep though.
08:57 AM _ami_: it has to wait!
09:08 AM Casper: 70$/year, same country only, 5km towing range to the nearest garage of their choice....
09:08 AM Casper: more expensive one is not much better, longer range, but not that much more
09:17 AM rue_bed: awe crap I missed the bot attack again
09:20 AM rue_bed: we need an autoban on that lead character that bot uses
09:21 AM rue_bed: Casper, what broke?
09:32 AM Casper: rue_bed: nothing
09:33 AM Casper: but I checked it before something does, and it is quite meh
09:34 AM rue_bed: but you said your car broke down?
09:34 AM Casper: no, you don't know how to read, dev1990 said his car broke<
09:35 AM rue_bed: oh, k
09:35 AM rue_bed: half asllep, all blur
09:35 AM Casper: same
09:36 AM Casper: and I have 25 minutes to vaccum the floor (because a broom take more energy)... then disconnect pc, move both desk in my bedroom, then other stuff for the party....
09:36 AM Casper: so
09:36 AM Casper: time to shut down, see ya<
09:36 AM rue_bed: need bigger ups!
09:38 AM dev1990: rue_bed: about that car, I do not know for sure but I got some computer failure and my engine working like shit, I'll get some intel on that later
09:39 AM rue_bed: hmm
09:48 AM rue_bed: the bots are comming
09:48 AM rue_bed: tom
09:48 AM rue_bed: Tom_L, you up?
09:49 AM Tom_L: no
09:49 AM rue_bed: there is another round comming
09:50 AM Tom_L: freenode seems to be on top of it
09:50 AM rue_bed: not really
09:51 AM rue_bed: 69.112.0.0/12
10:14 AM rue_bed: irtouv205
10:14 AM rue_bed: there will be an idle user irtouv
10:14 AM rue_bed: lets see
10:15 AM rue_bed: well, gone already, k
10:18 AM dev1990: rue_bed: those attacks are from same ip range or always random ip ?
10:18 AM rue_bed: Ruccas has a bunch of routers exploited on a bunch of different isps
10:18 AM rue_bed: he uses them to masquerade is source address
10:19 AM rue_bed: the ISPs dont care
10:19 AM rue_bed: almost every /8 IP range of comcast has 80 or more exploited routers
10:19 AM rue_bed: just as an example
02:13 PM Aslak3: I can't decide if I like those macros in the topic. For my own constants I always macro out the bit mask, not a bit numbers so I have no need for setting/clearing bits by number. But SetBit and ClearBit are kind of elegant *if* you are working from bit numbers. Anyway, cool /topic
02:15 PM Jartza: Aslak3: https://gist.github.com/Jartza/56d006504316ef5fe5a3db1b3e438ca9
02:15 PM Jartza: I use those :)
02:17 PM nuxil: yea. i prefere yours too :p
02:19 PM Aslak3: The usage of var args in the macro is interesting. I hadn't considered that
02:24 PM Aslak3: I find the multiple defs (ON or HIGH etc) for 1 confusing. Consistency trumps readability and cuteness. :) But very useful. I might have to rethink my "PORT &= ~(FOO | BAR)" type statements
02:24 PM nuxil: i havent tested with Jartza macros. but with the macros in topic. the compiler will convert them to sbi and cbi
02:25 PM nuxil: rue_bed, will tell you all about that :p
02:25 PM Jartza: mine convert to sbi/cbi as well
02:25 PM nuxil: :)
02:26 PM Aslak3: I haven't done any avr asm :( I assume my port assignment would be efficent?
02:26 PM Jartza: Aslak3: those high/low/on/off are just examples
02:26 PM Jartza: sure everybody uses what they wish as long as they are consistent throughout the code
02:26 PM Aslak3: Jartza: yeah I know. I'm just saying you can overdo "cute"
02:27 PM Jartza: of course
02:28 PM Aslak3: I've been doing C on and off for 20 years and I hadn't come across vararg macros. *blush*. For that teaching alone, I thank you
02:28 PM Jartza: I didn't make those to be cute, but I wanted more readable code
02:28 PM Jartza: examples are a bit bad though, I should give better examples
02:30 PM Aslak3: My AVR code is a bit rough. Any feedback welcome (beside "it's shit!" ;)) https://github.com/aslak3/keyboardcontroller/blob/master/main.c - couple of other AVR projects on that same github account
02:31 PM Jartza: anyways, I just find it more readable to say BITS_SET(TCCR0, CS00, CS01, CS02); than saying TCCR0 |= (1 << CS00) | (1 << CS01) | (1 << CS02);
02:31 PM Aslak3: When you have all those shifts I agree. I find it a menace how the standard headers use bit numbers and not masks myself. :(
02:32 PM Jartza: when reading code (especially beginners) the former tells better what is happening without too much thinking
02:32 PM nuxil: Aslak3, one suggestion. put all yout your initializing in a speperate functction. make your main cleaner :p
02:32 PM Aslak3: Thanks nuxil! It probably needs more commenting as well.
02:35 PM Jartza: I'm looking at code with cellphone, pretty demanding to comment :)
02:35 PM * polprog just writes those bitwise ops by hand... and if he was to make a macro it would be a topic one
02:36 PM Jartza: while(!(UCSRA & (1 << RXC)));
02:37 PM polprog: class UARTConditionFactory { ... }
02:37 PM nuxil: go away with your class
02:37 PM polprog: UartCondition getUartCondition(UartPeripheral uphe);
02:37 PM Jartza: #define RX_BIT BITP(UCSRA, RXC)
02:37 PM nuxil: :p
02:38 PM Jartza: while(!RX_BIT)
02:38 PM nuxil: damn. Jartza strikes with his macro magic again :p
02:39 PM polprog: nice
02:39 PM polprog: nice
02:39 PM polprog: let me see
02:40 PM polprog: while( !(UCSRA & (1<<UDRE)) );
02:40 PM nuxil: i think macros are 1 big thing that is skipped or just rushed over when learning C/C++
02:40 PM nuxil: should be more focus on it :)
02:40 PM polprog: macro abuse is sometimes funny
02:41 PM polprog: iirc there once was an entry in the obfuscated C contest that was the letter "P" as the program with the note that you can set P to be whatever you want in the makefile
02:42 PM nuxil: people still have contest makeing obfucated C code. usaly 1 liners.
02:42 PM nuxil: here 1 liner music https://www.youtube.com/watch?v=L9KLnN0GczI
02:43 PM nuxil: and this https://www.youtube.com/watch?v=rwOI1biZeD8
02:43 PM polprog: i know those. pretty cool!
02:43 PM Jartza: #define USART_EMPTY BITP(UCSRA, UDRE)
02:43 PM Jartza: while(!USART_EMPTY)
02:44 PM Aslak3: I like macros but like any tech they can be horribly abused. Yes everyone should know about them.
02:44 PM Jartza: :p
02:44 PM Jartza: Aslak3: yep. especially in vendor SDKs you see heavy macro overuse
02:44 PM Aslak3: Is the UART on an AVR buffered, as in more then 1 byte?
02:44 PM Jartza: and abuse
02:45 PM Aslak3: I confess to never having done an ISR with the UART for sending or recieving. I have in my 6809 SBC though, in assembly, so let me off a bit :)
02:47 PM Aslak3: Hey polprog. :)
02:48 PM Jartza: I have done UART sampling with bresenham alhorithm in my attiny85 VGA code because it's timing critical and hsync and uart are not really on same speed :D
02:48 PM Aslak3: You wrote a VGA generator yourself, or modified one?
02:48 PM Jartza: the whole thing is asm, though, for reasons
02:48 PM Jartza: Aslak3: myself
02:49 PM Aslak3: Ok, now I'm feeling stoopid :)
02:49 PM Jartza: 32x16 character screen buffer
02:49 PM Jartza: ansi escape subset support
02:49 PM nuxil: Aslak3, lol i know the feeling :)
02:49 PM Jartza: and it reads data from uart (9600 bps)
02:50 PM Jartza: Aslak3: https://github.com/rakettitiede/octapentaveega
02:50 PM Aslak3: Awesome. I'm hoping, some day, to do VGA in VHDL. That's assuming you can still find a working VGA monitor then
02:51 PM Aslak3: Pair that up with a PS2 keyboard interface in an AVR and you have a nice solution for the retro fans
02:51 PM Aslak3: PS2 or USB I spose
02:53 PM Jartza: on top of text it does 64x64 graphics
02:53 PM Aslak3: One tiny per R G and B? :)
02:53 PM Jartza: because 100% of attiny85s ram is used for screen buffer :D
02:53 PM Jartza: 32x16=512
02:53 PM Aslak3: That's a very sweet solution
02:54 PM Jartza: Aslak3: yeah, they run in sync. or single attiny for b&w display
02:54 PM Aslak3: How do you do the character lookups? You need, what, 128-32 by 8 bytes for the character ROM...
02:54 PM tpw_rules: Aslak3: vga in hdl is hilariously easy
02:55 PM Jartza: Aslak3: font is in flash
02:55 PM Aslak3: tpw_rules: It may be. I still want to prove that I can do it for my own benifit
02:55 PM Jartza: the VGA code is around 1.6kB so there is plenty of flash for font
02:55 PM tpw_rules: Aslak3: i mean i'm saying don't wait. do it now
02:56 PM polprog: hey Aslak3
02:56 PM polprog: ;)
02:56 PM tpw_rules: you have four hours. go!
02:56 PM Aslak3: tpw_rules: Hmmm :)
02:56 PM polprog: yay, got ponyprog2000 running on linux. holy cow, this thing runs on motif.
02:57 PM polprog: needs to be ported to gtk
02:57 PM Jartza: Aslak3: the code uses cpu registers as variables as all of the ram goes to screenbuffers
02:58 PM Aslak3: I know I'm old fashoined but I still find the idea of generating a video signal with a CPU to be.... alien :)
02:59 PM Jartza: I just made it to prove it can be done with tiny chip
02:59 PM Jartza: I also made it with much smaller chip
02:59 PM Jartza: attiny5
03:00 PM Jartza: 6 pins, 32 bytes RAM, 512 bytes flash
03:00 PM Jartza: 8 color vga :)
03:00 PM Jartza: https://youtu.be/WdBNR0JEDcY
03:02 PM Aslak3: Very impressive
03:04 PM Aslak3: I was going to use an AVR for the video on my 6809 board, but in the end I stuck with retro and used an V9958
03:04 PM Aslak3: I also wanted 80 col text
03:17 PM Jartza: https://drive.google.com/folderview?id=1X5PYggn6NsjgeeyJYZ_eBPaJeSgjyx65
03:17 PM Jartza: hardware :)
03:18 PM Jartza: IC1 = attiny5, U1 = oscillator
03:19 PM Aslak3: Dumb question, but where is the UART<->USB converter?
03:19 PM Aslak3: Or isn't there one?
03:26 PM polprog: im thinking about getting an amiga or a new CRT screen
03:26 PM polprog: fot the workshop computer
03:26 PM polprog: i mean, amiga as a terminal
03:26 PM polprog: running some light debian with ssh and nethack
03:26 PM polprog: maybe even FVWM
03:26 PM Aslak3: Why do you want to want to run Linux?
03:27 PM Aslak3: I've run Linux on an A1200 with 50Mhz 030 and 32MB RAM. It worked, but it was a dog. :)
03:28 PM polprog: maybe i just like CRTs
03:28 PM Aslak3: And unless you have a GFX card (so you'd probably need a A4000) you can pretty much forget X
03:28 PM Aslak3: An amiga running the native OS and a decent terminal emulator would be nifty
03:29 PM polprog: hmm, i will just ask around for unused HW
03:29 PM Aslak3: Jr-Comm. ahh happy days
03:29 PM polprog: maybe ill score some good old PCs or monitors
03:29 PM polprog: nighto!
03:32 PM dev1990_: Jartza: I get small tour on your projects and I'm very impressed, especially with that VGA based on Attiny85 and hand tuned assembly, gj
03:37 PM dev1990_: Jartza: did you write this assembly from scratch? or you used gcc artifacts at beginning?
03:43 PM Jartza: dev1990_: from scratch :) and thanks!
03:43 PM Jartza: Aslak3: no uart-usb converter, this attiny5 is standalone demo. the usb-port is only for power.
03:44 PM Jartza: and octapentaveega uses ttl-uart
03:44 PM Aslak3: ok :)
03:45 PM Aslak3: its an awseomely cute board. How much of the vt100 or whatever did you implement?
04:03 PM Jartza: Aslak3: the protocol description is in the github :)
04:03 PM Jartza: there's basic functionality like cursor placement, color selection, screen clearing etc
04:04 PM Jartza: and then some extras I implemented like line and screen scrolling
04:04 PM Jartza: Aslak3: but "pentaveega" is just standalone demo, little sister of octapentaveega :)
04:05 PM Aslak3: nice :) real vt100 would be a complete arse I'm sure
04:05 PM Jartza: octapentaveega can be used as display adapter for other peojects and has the uart & ansi
04:06 PM Aslak3: Yeah. Like I alluded too, if someone doing a 6502 project or something similar used that, combined with a keyboard controller AVR, they've got something pretty sweet. RX to the keyboaard, TX to your VGA. :)
04:21 PM Jartza: yea
04:30 PM Jartza: there's also the shield version of PCB, can be used with arduino-compatible hw
04:31 PM Jartza: I've used arduino, nxp frdm, atmel xplained, nucleo boards with it :)
04:34 PM cehteh: the main problem: no one still uses VGA nowadays, pls make a octapentadeepee or octapentaeitchdeemepee
04:36 PM rue_shop: hah
04:37 PM rue_shop: I thought most tv's and monitors still take vga
04:37 PM Tom_L: as a good human being you're supposed to keep a piece of the past in your closet
04:38 PM Aslak3: I wonder if even a core I7 or something could bit bang DVI
05:19 PM Jartza: cehteh: the only monitor missing vga input in my collection is the 24" 4k
05:20 PM Jartza: all the other 4 still eat vga
06:11 PM Jartza: I also tried octapentaveega with 15€ vga-to-hdmi converter and it works just fine
11:49 PM day__ is now known as day