#avr Logs

Mar 19 2018

#avr Calendar

12:08 AM day__ is now known as day
01:33 AM polprog: morning
01:35 AM Casper: .. yeah morning...
01:36 AM Casper: it's 2:36
01:36 AM Casper: and have to wake up at 6:15
02:38 AM _ami_: Casper, why to wake up at 6.15?
02:38 AM _ami_: gonna hit gym in morning?
02:38 AM _ami_: :)
02:46 AM polprog: Casper: go to sleep"; asm volatile("sleep"::); /*
02:47 AM Haohmaru: inline asm? i'll allow it
02:48 AM * _ami_ calls asm volatile("wfi"); instead on Casper's stack ;)
02:50 AM polprog: thats not even avr
02:50 AM polprog: stm8 has wfi iirc
02:50 AM polprog: and probably stm32
02:57 AM Haohmaru: stm32?
02:57 AM * Haohmaru phones the avr police
02:58 AM polprog: on my way to school today i was thinking about taking a math coprocessor like x87 and using it with avr
03:01 AM Haohmaru: u need to find a school that's located closer to you ;P~
03:08 AM rue_bed: polprog, I think you would find its slower than the avr doing it
03:08 AM rue_bed: do I need to send you a 80387?
03:14 AM _ami_: polprog, obviously stm32 :d it has 32 bit regs and he can sleep for more time. :P
03:36 AM Ameisen: so
03:36 AM Ameisen: I have the llvm toolchain kiiiinda working
03:36 AM Ameisen: there's a bug in lld that's keeping me from going further
03:36 AM Ameisen: however, the binary is actually substantailly smaller
03:39 AM polprog: rue_bed: interesting, i was just wondering
03:39 AM polprog: not sure if you can actually buy any x87 as a separate chip
03:40 AM Haohmaru: microsh<backspace,backspace>chip are such trolls..
03:40 AM Haohmaru: check out what happens when you open atmel.com
03:43 AM polprog: huh. 13 bucks https://m.ebay.com/itm/INTEL-D8087-1-CDIP-40-Arithmetic-Processor-IC/361934970944?hash=item5445016040:g:J2UAAOSwImRYDhxZ
03:43 AM polprog: for 8087
03:45 AM _ami_: Haohmaru, http://page.microchip.com/184freeboard.html
03:45 AM _ami_: they are giving away free PIC board. :)
03:45 AM polprog: or 100pcs for $400 for all your floating point needs
03:45 AM polprog: oh nice
03:45 AM polprog: _ami_: does that include a pickit?
03:45 AM _ami_: no.
03:47 AM polprog: well. not gonna bother then
03:47 AM Haohmaru: _ami_ i just took a sh*t, and i'm giving it away for free!
03:47 AM Haohmaru: what a coincidence!
03:47 AM Haohmaru: >:/
03:47 AM polprog: lol
03:47 AM _ami_: haha
03:48 AM polprog: tbh if someone near me was giving away a pickit id take it
03:48 AM * Haohmaru writes "CLOUD-BASED IDE" on a big wall
03:48 AM _ami_: polprog, it can't be programmed via usb bootloader? or serial?
03:48 AM polprog: ENTERPISE BLOCKCHAIN
03:49 AM polprog: _ami_: i know even less than you about pics
03:49 AM _ami_: oh, ok.
03:50 AM Haohmaru: microchip have put their sh*t in the clouds now
03:51 AM polprog: oh no. heavy rain incoming
03:51 AM polprog: take cover
03:51 AM Haohmaru: brown rain
03:51 AM * Haohmaru hides in a bunker
03:52 AM polprog: iirc smol device c compiler supports pics
03:52 AM * polprog would get some pics just to mess around
03:55 AM Haohmaru: basically, if you can't stand microchip's sh*t, their IDE and compiler, then you got only a few alternative options:
03:55 AM Haohmaru: SDCC (but it doesn't support all pic kinds, specifically not some of the smaller ones.. pic14, last time i checked), and some IDE
03:55 AM Haohmaru: there were some other compilers but i found SDCC the easiest to deal with
03:55 AM Haohmaru: cpik or some such
03:55 AM polprog: i kinda like sdcc
03:55 AM polprog: i mean. im on linux so mplab is not an option
03:55 AM Haohmaru: they may make it web-based ;P~
03:55 AM polprog: sdcc + make + emacs
03:55 AM polprog: oh god no
03:55 AM Haohmaru: in my case it's sdcc+Code::Blocks
03:56 AM Haohmaru: i still gotta have the whole MPLABX ide installed for the pickit3 programmer >:(
03:56 AM polprog: i tried c::b but it couldnt even friggin build a hello world on debian
03:56 AM polprog: :(
03:56 AM Haohmaru: eh?
03:57 AM polprog: plus im so deep in emacs it sufficient for me
03:57 AM Haohmaru: native hello world?
03:57 AM polprog: yeah.
03:57 AM Haohmaru: why wouldn't it build it?
03:57 AM Haohmaru: did you not have a compiler? ;P~
03:57 AM polprog: i dont remember the error
03:58 AM Haohmaru: or you used some obscure language like.. i don't know.. C?
03:58 AM * Haohmaru runs
03:58 AM polprog: lol
03:59 AM polprog: i will give it a try today
03:59 AM polprog: ill bother you with that when im home, in about 6h
03:59 AM polprog: :P
04:00 AM Haohmaru: well don't just because i say so
04:00 AM Haohmaru: if you find it easier to be a texteditor h4x0r - then so be it
04:02 AM Haohmaru: C::B is an IDE, so there's some learning to it, but the good part about it is that it's very configurable and you can use it for a range of platforms.. it works best with GCC-like compilers, but it can also work entirely with your own supplied make files
04:04 AM Haohmaru: for pic12 (where i can't use SDCC) i generate projects from MPLABX (which generates dumb makefiles for the XC8 compiler), and then i create a C::B project inside of that and set it up to use the makefile
04:08 AM _ami_: Haohmaru, http://page.microchip.com/184freeboard.html <-- any alternative to program this without pickit programmer?
04:08 AM _ami_: i heard pickit programmer is pretty costly?
04:08 AM * _ami_ googles
04:08 AM Haohmaru: it's not uber cheap
04:09 AM Haohmaru: but neither is the atmel programmer
04:09 AM _ami_: ~ 50$
04:09 AM _ami_: is there any alternative?
04:09 AM _ami_: picASP programmer? ;)
04:09 AM Haohmaru: but for avr, i cheap-a$$ stk200 (parallel port) or olimex avrisp2 clone (for xmega)
04:10 AM Haohmaru: * i use
04:10 AM Haohmaru: with avrdude, everything is a pleasure
04:11 AM Haohmaru: pickit3 has an equivalent (pk3cmd.exe) but guess what.. it's full of sh*t
04:11 AM Haohmaru: uber slow, and even the few nifty features it has actually don't work
04:11 AM Haohmaru: like specifying that you only want to overwrite the eeprom and not the flash (there are flags for this, but they actually are broken)
04:12 AM _ami_: i heard same feedback from sabor about PICs. :P so i would stay away from PIC.
04:12 AM Haohmaru: the tools for them are full of shizzle
04:12 AM polprog: i did not say i dont want c::b
04:12 AM Haohmaru: parallel port + avrdude is LIGHT YEARS better experience
04:12 AM polprog: i said, ill try to make it work when im home :D
04:12 AM polprog: Haohmaru: ++
04:15 AM Haohmaru: and of course.. it's 2018.. you got gigabytes of RAM, some computers i think even have terabytes.. the "biggest" 8bit pic doesn't have 4K even
04:16 AM polprog: but all mcus are cute and smol
04:16 AM Haohmaru: i don't buy ICs to pet and cuddle with them
04:17 AM polprog: >:(
04:18 AM Haohmaru: why is microsh*t's website so broken still?
04:18 AM Haohmaru: can't go to the product page even
04:19 AM polprog: maybe they write it in mplab as well :p
04:19 AM Haohmaru: were they too busy adding hi-res troll images for when you go to atmel.com?
05:24 AM nohitzwork: _ami_ that has a programmer built in
05:25 AM Haohmaru: u mean bootloader
05:26 AM nohitzwork: ok bootloader
05:27 AM nohitzwork: actually no
05:28 AM nohitzwork: it shows as usb flash drive and drop your program there, if i understood correctly
05:28 AM nohitzwork: its shows as usb flash drive when you plug it in
05:28 AM nohitzwork: to your pc
05:29 AM nohitzwork: but yeah, that needs also a bootloader
05:31 AM _ami_: nohitzwork, thats a good news. i would atleast able to do "hello world" on this when i get it. :P
05:31 AM nohitzwork: hmm tho that board has another mcu and the word "nEDBG" written next to it
05:32 AM nohitzwork: that would suggest a debugger
05:32 AM _ami_: only way to find out is to request the sample. :)
05:32 AM nohitzwork: yeah i did
05:34 AM polprog: i don feel like giving out my address. to get hardcopies of spam later on :D
05:35 AM polprog: ill just buy the stuff myself later
05:35 AM polprog: or... ill think about it
05:35 AM polprog: when i get home
05:36 AM Haohmaru: doesn't matter
05:36 AM nohitzwork: MPLAB
05:36 AM nohitzwork: ®
05:36 AM nohitzwork: Xpress PIC16F18446 contains an embedded debugger (nEDBG) that can be used to program
05:36 AM nohitzwork: the PIC16F18446 using ICSP.
05:36 AM nohitzwork: The nEDBG can program the PIC16F18446 with a USB mass storage drive and also include a Virtual
05:36 AM nohitzwork: COM Port interface over UART
05:36 AM Haohmaru: if you fall into that trap, eventually you'll have to get the pickit3
05:36 AM polprog: the oke
05:36 AM polprog: one that looks like alexa?
05:36 AM Haohmaru: and make sure you have a tough umbrella
05:37 AM Haohmaru: cuz the clouds are dark brown
05:37 AM polprog: :p
05:39 AM polprog: were getting substitute lessons today
05:39 AM polprog: in total, 5 lessons of physics today
05:39 AM polprog: f i v e
05:39 AM nohitzwork: yeah seems like this is the same case as with atmel xplain boards, they put on somehow crippled programmer so you cant use it with external boards
06:21 AM chat is now known as Guest55069
07:35 AM Casper: nobody want your shit! just it dump it in the toilet and flush it!
07:35 AM Casper: hmm
07:35 AM Casper: I was scrolled up it seems..
07:37 AM polprog: haha
07:39 AM Casper: it's all Haohmaru's fault, it's always his fault!
07:43 AM Thrashbarg: duh
07:43 AM * Haohmaru takes out his samurai sword..
07:44 AM * Haohmaru spits on it
09:39 AM skz81: polprog, that sounds a very good day ! What topic exactly ?
09:44 AM polprog: skz81: we were solving problems with ideal gasses (p1V1/T1 = p2V2/T2)
09:47 AM skz81: polprog, ok, not the most exiting I admit.... I was thinking of quantum field theory or something :)
09:48 AM polprog: no, im in highschool ;)
09:50 AM skz81: !! You reads older / more graduate...
09:52 AM polprog: good :P
09:52 AM skz81: see ? You're smoking pipe...
09:54 AM skz81: https://allpoetry.com/images/smile/old.gif
10:00 AM nohitzwork: polprog have you used cc65?
10:00 AM polprog: skz81: haha. thise emoticons. way better than emojis :D
10:01 AM polprog: nohitzwork: no, is that a c compiler?
10:01 AM polprog: hmn 6502 as i thouhght
10:01 AM polprog: never used 6502. nor had one
10:01 AM polprog: :(
10:05 AM nohitzwork: yeah
10:06 AM nohitzwork: im trying to get something out of SID schip
10:06 AM nohitzwork: as a test project
10:15 AM polprog: SID the sound chip?
10:15 AM nohitzwork: yep
10:15 AM polprog: wish i had a c64. i actually have a book about programming c64 in assembly
10:16 AM nohitzwork: im using emulator now
10:16 AM polprog: which one? i like Frodo
10:16 AM polprog: actually the book is for 7501. that is c16 and plus/4
10:17 AM nohitzwork: vice
10:17 AM polprog: https://puu.sh/zL0iM/37724b6ea4.jpg
10:18 AM polprog: it was my dad's
10:18 AM nohitzwork: damn its working :)
10:19 AM nohitzwork: lets try a different sound
10:20 AM polprog: nice
10:21 AM polprog: program "Last Ninja" into it :D or Comic Bakery
10:23 AM nohitzwork: sawtooth works too
10:35 AM Haohmaru: tawsooth
10:48 AM polprog: ill try and delid this chip
10:48 AM polprog: later learn some history and try to set up c::b
10:58 AM mulvane_ is now known as mulvane
11:43 AM tyzoid is now known as anyone
11:44 AM anyone is now known as tyzoid
11:44 AM tyzoid is now known as anyone-else
11:44 AM anyone-else is now known as tyoizd
11:44 AM tyoizd is now known as tyzoid
12:19 PM * skz81_test do a test
12:43 PM chat is now known as Guest57765
12:48 PM polprog: delidded some old chips
12:48 PM polprog: pictures imminent
12:49 PM polprog: https://puu.sh/zL5po/3290f54ac8.JPG
12:58 PM polprog: Emil: ^ nuxil rue_
01:05 PM nuxil: cool :)
01:06 PM nuxil: what chips where they?
01:07 PM polprog: no idea. one was a data transceiver
01:07 PM polprog: rest of them are remenants of a panasonic landline i took to bits when i was 10
01:50 PM Emil: polprog: what are those?
01:51 PM Emil: Oh I didn't even notice the resistor as scale :D
01:51 PM Emil: Pretty cool
01:51 PM polprog: Silicon chips
01:51 PM polprog: they are enormously yugeee though
01:52 PM polprog: the yellow one is a part of 3 die chip from most likely the 90s
01:56 PM nabil: Hey, is there some show/forum grouping people doing hardware freelancing or a variation like that
01:56 PM nabil: I'm thinking of something like "The Freelancers show" for hardware people
01:57 PM polprog: Emil: which resistor do i need to swap on the blue pill ?
02:01 PM Tom_L: the green one
02:03 PM Tom_L: polprog, do that in such a way they still work
02:04 PM Tom_L: open lid IC
02:04 PM polprog: no acid at hand
02:04 PM polprog: would be pretty awesome with avr though
02:04 PM Tom_L: :)
02:04 PM polprog: ;)
02:04 PM Tom_L: i've got a couple of thos UV erasable ones
02:05 PM Tom_L: don't even remember what they were
02:05 PM polprog: eproms? or uv eraseable micros?
02:05 PM Tom_L: micros
02:05 PM Tom_L: some old avr chip
02:05 PM polprog: ive only read about them on the avr libc homepage
02:08 PM Emil: polprog: have you tried googling it yet?
02:08 PM Emil: Correction
02:08 PM polprog: nope, im on my phone
02:08 PM Emil: Have you tried using a search engine yet?
02:08 PM polprog: lol
02:08 PM Emil: R10
02:08 PM polprog: i was thinking you remember off your head
02:08 PM polprog: :p
02:09 PM Emil: The USB standard requires a 1.5 kΩ pullup resistor on D+, but this board is known to have a wrong value (R10 on the board). It ships with either a 10 kΩ resistor or a 4.7 kΩ resistor, but it should be replaced with a 1.5 kΩ resistor, or put an appropriate resistor value (e.g 1.8 kΩ) in between PA12 and 3.3V. It is also true that some PCs are tolerant of incorrect value so, before you change the resistance,
02:09 PM Emil: you can try if it works in your case.
02:09 PM polprog: id have to load some usb prog first
02:09 PM Emil: polprog: try if it works directly
02:09 PM Emil: and/or measure the resistor
02:09 PM Tom_L: were they drunk that day?
02:10 PM polprog: no, maybe 10k was cheaper
02:10 PM polprog: like
02:10 PM polprog: a lot of half a million
02:10 PM polprog: special price for you my friend. only today. good deal
02:11 PM polprog: yea mine has 103 = 10m
02:11 PM polprog: 10k*
02:12 PM polprog: 1k5 =152. heh. i dont have a tape of those smd but this junk board has one right here
02:12 PM Emil: polprog: anything around 1.5k will work :D
02:13 PM LeoNerd: Presumably if it's already got a resistor onboard you can just measure that and apply another in parallel to it to generate the (approximately) right value
02:13 PM LeoNerd: I quite often stack two 0805 or 0603 values atop each other
02:13 PM polprog: me too
02:13 PM Tom_L: but then you don't know the value of the bottom one :D
02:14 PM polprog: but i dont have a 3k as well. i only have 510 and 1k
02:14 PM polprog: could make a tent like bodge though
02:14 PM polprog: but this 1k5 seems to work
02:14 PM LeoNerd: Ahyes; two 0603s in series across a footprint made for one. I've also done that before
02:15 PM LeoNerd: A little fiddly to get them into place, but reliable enough if you manage it
02:15 PM polprog: out of gas. awesome
02:16 PM Emil: LeoNerd: resistor houses are the epitome of "les fuq shit up"
02:16 PM Emil: :d
02:16 PM Emil: :D
02:16 PM Emil: "I'm too lazy to fix this right"
02:17 PM polprog: its more like
02:17 PM polprog: "look at my mad manual skillz"
02:30 PM learath: That bad?
03:43 PM h4x0riz3d is now known as antto
04:37 PM polprog: while(PIND & (1<<2) == 0)
04:37 PM polprog: for some reason this just doesnt wait till PD2 is high
04:46 PM nohitzzz2: it shouldnt
04:46 PM nohitzzz2: (if youre using stk500)
04:47 PM polprog: what do you mean
04:49 PM nohitzzz2: the way buttons are set up on that board
04:52 PM polprog: wtf
04:52 PM polprog: im trying to make a loop that starts when a pin (input) is low and waits till it goes hi
04:53 PM polprog: that cant be that hard what the hell am i missing its been two hours
05:04 PM polprog: holy fork()
05:04 PM polprog: itsworking
05:05 PM polprog: while(!(PIND & (1<<2))){
05:05 PM polprog: i dont even wanna know
05:06 PM LeoNerd: C operator precedence
05:06 PM LeoNerd: while(PIND & ((1<<2) == 0)) <== the latter of those two ANDed conditions is never true
05:06 PM LeoNerd: So your loop never stops
05:07 PM polprog: jesus
05:07 PM polprog: so
05:08 PM polprog: parentheses everywhere
05:09 PM LeoNerd: Yah; you wanted to write while((PIND & _BV(2)) == 0)
05:49 PM * Ameisen sighs
05:49 PM Ameisen: LLD is generating wrong section offsets. ld.gold fails to load clang's LTO files even with the plugin.
05:50 PM Ameisen: I'm sort of out of ideas
06:13 PM Tom_L: word instead of byte or vise versa?
06:13 PM Tom_L: that happens
06:22 PM Ameisen: well, no, more like
06:23 PM Ameisen: https://pastebin.com/UywnR7BA
06:23 PM Ameisen: it's positioning sections based on what appear to be incorrect sizes
07:16 PM rue_: polprog, what did you use to release the chips?
08:20 PM _ami_: 40mV ripple at output from a buck converter is NOT bad? right?
08:21 PM * _ami_ feels enlightened after measuring voltage output using his brand new Rigol 1054Z scope. :d
08:24 PM Casper: _ami_: 40mV seems fine, 5V supply?
08:24 PM cehteh: depends on for what you use it, and measured under different loads?
08:25 PM _ami_: measured with a 12V FAN at about 0.2 A current.
08:25 PM cehteh: note that buck operates in different modes and may output different ripple
08:25 PM cehteh: depending on load
08:25 PM * _ami_ have to make a electronic load. that would be next project.
08:26 PM _ami_: ok.
08:27 PM Casper: 12V that's perfect
08:28 PM _ami_: :)
08:28 PM * Tom_L gives _ami_ a copper bar as a load
08:28 PM Casper: iirc, atx specs is +/-50mV for 5V and 100mV for 12V
08:28 PM cehteh: perfect until driving analog stuff, amps etc :)
08:31 PM _ami_: i have this buck converter: https://www.kirich.blog/stati/informaciya-dlya-nachinayuschih/161-dc-dc-step-down-modul-s-zayavlennym-tokom-v-10-amper.html
08:32 PM _ami_: https://www.kirich.blog/uploads/posts/2016-03/1457126160_dc-dc-step-down-modul-s-zayavlennym-tokom-v-10-amper_12.jpg -> someone already did reverse engineer the circuit. With the help of sabor, what i did is i removed the voltage control 10k pot. and replaced it with this below circuit to have fine control.
08:33 PM _ami_: http://tinyurl.com/yc6jx5ol
08:33 PM cehteh: for what do you want to use it?
08:33 PM _ami_: cehteh, bench power supply.
08:33 PM _ami_: with coarse and fine pot.
08:34 PM cehteh: well thats quite generic :) .. should be good in almost all cases
08:34 PM _ami_: yes, its gonna be my first bench PSU. :)
08:34 PM cehteh: but when you want some real clean output then you'll put a linear regulator behind
08:35 PM _ami_: cehteh, for fixed voltage? sure
08:35 PM cehteh: also for adjustable voltage
08:35 PM _ami_: using LM317?
08:35 PM cehteh: there are plenty adjustable vregs
08:36 PM cehteh: lm317 for smaller loads
08:36 PM cehteh: ideally you make it that the input is just above the vregs drop
08:36 PM cehteh: then you dont waste much heat
08:37 PM _ami_: got it. just above the drop voltage
08:37 PM cehteh: but hey, i've brought a lap psu for cheap entirely with old linear technology and transformator
08:37 PM cehteh: give a shit about efficiency (ok it switches transformator rails with relays)
08:38 PM cehteh: but at least it has excellent output
08:38 PM cehteh: modern lab psu's are often switched, and some cheaper ones have not so stable outputs i heared
08:39 PM _ami_: yes, i saw reviews of some cheap psu and reviews were not that good.
08:39 PM _ami_: but hey, you get what you paid for.
08:39 PM _ami_: so no complains.
08:39 PM cehteh: on the pro side: they are efficient and can crank out lots of amps
08:40 PM cehteh: transformator based ones are huge heavy and inefficient :D
08:41 PM _ami_: Tom_L, i need to buy few loads from 1ohms - 8 ohms/100W rated.
08:41 PM _ami_: waiting for 28th march for big sale at Aliexpress. :D
08:41 PM cehteh: otherwise, dunno if it makes sense to build your own psu, there are a lot schematics and instructions for good ones on the net, but better ones are rather complex and you can buy a good one for less than $100
08:41 PM _ami_: indeed.
08:41 PM cehteh: 100W .. lol :D
08:42 PM cehteh: i once brought a "random bag" of load resistors
08:42 PM _ami_: cehteh, ofcouse, u would need to put them on a big heat sink :D
08:42 PM cehteh: with some 48Mohm 50W ones ... that really craps me out ..
08:43 PM cehteh: what voltage do you need to get 50W at 48MOhm WTF!
08:43 PM _ami_: the quality ones are costly - 30$ per load?
08:43 PM cehteh: shovelware, random bag, 1kg for 3 euros or such :)
08:44 PM _ami_: nice deal.
08:44 PM cehteh: sadly most of it was somewhat unuseable because of inpractical values
08:44 PM cehteh: see the 49Mohm thing .. did you calc the voltage? i didnt
08:46 PM _ami_: math.sqrt(50*50e6)
08:46 PM _ami_: 50000.0
08:46 PM _ami_: 50kV
08:46 PM _ami_: thats a lot
08:48 PM cehteh: that'll arc over :D
08:54 PM _ami_: overall it was good experience. i am waiting for my plastic case & banana clips/screws to arrive from banggood.
08:56 PM _ami_: and luckily i got SMPS from a old computer (picked from garbage) https://pbs.twimg.com/media/DYZNOksVwAAgcTM.jpg
09:40 PM rue_: banggood wouldn't let me pay them, which was good, cause I'd found like $150 in things I wanted, I'v never gone back
09:41 PM Tom_L: they just wanted you cc info