#avr Logs

Feb 19 2018

#avr Calendar

01:01 AM polprog: Casper: unsuscribedunreg: Me too!
01:42 AM unsuscribedunreg: nah since my supercheap chinese ledlamp lithium charger blown up, i hacked a phone charger to be a 4V20 output 700mA charger
01:43 AM unsuscribedunreg: i should set it to 4V1 ;/ so the batt lives longer
01:54 AM Casper: nahhh set it to 4.45V
01:55 AM Casper: more runtime!
01:55 AM unsuscribedunreg: hahah
01:55 AM unsuscribedunreg: +5%
01:55 AM unsuscribedunreg: it WAS 4.45V unloaded btw :)
01:55 AM unsuscribedunreg: the one that blew up
01:56 AM unsuscribedunreg: it regulated the lithium voltage with a zener diode in series with the feedback optocoupler...
01:57 AM Casper: standard stuff
02:35 AM unsuscribedunreg: what do you think about my plan to create the brain of a laser printer with an stm32 without external ram, and print at 1200x1200 dpi? :)
02:35 AM unsuscribedunreg: i figured i need only 8192 bytes of ram to make it work in A4 size
02:35 AM unsuscribedunreg: black&white would need 1024 bytes ram, 8 bit grayscale 8kiB
02:35 AM unsuscribedunreg: any less than that would suck big time because a scanline would not fit in a buffer ;/
02:37 AM polprog: do you know the phrase to dive into deep water
02:38 AM Haohmaru: y is dis water so brown
02:38 AM unsuscribedunreg: polprog: splash
03:51 AM Jartza: oh
03:52 AM Jartza: plenty of space
03:52 AM Jartza: Program: 422 bytes (41.2% Full)
03:52 AM Jartza: all features now in
04:04 AM Emil: Jartza: what part did you upgrade to?
04:04 AM Emil: Jartza: and didn't you say you needed >1kB for the driver?
04:07 AM Jartza: ahh, this is just different product
04:07 AM Jartza: some vape-thingie for a friend
04:07 AM Jartza: it's using attiny10
04:07 AM _ami_: Jartza, using asm?
04:07 AM _ami_: or C
04:07 AM Jartza: C
04:39 AM nohitzwork: Jartza i've been looking for a vape, when are these available ?
04:42 AM Haohmaru: is he making an electronic cig?
04:45 AM nohitzwork: apparently
04:48 AM Haohmaru: ooh, wat features?
04:49 AM nohitzwork: AVR inside sticker
04:50 AM Haohmaru: that's a feature?
04:50 AM Haohmaru: >:/
04:50 AM nohitzwork: i know as much as you do about this project
04:51 AM * Haohmaru pours a bucket of optimism over nohitzwork's head
04:52 AM nohitzwork: but if im gonna get a vape, i might as well get one that is finnish and has AVR inside
04:58 AM Emil: haha :D
05:33 AM Jartza: nohitzwork: I don't know when this version is available, but this is for finnish guy who makes custom mods
05:34 AM Jartza: they probably aren't the cheapest ones
05:34 AM Jartza: as they are hand made very custom thingies
05:34 AM Haohmaru: boutique stuff
05:35 AM Jartza: somewhere around $200 - $700 I think :)
05:35 AM Haohmaru: que? x_x
05:35 AM Jartza: I'm still using eLeaf iStick Pico myself
05:36 AM Jartza: Haohmaru: yeah, carbon fiber, stainless steel, gold plated contacts etc...
05:36 AM Haohmaru: carbon fiber? dafuq
05:36 AM Haohmaru: what's the point
05:37 AM Haohmaru: yeah, some people want carbon fiber on everything
05:37 AM Jartza: I don't know what is the point, as I'm not the target group
05:38 AM Jartza: I guess the point is the same as with wrist watches
05:38 AM Jartza: some people buy $30k wrist watches
05:40 AM Jartza: some people buy iPhones
05:46 AM theBear: and some people are above such things :)
05:48 AM Jartza: well. not my job to judge. if people want such things and have money to buy such things and are just happy with it, why the heck not.
05:48 AM Haohmaru: cuz it's... wrong.. :/
05:49 AM Jartza: no it's not.
05:49 AM Jartza: it's morally wrong to let those stupid rich people to keep their money.
05:49 AM Jartza: more stupid products to take money away from them, that's the way.
05:49 AM Haohmaru: there are better ways they could spend them, not on some pointless carbon fiber decorations
05:50 AM Haohmaru: who's gonna be sniffing the harmful carbon dust while machining that?
05:50 AM Haohmaru: not the rich dude
05:50 AM Jartza: the air filtration system is who is sniffing that dust
05:51 AM Jartza: and my friend is making his (and his family's) living with this stuff
05:51 AM Haohmaru: buy more expensive air filtration system, from the rich guys ;P~
05:51 AM theBear: it's morally wrong that when rich people choose a watch to buy, that every brand they are choosing from is a word/name we have never even heard
05:52 AM theBear: of course top of the line rolex are crap against that kinda lineup... they're somewhere comfortably below the lowest on that list
05:52 AM Haohmaru: ItsAFartTime?
05:53 AM theBear: does the pope still wear half a beanie ?
05:53 AM Haohmaru: wut's a beanie?
05:54 AM Haohmaru: a dome-shaped hat?
05:55 AM theBear: damn, way to ruin a bad joke that the majority of people think is humorless :-) well, kinda dome shaped, but it's more about being fluffy (outside of this bad joke) .. like those things you put on teapots to keep them warm, but for heads
05:56 AM Haohmaru: you put fluffy hats on teapots? o_O
05:56 AM theBear: personally i think that yamaka's (spelling? and likely wrong name for catholic ones) looking like half of one makes that line one of the funniest that will ever be written, and there VERY few people on this planet that don't get an image in their head instantly when they hear the word pope...
05:57 AM Haohmaru: *shrug*
05:57 AM theBear: well not me, i use teabags generally, teapots make things a bit excessive for a cup of mostly warm water, i feel :)
06:00 AM * Haohmaru sniffs his coffee suspiciously
06:01 AM theBear: at least the coffee covers the taste of the water... tea is more like adding a subtle nuance on top of the water flavour <grin>
06:02 AM Haohmaru: the hot water in my coffee here comes from a dumb espresso machine
06:03 AM Haohmaru: so it has a strong flavor of naaaaasty espresso
06:06 AM theBear: i used to have a slightly intelligent one, would anticipate you switching to steam setting and pre-raise the temp etc, but after two rounds of short-lived repairs a pin on the mystery micro that i didn't have code for anyway died, so it's been "on the backburner" for probably several years now.. "on the backburner" is a non-alarming term i was taught at my first (electronics repair) job... it basically means at the back of the workshop/repairs pile
06:06 AM theBear: waiting to maybe be the lucky winner on one of those rare occasions that a repair-tech has more time than fresh repairs to do, and happens to feel that specific very-broken thing is the most deserving or satisfying on the day
06:07 AM theBear: but it was so very good to me for so many years, i just can't give up on it yet
06:10 AM Haohmaru: i drink instant coffee ;P~
06:10 AM Haohmaru: it's so much easier
06:10 AM Haohmaru: you just need water that doesn't taste like sh*t
06:14 AM Jartza: https://i.pinimg.com/originals/ba/40/8f/ba408f021750cfc152c5e9bed936e341.jpg
06:14 AM theBear: heh, ya gotta "make your own" to get water like that here these days.... i spose you can likely buy it bottled, but i just can't condone paying for bottled water in a country with all kinds of convenient and often even free tap/plumbed water
06:14 AM Jartza: I'm not sure if those are the cheaper, or more expensive -end products
06:15 AM Jartza: and I'm pretty sure the snake isn't included
06:16 AM Haohmaru: what snakOMG SNEK /o\
06:18 AM theBear: heh... even if you aren't familiar with all the same headwear as I am, i think i "like the cut of your jib" Haohmaru :-)
06:19 AM Haohmaru: i think i need a translator
06:20 AM theBear: heh, i thought that one might be not the best choice... it's a sailing-related term.. it's a positive/good/approval-granted kinda thing
09:29 AM polprog: found an Unitra scope probe i got for 10 pln once
09:29 AM polprog: made in 1990, still works well
09:30 AM polprog: ill take it to school on the "Science day" to use with their scope since they only seem to have bnc-banana cords
09:44 AM nuxil: o.O ? really ? they dont got a proper scope probe ?
09:44 AM polprog: no idea
09:44 AM polprog: the latest and greatet scope they had was a semianalogue hameg one
09:44 AM polprog: very nice machine
09:45 AM polprog: https://upload.wikimedia.org/wikipedia/commons/4/49/HAMEG_HM404-2.jpg
09:45 AM nuxil: digital sampeling ?
09:46 AM nuxil: *it has .. ?
09:46 AM polprog: analog sampling i think, but it displays some simple measurements like ampl, Vpp, freq etc
09:46 AM polprog: as it cannot display two channels at once
09:46 AM nuxil: ok so no storage of signals.
09:46 AM polprog: yeah
09:47 AM nuxil: i want a crt scope with digital sampeling.
09:47 AM polprog: me too
09:47 AM polprog: like a HP once
09:47 AM polprog: one*
09:47 AM polprog: sweet sweet crts
09:47 AM nuxil: :)
09:47 AM polprog: on sigrok wiki i found a 4 channel japaneese one with amber <3 CRT
09:48 AM nuxil: i have a crt scope. but i dont have any storage.
09:48 AM rue_: I have an amber crt, is it workth anything yet?
09:48 AM rue_: ooh its not a scope tho
09:49 AM rue_: I have an OLD white crt scope, tube
09:49 AM nuxil: mine is good old green :)
09:49 AM polprog: white?
09:49 AM polprog: odd
09:50 AM rue_: yea, I'm trying to keep it safe
09:50 AM rue_: the circuit it toast tho
09:51 AM polprog: i also have this very old soviet CRT scope, one channel, small screen but it was very very helpful to me. Didnt have BNC even, some odd banana plug cable
09:52 AM polprog: i still have it, its in storage since it would occasionally do one weird thing,
09:52 AM polprog: as if the horizontal beam deflection system was catching an offset. i had to manually correct the offset
09:52 AM polprog: and then after some time it would jump back to norma
09:52 AM polprog: l
09:53 AM polprog: nothing wrong with anything else tho
09:57 AM nuxil: yea. old russian tech. if you hit with a hammer or something you will just fix it unlike vestern tech that gets hit ;)
09:58 AM polprog: lol
09:59 AM polprog: insert ak47 joke here
10:09 AM nohit: how about this https://ikalogic.com/pages/ikascope-wireless-oscilloscope
10:11 AM polprog: not a huge heavy box with a ton of fancy buttons ans knobs? absolutely disgusting :^)
10:12 AM nuxil: no knobs == shit.. lots of knobs == good stuff :D
10:13 AM polprog: someone here posted a pic of a hardware LA that had a "Whatever" button on the keypad
10:13 AM polprog: not a long time ago :P
10:13 AM nohit: dont care button
10:13 AM polprog: yeah
10:13 AM polprog: on a serious note this wireles scope looks reasonable
10:14 AM nuxil: 299€ excluding taxes
10:14 AM nuxil: hell no.
10:14 AM polprog: eww
10:14 AM nuxil: for that prize i get a real scope :p
10:14 AM polprog: haha
10:15 AM polprog: maybe even a used kektronix
10:16 AM nuxil: 359€ Including French VAT taxes)
10:16 AM nuxil: that got to be a joke
10:16 AM nohit: https://www.ebay.com/itm/Rigol-DS1054Z-Digital-Oscilloscopes-Bandwidth-50-Mhz-Channels-4/331941742120?epid=2254681137&hash=item4d49450628:g:EHYAAOSwUoNaA4By this is actually cheaper
10:16 AM polprog: lol
10:16 AM polprog: yeah
10:16 AM nuxil: they gonna get bankrupt
10:16 AM polprog: and is reasonable for its price
10:17 AM polprog: dont worry about them, some hipster hackerspace will buy some sooner or later !
10:17 AM polprog: :P
10:19 AM nuxil: i watched this eevblog about the opensource scope. it just looks like it needs alot more work. looks real buggy.
10:20 AM nuxil: this one https://www.youtube.com/watch?v=d8i125NSaqE
10:21 AM polprog: its likely that there are two or three guys working on it past time
10:22 AM polprog: havent seen that one
10:24 AM nuxil: 20:30 min into you can see all the artifacts with creates. sampling totaly messed up or something,
10:24 AM nuxil: with -- >*it creates...
10:28 AM nuxil: i like this about eevblog. lots of reviews on dmm and scopes.
10:28 AM polprog: yeah
11:40 AM nuxil: hmm. just noticed that i got a weird bug with my i2c. or maybe it isnt idk. im a noob with i2c stuff.
11:40 AM nuxil: same device works with 2 two different addresses.
11:40 AM nuxil: im sure thats not how i2c is intended.
11:41 AM nuxil: if i put my display and my mcp23008 on same bus. the display works with address 3e or 7c .
11:41 AM nuxil: 0b00111110 | 0x3e | 62
11:41 AM nuxil: 0b01111100 | 0x7c | 124
11:42 AM nuxil: if i put the display alone on the bus. it will only work with address 7c
11:42 AM polprog: notice how 3e and 7c are shifted
11:42 AM nuxil: yea
11:42 AM polprog: interesting
11:44 AM nuxil: the address of the mcp23008 is 40 0100000(0) | 0x40
11:45 AM nuxil: but the thins is. when i use 3e address on the display. it goes blank after a few min. but not if i use 7c. :p so idk. maybe a hw bug in the display.
11:46 AM nuxil: *thing.
11:46 AM polprog: no idea
11:47 AM nuxil: i need to hook up my analyzer to see whats going on.
11:47 AM polprog: good idea
11:50 AM nuxil: the manual says to use 0111110 + 0 at end since it only accepts write. (0x7c) so. kind of strange.
11:52 AM nuxil: https://pastebin.com/YcFauie9 https://pastebin.com/4kKamjQG i2c master code for atiny. written in asm. "not by me ofc :p"
11:53 AM nuxil: example to use in header. and need to edit asm to set ports.
11:54 AM nuxil: and edit makefile to include the asm file. :)
11:55 AM nuxil: copy and save incase you need to do i2c on atinys someday :p
11:57 AM polprog: heh, thanks
11:57 AM polprog: "Peter Fleury:
11:57 AM nuxil: it works on atmega aswell
11:57 AM polprog: hears that name before
11:57 AM polprog: heard*
11:57 AM nuxil: tested it on my atmega 324
11:57 AM nuxil: no idea who he is. :p
11:58 AM nuxil: http://homepage.hispeed.ch/peterfleury/avr-software.html
11:58 AM nuxil: there
11:58 AM nuxil: i got the source from
11:59 AM polprog: in bash meta-backspace (esc bksp) will erase the whole word
11:59 AM polprog: how cool is that
12:00 PM polprog: i would write the lcd handler for stm8 but im too lazy to do it
12:01 PM nuxil: no one written a lib you can use already ?
12:01 PM polprog: maybe they did
12:01 PM nuxil: or you talking about menus and stuff.?
12:01 PM polprog: but i never wrote a lib for 44780 so i wanted to try
12:01 PM polprog: no just simple puts() like stuff
12:02 PM polprog: not even printf
12:04 PM polprog: actually
12:04 PM polprog: i'll make myself some tea and start writing the code
12:04 PM polprog: or at least draw out the commands etc
12:05 PM nuxil: :)
12:05 PM nuxil: start with the setup of the display. a init function.
12:05 PM polprog: this was what i used on avr http://radzio.dxp.pl/hd44780/hd44780_avr_4-bit_norw_c.htm
12:05 PM polprog: ill just take a look at how its done
12:05 PM polprog: i know the command set
12:06 PM polprog: he just didnt explain how to use the 4 bit mode in the text
12:07 PM polprog: http://radzio.dxp.pl/picprog/ 7406 based PIC flasher iface. this guy has some nice stuff on his site
12:08 PM polprog: or this http://radzio.dxp.pl/font/
12:08 PM polprog: im amazed
12:34 PM nohit: there's a hd44780 driver in avr-libc
12:35 PM nohit: its in /doc/avr-libc/examples/stdiodemo/
12:35 PM nohit: https://www.microchip.com/webdoc/AVRLibcReferenceManual/group__stdiodemo_1stdiodemo_overview.html
12:46 PM polprog: wow
12:46 PM polprog: i never known that haha
12:48 PM Jartza: polprog: did you see how I made fonts for the octapentaveega? ;)
12:49 PM Jartza: https://github.com/rakettitiede/octapentaveega/blob/master/vgafont.dat
12:49 PM Jartza: the fonts are "drawn" into that file
12:50 PM Jartza: https://github.com/rakettitiede/octapentaveega/blob/master/vgafont.py
12:50 PM Jartza: and that stupid simple script creates the actual code out of them :)
12:51 PM Jartza: aka, it spits out this: https://github.com/rakettitiede/octapentaveega/blob/master/font.inc
12:51 PM polprog: lol
12:51 PM polprog: very neat !
04:10 PM polprog: fck me sideways
04:10 PM polprog: _delay_ms function for stm8
04:10 PM polprog: T_COUNT(x) ((( F_CPU * x / 1000000UL )-5)/5 )
04:11 PM polprog: that macro calculates the ticks needed to be nop'd inside a do{} while()
04:11 PM polprog: guess what sdcc did
04:12 PM polprog: "call __mullong" ... "call __divlong"
04:12 PM polprog: this is a CONSTANT jesus christ
04:12 PM polprog: you were meant to optimize it!!!!
04:12 PM polprog: ill try to compile the new version again or soemthing
04:12 PM polprog: or install cosmic.....
04:21 PM Emil: :D
04:21 PM Emil: but
04:21 PM Emil: why not use gcc?
04:21 PM Emil: stm8 should be supported
04:21 PM polprog: hmm
04:21 PM polprog: i think its not
04:21 PM polprog: let me check again
04:21 PM polprog: not supported
04:22 PM cehteh: never seen/used gcc for stm8
04:22 PM cehteh: and even if, looks like niche, avr-gcc is already bad enough :D
04:22 PM polprog: hehehe
04:22 PM polprog: keep your fingers crossed guys
04:23 PM cehteh: is there a forth for stm8? :)
04:23 PM polprog: im compiling sdcc 3.7.0 (vs 3.6.0) thats in the debian repo
04:23 PM polprog: i think there is cehteh
04:23 PM polprog: i was looking at forth but didnt try it
04:23 PM cehteh: me neither, but would be fun
04:23 PM polprog: hmm i disabled building uCsim and it looks like its compiling
04:25 PM polprog: looks like disk is the downside on this baby, compiling and all 4 cores are at 25%, but i think linux caches stuff as the disk led is off
04:25 PM polprog: load average 1.2
04:26 PM polprog: lol firefox takes more CPU than make
04:28 PM polprog: woohoo
04:28 PM polprog: sdcc --version gives "0.0.0" lmao
04:51 PM nohit: this seems like a nice tutorial https://lujji.github.io/blog/bare-metal-programming-stm8/
05:05 PM polprog: nohit: i guess i will just implement the delay in assembly myself
05:05 PM polprog: :P
05:05 PM polprog: no big deal
05:05 PM unsubscribedandf: hello
05:05 PM polprog: since i found one delay but it waits 15 ms when given 10 ms as a parameter lol
05:06 PM polprog: or just tune that one. but an assembly one would be much better
05:06 PM polprog: goodnight
05:10 PM splud: Anyone here doing ultra low power projects where they're needing to track power consumption on the AVR (at least for test), and if so, what are you using to do that?
05:12 PM LeoNerd: I sometimes do battery-powered things. I use an oscilloscope current probe, that I make and sell on Tindie
05:13 PM LeoNerd: in fact it's part of why I got into selling on Tindie in the first place :)
05:19 PM splud: I'm looking for something that can ideally log, and if not logging individual readings (or a delta set), at least track cumulative, average and min/max
05:19 PM splud: At this point, it is looking a lot like I'd have to design and build one to get what I want.
05:19 PM LeoNerd: Ah.. yeah that's something I've been thinking about making for a while, but so far nothing but thoughts
05:21 PM splud: Have done a number of projects with ATTiny13A and 24, 84, 85, but am tinkering with 43U right now, and would like to really know how much the device is using over time in a mixed environment.
05:21 PM LeoNerd: Yeah; for that you're more looking for a charge meter
05:21 PM LeoNerd: Not something I've directly thought about, but probably something you'd be able to find somewhere
05:21 PM splud: The load/meter I have doesn't seem to track below 1mA
05:22 PM splud: I probably should actually dial in a precise load (Vin + resistor) to determine what its threshold is, but if my uC is 10
05:22 PM splud: 10's of uA, with occasional spikes it doesn't track.
05:23 PM LeoNerd: Yeah.. that kind of task is pretty tricky
05:23 PM LeoNerd: It's an HDR problem
05:24 PM splud: ADCs on something need to be fast otherwise you can miss events.
05:24 PM LeoNerd: min/max hold is easy enough with some opamps
05:24 PM splud: But, this isn't commercial, it's me toying around in the shop.
05:24 PM splud: The average is more significant, as well as max.
10:34 PM nuxil: splud, http://www.eevblog.com/files/uCurrentArticle.pdf maybe of interest to you.
11:19 PM day__ is now known as day
11:57 PM polprog: morning
11:58 PM nuxil: sup
11:59 PM polprog: cold
11:59 PM polprog: or rather chilly