#avr Logs

Dec 31 2017

#avr Calendar

12:58 AM anonnumberanon: hi what's the port manipulation again that lets you turn some pins on faster than with (PORT |= (1<<BIT)) ?
01:01 AM anonnumberanon: was it something like PINB = 3; for instance if you want to turn on the first 2 pins of the port?
01:01 AM Casper: PINx = y.... change the state of the pin
01:01 AM Casper: it do not turn on, it change state
01:01 AM rue_mohr: what?
01:02 AM rue_mohr: oh, nevermins
01:02 AM Casper: rue_mohr: go to bed now!
01:02 AM rue_mohr: anonnumberanon, PIN is the READ state
01:02 AM rue_mohr: PORT is the write state
01:02 AM rue_mohr: and DDR is the direction state
01:02 AM anonnumberanon: Casper, yeah i think that's it
01:02 AM rue_mohr: if you write to the PIN, it'll toggle the output
01:03 AM anonnumberanon: now to make sure I don't toggle an already 1
01:04 AM anonnumberanon: damn i wrote some code with this where is it
01:04 AM anonnumberanon: and why was i wanting to do it this way?
01:35 AM anonnumberanon: I've come to the conclusion it is impossible to toggle on a pin on a port and toggle a pin on another port exactly at the same time. Does this sound reasonable?
01:48 AM Casper: anonnumberanon: impossible
01:48 AM Casper: each ports are adressed individually
01:49 AM Casper: you can however do it within 1/F_CPU of a second (aka 1 cycle time)
01:49 AM Casper: might require ASM...
01:55 AM anonnumberanon: yes
01:55 AM anonnumberanon: thanks for making sure
03:12 AM Jartza: morning
07:03 AM LOVV is now known as lemmings
07:55 AM Emil: ....
07:55 AM Tom_L: ...
07:55 AM nuxil: ..
07:55 AM Emil: .
07:56 AM Emil: anonnumberanon: PORTx|=constant is single cycle anyways
07:57 AM nuxil: man i wish i had a cnc, makeing holes in my box useing a dremmel sucks :p
07:57 AM Emil: you were pronably thinking about ^=
07:57 AM Emil: Dont we all
07:57 AM nuxil: heh yea.
09:02 AM nuxil: finally done with the hard holes. (display & keypad)
09:06 AM nuxil: i found a old remotecontrol in my junk bin that had a nice membrane suted for my project :)
09:07 AM nuxil: im a cheap bastard and dont want to buy one keypad. :p
09:09 AM nuxil: cuting out membrane and finding position for the buttons, https://gyazo.com/98238cf09f09cef2f82e6f1b1c65ab10 , https://gyazo.com/00bf69b46c74e66856e930c8606fe1e5
09:09 AM nuxil: my box with so far , https://gyazo.com/ef60f8d6147d61f47ac4560d2d68b70c
09:09 AM nuxil: still needs to make holes for the bnz connectors on the front ;)
10:03 AM Tom_itx is now known as Tom_L
12:57 PM Thedarkb1: Just wondering, can an AVR execute code in it's own RAM?
01:01 PM antto: i think no..
01:08 PM Thedarkb1: Eh, worth a shot.
01:08 PM Thedarkb1: I'll use a Quark.
01:13 PM s8548a_: Wish you all a very Happy New Year.
01:39 PM nuxil: Thedarkb1, execute code in ram?
01:39 PM Thedarkb1: nuxil, Yeah.
01:40 PM nuxil: what do you mean by that?
01:41 PM Thedarkb1: I mean can you load code into RAM and jump to it?
01:41 PM nuxil: a memory that can do arithmetic operations ? i
01:41 PM Thedarkb1: What?
01:41 PM HighInBC: avrs use harvard architecture
01:42 PM HighInBC: entirely separate buses and memories for program and data memory.
01:42 PM learath: I was wondering
01:42 PM Thedarkb1: Thanks, that's the answer I was looking for.
01:42 PM HighInBC: for security it is actually pretty handy, no arbitrary code injection, just arbitrary data injection at worst
01:43 PM Thedarkb1: Yeah it makes sense.
01:47 PM antto: pls no trojans in my avr, thanks
01:56 PM pebble`_ is now known as pebble`
02:07 PM MrFahrenheit: I ate too much, help
02:11 PM * antto rushes in like a doctor.. punches MrFahrenheit in the stomach *gently*
02:13 PM MrFahrenheit: gees, I wasn't expecting such... wonderful treatment
02:28 PM Emil: Thedarkb1: not directly
02:58 PM polprog: cryptolocker for avrs ;P
02:58 PM polprog: happy new year everyone!
03:01 PM MrFahrenheit: thanks, you too
03:55 PM Aslak3_ is now known as Aslak3
04:09 PM nabil: .
04:31 PM gnom: i wish all a Happy New Year
04:58 PM xMopxShell is now known as xMopx
05:21 PM nuxil: happy new year to you all.
05:21 PM Emil: Happy new year :)
05:28 PM polprog: happy new year!
05:28 PM polprog: our champagne froze cos we put it into the freezer to cool it down
05:28 PM polprog: haha
05:29 PM antto: i know!
05:29 PM antto: p.. p.. PUT IT IN TEH OVEN! \o/
05:29 PM polprog: no, we drank it anyway :P
05:30 PM antto: you mean you ate it ;P~
05:30 PM antto: or licked it
05:30 PM polprog: water freezez, but alcohol does not
05:30 PM polprog: so, i guess this was the strongest chamagne i ever drank lol
05:30 PM * antto sets polprog's freezer to -245°C
05:32 PM polprog: dont go lower, i want the light to work
05:33 PM nuxil: :)
05:33 PM * polprog puts his computer in the freezer to do the superconductor dabce
05:33 PM polprog: dance*
05:33 PM nuxil: superconducters
05:33 PM nuxil: its impossible
05:35 PM nuxil: i mean. R=0 is impossible. you would be able to put the energy of entire universe if R=0 though a 1mm wire :p
05:36 PM * nuxil hides
05:36 PM polprog: resistance is futile. you will be conducted
05:36 PM nuxil: problem with resistace the same as with temperature. you can never get absolute zero
05:36 PM nuxil: *is the
05:39 PM Emil: polprog: alcohol also freezes ;)
05:40 PM polprog: Emil: but not in our freezer i think
05:41 PM antto: i fixed your freezer >:)
05:42 PM antto: R=0 -> division by zero
05:42 PM antto: infinite current /o\
05:42 PM polprog: i wish i had a freezer that could go to -114C :P it's only -18
05:42 PM polprog: antto: free energy11!!oneone
05:42 PM antto: hm
05:43 PM antto: what happens if you make a voltage divider with TWO resistors of 0 ohms? >:)
05:43 PM polprog: moar energy
05:43 PM antto: do you even need to supply voltage to that?
05:48 PM polprog: so im using urxvt in place of xfce4-terminal.
05:48 PM polprog: it's nice
05:49 PM polprog: night!
06:01 PM polprog: or not... i was looking at my stash of parts
06:01 PM polprog: chekinng if i have a spare m8 in tqfp
06:02 PM polprog: to my surprise when i opened the drawer i found a tqfp chip, but not m8. at89s52! they mustve made a mistake when packing it...
06:03 PM polprog: now i can learn 8051 !
06:16 PM nuxil: ?
06:17 PM polprog: this year brought me a surprise 8051 clone
06:18 PM nuxil: what you gonna do with it ?
06:21 PM nuxil: im just sitting here thinking what i should have in my menu for my project.
06:25 PM Aslak3: I vote for the AT8515. My favourite AVR. AFAIK the only one available in PLCC44. Lots of IO but not a massive DIP, nor tricky (for me) SMT
06:25 PM nuxil: Atiny85 is best AVR
06:25 PM Aslak3: EOL now I think.
06:25 PM nuxil: ever:p
06:26 PM Aslak3: The tinys are cool, indeed
06:26 PM Aslak3: Just don't mention Arduino, right?
06:26 PM nuxil: but saying one is better than the other is kind of wrong.
06:27 PM nuxil: you pick the mcu you need for the job you want to be done,
06:27 PM polprog: sweet. ponyprog supports it and the hw iface is as simple as 123
06:27 PM nuxil: Aslak3, i dont use one. dont have one and dont want one
06:28 PM Aslak3: Sure. As long as it's an AVR ;) My main reason for using em is the GCC toolchain and not having to worry about a load of variants.
06:28 PM nuxil: polprog, did you see my wip of my Box ?
06:28 PM Aslak3: nuxii: Same here!
06:28 PM polprog: nuxil: who knows what? ill probably make myself a dev board to learn as i made with t4313 while learning avr asm!
06:28 PM polprog: nuxil: no, im curious
06:28 PM Aslak3: My first AVR was a 28pin DIP Mega rammed into a breadboard, with a bodged up programmer. That should be fine for everyone.
06:29 PM nuxil: polprog, https://gyazo.com/ef60f8d6147d61f47ac4560d2d68b70c
06:29 PM nuxil: dirlled hole for display and made keypad :p
06:29 PM nuxil: dirlled holed for keypad aswell. was a pain in the ass
06:29 PM nuxil: Aslak3, my 1st avr was atiny85 :)
06:30 PM nuxil: and now my 2nd avr is a atmega 324p-20pu
06:30 PM polprog: Aslak3: we all started like this. my first was atmega16
06:30 PM Aslak3: My best project (to date) is a paper laminator controller that I use for PCB making: 4 7segment LEDs, SPI temp IC with a thermocouple, some buttons for setting the target temp, and a relay to turn the mains on and off. It's super. :)
06:31 PM Aslak3: That's with a Mega128 I think
06:32 PM Aslak3: My first project was a parallel eeporm programmer (AT28C256), with the address bus formed from a 16bit counter pulsed and reset from the AVR. That was a whole load of fun
06:32 PM polprog: nice
06:32 PM polprog: haha
06:32 PM polprog: awesome hackery!
06:32 PM Aslak3: Thanks. :)
06:33 PM nuxil: nice
06:33 PM polprog: maybe it will become a cloxk
06:33 PM polprog: clock*
06:33 PM polprog: ill have to go and buy more of those.
06:34 PM nuxil: hows that project going btw ?
06:34 PM nuxil: your deskclock
06:34 PM Aslak3: It's mostly in aid of my retro computing projects. I'm currently working on using one in my 8 bit micro. The AVR is the keryboard controller, but not PS2 or anything modern cos that is dull. It's attached to an Amiga 600 matrix (16 cols by 5 rows or so). It's fun writing a fairly complete keyboard controller from scratch
06:34 PM polprog: and i have to resurrect the pentium box from being an ex sql server to a proper workshop programming pc
06:34 PM polprog: nuxil: fatal :( i messed up the footprints!
06:34 PM polprog: i have to redo the pcb
06:34 PM nuxil: lolz
06:35 PM polprog: but work project came up and i was doing that instead
06:35 PM Aslak3: I've been meaning to make a decent clock
06:35 PM nuxil: polprog, what was wrong with your footprint ?
06:35 PM polprog: Aslak3: i can give you some code/schem for the base, using 32k osc with a tcnt
06:36 PM Aslak3: polprog: ermm tcnt?
06:36 PM polprog: nuxil: i mirrored it. basically the physical fron of the clock was back on my project (most components are on the physical back) and i forgot about that when designing the custom display footprint
06:36 PM nuxil: just paste the link and he get it :p
06:37 PM nuxil: your 1sec timer :p
06:37 PM nuxil: ouch
06:37 PM polprog: Aslak3: timer/counter
06:37 PM Aslak3: I asssumed for a clock you'd use a RTC and poll that?
06:37 PM Aslak3: Then you have the 32.768khz crystal etc
06:37 PM nuxil: polprog, you had a tut shoing 1sec isr thingy
06:37 PM nuxil: *showing
06:37 PM polprog: nuxil: its 2:00 here, i should be sleeping,:p
06:38 PM polprog: nuxil: good idea. ill make a writeup or video on that
06:38 PM polprog: !
06:38 PM Aslak3: Can you get that accurate enough? what's the drift?
06:39 PM polprog: typical 32khz crystal is pretty accurate
06:39 PM Aslak3: I mean with a software 1sec isr?
06:39 PM polprog: no drift.
06:39 PM Aslak3: interesting.... So you clock he AVR at, what frequency?
06:40 PM polprog: the crystal is driving a timer. im interrupting on the timer overflow. the crystal is clocking only the timer. rest of the cpu runs on default 1mhz internal cloxm
06:40 PM polprog: clock*
06:41 PM Aslak3: ahh, you have an additional crystal. I got ya.
06:41 PM polprog: the 1mhz crystal is built in the avr
06:41 PM polprog: https://youtu.be/RSmckqwoPc4 you can see all the code here
06:41 PM nuxil: the internal rc sucks
06:41 PM nuxil: :p
06:41 PM Aslak3: Can you get 32.768khz crystal in a can oscilator or have you got some fruity gates to turn the crystal into a square wave?
06:41 PM nuxil: it can be upto 2+% off
06:42 PM nuxil: *20%
06:42 PM polprog: nuxil: its good for program but not for time keeping... hence the ISRa
06:42 PM polprog: ISRs*
06:42 PM nuxil: yea
06:42 PM Aslak3: slaps of glorious breadboard
06:43 PM Aslak3: And a scope. I really need one :(
06:43 PM nuxil: you dont have a scope ?
06:43 PM polprog: i could use an external rtc but i wanted to keep that PCB as small as possible. so it fits behind the display. which didnt work out and i had to make a small tab which made the pcb, erm, "look phallic"
06:43 PM polprog: Aslak3: the rigol 1054z is pretty good for its price
06:44 PM nuxil: how much for it ?
06:44 PM Aslak3: No scope. I have a saleae (however you spell it) analyser. Genuine one, not a knockoff. But I've managed to get by without a scope so far
06:44 PM polprog: hmm.. i got mine cheaper, 250 eur
06:45 PM nuxil: i got a 5buch "saleae" clone that works just fine :p
06:45 PM nuxil: *buck
06:45 PM polprog: i have a knockoff saelae. very good analyzer. sigrok/pulseview is nice free tool
06:45 PM polprog: thanks for reminding me to pack my analyzer for work tomorrow lol!
06:45 PM nuxil: Aslak3, you should really get a scope. even a old analouge one
06:46 PM Aslak3: nuxil: I know :( I will soon
06:47 PM nuxil: polprog, https://www.ebay.com/itm/Rigol-DS1054Z-Digital-Oscilloscopes-Bandwidth-50-Mhz-Channels-4/331941742120?epid=2254681137&hash=item4d49450628:g:EHYAAOSwUoNaA4By
06:47 PM polprog: my analogue soviet one is in the wardrobe since it was acting up and i had no space on the bench :(
06:47 PM nuxil: is that the one you got ?
06:47 PM polprog: yeah
06:47 PM nuxil: aww. its from murica.
06:47 PM nuxil: stuff takes like 4 months to get there
06:47 PM nuxil: *here
06:47 PM polprog: also there is a very easy way to upgrade it :^) shame the keygen doesnt play music though
06:48 PM Aslak3: I was looking at that same scope I think. There's a UK reseller (am in UK)
06:48 PM polprog: i got mine from poland based seller
06:48 PM Aslak3: https://www.rigol-uk.co.uk/Rigol-DS1054Z-Digital-Oscilloscope-p/ds1054z.htm
06:48 PM polprog: Aslak3: check if farnell has a sane price
06:48 PM Aslak3: polprog: It's unlikely, but I'll look
06:48 PM nuxil: digi scopes on ebay are not cheap
06:49 PM nuxil: :(
06:49 PM Aslak3: Not AVR related, but the mad stuff I do: http://1.bp.blogspot.com/-UunAMT1vrEg/VXV5JtCiulI/AAAAAAAAA7c/0P9rXpd7c44/s1600/IMAG1359.jpg
06:49 PM polprog: altera fpga?
06:50 PM Acbn: nice. Aslak3
06:50 PM Acbn: If that's an FPGA, I love FPGA stuff, need to practice my Verilog though, lmao
06:50 PM polprog: i wanted to get into fpgas. just need to get the hardware. but i guess i will be doing that 8051 now
06:50 PM Aslak3: polprog: yeah. Flex10K, the biggest 5V, throughole (PLCC) FPGA I could find, after lots of digging
06:51 PM nuxil: mmm
06:51 PM Aslak3: I have 2 in my 6809 micro
06:51 PM Acbn: the stuff about primitive clocks and stuff gets me confused a bit
06:51 PM Aslak3: They were state of the art circa 1997 or so
06:52 PM Aslak3: I have implemented glue logic, and a few other bits. Next challenge will be an SPI controller
06:52 PM polprog: implement an avr core in it and run the x86 emulator which runs linux... we need to go deeper
06:52 PM Aslak3: I'm just learning it as I go. VHDL instead of verilog. So far everything Ive written is dreadful hackery, but it works
06:52 PM Aslak3: lol
06:53 PM Acbn: most I've done was a single core ARM proc with limited ALU controls
06:53 PM Aslak3: You only have about 5,000 flipflops/gates in that one :)
06:53 PM polprog: haha
06:53 PM polprog: so far i made an up down counter in verilog
06:53 PM Acbn: does it have built-in RAM modules, Aslak3 ?
06:53 PM Acbn: I know some newer ones do
06:54 PM Acbn: if you write something that behaves as a memory cell it will synthesize it onto the on-board RAM
06:54 PM nuxil: arm.. i bought a nucleo. i felt like a aurdiono user after i did that :p its still in my package :p
06:54 PM Acbn: idk if older ones have that
06:54 PM Aslak3: Acbn: that one does yes. 3 lots of 256 bytes. I crammed a boot loader into one 256 byte page
06:54 PM Acbn: pretty nice fam
06:54 PM polprog: nuxil: you can always learn assembly >:)
06:54 PM Aslak3: nuxil: "felt like an arduinto user". I shouldn't laugh, but ... hell YEAH
06:54 PM polprog: become the chip whishperer
06:55 PM Aslak3: Learning ARM is good for the old CV though. Have to do that someday.
06:55 PM Acbn: Aslak3, is it quadranted for clocks?
06:56 PM Acbn: or does it just have one global clock zone
06:56 PM Acbn: like, the routing
06:56 PM nuxil: i see your breadboard. and i want a new one. mine is so old and worn. some slots are real dicky
06:57 PM Acbn: good thin they're cheap, lol
06:57 PM Acbn: *thing
06:57 PM Aslak3: https://www.altera.com/literature/ds/dsf10k.pdf ermm. You have a look and tell me ;) My stuff is so slow (2MHz) I don't think it really matters in my design. I feed the system clock (E) into the main clock pin though...
06:57 PM polprog: nuxil: got it for bday from my grandparents in england
06:57 PM Acbn: ty
06:57 PM polprog: brb
06:57 PM Aslak3: acbn: don't go too cheap on the breadboard. some of the cheap ones are really shit
06:57 PM Acbn: lol
06:58 PM Acbn: i'm sitting right next to some of Shenzhen's finest
06:58 PM Acbn: :^)
06:58 PM nuxil: its true
06:58 PM Acbn: so Iktf
07:00 PM polprog: do you guys knoe that i melted my other breadboard a bit once?
07:01 PM polprog: in that vid you can see the lab psu. before i got it i was using the 5v one that sits next to it. it has a small pcb screwed on the terminals
07:01 PM polprog: its output is 4A at 5V...
07:01 PM Aslak3: Done that loads of times. It's fine. You can usually still use the board, just skip the melted corner :)
07:01 PM polprog: i shorted a micro.
07:01 PM Acbn: Aslak3, doesn't look like there are any clock regions, nice
07:01 PM nuxil: polprog, noob :p
07:01 PM polprog: i added that pcb afterwards... it has a 400mA polyfuse
07:02 PM Aslak3: Hey I need a PSU too. Using Apple wallwarts :)
07:02 PM polprog: nuxil: it was 2 yrs ago iirc
07:02 PM polprog: :P
07:03 PM polprog: also i got a set of jumper wires with that breadboard. they are so tidy and straight its a shame to use them :D
07:04 PM nuxil: man looking up breadboard on ebay only give me cheap crap.
07:05 PM Aslak3: All those banana plugs is luxury. There's perverse satisfaction in getting something working with just your wits, and maybe a DMM
07:05 PM polprog: haha
07:05 PM polprog: i dont have any banana-banana cables
07:05 PM nuxil: get some bannana man :p
07:05 PM polprog: im short on cables in general
07:06 PM polprog: i was looking for those stackable banana plugs for my dmm but noone in warsaw seems to stock them
07:06 PM Aslak3: One thing that is nice is those breadboard wires with the single core wire plug things. Dunno how I coped without those when I was a boy
07:07 PM Acbn: Any of you guys near Boston/Cambridge?
07:07 PM Aslak3: Stackable nananas.. I remember those from college
07:07 PM polprog: Aslak3: i find cat5 cable cheap and good for breadboard wires
07:08 PM Aslak3: polprog: Ive heard people say the same. I might have to give it a go!
07:08 PM polprog: ok, i packed the bus pirate. hope it will work as a LA nicely
07:11 PM polprog: i think i have a general idea of the workshop computer
07:12 PM polprog: slackware or debian running icewm - now i only need a free disk
07:14 PM Aslak3: Slackware isn't yet systemd. Choice made.
07:14 PM polprog: actually it is running debian AND has ivewm over rdp right now. just need to add a new disk - preferably sata - for a new home for the new user... and that is a pentium pc which uses old ide disks.
07:15 PM polprog: honestly i dont care if its systemd
07:15 PM polprog: its even comfortable since i bring up stuff the same way on my arch lappy and debian server
07:16 PM Aslak3: Me neither. I just like to poke systemd with a "grrrr" stick every now and then.
07:16 PM polprog: haha
07:16 PM Aslak3: I used to be a huge linux user, then I found OS X - which itself is getting steadly more crap. Linux still rules on servers.
07:16 PM polprog: i recently was messing around with kernel compilation and wrote my own init
07:17 PM Aslak3: Oddly enough I rebuiltl my fileserver today. Debian of course.
07:17 PM Aslak3: I used to build up my own kernel back in the 2.2 days :)
07:17 PM polprog: im a proud admin of a vm server where me and my dad are playing with neural networks in a debian vm. hypervisor is debian as well
07:18 PM Aslak3: Excellent! :) Xen, VirtualBox? KVM?
07:19 PM polprog: i find windows 7 not thay bad recently. i boot the second pc to windos and from there via putty and vnc i administrate the server
07:19 PM polprog: libvirt kvm
07:19 PM polprog: i also have solaris 11 in qemu on my laptop
07:19 PM Aslak3: KVM is prety decent. The python/gtk UI is a bit klunky but it's getting better.
07:19 PM polprog: i set it up for shits and giggles
07:20 PM polprog: i use virsh command line tool for that
07:20 PM Aslak3: Windows is disturbingly not quite as terrible as it used to be, for devs/nerds/hackers etc
07:20 PM Aslak3: I started learning that, then we switched to virtualbox :(
07:20 PM polprog: the hypervisor has no graphical stuff installed... except for mc
07:20 PM Aslak3: "we"=previous job
07:20 PM polprog: ah
07:21 PM polprog: i thought you are a student and the lab seitched
07:21 PM polprog: i know a guy who runs ~10 vms with virtualbox
07:21 PM Aslak3: too old. 42. hoping to go back to uni soon though!
07:21 PM polprog: he also uses win 7 as a thin client
07:22 PM polprog: it a very nice setup since sis can play games on the big PC
07:22 PM Aslak3: Win 7 is a good choice. Reliable. Still supported with updates I think.
07:22 PM polprog: (which ironically is more powerful that yhe server lololol)
07:22 PM polprog: i should go to sleep now
07:22 PM Aslak3: and me
07:23 PM Aslak3: night night all
07:23 PM polprog: or rather rjmp sleep since gotos are bad
07:23 PM polprog: night!
07:23 PM Aslak3: hahaha
07:23 PM Aslak3: night :)
07:23 PM polprog: ;)
07:47 PM mudkip908_ is now known as mudkip908
10:37 PM -!- #avr mode set to +o by ChanServ
10:37 PM rue_shop: ok, ready for the bot...
10:45 PM * Casper screws a few neodyum magnet on the floor
10:45 PM Casper: that could actually be a good way in case of robot invasion
10:45 PM Casper: ... as long as they don't use stainless...
11:51 PM day__ is now known as day