#avr Logs

Dec 29 2017

#avr Calendar

03:21 AM dev1990: nuxil: I get basic grip on terminology and idea behind analog pot and dac :) so I can understand what you accualy doing
03:50 AM [1]MrMobius is now known as MrMobius
04:34 AM u_ri_ is now known as u_ri
05:40 AM ike: hi guys
05:41 AM ike: is there any cheap usb debuger for avr atmega328p
05:53 AM nohit_: no
05:54 AM [1]MrMobius is now known as MrMobius
05:56 AM polprog: leds are cheap
05:56 AM polprog: that's an easy way to debug stuff
06:02 AM Snert: mebbe I'm too easily entertained but LEDs are my usual way of debugging.
06:13 AM * Tom_L releases a few butterflies around Snert's head
06:33 AM polprog: i'm trying to find an inexpensive way to see if a number is divisible by 16
06:33 AM polprog: i tried if((i & 0b00001111) == 0x00001000)
06:33 AM polprog: but i'm missing something since this doesnt seem to work
06:34 AM polprog: oops
06:34 AM polprog: that should be b not x
06:34 AM antto: this looks wrong
06:35 AM antto: just take the remainder, it should be zero, and besides that, there should be some other bits present (otherwise your number is actual zero)
06:38 AM polprog: im masking the bits, so 0b11101000 and 0b00001000 have the 4 lsb the same
06:38 AM polprog: i dont even know myself
06:38 AM antto: dividing by 16 is like bitshifting
06:38 AM antto: a bunch of times
06:39 AM antto: so, if there's a remainder - meh
06:40 AM polprog: maybe i should just check if 4 lsb are 0
06:42 AM polprog: that seems to work
06:42 AM antto: check if ((x & 0x0F) == 0) and that x != 0
06:44 AM antto: 0xF0 should be divisable by 16, and should turn into 0x0F after division, if my brain isn't lying to me
06:45 AM polprog: if((i & 0b00000111) == 0)
06:45 AM polprog: this works for 8
06:45 AM polprog: and for what i need ;_
06:45 AM polprog: ;)
06:48 AM polprog: now lets see if ansi colors work in putty
06:48 AM polprog: yess
07:04 AM polprog: odd
07:05 AM polprog: i have uint8_t data = {0x55, 0x50}
07:05 AM antto: dafuq
07:06 AM antto: does that even compile?
07:06 AM polprog: yet my printf("%d", data[0]) prints garbage
07:06 AM polprog: sorry, uint8_t data[]
07:08 AM antto: how about printf("%d", (int)(data[0])); ?
07:09 AM antto: or even better, printf("%02X", data[0]);
07:09 AM polprog: oh fuck
07:09 AM polprog: sorry
07:09 AM polprog: i need to take a break
07:10 AM polprog: it was printing 85. which is 0x55 in hex
07:10 AM polprog: sorry lol
07:11 AM polprog: damn
07:56 AM [1]MrMobius is now known as MrMobius
08:40 AM polprog: this is voodo!
08:40 AM polprog: the error disappeared :o
08:40 AM antto: what error? i ain't seen no error
08:41 AM polprog: no i had some problems with spi ram
08:41 AM * antto hides the voodoo under the rug
08:41 AM polprog: but my gexfump command now prints beautiful colored hexdump
08:42 AM polprog: rn it's green when nonzero
08:42 AM polprog: i need ideas for new colors
08:42 AM antto: no idea what you're doing
08:42 AM polprog: a hexdump procedure
08:43 AM polprog: hmm, reverse video for printable range and red for 0xFF
08:44 AM antto: you're dumping the firmware hex?
08:45 AM polprog: no. i have a spi ram chip and i have this serial interface for the mcu
08:45 AM polprog: im writing a procedure that dumps a part of it for debugging
08:45 AM polprog: and i need to add some basic colors so it doesnt blend
10:24 AM ike: I was asking about debugging avr
10:24 AM ike: because I saw on ebay AVR USB Emulator debugger programmer JTAG ICE for Atmel for $8
10:24 AM ike: and I was wondering is it real
10:26 AM ike: can I put breakpoint and change register and memory with that
12:12 PM [1]MrMobius is now known as MrMobius
12:13 PM polprog: ike: ICE is real, i dont think clones will cause problems, although i use a dragon i have
12:13 PM polprog: avarice works with ddd very well, and other gdb frontends will probably too
12:24 PM Tom_L: the cheap ones may not do all the protocols
12:32 PM nabil_: hi
12:33 PM nabil_: how do you add wifi to your avr32 project (when working on a professional project)
12:33 PM ike: so this cheap clone will work https://www.ebay.com/itm/1PCS-AVR-USB-Emulator-debugger-programmer-JTAG-ICE-for-Atmel/401290499778?hash=item5d6ec716c2:g:Yq8AAOSwhQhYxhn6
12:33 PM nabil_: just to get ideas
12:33 PM ike: as debuger
12:33 PM ike: to set register values
12:33 PM ike: on the chip
12:45 PM nuxil: polprog, how much did you pay for the dragon ?
12:46 PM nuxil: ike. get a raspberry Pi and build your own :p
12:47 PM ike: so this $8 is only isp and not a debugger?
12:49 PM nuxil: idk. no idea about jtag debugging stuff
12:54 PM polprog: nuxil: about 300pln which is 70 euros
12:54 PM nuxil: o.O
12:55 PM nuxil: im happy with my diy/hacked up programmer :p
12:55 PM nuxil: looks like shit tho.
12:55 PM nuxil: but works
12:56 PM nuxil: https://gyazo.com/686c3ed92c3ee3d58ac77db2708c6514 :p does both atmega324 and atinys
12:57 PM polprog: https://puu.sh/yLdUy/4b6c972bed.jpg this was my first
12:57 PM polprog: hah nice
12:57 PM polprog: looks way better than my cable
12:58 PM nuxil: i drilled hole in the PI chassie and used a long header
12:58 PM polprog: i dont have any pi case
12:58 PM polprog: one that was meant to run permanently had a cease made out of legos
12:58 PM nuxil: hehe
12:59 PM polprog: notabene this pi ran my irc session before i got the vps
12:59 PM polprog: ran archlinux-arm
12:59 PM nuxil: this one is running osmc :p
01:00 PM nuxil: its a all in all box. pc. media center. programmer :p
01:00 PM polprog: holy cow i need to take a break and relax - ive been programming C and C# for the whole day since 10:00
01:00 PM polprog: a media center with avr programming capabilities lel
01:00 PM nuxil: :D
01:01 PM polprog: good that i nearly finished setting up this windows dev battlestation
01:01 PM polprog: theres arch installed alongside but i rarely use it
01:01 PM polprog: originally win was here for Steam games but i got to write a c# app... and so it went
01:02 PM nuxil: C# aww
01:03 PM polprog: but the real programming/it work is done via ssh obviously :P
01:04 PM polprog: im compiling some tensorflow stuff and examples
01:08 PM nuxil: i done minimal C#, done some in unity a some time ago.
01:08 PM nuxil: correctio would be "mono" and not C#
01:09 PM nuxil: in my case
01:13 PM polprog: im doing WFM and i never did c flat before
01:32 PM Emil: polprog: https://pjreddie.com/darknet/ you might be interested in this
01:32 PM polprog: is this what im thinking about?
01:33 PM polprog: not exactly
01:33 PM polprog: but still nice
01:33 PM polprog: great project name hah
01:33 PM Jartza: I see
01:33 PM Jartza: attiny85 doesn't exist anymore in microchip pages
01:34 PM Emil: Jartza: eh?
01:34 PM Emil: polprog: whatcha mean with wfm
01:35 PM polprog: wfm?
01:35 PM Emil: 2017-12-29 21:13:06 +0200 < polprog> im doing WFM and i never did c flat before
01:35 PM Emil: also c flat?
01:35 PM Emil: you mean c sharp?
01:36 PM polprog: i meant windows forms and i meant c sharp by c flat ;)
01:36 PM Emil: ah
01:36 PM polprog: c flat is a j o k e
01:36 PM polprog: ;)
01:36 PM Emil: polprog: do you have an end goal with tensorflow?
01:36 PM Emil: like are you just messing around or do you have an objective also?
01:36 PM polprog: Emil: not really. m messing around
01:37 PM Emil: Jartza: whatcha mean with doesn't exist? :D
01:37 PM polprog: right now im trying to retrain it with my set of images, maybe later mate it with a webcam and make a script that tells me what im holding in my hand
01:37 PM polprog: or a LEGO sorter
01:38 PM Jartza: 8-bit microcontrollers -> 8-bit AVR -> there is no attiny85
01:38 PM polprog: Emil: you know how it is with projects. My physics simulator branched out and became a Lissajous plotter
01:38 PM polprog: :P
01:38 PM Emil: Jartza: https://www.microchip.com/wwwproducts/en/ATtiny85
01:38 PM Jartza: Emil: yes, but that's under documentation only
01:39 PM Jartza: you can't buy them anymore it seems
01:39 PM Jartza: oh well. now the buy now link works again.
01:39 PM Jartza: wtf
01:39 PM Jartza: maybe they're readying to obsolete that :)
01:40 PM Emil: Intereting
01:40 PM Emil: is the 84 btw the same thing but with more pins?
01:40 PM Jartza: it's almost the same
01:40 PM Jartza: but not really
01:40 PM Jartza: different timers and such
01:40 PM Jartza: also there's attiny88
01:40 PM Jartza: less eeprom, but 32 pins & spi
01:42 PM polprog: Emil: this came to my mind when i looked at the link you sent me: https://i.redd.it/60eobacxs87y.jpg
01:42 PM polprog: Emil: ill take a look into that project
01:43 PM Emil: https://github.com/codeplea/genann
01:43 PM Emil: also this
01:44 PM Emil: polprog: :D
01:44 PM polprog: Genann: Contained in a single source code and header file.
01:44 PM polprog: oh boy
01:44 PM polprog: only 10 kb, nice
01:45 PM polprog: hey this is awesome
01:46 PM polprog: ok, this really will compile faster than TF. and looks very hackable
01:46 PM polprog: thanks very much
01:46 PM polprog: !
01:49 PM Emil: np
02:17 PM [1]MrMobius is now known as MrMobius
04:11 PM polprog: night
04:22 PM nabil: polprog> oh boy
04:22 PM nabil: <polprog> only 10 kb, nice
04:22 PM nabil: <polprog> hey this is awesome
04:22 PM nabil: <polprog> ok, this really will compile faster than TF. and looks very hackable
04:22 PM nabil: <polprog> thanks very much
04:22 PM nabil: <polprog> !
04:22 PM nabil: prolpog mind sharing what it was ?
04:22 PM nabil: thanks
04:33 PM nohit_: https://github.com/codeplea/genann
05:32 PM Emil: nabil: you can read the context, too ;)
11:52 PM day__ is now known as day