#avr Logs

Jan 19 2018

#avr Calendar

12:04 AM day__ is now known as day
12:53 AM polymorph: :) http://blog.lenovo.com/en/blog/typing-on-a-blank-keyboard
12:59 AM Thrashbarg: neat
01:50 AM _ami_: silicon bug in Attinys: https://electronics.stackexchange.com/questions/342606/usibr-loses-the-msb-of-the-received-byte-in-attiny45-85-of-avr-family?atw=1
02:02 AM Jartza: nuxil: http://i.imgur.com/4hKT4cU.png
02:02 AM Jartza: we made a mug where the rocket is now another way around :D
02:07 AM polymorph: [08:48] <_ami_> silicon bug in Attinys: https://electronics.stackexchange.com/questions/342606/usibr-loses-the-msb-of-the-received-byte-in-attiny45-85-of-avr-family?atw=1 - i wrote my own interrupts to handle datacom
02:34 AM polymorph: check this dude's stuff out https://github.com/cpldcpu
02:34 AM Jartza: luckily I only mis-use USI, so I don't care :)
02:37 AM Jartza: polymorph: and btw. I've had blank keyboard for like 8 years
02:38 AM Jartza: using the original "das keyboard"
02:39 AM polymorph: :)
02:39 AM polymorph: https://github.com/cpldcpu/MCPU
02:39 AM polymorph: MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD
03:22 AM nuxil: Jartza, LOL
03:27 AM Jartza: nuxil: you can even buy one if you want :D
03:28 AM Jartza: https://shop.spreadshirt.fi/rakettitiede/
03:28 AM Jartza: yes. our consulting company has fan merchandise shop.
03:28 AM Jartza: who wouldn't have one? :D
03:31 AM nuxil: hmm, that cap "Mystinen pipo". or whatever its called. we call them "hue"
03:31 AM nuxil: how thik is it ?
03:32 AM nuxil: can i use it outside at -10 deg without freezing my ears off?
03:42 AM nohit: Jartza do you work with dive computers? i remember you said something about Suunto and charger firmware
03:50 AM Jartza: nohit: Amer Sports Digital is my customer, so I do work with dive computers, sport watches and other products they make
03:50 AM Jartza: but *mostly* sport watches
03:51 AM Jartza: nuxil: pipo, I don't really know what's that in english... woolly hat?
03:51 AM Jartza: but yeah. I have few of them because it's like -13°C outside now
03:52 AM nohit: nice. me too
03:54 AM Jartza: cool
03:54 AM Jartza: although current assignment is something completely new.
03:54 AM Jartza: not-yet-announced product
03:55 AM nohit: so you designed a smart charger for them? is it new thing for Suunto?
03:55 AM Jartza: not really smart charger
03:55 AM Jartza: the chip is inside every charging cable
03:56 AM nohit: ok
03:56 AM Jartza: but as the cable doesn't really have "connector", but just plain pins, it's easy to place the connector on metal surface and short the pins
03:56 AM Jartza: so there's some smartness inside, yes
03:56 AM Jartza: mainly preventing shorts and overvoltages reaching the watch
03:56 AM nohit: yeah
03:57 AM Jartza: as the watch has only metal pads behind it where either the clip attaches, or in some models there's magnetic clip
03:57 AM Jartza: but yeah, I have made the firmware for the cable mcu :)
03:58 AM Jartza: and lot of stuff to software platform of the watches
04:00 AM nohit: what mcu's they use with the sport watches? (if you are allowed and want to tell)
04:01 AM nuxil: buy one. crack one open and find out :p
04:04 AM nohit: im not THAT interested
04:04 AM nohit: just wondering
04:29 AM Jartza: hehe
04:29 AM Jartza: I don't know if I'm allowed to tell the exact MCU, but it's cortex m4
04:30 AM Jartza: depending of the device of course. some of them might have multiple ones.
04:44 AM nohit: garmin has released a nice looking device https://www.youtube.com/watch?v=DmRhSbzS5fw
04:48 AM nohit: bit pricy
05:13 AM day__ is now known as day
05:17 AM day: Jartza: so they use off the shelf available mcu's in their products?
05:48 AM nohit: what else would they use? some custom chips?
05:49 AM Haohmaru: no, home-brew black magic
05:49 AM nuxil: a blob ?
05:50 AM nuxil: ewww :p
05:50 AM Haohmaru: covered in black hot-snot
06:10 AM nuxil: ok. so does anyone know of some GOOD menu lib written in C for 2 line displays, dosent havet to be for AVR. just so i get the gist of if.
06:11 AM nuxil: The current code im working on is a mess and want to abandon it :p. tonz of switches, and the deeper i go into sub menus the more ugly and messy it gets.
06:11 AM nuxil: i never written any menu system before so im not sure whats the best way to do it.
06:11 AM nuxil: here you can see a example of what i mean by messy, it works but looks like shit and not good to maintain. https://pastebin.com/7PyYjKjK
06:11 AM nuxil: thats just for 1 button. now there are 8 buttons in total that has misc functions. so there are alot of switches in the code. :p
06:12 AM Thrashbarg: try writing it as a state machine?
06:12 AM polprog: i feel like a state machine would be perfect for that
06:12 AM Thrashbarg: :D
06:12 AM nuxil: hmm,
06:13 AM nuxil: yea. i guess that would be the thing to do
06:13 AM polprog: state machines are awesome
06:13 AM Thrashbarg: yup
06:13 AM polprog: i know generally how they work but the whole maths behind them doesnt make it clear.
06:14 AM Thrashbarg: I find written maths, algebra, etc, never makes things clear :P
06:14 AM Thrashbarg: I prefer graphs
06:14 AM polprog: yes, graphical presentation ftw
06:15 AM nuxil: i need to go look for state machine tutorials :p
06:15 AM polprog: hmm
06:15 AM polprog: i might have something
06:16 AM Thrashbarg: nuxil: it's easy enough. The current state is held in a variable. The value of that determines what is executed, and what is executed determines the next state
06:17 AM Haohmaru: i've made a dumb device which has 4 arrow buttons and a 2x16 character display
06:18 AM polprog: dumb vt100 would be cool
06:18 AM polprog: made with a small lcd, not that huge CRT thing
06:19 AM Thrashbarg: I made a 'dumb' 80-column (composite) ADM3A terminal for my Z80 project with an ATmega324:P
06:19 AM Haohmaru: it can show menus.. the catch is that it doesn't have any menus.. instead, it connects to a given device (via uart) and the device "dumps" a bunch of stuff.. this stuff includes an array of strings with indexes which represent a menu
06:19 AM Haohmaru: then this can "walk" the menu
06:19 AM polprog: Thrashbarg: adm3a looks so cute <3
06:19 AM Thrashbarg: yea the old toilet bowl
06:20 AM polprog: haha
06:21 AM Haohmaru: more or less [level]["string"][goto_level]
06:21 AM Haohmaru: an array of that sort of thing is dumped initially
06:21 AM Haohmaru: using dumb pic18
06:25 AM nohit: nuxil, first design your ui to a piece of paper, its easier to implement when you have clear picture what you are actually doing
06:25 AM polprog: it think also making a tree like structure with function pointers, like this struct menuitem { menuitem parent, menuitem* children, void (*onClick)() };
06:25 AM nuxil: nohit, already done.
06:26 AM polprog: so that you etier have a structure of a menu item with children or an item that runs item->onclick();
06:27 AM polprog: when something happened like button or encoder click
06:27 AM polprog: what do you think?
06:27 AM jragon: nuxil: http://embeddedlightning.com/ugui/ might work for you, it's a really nice interface
06:27 AM skz81: polprog, +1, but I would refine / optimize by discriminating either it's an actual action (ie tree leave) or a submenu
06:28 AM polprog: skz81: good idea
06:28 AM polprog: oh, and a name string in that struct as well :P
06:28 AM skz81: Maybe one can use the same void* and cast-it either to callback or menu_type
06:29 AM nuxil: jragon, thanks. but i dont think thats for me. besides i read uGUI features foes not have menu system which is what i need. code for controlling the lcd is already done.
06:30 AM polprog: i should write a small menu system with structs like that - might need it sooner or later and if its in C then it can be ported to anything really
06:30 AM jragon: nuxil: It doesn't control the LCD, you have to give it a pointer function to write a pixel, it instead handles windows. It might be a bit overt he top though :)
06:30 AM jragon: It has a nice method of handling the call back functions
06:30 AM nuxil: jragon, yes it seems to be a bit overkill for my purpose
06:30 AM skz81: we need an "entry_type" attribute in our struct to discrinate... At least a "bool" but an enum scales best... and (but only maybe) a void* for arguments of the callback if needed (but then, you have two pointers, which one will fit best to hold sub-menu ?)
06:31 AM nuxil: polprog, yea a struct seems the way to go.
06:31 AM polprog: you could discriminate between leaf and branch bu setting onClick to NULL
06:31 AM polprog: and set the root item by setting parent to NULL as well
06:31 AM polprog: just need to check those nulls later
06:32 AM * polprog wonders what happens if he called a null pointer as a function on avr? jump to 0x0000?
06:32 AM skz81: polprog, if you have another pointer, that holds either the sub-menu adress, or the callback args, why not, it works :)
06:33 AM polprog: the more function pointers in structs you have, the more they have to call you to understand the code ;)
06:33 AM * polprog sprinkles some inline assembly on the menu system
06:34 AM skz81: polprog, jump to 0 means reset IIRC
06:34 AM polprog: yeah
06:35 AM polprog: so the avr shits the bed. same thing that happened when i tried to write to a null (forgot to check if malloc returned a valid address oops :P )
06:35 AM skz81: polprog, I was not talking about a second *FUNCTION* pointer, the second would be the "data" => if callback is n
06:36 AM polprog: oh. that a good idea as well
06:36 AM skz81: NULL, then data is sub-menu adress, if callback provided, data are callback's data
06:36 AM polprog: smart
06:36 AM polprog: always good to save a couple more bytes
06:38 AM skz81: but unsure if callback's data will be extendly used, that's why I proposed to kill a byte to save a pair (pointers are 2bytes in AVR IIRC)
06:38 AM polprog: what about parts with less than 255 bytes of ram?
06:39 AM polprog: or parts with no ram but there you dont really use C on them
06:39 AM LeoNerd: void* pointers are 2 bytes. void(*)() pointers I could imagine might be 3 or 4 on the >64Ki flash chips
06:39 AM polprog: why is 64Ki the boundary?
06:39 AM LeoNerd: 2**16 == 64Ki
06:40 AM polprog: ah
06:40 AM polprog: duh
06:40 AM nuxil: ^^
06:40 AM LeoNerd: Yah offhand I'm not sure how big a function pointer is on e.g. an ATmega1284
06:40 AM polprog: well, we can always go ahead and compile a simple program then disassemble it
06:41 AM * polprog is bored anyway so time to do some s c i e n c e
06:42 AM skz81: LeoNerd, I advice to store menus in flash as well, anyway :) :) :) But right, that implies callback data must be static too I believe
06:42 AM skz81: s/PROGMEM/static/
06:42 AM nuxil: yea
06:42 AM polprog: how often do you change the menu data
06:42 AM LeoNerd: Yah I usually keep printf string formats and OLED bitmap data in PROGMEM
06:43 AM polprog: PSTR() for the win
06:44 AM skz81: silly & dirty idea 80's style, and not portable on every chip, but.... you maybe can use the 'useless' MSbits of pointers to implement the "bool isLeaf;" value of each menu entry ^^
06:45 AM polprog: hmm
06:45 AM Thrashbarg: heh just like the 68000
06:46 AM skz81: Thrashbarg, maybe, don't know much about 68K... What was it used for then ?
06:47 AM Thrashbarg: the address bus was 24-bit in hardware but the internal address registers were 32-bit, so programmers used them for things
06:47 AM Thrashbarg: then it became a problem with 32-bit clean 680x0's
06:47 AM polprog: LeoNerd: looks like void* is 2 byte wide in mega1284
06:48 AM nuxil: i found something :D https://github.com/aeguana/LCDMultiLevelMenu/blob/master/menu.c
06:49 AM polprog: how do i make avr-gcc show me evaluated code? replacing sizeof() with actual number
06:50 AM polprog: odd. both compiling for atmega1284 and attiny10 the same test code (definiing a void* and then assigning sizeof that void* to a variable) loads 2 into a register pair
06:50 AM polprog: interesting
06:55 AM LeoNerd: polprog: void* sure, that's a data pointer. I was talking about code pointers
06:55 AM LeoNerd: void (*)()
06:55 AM polprog: i mean void (*testfunc)();
06:56 AM LeoNerd: Hrm
06:56 AM LeoNerd: I wonder if maybe every function is aligned on an even address, so maybe 128Ki is the limit
06:56 AM LeoNerd: because they're shifted?
06:59 AM cehteh: avr addresses the program space at word (16bit) boundaries not bytes addresses
06:59 AM LeoNerd: Ah right. That'll be why 128Ki seems to be the biggest chip then
07:00 AM cehteh: yes
07:28 AM skz81: ha yes remember I have been puzzled by that word adressing (while looking in simulavr's code ^^)
10:31 AM Ameisen: Are there any commercially-available DRAM boards for things like AVR, ARM MCUs and so forth
10:31 AM Ameisen: with SPI or some other interface (I'd be willing to sacrifice a few GPIO pins to increase bandwidth and decrease latency
10:31 AM Ameisen: or would I need to design my own
10:38 AM Casper: some older AVR had the ability to connect an external ram chip... but that wasn't that usefull. going up in the avr line was often more economical, or using another kind of device was better
10:39 AM Casper: and you most likelly want sram, unless you want to also use a dram controller, due to the need of it to be refreshed every so often
10:54 AM _abc_: Hello. I am tinkering with a project which might benefit later from using a low end v-usb style cdc or similar connection. I am looking at usbasp sources (firmware) for clues, it appears it only ever ran on atmega8 atmega48 atmega88 , can't find a port ...
10:54 AM _abc_: ... to atmega328. Has anyone got a port to it? I assume it's just more register setup and fuses. Before I reinvent warm H2O, can someone please point me right?
11:56 AM Emil: _abc_: usbasp dowsnt do cdc
11:57 AM Emil: it does its special thing
11:58 AM polprog: Ameisen: you could in theory take a paralell ram chip and sacrifice a port or something like that. Should be fast enough if written in tailored c or assembly
11:59 AM Emil: _abc_: but it should be extremely simple to port to m328
12:00 PM Emil: _abc_: though ch34g costs very little
12:04 PM Emil: _abc_: I recommend cp2102-series
12:08 PM polymorph: hi
12:10 PM polymorph: i have a 16cm wide 4x7 segment led display in a clack that has a foulty brain :)
12:10 PM polymorph: alarm clock
12:18 PM _abc_: Emil: usbasp does not do cdc, but v-usb does cdc. I asked about porting usbasp to '328
12:28 PM polymorph: what do you think the alarm clock should do with an atmega168? ;>
12:30 PM Tom_L: tell time and wake you up and give you minute by minute reminders
12:33 PM polymorph: RMS/PEAK,MIN/MAX voltage display?
12:33 PM polymorph: and temperature in/out?
12:34 PM polymorph: i think i should have an outside temperature display somewhere
12:35 PM polymorph: and mayby RH to give an idea if it is likely to rain
12:55 PM Emil: _abc_: bruh.
01:15 PM Jartza: I just got 200 ws2812b leds
01:15 PM Jartza: and then I realized... 200 is waaaaaaaay too little for my needs :D
01:15 PM Jartza: should've ordered 2000
01:17 PM Emil: wot
01:17 PM Emil: whatcha doing?
01:21 PM Casper: lol
01:22 PM Casper: I'm actually thinking to buy some of those leds for an xmas project
01:36 PM nuxil: god damn.. i just spend 250 kr (30+ dollars) on wrong transparant sheet for the printer. the sheets get melted stuck in the printer.
01:37 PM nuxil: i wounder if i can hack the fuser so it doesnt give off so much heat :p
01:43 PM polprog: Casper: Just in time for xmas!
01:43 PM polprog: laser printing on plasic sheets
01:43 PM polprog: extreme sport :P
01:44 PM nuxil: you know there are transparant sheet for it right?
01:44 PM nuxil: i just happen to not buy the correct type :p
01:44 PM polprog: are you making PCBs?
01:45 PM nuxil: lol. at some point :p
01:45 PM polprog: i wanted to try out uv laquer and tracing paper in inkjet. but my printer died just in time
01:45 PM polprog: having a working pcb etching process could come in handy for quick protos / breakouts
01:48 PM nuxil: i have a 2nd printer aswell. canon pixma 5150, but its not any better, the ink just floats around on the sheet.
01:48 PM nuxil: so looks like i have to spend another 30bucks on new sheets or try to modify the fuser on the the other printer.
01:50 PM nuxil: im gonna crack it open later and take a look :p
01:51 PM nuxil: if i can just add in a mosfet as a regulator then its a pize of cake. will be worse if there is some sensors that checks the temp.
01:53 PM polymorph: nuxil: lol
01:53 PM polymorph: toner melts at fuser temp about 200°C
01:54 PM polymorph: it is not ink
01:54 PM nuxil: i know. i said i had 2 printers. one ink and one not.. i didnt spesify toner tho :p
01:55 PM polymorph: laser printable media can widthstand 200°C for 10s
01:55 PM cehteh: i'd wish for these soild wax printers, modified to print a mask directly on a PCB
01:55 PM nuxil: hell, maybe i can modify this hole thing to print directly on the pcb :p
01:55 PM cehteh: i bet that would give awesome results
01:56 PM polymorph: i used to print on thin white office paper then iron it on the clean board
01:56 PM cehteh: laser? no, because coper may negate the static charge used to keep the toner in place
01:56 PM _abc_: Searh for inkjet mod to direct print on pcb, using Epson printer and some ink made for that printer
01:56 PM polymorph: then the paper comes off with a wet sponge
01:56 PM _abc_: +c
01:56 PM cehteh: inkjet maybe, but inks splatter micro dots and are not etchant proof
01:58 PM cehteh: there are these xerox solid hot wax printers, which print a thin but opaque layer of wax. if they wouldnt be that friggin expensive it would be fun to mod one to print on pcb's
01:59 PM polymorph: no laser printer prints on fiberglass
01:59 PM _abc_: Why do you invent explanations instead of looking it up. It is old already. hacakaday iirc
02:00 PM _abc_: cehteh:
02:00 PM cehteh: really?
02:00 PM polymorph: sup _abc_
02:00 PM cehteh: link?
02:00 PM _abc_: http://www.instructables.com/id/Converting-an-Inkjet-Printer-to-Print-PCBs/
02:00 PM _abc_: check the date
02:01 PM _abc_: There are several articles on that, several different printers modded, all by Epson
02:01 PM _abc_: polymorph: hi
02:02 PM _abc_: https://www.inksupply.com/product-details.cfm?pn=MISPRO-4-Y this ink.
02:02 PM _abc_: It is baked on a bit with heat and resists etchant
02:02 PM cehteh: ah
02:02 PM cehteh: but looks like a lot work too, while inkjets are cheap shit
02:03 PM _abc_: https://hackaday.com/2009/09/02/direct-to-pcb-inkjet-printing/
02:03 PM cehteh: but did you ever seen printouts from solid ink printers? contours are much better than any inkjet
02:03 PM _abc_: Only Epsons work, their print head is ultrasonic not thermal inkjet. That is the key
02:03 PM cehteh: ok
02:03 PM _abc_: Yes solid wax printers from Xerox are nice but they are $$$
02:04 PM cehteh: hey maybe i mod my wife's inkjet :D
02:04 PM polymorph: _abc_: there are outdoor inks... those are waterproof
02:04 PM cehteh: ohnoo its a canon :(
02:04 PM _abc_: Note that last link uses an inkjet with 'cd printing tray' so no need to mod it at all
02:04 PM cehteh: yes the canon has a cd tray
02:05 PM _abc_: polymorph: I know, but none of the solvent based inks are printable with thermal heads for obvious reasons
02:05 PM _abc_: cehteh: so locate an Epson with a cd tray at a garage sale and grab it
02:05 PM cehteh: i should figure out if there are some waterproof inks for that one available from 2nd sources
02:05 PM _abc_: cehteh: Canon uses thermal heads, not good
02:05 PM cehteh: prolly
02:06 PM _abc_: cehteh: go read all the comments on this page https://hackaday.com/2009/09/02/direct-to-pcb-inkjet-printing/ -- there are links and things answer you questions.
02:06 PM _abc_: 10 years ago in a few
02:06 PM cehteh: i wonder if todays models still work then :D
02:06 PM cehteh: anyway i am not goiung to build that now
02:07 PM _abc_: http://www.pabr.org/pcbprt/pcbprt.en.html
02:07 PM cehteh: but toner transfer is always a bit pita, often enough it turns out not good enough
02:07 PM _abc_: They stll use the same piezo head technology
02:13 PM polymorph: _abc_: not too obvious... they use high power piezos, they enerate heat
02:13 PM _abc_: Just buy presensitized boards and expose with uv, printed on transparency
02:13 PM polymorph: as a side effect the ink has lower viscosity and dries faster probably
02:14 PM _abc_: polymorph: they do not run too hot but they self destruct if run dry.
02:14 PM _abc_: polymorph: I know, I had trouble with that. See peter5.50webs.com
02:14 PM _abc_: That's a page of mine
02:14 PM _abc_: The Epson part
02:15 PM _abc_: I tried to reuse the heads from that printer, did not succeed, apparently they dry out/burn out when dry.
02:19 PM cehteh: or just when they get air into the printhead the forming of droplets doesnt work anymore
02:28 PM _abc_: Welp, I always wanted an avr resident monitor. This comes pretty close https://ka010.wordpress.com/avrbridge/ xposted to #avr
02:29 PM _abc_: cehteh: those can be purged but if you run the head dry for even a few minutes (pages), the elements inside die
02:53 PM Casper: For those ws... leds... the data out of them can drive how many leds in parallel?
03:03 PM polprog: ive seen a lot
03:03 PM polprog: like 200 or so. i think every led acts as a repeater
03:04 PM polprog: if you are talking about those WSsomething aka neopixels
03:11 PM Jartza: Emil: I'm going to do my own word clock
03:11 PM Jartza: but with esp8266 so that it can connect to wifi and get time from ntp
03:12 PM Jartza: Casper: they are not in "parallel", but in series
03:12 PM Jartza: daisy-chained
03:13 PM Jartza: every LED has 24 bits. if you send 48 bits, when the first led in chain gets 24 bits, it starts to push following bits through to it's out-pin, which can be connected to another led...
03:13 PM polprog: i was thinking about making a networked clock, but i think i will settle for some serial. i could do rs485 with many clocks and "multicast" time settings packets from a host compute
03:13 PM polprog: r
03:13 PM Jartza: so basically, you send bits to last led in chain first
03:14 PM Jartza: after a "latch", all leds will display whatever their bits are set to, using built-in pwm
03:14 PM polprog: primitive neteorking like 485 or modbus is kinda interesting to me
03:14 PM polprog: networking*
03:15 PM Jartza: uhh. one customer project last year involved modbus
03:15 PM _abc_: Correct me if wrong: v-usb is ported to smaller avrs like 8 48 88 but not to 168 328 because the code size (rjmp size etc) in the small ones uses 8 bit vectors, the ones in the large ones 16 bit?
03:15 PM _abc_: Rephrased: is there a way to port v-usb based code to 168 328 without rewriting the asm timing critical code?
03:15 PM nuxil: why not.
03:15 PM _abc_: Am reading asm now.
03:15 PM polprog: Jartza: modbus really sounds like something that liked to crap itself (im serious)
03:16 PM Jartza: it's still very much used in heavy industry
03:16 PM Jartza: and pretty reliable actually
03:16 PM polprog: i know
03:16 PM nuxil: _abc_, what does your atmega328 not have that a a atiny has which is special to this project?
03:16 PM Jartza: it's like lonworks
03:17 PM polprog: but still. many vendors, many quirks probably
03:17 PM polprog: ill see
03:17 PM _abc_: referring to http://www.avrfreaks.net/forum/porting-atmega88-code-atmega328 -- the vector table for '8 is clearly smaller than that for 328, step between vectors is 1 for 8 vs 2 for 328
03:17 PM _abc_: nuxil: other way around
03:17 PM Jartza: polprog: well, the problem with modbus is that you just have device with id, and then you can read the registers
03:17 PM Jartza: and there can be A LOT of the registers in one device
03:17 PM Jartza: and you can write registers
03:17 PM Jartza: but there is no standard of what register contains what
03:17 PM _abc_: Oh, the 8 uses all rjmps
03:18 PM polprog: i know the idea, registers/coils etc
03:18 PM Jartza: communicating is the easy part
03:18 PM Jartza: most often the physical layer is just rs485
03:18 PM polymorph: only because of the jump size ;P
03:19 PM polprog: never tried it. for now i would be pretty happy with 485 comms between to computers - bougt a second usb-uart dongle recently
03:19 PM polprog: i think i still have a second 485 transceiver
03:19 PM polprog: ill just need to sort out flow control
03:20 PM Jartza: Casper: I've seen projects with like 1000 ws2812b or whatever neopixels
03:23 PM cehteh: wherent neopixels originally developed for huge billboard displays?
03:23 PM Casper: I don't mean in series, but parallel...
03:24 PM Casper: like I plan to have a string, that split later on in a few spikes.... which all the spikes have the same pattern
03:24 PM polprog: isnt it like, if theres many of them you get a scrolling artifact, as the first would be displaying every bit it has in its shift reg for a moment?
03:25 PM Casper: think of a firework style... raising dot that explode at the top and rain down...
03:26 PM Casper: polprog: I actually didn't checked the data protocol, so yeah it is possible, or maybe there is a "turn on" command too...
03:26 PM polprog: but that command would have to be passed as well...
03:26 PM polprog: lagging
03:30 PM Casper: yeah but at the 800kbps speed, the lag isn't that important
03:30 PM Casper: reading it
03:30 PM Casper: look like a kind of a pain to send
03:33 PM Casper: 0 = 0.35us low, 0.9us high.... 1 = 0.9us low, 0.35us high.... send all of your bits one after the other... then low for atleast 50us
03:33 PM Casper: that low is the reset, which is most likelly to be the "set data"
03:34 PM Jartza: well. SPI or USI can be easily used to send data
03:34 PM Jartza: as the timing is not that strict
03:34 PM Jartza: it's 0.35us +-150ns, 0.9us +-150ns
03:34 PM Jartza: so 3:9 and 9:3 timing is also fine
03:34 PM Jartza: translates to 1:3 or 3:1
03:35 PM Jartza: time your SPI correctly and send either 1000 or 1110
03:35 PM Casper: hmmm so 12 bytes per led with spi instead of 24 bits...
03:36 PM Jartza: yea
03:36 PM Jartza: just need to calculate 1 bit close to that 0.35us
03:38 PM polprog: its 800kbps? wow
03:39 PM polprog: i thought ot was more like 100kbaud
03:39 PM Jartza: hmmh. did I calculate right, 2.85 .. 2.86 MHz SPI
03:39 PM polprog: welp. never really touched that stuff
03:39 PM nuxil: are thouse leds i2c ? or some other spi
03:39 PM Jartza: no
03:39 PM Jartza: neither
03:40 PM Jartza: they have their own protocol
03:40 PM polprog: some serial
03:40 PM nuxil: oki
03:40 PM Jartza: like casper said.
03:40 PM polprog: 12 byte word
03:40 PM Jartza: < Casper> 0 = 0.35us low, 0.9us high.... 1 = 0.9us low, 0.35us high....
03:40 PM Jartza: but that can be emulated with SPI :)
03:40 PM polprog: is it ?
03:41 PM nuxil: so do you have 12 bit control per color or is it like 4 bits per color? rgb?
03:41 PM Jartza: configure your SPI to 2.85MHz, drive 1000 for bit 0 and 1110 for bit 1
03:42 PM Jartza: well actually yeah, casper said wrong, either bit always begins high
03:42 PM polprog: thats a neat trick
03:42 PM polprog: i saw it somewhere
03:42 PM Jartza: 0 = 0.35 us high, 0.9 us low. 1 = 0.9 us high, 0.35 us low.
03:43 PM Jartza: but misusing SPI is easier if you can configure your SPI close to 2.85MHz
03:43 PM Casper: the real protocol is simple: send GRB, MSB first, and it's a shift register... the datasheet I found isn't clear if you send the data of the first led first, or last led first...
03:43 PM Jartza: 2.85MHz and those bit pattern I showed will yield .35us and 1.05us
03:43 PM Casper: so, send all the 24 bits sets... then send a reset...
03:44 PM Jartza: but it's still around the specs
03:44 PM Jartza: actually I think 3MHz would even be closer
03:44 PM Jartza: that would give .33 us and 1 us
03:44 PM Jartza: yea
03:44 PM Jartza: 3MHz better
03:45 PM Jartza: Casper: yes, if you have 5 leds, then send 5 * 24 bits
03:45 PM Jartza: and then "reset"
03:45 PM Jartza: which is stupidly named, should be "latch"
03:45 PM Jartza: just remember to send first the bits for the last led in chain :)
03:45 PM nuxil: sound like weird leds. i should stay away form them :p
03:46 PM Jartza: nuxil: why on earth? they are *nice*
03:46 PM nuxil: jk. i been thinking for a long time getting some. but atm i have no project im i can use them in.
03:48 PM nuxil: maybe my next project. which i need some rgb leds for anyway.
03:49 PM Jartza: nuxil: I just got my test working :)
03:49 PM Jartza: these are nice
03:49 PM Jartza: hastily soldered 5 leds to board and just tried them
03:50 PM nuxil: next project is to hack my globus.
03:50 PM Jartza: I think it's pretty amazing to control any number of PWM RGB leds with single pin
03:50 PM nuxil: im gonna put a micro ship in it. add a light array inside it in a closed box and output fiberto each capital
03:52 PM nuxil: btw. your new soldering iron never arrived ?
03:53 PM Jartza: nuxil: https://www.youtube.com/watch?v=hwjcipwu5R8
03:54 PM nuxil: :)
03:54 PM Jartza: that's just 5 leds but you can chain as many as you want :)
03:56 PM nuxil: how much power does 1 led use max. "as white color?"
03:56 PM nuxil: idk if its the camera but they seems bright.
03:56 PM hetii: Hi
03:57 PM Jartza: nuxil: this is now 1/4 brightness
03:57 PM nuxil: howdy
03:57 PM Jartza: on max brightness they eat like 50mA each :)
03:57 PM Jartza: and they are *bright*
03:57 PM Jartza: like, hurting eyes bright
03:57 PM nuxil: ouu. hungry beasts :p
04:01 PM hetii: I have small challange for your, I wrote simple AC dimmer: https://pastebin.ca/3961351 Now when set dimming from 6 to 90 my lamp dimm correctly from low to high, but after value 92 my traic is fire in random pattern
04:02 PM hetii: and when set dimming to 100 then my lamp dimm from high to low state.
04:02 PM hetii: so without any for loop in my main while loop...
04:03 PM rue_bed: how long is the trigger pulse for the triac
04:03 PM hetii: any idea what can happen
04:03 PM nuxil: dont use delay in a isr
04:03 PM rue_bed: oh by the way, if you dont answer right away you definitly wont get help
04:03 PM hetii: nuxil, I will change it to some timer in the future
04:03 PM hetii: rue_bed, no clue...
04:04 PM rue_bed: looks like 10us is the designed delay
04:04 PM rue_bed: but yea, NEVER delay in an isr
04:05 PM rue_bed: hetii, isn't actually answering tho, right?
04:05 PM nuxil: the code is foobar :p
04:06 PM rue_bed: it SHOULD work by using two interrupts, one to detect the zero crossing, and one off a timer to fire the triac
04:07 PM rue_bed: 0 to 8.3ms later
04:07 PM hetii: rue_bed, yep the 10us so to be sure that my triac will off, and before its on at least 100uS or even 600uS in my real case
04:08 PM nuxil: read the datasheet how much latching current is needed.
04:08 PM rue_bed: do you have a frequency generator and a digital scope?
04:08 PM rue_bed: I was going to assume the hardware is ok
04:08 PM hetii: unfortunate not ;(
04:09 PM rue_bed: hmm
04:09 PM hetii: yep, It should be fine :)
04:09 PM rue_bed: so, wait a min
04:09 PM rue_bed: 100us * 90 is 9000 us
04:09 PM rue_bed: aka 9ms
04:09 PM hetii: as I wrote it works stable when dimming is in range >=6<=90
04:10 PM hetii: above or below make strange things
04:10 PM rue_bed: but you only have 8.3ms of waveform
04:10 PM rue_bed: 50 or 60hz?
04:10 PM hetii: 50Hz
04:10 PM rue_bed: ah
04:10 PM rue_bed: 10ms
04:10 PM hetii: yep
04:11 PM rue_bed: I wonder what the delay time on the triac/driver is
04:12 PM hetii: for that question I cannot answer ;(
04:12 PM hetii: I use moc3021 with BT136
04:13 PM nuxil: check the Tgt value
04:13 PM hetii: ohh
04:13 PM nuxil: if its specified
04:16 PM hetii: Gate controlled turn-on typ: 2uS
04:20 PM nuxil: you have enuf gate current for for this triac? you said it was randomly triggering ?
04:20 PM nuxil: typical 5mA it seems like.
04:21 PM hetii: nuxil, from moc3021 I have just 1k resistor that go to gate
04:24 PM nuxil: idk. this is why i hate triacs. there is always something when using them :p
04:26 PM hetii: well in my case I will probably add dead zones where I define if the value is below 6 then my triac is on and when above then is on
04:27 PM hetii: but ask here to know why it can happen
04:27 PM hetii: also I plan to drive multiple triacs so one delay or timer is not enough for me.
04:29 PM hetii: probably will use timer just to count time passed from zero cross and then compare that with values for each triac
04:31 PM hetii: I also find this article http://alfadex.com/2014/02/dimming-230v-ac-with-arduino-2/
04:32 PM hetii: and not sure why there someone configure interrupter to fire on rising edge?
04:33 PM hetii: as I test that configuration it seams that only half power are delivered for lamp
04:33 PM nuxil: http://www.instructables.com/id/AC-PWM-Dimmer-for-Arduino/
04:33 PM nuxil: get a mosfet :p
04:33 PM hetii: so only half sine wave is used
04:34 PM polymorph: i have a 16cm wide 4x7 segment red led display in a clock that has a faulty brain :) what do you think the alarm clock should do with an atmega168? RMS/PEAK,MIN/MAX voltage display?temperature in/out?i think i should have an outside temperature display somewhere, and maybe RH to give an idea if it is likely to rain
04:36 PM nuxil: make it mesure radiactivity
04:37 PM nuxil: and display the rad's
04:37 PM polymorph: is that important nowadays ? ;>
04:37 PM nuxil: how knows with rocket man makeing nukes and all that :p
04:37 PM _abc_: polymorph: usually the faulty brain's alzheimer can be cured by replacing the electrolytic caps
04:37 PM nuxil: not to speak of us president :p
04:37 PM _abc_: I assume it's a 40 pin DIP MOS chip from 1970s
04:38 PM polymorph: theey are nukinf the planet since a century
04:38 PM nuxil: make it count how many times you znore during your sleep
04:38 PM polymorph: _abc_: it displays set time and blinks, it does not increment time ;>>
04:39 PM polymorph: i set it 11:14 and it stays there
04:39 PM polymorph: its type is VST®
04:39 PM _abc_: polymorph: did you wait for 65 seconds after setting time?
04:40 PM polymorph: _it is been this all day ;>
04:40 PM _abc_: I fixed a lot of these old clocks, 99% was dried capacitors and gunk on pins and/or switches which confused the chip
04:40 PM _abc_: VST?
04:40 PM nuxil: verry special thing.
04:41 PM _abc_: There were only 3 or 4 kinds of clock chip, all the others were clones.
04:41 PM _abc_: MOSTEK NatSemi and Motorola were the usual suspects to search
04:41 PM _abc_: Even Russian/East Bloc clock chips were copies thereof.
04:45 PM hetii: Other topic: I found few days ago in one of my box this: https://snag.gy/0nbxml.jpg How do you think, it will be hard to add all required hardware to make it alive ?:)
04:46 PM nuxil: whohoo. whooping 12.5Mhz :D
04:47 PM nuxil: 1982 model
04:48 PM hetii: yep, year of birth, so would be nice for me to push life again to this CPU :)
04:48 PM hetii: I also had somewhere 8086
04:48 PM polymorph: i am not sure it is worth the time trying to fix it, i have not checked the capacitors
04:50 PM nuxil: hetii, http://bitsavers.org/components/intel/80286/210498-005_80286_and_80287_Programmers_Reference_Manual_1987.pdf
04:52 PM nuxil: http://datasheets.chipdb.org/Intel/x86/286/datashts/intel-80286.pdf
04:53 PM nuxil: there you go :p
04:54 PM hetii: nuxil, thx for ebook :)
04:54 PM nuxil: :) np
04:55 PM hetii: probably will try to run some linux kernel 1.0 or similar on it and maybe port some networking stack :) but first will need figure out hardware things
04:56 PM nuxil: 2nd link got the pinouts.
04:56 PM hetii: yep
04:57 PM nuxil: now you need to get some old simm for it aswell :p
04:58 PM hetii: I have 48 units of M5M4256P and 35 of M41256A-12
05:00 PM nuxil: well atleast they are dip. so it gets a retro feeling along the old cpu :)
05:01 PM hetii: the things that I don`t have it yet is a graphic card
05:02 PM nuxil: you mean a vga driver :p i wouldnt call the stuff on a 286 graphics :p
05:02 PM hetii: hehe, yep :)
05:05 PM polymorph: hetii: add usb, sata too
05:07 PM polymorph: atmega is more powerful btw
05:07 PM nuxil: no.
05:08 PM nuxil: define more pwerfull
05:09 PM nuxil: atmega is a mcu. 286 is much more.
05:11 PM nuxil: polymorph, you can run linux on a atmega. but it takes about 2hours to get to the console. i doubt it take that long in a 286 :p
05:11 PM polymorph: has more competing power
05:12 PM polymorph: obviously it is way more energy efficient
05:12 PM nuxil: yes. leaving a 286 on 24/7 will surly notice on your bill vs a atmega.
05:12 PM hetii: https://www.youtube.com/watch?v=S_ZEWvokp3o
05:13 PM polymorph: nuxil: i doubt you knaw what you are talking about
05:13 PM polymorph: i have used a 80386...
05:14 PM nuxil: then define more powerfull? you mean. less watt usage per cycle and more instructions per cycle ? due to risc arc ?
05:15 PM polymorph: https://en.wikipedia.org/wiki/Intel_80286
05:15 PM polymorph: if you are interested
05:15 PM polymorph: an atmega can do 20 MPIS @ 20 MHz
05:15 PM polymorph: MIPS
05:16 PM polymorph: On average, the 80286 was reportedly measured to have a speed of about 0.21 instructions per clock on "typical" programs,[5] although it could be significantly faster on optimized code and in tight loops, as many instructions could execute in 2 clock cycles each. The 6 MHz, 10 MHz and 12 MHz models were reportedly measured to operate at 0.9 MIPS, 1.5 MIPS and 2.66 MIPS respectively.
05:16 PM nuxil: at best doing nop's or 1 cycle inst all the time. but you code will surlyy have stuff that requires 2 and 3 cycles :p
05:16 PM polymorph: this is less powerful
05:17 PM polymorph: the difference is atmega does not really sepport external memory like a cpu
05:17 PM polymorph: so quake will be slower lol
05:18 PM nuxil: yea it uses harvard arch.
05:19 PM nuxil: anywho. to much 80's and 286 :p i get distracted
05:19 PM nuxil: i have to many hours in quake
05:19 PM polymorph: will this do? https://www.xilinx.com/products/design-tools/microblaze.html
05:20 PM polymorph: you could make your own cpu
05:20 PM polymorph: reconfigure it if you want
05:21 PM nuxil: hmm
05:24 PM polymorph: https://lighttomorrow.wordpress.com/2011/09/11/what-you-need-to-run-linux-on-xilinx-fpga/
05:26 PM hetii: I had also this board but had no time to even check if it works: https://snag.gy/g9tAic.jpg
05:26 PM hetii: * I (still) have
05:30 PM polymorph: that is a cool stuff
05:31 PM polymorph: you need a core for it and upload it
05:32 PM hetii: My life is to short to try everything that I want: )
05:33 PM Thrashbarg: hetii: if I had infinite time and resources to do the stuff I want to do I'd be happy :P
05:34 PM polprog: its a shame a day is only 24 hours long :(
05:35 PM LeoNerd: Hellyeah
05:35 PM LeoNerd: About 36 would be lovely
05:35 PM Thrashbarg: heh
05:35 PM LeoNerd: actually, at university I did two weeks of having 6, 28hour days. Numerically it fits into a week
05:35 PM polprog: being able to fork and work in paralell
05:35 PM polymorph: 168 + 12 sleep
05:35 PM LeoNerd: It basically gives me 4 hours extra awake per period of awakeness. The only trouble is naming the days - you only have 6 of them
05:36 PM polprog: that cant be healthy in the long run
05:36 PM polprog: anyway, goodnight
05:36 PM hetii: goodnight polprog
05:37 PM hetii: I also will end for today, see you next time.
05:43 PM Jartza: http://i.imgur.com/ss3PLuE.png
05:43 PM Jartza: hmm
05:43 PM Jartza: I think I like that one now
05:43 PM Jartza: been fiddling with that for ages
05:54 PM eszett: Jartza what font is that?
05:57 PM Jartza: taurus mono stencil
05:58 PM kvik_ is now known as kvik
07:24 PM nuxil: hmm. i didnt know that gcc could ranges in switches.
07:24 PM nuxil: switch(foo) {case 10:{bar()}break; case 20 ... 100: {moo()} break;}
07:24 PM nuxil: ;D
07:35 PM JoeLlama: moo nuxil
07:39 PM nuxil: moo(2u2)
07:48 PM nuxil: JoeLlama, https://www.youtube.com/watch?v=Hp5BXRlAs4A&list=RDHp5BXRlAs4A&ytbChannel=null :p
07:59 PM Jartza: http://i.imgur.com/kAJMO60.png
08:00 PM Jartza: maybe I select those letters to word clock
08:01 PM nuxil: you must be good at scrable
08:01 PM nuxil: :p
08:03 PM Jartza: heh
08:06 PM Jartza: I still need to see tomorrow if some shuffling is needed
08:13 PM rue_: nuxil,
08:13 PM JoeLlama: moo
08:13 PM nuxil: rue_,
08:13 PM rue_: switch(foo) { case 3: case 5: case 7: case 11: prime(); break; }
08:14 PM rue_: er, forgot braces, sorry
08:14 PM * rue_ is ill
10:02 PM _ami_: Added usb to serial support into my avr programmer: :) https://github.com/amitesh-singh/FASTUSBasp#serial-connections
10:47 PM nuxil: can anyone reccoment a ok multimeter for around 300dollars max,
11:04 PM Tom_L: just about any FLUKE
11:04 PM Tom_L: within that price range
11:46 PM nuxil: how about BM829 ?
11:46 PM nuxil: Brymen
11:47 PM _ami_: wow, 300$ for multimeter :)
11:47 PM _ami_: nuxil is a rich guy! ;)
11:48 PM nuxil: no im not. but i want equipment that will last years to come
11:49 PM nuxil: i have 1 cheap 20dollar multimeter that is useless. and one fluke thats getting old.
11:50 PM nuxil: fluke been with me for years.
11:50 PM rue_: oo old, better get rid of that one
11:50 PM rue_: change meters every 6 months, and ALWAYS buy the most expensive ones you can
11:50 PM rue_: thats the american way
11:50 PM nuxil: lol
11:50 PM rue_: you do it with computers, why not your multimeter?
11:51 PM nuxil: i do not do that with computers.
11:51 PM rue_: imagine the comments someone gets if their video card were a YeAr old!!!!
11:51 PM nuxil: its been like 6years or so since i bought this pc :p
11:53 PM rue_: totally out of fassion
11:54 PM nuxil: i am too so.. dosent matter :p
11:54 PM nuxil: i want a flue 287 :D
11:54 PM rue_: your a BAD consumer
11:54 PM nuxil: *fluke
11:55 PM rue_: arg, I still have a throbing headache
11:55 PM nuxil: well i dont game. so i have no need to upgrade my pc each time there is a new game on the market :p
11:57 PM rue_: you dont game!!!! oh my how are the gaming corperations going to make their money from you!!! you could even end up doing something usefull, I think you should be labeled as dangerous
11:57 PM rue_: you should spend all your time gaming
11:57 PM rue_: its a mind exanding social activity
11:58 PM Tom_L: what do you play, Pong?
11:58 PM nuxil: EA hates me :p
11:58 PM rue_: dont eat, dont sleep, dont work, just game
11:58 PM nuxil: steam too :p
11:58 PM Tom_L: or thermonuclearwar?
11:58 PM rue_: its important because it prevents you from being productive
11:58 PM Tom_L: would you like to play a game?
11:59 PM rue_: we cant go having 4 billion people in the world all ebing productive, it might cause something to happen
11:59 PM Tom_L: nuxil that fluke is above your budget
11:59 PM nuxil: Tom_L, no shit :p
11:59 PM rue_: https://www.aliexpress.com/item/FLUKE-17B-Digital-multimeter-Tester-DMM-with-TL75-test-leads-Soft-case-kch17/32309904281.html
11:59 PM rue_: what about that fluke?