#avr Logs

Feb 24 2017

#avr Calendar

03:35 AM skz81: <Emil> but using const is quite easy >> If you say they should have put const things in flash, I disagree. PROGMEM is about laying out memory. const is NOT. Maybe there are smarter solution than PROGMEM, but tweaking const semantic is not one of them, IMHO
03:37 AM Haohmaru: i use const all the time to hint to the compiler when i don't intend to change the value of something
03:38 AM Haohmaru: and i don't expect that to cause such variables to be stuffed in the slow flash
03:39 AM skz81: <xentrac> Jartza: is simavr simulavr or is it an alternative? <xentrac> is it better? >> simavr : C, faster, more chips supported, more buggy features. simulavr : C++, slower, but works better for features I tested at least (I think of timers interrupts).
03:43 AM skz81: <xentrac> polprog: its README claims it can dump waveforms toview in gtkwave / <xentrac> simavr's >> BOTH DOES, actually. One of them can dump bits, the other is configure on a byte basis, but you can filter the display in GTKWave.
04:03 AM skz81: * LeoNerd idly wonders if Adafruit are anyhow related to the Ada language >> anyhow, I guess that : http://www.ada.fr/ IS NOT RELATED to Ada language
04:06 AM skz81: mWhahahaha "spark" language is an extention of "Ada"... Insta-thinked of "sparkfun" :p :p
04:07 AM dgriffi3 is now known as dgriffi2
04:08 AM specing: it is a subset of Ada
04:11 AM skz81: specing, OK... And sorry, I was just quoting (french) wikipedia ^^
04:12 AM skz81: Was searching for any relation between Ada (possibly Ada Lovelace) and fruits... But....
04:21 AM Haohmaru: Ada is adA spelled backwords
04:32 AM dgriffi2: An anagram for H.P. Lovecraft is P.V.C. Farthole.
04:35 AM specing: lol
04:49 AM tkoskine: It is somewhat sad that Adafruit doesn't use Ada for their avr boards.
04:49 AM tkoskine: It would nicely fit into their "Ada*" theme and AVR-Ada project is pretty usable.
04:58 AM dgriffi2: ada has always struck me as a stodgy and irritating language
05:18 AM specing: dgriffi2: that is because the compiler has a personal vendetta against you
05:18 AM specing: but don't write shitty code and it will stop having^
05:26 AM dgriffi2: how about COBOL for AVR?
05:32 AM Ad0: how do you program 1000 atmel chips with a calibrated OSCCAL?
05:32 AM Ad0: is there an automated process for this?
05:34 AM julius_: hi
05:36 AM julius_: i have these two 12v pc case fans, same product, different buy times. one wasnt start to turn when theres not at least 9 v as a power source....now after it did run for a few hours it also starts at 3v as the other one. could it be that trough years of lying around doing nothing it needed a push?
05:37 AM julius_: i mean, could it be that the motor inside it got stuck somehow?
05:37 AM daey___ is now known as daey
06:30 AM Lambda_Aurigae: yes
06:31 AM Lambda_Aurigae: Ad0, there is a way to calibrate the osccal...there is an appnote about it on the atmel website somewhere...they should come somewhat pre-calibrated though.
06:32 AM Lambda_Aurigae: if you erase the eeprom you lose that calibration though as I recall.
06:32 AM Lambda_Aurigae: julius_, yes, it possibly collected dust or the oil in it got gunky or something like that.
06:41 AM Ad0: Lambda_Aurigae: it's calibrated from the factory at a lower standard than what's required for serial communication
06:42 AM Ad0: using soft serial
06:42 AM Ad0: http://pastebin.com/qA24a0aa - I wonder if you could verify that I am thinking correctly here
06:42 AM Lambda_Aurigae: and depending on your serial comms speed, no matter how you calibrate it, the internal RC oscillator is not stable enough for async serial comms usually.
06:43 AM Ad0: ok
06:43 AM Lambda_Aurigae: the RC oscillator frequency will shift as the chip heats up.
06:44 AM Lambda_Aurigae: the times I've done usart comms with the internal RC oscillator I used a packet and autobaud system.
06:44 AM Ad0: ok
06:46 AM Lambda_Aurigae: if your speed is slow enough you might can get away with pre-calibration and no on the fly adjustments.
06:46 AM Ad0: it's not much data that is sent
06:46 AM Ad0: 27 chars every second
06:47 AM Lambda_Aurigae: you should be able to run down around 4800bps or even 1200bps and be ok with the internal oscillator.
06:47 AM Lambda_Aurigae: would have to test it under various conditions though.
06:47 AM Lambda_Aurigae: also note that the RC oscillator will run different speeds under different voltages.
06:48 AM Lambda_Aurigae: it is minimal but enough to screw with 9600bps comms shifting between 5V and 3.3V
06:49 AM Ad0: so I noted haha
06:49 AM Ad0: is 4800 bps a valid rate?
06:49 AM Lambda_Aurigae: yeah.
06:49 AM Lambda_Aurigae: I have a 4800 baud modem here somewhere.
06:49 AM Lambda_Aurigae: heck, 300bps is a valid rate.
06:50 AM Lambda_Aurigae: now, not all USARTs will support the slower speeds these days..
06:50 AM Lambda_Aurigae: but you said you were going software serial...dunno if that is for both ends or not.
06:50 AM kosc: Hello! How can I make sleep for 1 second with avr assembler (ATMega328P).
06:50 AM kosc: ?
06:50 AM Lambda_Aurigae: kosc, multiple ways...all depends on what you are doing.
06:51 AM Lambda_Aurigae: are you wanting sleep or just a pause?
06:51 AM Ad0: Lambda_Aurigae: it worked without calibration
06:51 AM Ad0: thanks :)
06:51 AM kosc: Lambda_Aurigae: pause.
06:51 AM Lambda_Aurigae: Ad0, awesome...now run it for a while and see what happens if it heats up.
06:51 AM kosc: Lambda_Aurigae: I want to blink LED.
06:51 AM kosc: 1 second on, 1 second off
06:52 AM Lambda_Aurigae: kosc, if you don't care about wasting time...just do a loop...or a couple of nested loops...with a few NOPs in the middle.
06:52 AM Ad0: Lambda_Aurigae: :)
06:52 AM kosc: Lambda_Aurigae: OK, but I don't think it's the correct way.
06:53 AM Lambda_Aurigae: kosc, you could do it with interrupts and timers
06:53 AM Lambda_Aurigae: but that's much more complex.
06:53 AM Lambda_Aurigae: http://stackoverflow.com/questions/24097526/how-to-make-a-delay-in-assembly-for-avr-microcontrollers
06:53 AM Lambda_Aurigae: if the chip is doing nothing else then just nested loops with a nop in the middle works well.
06:56 AM Lambda_Aurigae: kosc, the only correct way is however it works.
08:19 AM Ad0: I get 512 from pure ADC reads
08:20 AM Ad0: when it should be 0
08:20 AM Ad0: http://pastebin.com/qA24a0aa I thought this should be correct
09:34 AM rue_house: Ad0,
09:35 AM rue_house: http://paste.debian.net/916577/
09:36 AM rue_house: make sure volatile int AdcValues[8]; to not forget the volatile
09:37 AM specing: I prefer to declare them flammable
09:38 AM rue_house: :)
09:38 AM Emil: Lambda_Aurigae: wtf
09:38 AM Emil: Lambda_Aurigae: dont be silly and place a nop
09:39 AM Emil: Omit the nop
09:39 AM rue_house: dude
09:39 AM rue_house: your optimizing a delay loop
09:39 AM rue_house: THINK ABOUT THIS
09:42 AM polprog: nop? no operation?
09:43 AM Emil: rue_house: it's super silly to do nop, add/dec, cbr
09:43 AM xentrac: you get higher timer resolution without the nop, it's true
09:43 AM rue_house: ITS A DELAY LOOP
09:43 AM Emil: especially when waiting for an io event
09:43 AM rue_house: you defeat its purpose by optimizing it
09:44 AM Emil: rue_house: please stop
09:44 AM xentrac: also it consumes a tiny amount less program memory space
09:44 AM xentrac: I would tend to want to use interrupts though
09:44 AM rue_house: its a delay loop, you actaully defeat its purpose when you optimize it
09:45 AM xentrac: Lambda_Aurigae: I've used 110 bps modems in the past
09:45 AM Emil: rue_house: please go away
09:45 AM specing: < specing> its a downward spiral
09:46 AM Emil: xentrac: interrupts are better most of the time, yeah
09:47 AM xentrac: the Modern™ way to do serial commnication is with SPI though. then you don't have to worry about your clock speed, as long as you can afford the extra pin
09:47 AM xentrac: (in re Ad0's discussion)
09:49 AM xentrac: skz81: Adafruit is the company that Ada founded to sell her fruits, which are computing hardware
09:49 AM xentrac: skz81: Ladyada more specifically, the nick of Limor Fried
09:50 AM xentrac: skz81: she's named after the same person as the language
09:50 AM Emil: xentrac: eh
09:51 AM Emil: usart us really quite wonderful, though
09:51 AM xentrac: they are!
09:51 AM xentrac: but the clock crystal costs you two pins and another BOM iem
09:51 AM xentrac: so if that's all you need it for...
09:52 AM xentrac: and SPI is alsoquite a bit faster
09:53 AM xentrac: (sorry for my spacebar)
09:53 AM specing: xentrac: Ada Augusta Byron, countess of Lovelace
09:53 AM xentrac: specing: indeed!
09:53 AM Chillum: xentrac: you can borrow some of my spaces just copy and paste as needed
09:53 AM xentrac: she was lucky that she didn't have to deal with interrupts
09:54 AM xentrac: Chillum: ♡♥
09:54 AM specing: wow that unicode char
10:29 AM julius_: Lambda_Aurigae, ah thanks
10:29 AM polprog: that failed to sync error is some kind of a voodo shit... i checked everything with a meter, and a scope, and after some time it starts to see the chip. im doing avrs for 1 year now and i still cant fix that error right away
10:30 AM Casper: that sound like a connection issue
10:30 AM Casper: or an issue with the programmer
10:30 AM polprog: exactly, a connection issue
10:31 AM polprog: yet it still takes half an hour to fix...
10:31 AM polprog: i need to start programming via the bus pirate cos the dragin comes without any cable whatsoever
10:31 AM polprog: i had to make a cable for it
10:32 AM polprog: whick kinda sucks given that it's slightly less thatn $100
10:32 AM LeoNerd: AVR programming via BP?
10:32 AM polprog: avrdude supports it
10:32 AM LeoNerd: Beware it will be slooooow
10:32 AM polprog: yeah
10:33 AM polprog: fortunately it works now
10:35 AM xentrac: the first time I programmed an AVR, I soldered a DB-25 parallel port connector to the edge of the PCB and just plugged it into my parallel port
10:35 AM skz81: <LeoNerd> Beware it will be slooooow >> Hopefully that's only few kB
10:35 AM bss36504: Oh the dragon is the worst
10:35 AM xentrac: a minipov, maybe version 2
10:35 AM polprog: xentrac, that was my first programmer too :)
10:36 AM LeoNerd: skz81: Yes but don't forget the bytewise inflation slowdown that the BP has..
10:36 AM polprog: the parallell cable rocked
10:36 AM LeoNerd: A few KiB of target data requires quite a bit more UART data to the BP chip
10:36 AM LeoNerd: which goes over its internal UART bridge
10:36 AM Emil: xentrac: no is forcing you to turn on shitty 9600 or 115200 ;)
10:37 AM polprog: not very fast obviously
10:37 AM Emil: but sure, it's srill slower at 1Mbaud
10:37 AM polprog: bss36504, why is the dragon the worst?
10:40 AM bss36504: polprog: Because it's fragile. Because I need a different fucking jumper pattern for every goddamn micro/protocol
10:41 AM bss36504: I'd rather have no debug capability and buy a AVR ISP MkII for the same price (or less maybe) or have an Atmel ICE for $90 or whatever it is.
11:15 AM polprog: jumper patern? you mean using the ZIF area?
11:26 AM bss36504: Yes, and to configure it to different protocols.
11:28 AM polprog: i've never used it to anything other than ISP, what else can it do? dW and JTAG?
11:30 AM Emil: Hmm
11:30 AM Emil: I read that usart could be used for 1 wire
11:30 AM Emil: polprog: "jumper" configuration is just fucking stupid if you are aready controlling the device through usb
11:31 AM Emil: Would be trivial to just have the configuration data baked in
11:32 AM polprog: i see your point
11:35 AM polprog: now im not sure of my board is crap or is it the dragon
11:38 AM polprog: am i going crazy? for the past 30 mins i'm trying to make dragon talk with the avr
11:41 AM polprog: everyinh is fine, continuity shows no problem.
11:53 AM JanC is now known as Guest36981
11:53 AM JanC_ is now known as JanC
11:57 AM polprog: it works now
12:01 PM bss36504: why would you bother getting the dragon if you only use ISP, and therefore no debugging? An AVR ISP mkII or even a clone is a solid choice over a bare board (that is pretty fragile, IMO). The only real benefit that the dragon could conceivably fill is HVPP, but if you don't brick your parts you never need it.
12:05 PM LoRez: bss36504: "known good programmer", "Support Atmel", "Organization will only buy OEM tools"
12:11 PM Emil: And if one uses a modified isp firmaware you can talk through isp
12:11 PM Emil: To the computer
12:20 PM polprog: finally i have reproduced the situation and it works
12:21 PM polprog: looks like the dragon is somewhat baffles
12:21 PM polprog: the scope shows a 720mV Vpp on the signal lines, that must be the shitty brick PSU for my laptop
12:21 PM polprog: i think that the dragon hangs
12:22 PM polprog: just like that
12:22 PM bss36504: LoRez: What?
12:24 PM bss36504: polprog: You have 720mV ripple on your data lines?
12:24 PM polprog: unfortunately yes
12:24 PM bss36504: That seems like it goes beyond noise
12:24 PM bss36504: What frequency?
12:25 PM polprog: the noise has a repetitive pattern every 10ms, and appears only when the usb is plugged
12:26 PM bss36504: Wait I'm confused...you have the dragon plugged in to the PC, and your slave board is connected to the dragon, right? Is the slave board powered via the same USB or externally?
12:26 PM polprog: the slave is powered externally
12:27 PM polprog: the laptop psu is not grounded btw
12:27 PM bss36504: What does the USB V+ rail look like?
12:27 PM bss36504: Also ripple-ey?
12:28 PM polprog: let me see
12:29 PM polprog: oh man it's terrible
12:29 PM polprog: Vamp = 1.28V
12:30 PM bss36504: can you unplug your laptop from the wall?
12:30 PM polprog: not really
12:30 PM bss36504: more of a desktop, eh? haha
12:30 PM polprog: no, the battery died a long time ago
12:30 PM bss36504: Can you remove the dragon and still probe the USB power?
12:30 PM polprog: i'll try
12:30 PM bss36504: perhaps the dragon is doing something weird
12:34 PM polprog: all the line have a terrible ripple, from 550mV on V+ to 900mV on Data, this doesn't look any good
12:34 PM polprog: i wasnt aware of this at all
12:34 PM bss36504: yeah that sucks.
12:35 PM polprog: well, i'll have to program from the desktop tower now
12:35 PM bss36504: I guess so. Or use an externally powered hub maybe
12:35 PM polprog: that's a good idea, thanks :)
12:36 PM polprog: but i think that it may be the board too, the same process on a breadboard went painless.
12:37 PM bss36504: Maybe the board is just more sensitive. Who knows.
12:46 PM polprog: bss36504: what if o put a 220nF cap across the V+ and V-?
12:47 PM polprog: on the dragon
12:50 PM jdoe_: Hey guys, i'm fairly new to microcontrollers and was hoping one of you might be able to clue me in. I currently have an Atmel ICE hooked up to a attiny25 on a breadboard. The ICE is recognized in atmel studio, but if I go to Tools->Device programming and set attiny25 and click apply, I get an error saying it could not connect to the ICE because "no context id returned"
12:51 PM jdoe_: it looks like this: http://imgur.com/a/B5gE2
01:03 PM polprog: this is a bad joke
01:03 PM polprog: the programmer works again
01:11 PM Ad0: has anyone used the MCP3008 ?
01:11 PM Ad0: can you read all the chans at the same time?
01:11 PM Ad0: in one big fat SPI request
01:14 PM Emil: Hehheh
01:14 PM Emil: I mean
01:14 PM Emil: I have never had issues with using a cheap ass usbpasp
01:14 PM Emil: Always works
01:15 PM polprog: mine had old firmware
01:15 PM Emil: and then people have expensive as fuck programmers and paid software
01:15 PM polprog: and didnt work w/ avrdude because of that
01:15 PM Emil: and ":D"
01:19 PM bss36504: jdoe_: Can you make sure the firmware is up to date in the ICE?
01:19 PM jdoe_: How would I go about doing that?
01:20 PM bss36504: Pretty sure its in the instructions/datasheet for the ICE. You can find it online or in the help files with atmel studio I think
01:20 PM jdoe_: I'll try, thanks :)
01:20 PM bss36504: http://www.atmel.com/webdoc/atmelice/atmelice.firmware_upgrade.html
01:20 PM jdoe_: bss36504, tyvm :)
01:24 PM jdoe_: bss36504, atmel studio reports that the firmware is up to date. If i click update to force it to get the latest version, atmel studio crashes
01:24 PM jdoe_: I'm gonna try atmel studio on a different windows computer
01:25 PM Emil: :DDDD
01:25 PM Emil: >winshit
01:25 PM Emil: Okay
01:25 PM Emil: so
01:25 PM Emil: Try Linux and avrdude
01:26 PM Emil: you can see the valid programmers by specifying -c shit
01:26 PM _ami_: jdoe_: yeah, u never have to deal with this shit on linux/avrdude
01:26 PM * _ami_ time to sleep
01:27 PM _ami_: nn
01:28 PM jdoe_: yeah i have a linux partition i can boot into but the wifi driver isn't working
01:28 PM jdoe_: the other windows machine i have access to is not sp1, so it atmel studio won't install
01:28 PM jdoe_: headache
01:32 PM specing: winshit ;D
01:32 PM jdoe_: well, i would prefer linux. if the wifi worked.
01:32 PM specing: next time buy supported hardware
01:32 PM specing: or just buy a different wifi card
01:33 PM jdoe_: tbh i think maybe i broke the wifi
01:33 PM polprog: could you take a look a t this SPI code? there's no activity on the clk line
01:33 PM polprog: http://pastebin.com/MxFYw6cz
01:33 PM polprog: in fact any SPI whatsoever
01:34 PM bss36504: Jeez Emil, dont break an arm jerking yourself off over there
01:34 PM specing: >pastebin.com
01:34 PM * jdoe_ busts out the cat5
01:35 PM Emil: bss36504: wat?
01:35 PM Emil: bss36504: what did I do
01:35 PM bss36504: im just picking on you, "winshit"
01:35 PM Emil: polprog: the spi is fucked up
01:35 PM Emil: polprog: you need to have a pull up on the cs pin
01:36 PM Emil: otherwise it will revert to slave
01:36 PM Emil: For some god damn idiotic reason
01:36 PM bss36504: Anytime anyone has the slightest issue with AS, people on here climb onto the soapbox and proclaim how amazing linux and avrdude are
01:36 PM Emil: bss36504: well, they are
01:36 PM bss36504: Do I just get lucky? I literally never have driver problems with anything on windows. It works fine for me. And yes, that includes Atmel stuff, Freescale stuff
01:36 PM specing: they are.
01:36 PM Emil: bss36504: well, your gain if they work for you
01:36 PM bss36504: Right but in most cases windows works great too.
01:36 PM Emil: Nah
01:36 PM Emil: Windows is shit
01:37 PM bss36504: wheres carabia when i need him :P
01:37 PM Emil: polprog: what chip is that btw?
01:37 PM Emil: bss36504: you are all alone, now :)
01:37 PM Emil: bss36504: if you want windows circlejerk try ##stm32, though ;)
01:37 PM Emil: but then you'll also have to move to keil
01:37 PM specing: I doubt carabia is a fan of windows
01:38 PM bss36504: Makes sense then that carabia is a windows guy, he's always circlejerking over the STM stuff
01:38 PM Emil: I don't know if Carabia is still ignoring me for some reason
01:38 PM bss36504: nah he just hates "Commie" shit, aka linux and anything open source lol
01:38 PM Emil: :DD
01:38 PM Emil: Well
01:38 PM Emil: that would explain it
01:38 PM Emil: polprog: what chip?
01:39 PM Emil: Aww shit nigga wat
01:39 PM jdoe_: I mean. Usually you would go with the vendor spec. which for avr stuff seems to be atmel studio on windows afaict
01:39 PM Emil: Atmel's site has gone down
01:39 PM Emil: The datasheet's are as per usual though :whew:
01:39 PM bss36504: Its working for me
01:40 PM Emil: bss36504: no I mean, the site's full Microshit now
01:40 PM bss36504: oh yeah, definitiely
01:40 PM specing: no
01:40 PM specing: Microchipshit
01:40 PM bss36504: such a shame. I really want microchip to just shitcan the PIC
01:40 PM Emil: But ooh, I like this collection of appnotes
01:40 PM bss36504: (8 bit, that is)
01:41 PM Emil: bss36504: if they take the best of pic and the software support of avr we are in for a treat
01:41 PM bss36504: indeed
01:41 PM bss36504: but the pic8 core needs to die in a fir
01:41 PM bss36504: fire*
01:42 PM Emil: Imagine proper 50MHz 32 bit AVR with fpu and the software support of today <3
01:42 PM bss36504: Oh yeah but AVR32 is almost as useless as PIC8
01:42 PM Emil: bss36504: sure, sure, but PIC32 is pretty damn hardcore for what I know
01:42 PM bss36504: yeah I suppose.
01:43 PM bss36504: I havent used one but I've heard they are good. Isnt it Lambda_Aurigae who's always pushing those?
01:43 PM Emil: yeah
01:43 PM Emil: He is
01:44 PM bss36504: One thing I want to remain is the Atmel Datasheet formatting. So nice to read
01:46 PM skz81: zlog
01:46 PM jdoe_: okay so avrdude is talking to the ICE now. I guess that's good.
01:46 PM Emil: bss36504: <3
01:46 PM Emil: bss36504: the atmel datasheet formatting is <3 desu kawaii :3
01:47 PM Emil: jdoe_: you got it working, that's good to hear
01:47 PM bss36504: haha
01:47 PM Emil: bss36504: I mean, the register descriptions are god tier
01:48 PM skz81: hahaha I believed that was a persistent feature on this channel that zlog... What a discomfiture...
01:48 PM bss36504: Emil: yes they are. I'm trying to get the I2C to work in this freescale kinetis POS and it's such a pain to decode what the fuck you need to do to get it going.
01:49 PM jdoe_: anyone have a quick reference for how to compile .c to .hex on linux?
01:49 PM skz81: (hey I just learn that word "discomfiture"... For a French Guy it's sounding very funny
01:49 PM bss36504: Also I'm very much not experienced with I2C, I have gone years without using it.
01:49 PM skz81: jdoe_, man make
01:49 PM bss36504: skz81: I thought zlog was persistent as well
01:49 PM specing: jdoe_: you use whatever compiler your userspace provides
01:50 PM polprog: jdoe_: http://www.tldp.org/HOWTO/Avr-Microcontrollers-in-Linux-Howto/x207.html par 2.4.2
01:50 PM skz81: bss36504, we should launch cream pie to rue I guess, then
01:50 PM bss36504: hahaha probably
01:51 PM jdoe_: tyvm !
01:51 PM skz81: s/at/to/
01:51 PM skz81: hahem patch -r
01:52 PM polprog: could you help me out here? i copied it from the datasheet but the spi lines are idlde
01:52 PM polprog: http://pastebin.com/MxFYw6cz
01:52 PM polprog: idle*
01:53 PM specing: >pastebin.com x2
01:53 PM polprog: ok then
01:53 PM polprog: http://wklej.org/id/3050801/
01:54 PM polprog: ;)
01:54 PM specing: >no TLS
01:54 PM polprog: come on, you are trolling now. It's not freaking top secret
01:55 PM polprog: i can make a gist if you want
01:55 PM specing: that would be great
01:55 PM Emil: jdoe_: https://emil.fi/avr
01:55 PM specing: also TLS, no ads and working without javascript are a must for a paste bin
01:56 PM specing: and no changing of content (pastebin.com)
01:56 PM polprog: pastebin has ads?
01:56 PM specing: yep
01:56 PM specing: and it changes the files you upload
01:56 PM polprog: oh, that's a big nono
01:56 PM polprog: why didn't you tell me this before
01:56 PM polprog: :o
01:56 PM Emil: polprog: what chip
01:57 PM specing: Because you didn't ask
01:57 PM Emil: polprog: please answer that
01:57 PM polprog: amtega8
01:57 PM Emil: finally
01:57 PM polprog: i should put it in the header comment
01:58 PM jdoe_: Emil, thanks that's very useful
01:59 PM jdoe_: need to get a flexible RGB LED array under my control by tomorrow :D
02:02 PM Emil: jdoe_: that's piece of cake ;)
02:02 PM Emil: jdoe_: but I'm glad you find it useful
02:02 PM Emil: That's its only purpose
02:08 PM LoRez: bss36504: just responding to your question. Was it difficult to understand?
02:14 PM skz81: arrmmm hemmm sorry, back from the limbs
02:14 PM skz81: polprog, i'm having a look on it
02:15 PM polprog: thanks
02:15 PM skz81: what do you mean IDLE ? How do you observe it ?
02:15 PM skz81: further, my last log line is <Emil> jdoe_: that's piece of cake ;)
02:15 PM polprog: it shows up as a logi 1 on the scope and there are no changes in that
02:15 PM polprog: logic 1*
02:16 PM skz81: please repost any relevant info inbetween, cause i loss them
02:16 PM polprog: nothing happened really
02:16 PM skz81: polprog, ok I see, pulled up
02:16 PM skz81: never pulled down okay
02:16 PM skz81: let me look at the code
02:16 PM polprog: wait, there was some piece of copper wire shorting dtuff
02:16 PM polprog: ill test it again
02:17 PM skz81: wtf : PORTD++; ???
02:17 PM bss36504: LoRez: I wasn't questioning buying OEM, I was questioning buying an AVR Dragon at all.
02:17 PM polprog: there are 8 leds attached to portd, it's my debug sys
02:17 PM bss36504: ESPECIALLY if you dont even use it for debug
02:18 PM skz81: polprog, okay then, no prob
02:19 PM skz81: I saw the PORTD = ... in main() in between.. unsure to figure out but nvrm
02:19 PM polprog: i suspect it might be a problem with portb itself, since i added now a piece of code that generates a pulse and i dont see it
02:20 PM skz81: You lean hardware ? If so I stop right now to think
02:20 PM skz81: thinking*
02:20 PM polprog: the code goes through the whole main, since the portd = 3
02:23 PM skz81: polprog, can you plz link datasheet and page number so I can have a look ?
02:24 PM polprog: http://www.atmel.com/Images/Atmel-2486-8-bit-AVR-microcontroller-ATmega8_L_datasheet.pdf , page 123
02:24 PM polprog: what do you mean by "leaning hardware"?
02:24 PM skz81: s/lean/mean/
02:24 PM skz81: not learn
02:25 PM polprog: wait, i have an ide
02:25 PM polprog: idea
02:25 PM skz81: if the fault is hardware, my help is useless ^^
02:25 PM polprog: the /SS is defined as input
02:25 PM skz81: yup
02:25 PM polprog: it is probably floating [facepalm]
02:25 PM skz81: you still should see the AVR issue on MOSI
02:25 PM polprog: and it says in the datasheet that if it's low then the SPI thinks it's another master selecting the AVR
02:26 PM polprog: ill set is as output
02:26 PM skz81: polprog I've read you set the AVR as the master is'nt it ?
02:26 PM polprog: yeah
02:26 PM skz81: SPCR = (1<<SPE) | (1<<MSTR)
02:27 PM skz81: it is
02:27 PM polprog: exactly
02:27 PM skz81: So /SS is for the slave. NOT the master
02:27 PM skz81: the Matser
02:27 PM skz81: clocks, the master st
02:27 PM skz81: elects
02:28 PM polprog: see "Master Mode" next pade, 3rd paragraph
02:28 PM polprog: *page
02:28 PM skz81: Ok i read that
02:29 PM skz81: page 124 ? it's about slaves
02:29 PM skz81: slave mode rather
02:30 PM polprog: hmm
02:31 PM skz81: polprog a diff is you set SPR1. Why ?
02:31 PM skz81: (I have no all control register semantics heady)
02:31 PM skz81: (in the head)
02:31 PM polprog: i wanted it to be a bit slower than the example
02:31 PM skz81: ok it's about speed, no prob
02:31 PM polprog: SPR0 and SPR1 set both make the prescaler 128
02:32 PM skz81: how did you translate "DDR_SPI" from the DS ?
02:32 PM polprog: the program eventually ends with SCK low and MOSI high
02:33 PM skz81: syntax error
02:33 PM * skz81 is rebooting.. Please wait
02:34 PM skz81: The "program" as no pin...
02:34 PM skz81: how did you translate "DDR_SPI" from the DS ?
02:35 PM polprog: it's DDRB
02:35 PM skz81: https://www.google.fr/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwimhPCNxKnSAhWbHsAKHQ4yBSQQjRwIBw&url=https%3A%2F%2Fsteemit.com%2Fphilosophy%2F%40soulsistashakti%2Fthe-ultimate-problem-solving-technique-there-is-no-spoon&psig=AFQjCNFHE7HVURBGY5zpWw9RCzAfQLBmyg&ust=1488053149604739
02:37 PM polprog: i spent the last couple of hours trying to get dragon--avr comms work
02:37 PM skz81: polprog, sure
02:37 PM skz81: sure ? sure ? sure ?
02:37 PM polprog: did i post the code?
02:38 PM polprog: i did
02:38 PM skz81: unsure it has any side effect but : #define F_CPU 10000000L
02:38 PM skz81: yes you did
02:38 PM skz81: do you run @ 1MHz you chip ?
02:38 PM polprog: this line is weird, when it was defined after include delay.h the timings were wrong
02:38 PM polprog: i may have missed a zero there
02:39 PM polprog: i dont really get the freq settings
02:39 PM polprog: i never used them
02:40 PM skz81: ok actually it means 10MHz
02:40 PM skz81: *I* missed a 0
02:40 PM polprog: ;)
02:40 PM skz81: what kind of board do you use ? custom ?
02:41 PM polprog: custom
02:41 PM polprog: i can show you but it's a clusterfork of wires
02:41 PM polprog: i spent the whole afternoon today to get it working
02:41 PM polprog: but the connections are good,
02:42 PM polprog: when the program starts, i can see the MOSI rising on the scope
02:42 PM skz81: Nice ! I'm a software guy... So far I only used Arduino board and other modules and some wire, but I plan to learn to outsource PCBs
02:42 PM polprog: it's actually pretty easy
02:43 PM skz81: For you maybe :) Does n't look so hard though, but time consuming
02:43 PM polprog: read some barebones avr tutorials first, i didn't read on basic electronics and it kept biting back
02:43 PM skz81: I trust the AVR chip, if your PORT[debug] leds do what you want, you chip is running ok
02:43 PM polprog: it's time consuming, but rewarding, and working in KiCad is pure joy
02:44 PM polprog: the leds seem to be ok
02:44 PM polprog: hmm
02:44 PM polprog: not really actually
02:45 PM polprog: They show 2 in binary meaning that it went as far as loading 0xAA to the SPDR and then it's stuck on the TX loop
02:45 PM polprog: *wait for TX end loop
02:46 PM polprog: interesting, why is it doing that? :o
02:46 PM polprog: i'll add a delay
02:46 PM skz81: BTW you should set 0x01, 0x03, 0x05 in main()
02:46 PM skz81: and let tx do the ++ do get even number
02:48 PM polprog: ill try
02:48 PM skz81: you'll be able to discriminate if the progam block before or after the ++ in the tx func()
02:48 PM polprog: oh man
02:49 PM polprog: i found a bug
02:49 PM polprog: not the bug but a bug
02:50 PM polprog: oh it's a terrible bug
02:50 PM polprog: it may be the bug.
02:50 PM skz81: you stuck after writing 0x55 into SPDR though
02:50 PM skz81: you set PORTD = 0x01 and the write and ++ and then while()...
02:50 PM polprog: i didnt code avrs for a bit of time and i mixed stuff up...
02:51 PM polprog: i used &= to set and |= ~ to clear a bit
02:51 PM skz81: and ?
02:51 PM polprog: it's the oher way around!!!! |= set; &= ~ clear
02:51 PM polprog: http://www.avrfreaks.net/forum/flip-bits
02:51 PM skz81: it's C not AVR nor anything else
02:51 PM polprog: well i didn't do c for a while
02:51 PM skz81: what ?????????????????????????????????????????????????????????????
02:52 PM polprog: post #9
02:52 PM polprog: faile
02:52 PM polprog: fail
02:52 PM specing: polprog: there is a reason why we make cbi and sbi functions/macros...
02:52 PM skz81: I'm a little drunk but i'm pretty sure THERE IS NO WAY to set a bit using "|= ~" to clear ANY BIT in C
02:53 PM specing: because those bitwise ops are just too easy to make mistakes with
02:53 PM specing: and they make for some quite unreadable code
02:53 PM skz81: what was you previus target
02:54 PM polprog: specing, i will make them now xD
02:54 PM polprog: my prev target?
02:54 PM polprog: i started with AVR
02:54 PM polprog: before that i wrote some C for *NIX
02:55 PM skz81: Hum OK just misunderstand your statement <<<polprog> i didnt code avrs for a bit of time and i mixed stuff up...>>>
02:55 PM skz81: K
02:56 PM skz81: In C no target can be " used &= to set and |= ~ to clear a bit"
02:56 PM jdoe_: Emil, could you give me a quick pointer on how to make sure avr/io.h is in my include path? avr-gcc and avrdude are all installed and working, it just can't find the libraries.
02:57 PM polprog: YESS
02:57 PM polprog: it works now
02:58 PM polprog: it was my derp with the bits...
02:58 PM skz81: polprog, good you found out, it was driving me a little crazy...
02:58 PM polprog: now onto the macros
02:58 PM polprog: don't worry, theese ops aren't widely used on PC
02:58 PM skz81: polprog, macros ?
03:00 PM polprog: the ones specing metioned
03:00 PM polprog: setbit and clearbit
03:00 PM polprog: sbi, cbi
03:01 PM Emil: jdoe_: that seems to be fucked up :D
03:01 PM skz81: https://skz81.wordpress.com/2017/02/20/diy-project-an-openpowerswitch-1/ << dediacted to Lambda_Aurigae, cehteh (for the relay driving part and falstad simulations)
03:01 PM Emil: jdoe_: cant help with it
03:02 PM skz81: and other people on this channel that I can't quote but everybody active hold a stake :)
03:02 PM jdoe_: hmm, I was missing avr-libc, now it includes the file alright, but fails on first use of DDRB with 'DDRB' undeclared
03:03 PM skz81: jdoe_, do you #include <avr/io.h> ?
03:03 PM jdoe_: yup
03:04 PM jdoe_: maybe i need to copy it over somewhere
03:04 PM skz81: and compile with the right<< gcc [...] -mmcu=<target> [...] >> target option ?
03:05 PM skz81: jdoe_, if gcc doesn't complain about a file not found named after it, no
03:05 PM specing: polprog: use functions though, static inline void...
03:05 PM jdoe_: i have mmcu=avr25 for attiny25, then -Os -o file.elf
03:05 PM jdoe_: -Wall ofc
03:05 PM skz81: specing, /though/instead/
03:06 PM jdoe_: warning "device type not defined"
03:06 PM jdoe_: weird
03:06 PM skz81: try tiny25 instead of avr25 maybe
03:07 PM jdoe_: spits out a list of valid ones
03:07 PM skz81: attiny25 even
03:07 PM jdoe_: attiny25 was in there but it yields the same error as with avr25
03:07 PM jdoe_: no wait
03:08 PM jdoe_: hang on a sec
03:08 PM skz81: you may have no PORTB on this target ? Unsure
03:08 PM skz81: I hold
03:08 PM skz81: ** w
03:08 PM jdoe_: yeah no attiny25 fixed it, the error I'm getting now is actual bad code
03:09 PM jdoe_: haha nice
03:09 PM skz81: https://www.youtube.com/watch?v=9hmDZz5pDOQ
03:09 PM skz81: Ok then I hang up :p
03:09 PM polprog: ok, i got the macros. lesson learned
03:11 PM skz81: polprog, you're blinky text on "my" intermission music.... So sweet & funky
03:11 PM polprog: furthermore the macros i made atually work
03:12 PM polprog: what?
03:12 PM skz81: fuck it blinked only on my side !
03:12 PM skz81: KDE bug it seems ^^
03:12 PM polprog: oh, that music is great
03:13 PM polprog: i loved that movie
03:15 PM skz81: The tempo is nearly 80 or 90 BPM I guess... Maybe I can do something with that and a teKno trakk on my mix station, who knows ?
03:16 PM skz81: /slightly/ off-topic though, please get back on your AVRs people !
03:17 PM skz81: (or maybe twice actually... I think of the tempo, can't unhear the trakk heyhey)
03:19 PM skz81: * JoeLlama est parti (Quit: Passive Crossovers are a Crime Against Audio) >> Is he talking to me ?? https://i.ytimg.com/vi/JkxoczOXRi4/maxresdefault.jpg
03:34 PM polprog: hmm, the avr tries to pull down the SPI, while the dragon is still connected, and gets warm
03:34 PM skz81: haha sorry I had to
03:34 PM polprog: hmm, the avr tries to pull down the SPI, while the dragon is still connected, and gets warm
03:34 PM specing: polprog: not good enough
03:35 PM specing: polprog: you need to get a bigger FET
03:35 PM polprog: im concerned about it
03:35 PM skz81: For your info, the "intermission theme" tempo is counted as 87.5 BPM by mixx
03:36 PM specing: polprog: oh I thought you wanted to blow it up?
03:36 PM skz81: mixxx sorry (http://www.mixxx.org/)
03:36 PM polprog: not this sarcastic :^)
03:37 PM skz81: specing, sarcastic <
03:37 PM skz81: ???
03:37 PM skz81: YOU MUST be wrong
03:39 PM skz81: so as zlog is away... Please people tell me if anyone reacted. I'll hold for two hours or so and off for the week-end
03:39 PM skz81: Then ENC28J60 of the power-switch is up-to-come
03:41 PM polprog: ok, spi works, now off for the sensor
03:41 PM skz81: presently tweaking that lib : https://github.com/SKZ81/AVR-ENC28J60-Examples
03:42 PM specing: skz81: https://lut.im/vam3SLvhHp/5kcX9bxD421cqqtz.jpg
03:42 PM skz81: specing : the size of the FET doesn't count. It's the way you use it that does.
03:42 PM skz81: specing : OVERDRIVE !!!!
04:20 PM polprog: finally the max31855 works
04:30 PM skz81: polprog, thermocouple interface ? what are you tryin to do ?
04:51 PM skz81: polprog, specing I did it ^^ http://skuizh.free.fr/AVR/hashtag_AVR.mp3
04:51 PM skz81: better listen with earphones I guess
04:52 PM skz81: anyway it's crappy, quick and and dirty mix DRAFT
04:52 PM skz81: not a real one
04:53 PM skz81: I did not even mix anything after the first "real"
04:53 PM skz81: trakk
04:53 PM Emil: Who was doing the ethernet chip here?
04:53 PM Emil: was it you skz81 ?
04:53 PM Emil: was it you skz81 ?
04:53 PM skz81: yup
04:53 PM skz81: ENC28J60
04:53 PM skz81: why
04:53 PM skz81: ?
04:53 PM Emil: skz81: did you try to broadcast?
04:53 PM Emil: one to many
04:54 PM skz81: Not tr
04:54 PM skz81: grr
04:54 PM skz81: not tried acy
04:54 PM skz81: grr
04:55 PM Emil: :/
04:55 PM skz81: not tried actually but theoricaly possible with any ethernet ITF as said formerly with... Leonerd ? or was that Lambda ?
04:56 PM LeoNerd: Hmwhat?
04:56 PM skz81: it's only the MAC you set in the frame
04:56 PM skz81: FF:FF:FF:FF:FF:FF will go to everybody (pass every filter )
04:58 PM specing: hmm I have an enc28j60 somewhere...
05:00 PM skz81: LeoNerd, unsure it was you, or Lambda_Aurigae rather
05:01 PM skz81: L_something (dirty neuronal memory)
05:07 PM skz81: Emil, further : you can configure the ENC28J60 to accept "stuff"
05:07 PM skz81: basic config config is "me and broadcast"
05:08 PM skz81: but nothing mandatory
05:08 PM skz81: or at the opposite you can spy all traffic
05:08 PM skz81: your question lakes no sense
05:08 PM skz81: ti me at least
05:09 PM Emil: skz81: eh?
05:09 PM skz81: <Emil> skz81: did you try to broadcast?
05:09 PM Emil: Yes did you try it
05:09 PM Emil: And was there any issues :D
05:09 PM skz81: <skz81> your question lakes no sense
05:09 PM skz81: <skz81> ti me at least
05:09 PM Emil: Theory is rarely practice
05:10 PM skz81: yup but in this case my answer is clear : in pratice I did n't
05:10 PM polprog: skz81: specing:i did mine too :) thanks for help
05:11 PM skz81: just forward some UDP packets into the void and spy them with wireshark on an USB/ethernet single interface
05:11 PM skz81: clear of another traffic
05:11 PM jdoe_: is there a way to get a delta time value or absolute elapsed run time value in avr-libc?
05:12 PM jdoe_: avr/time.h seems to deal mostly with time formats?
05:12 PM Emil: No need for wireshark, I bet I can easily listen to them with just the standard interfaces
05:12 PM Emil: jdoe_: time is only about formats
05:12 PM Emil: you still have to produce your own timekeeping api
05:12 PM skz81: jdiez, ask yourself : what is your CPU freq ?
05:12 PM polprog: jdoe_: use a timer?
05:13 PM Emil: jdoe_: you need to to ask yourself: what is the resolution I need and how much processing power am I willing to dedicate to keeping time
05:13 PM skz81: jdoe_, and how youwant to measure it
05:13 PM skz81: polprog, you answer the second
05:13 PM skz81: jdiez, sorry, go to sleep again, sorry
05:13 PM jdoe_: hmm okay.. thanks
05:14 PM skz81: jdoe_, consider about including <delay.h> or so :)
05:14 PM Emil: jdoe_: so what is the answer to those questions?
05:14 PM Emil: skz81: pls go
05:14 PM polprog: skz81, you can start a timer on the beginning and count the interrupts for a longer period with the same resolution
05:14 PM Emil: ;)
05:14 PM skz81: Emil, short one : it depends, for both.
05:15 PM Emil: skz81: I didn't ask you ;)
05:15 PM polprog: absolute runtime is just a delta from start ;)
05:15 PM skz81: <Emil> skz81: pls go >> then, what was that ? Ask me to leave ?
05:15 PM Emil: skz81: it was about using delay
05:16 PM Emil: when the question was how to "get" delta time
05:16 PM polprog: you can also use an rtc chip for longer periods
05:16 PM skz81: Emil, short one : it depends, for both. [again]. You can measure it with internal clock, using SPI RTC, and so on. PIck up your poison
05:17 PM Emil: skz81: what do you not understand about not asking you :D
05:17 PM polprog: what exactly are you measuring jdoe_
05:17 PM jdoe_: I want to generate a sine wave as a function of time passed
05:17 PM Emil: sigh
05:17 PM polprog: pem
05:17 PM polprog: pwm*
05:17 PM jdoe_: resolution would have to be on the order of ~1 second
05:17 PM jdoe_: nothing too time critical
05:18 PM Emil: jdoe_: remember the AB-problem when talking here
05:18 PM polprog: use pwm, and a delayed loop for simplicity
05:18 PM jdoe_: alright
05:18 PM Emil: jdoe_: I assume you are not actually interested in generating endlessly growing sinewave
05:18 PM polprog: you can also use a timer interrupt if you need to do stuff in the foreground
05:18 PM polprog: the latter is better imho
05:18 PM jdoe_: an endlessly growing sine wave?
05:18 PM Emil: jdoe_: please really google AB-problem
05:19 PM Emil: jdoe_: by frequency
05:19 PM jdoe_: a sine wave osciallates no?
05:19 PM jdoe_: alright I will
05:19 PM Emil: The AB problem is the fucking bane of doing anything
05:19 PM jdoe_: population genetics
05:19 PM jdoe_: is what google gives me
05:20 PM Emil: jdoe_: it's also called the XY problem
05:20 PM Emil: http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem
05:20 PM polprog: tell us what you wanna do with that in general
05:20 PM jdoe_: i'm using this as a basis: https://gist.github.com/akoimeexx/2216018#file-rgb_driver-v6-c
05:20 PM jdoe_: to control an rgb led
05:20 PM polprog: pwm then
05:20 PM jdoe_: but as he notes in the comments, the function for actually varying the r g and b values is clunky as hell
05:21 PM jdoe_: there is already pwm in there for regulating the rgb led
05:21 PM Emil: jdoe_: first of all, what chip are you using
05:21 PM Emil: le*
05:21 PM Emil: led*
05:21 PM jdoe_: but i would like to calculate smooth r g b values with a sin function of time
05:21 PM jdoe_: attiny25v
05:21 PM Emil: no the led
05:21 PM Emil: what led are you using
05:21 PM jdoe_: umm
05:21 PM polprog: i suppose its a bare rgb led if he wants a sine wave
05:21 PM Emil: polprog: you never know when people are stuck with the AB problem
05:21 PM jdoe_: http://v-tac.eu/led-lights/lights3/led-strip-accessories/led-strip-smd5050---60-leds-rgb-waterproof-detail.html
05:22 PM polprog: not some chip stuff
05:22 PM jdoe_: common +
05:22 PM polprog: Emil, ill have to google that too ;)
05:23 PM polprog: thats a discrete led, right? (sorry im on mobile)
05:23 PM Emil: jdoe_: so it's just a standard chained RGB led strip
05:23 PM jdoe_: it's a flexible array of RGB LEDs that you can cut at certain points
05:23 PM Emil: polprog: a) you need mosfets to drive those
05:23 PM jdoe_: has headers for R, G, B and +12v
05:23 PM Emil: polprog: sorry, not you
05:23 PM polprog: i wanted to say that!
05:23 PM Emil: polprog: ;)
05:24 PM jdoe_: the code i posted has a software implementation of pwm that seems to work
05:24 PM Emil: jdoe_: and is this a personal project?
05:24 PM jdoe_: yes
05:24 PM jdoe_: i am doing a little light installation in the bar at a party my friends are hosting
05:24 PM polprog: do you have an oscilloscope or a meter that can measure duty cycle?
05:25 PM jdoe_: yes
05:25 PM jdoe_: but I have never used it :D
05:25 PM polprog: that will be useful for debugging
05:25 PM polprog: good
05:25 PM Emil: jdoe_: did you review the AB problem?
05:26 PM polprog: you need to connect that pwm output (3 pwm outputs actally) and drive the mosfets with that
05:26 PM polprog: the mosfets sink current since its common +
05:26 PM Emil: jdoe_: I want you to understand that you will never again fall for the AB problem
05:26 PM polprog: or take a look at led drivers but that might be too difficult ;)
05:27 PM Emil: jdoe_: because it's annyoing af
05:27 PM Emil: jdoe_: anycase
05:28 PM Emil: lemme see if I have my shittier code for this somewhere
05:28 PM jdoe_: I didn't find any salient google results after a cursory search
05:28 PM jdoe_: but im really happy you guys want to help
05:28 PM jdoe_: i'm gonna call it a night
05:28 PM jdoe_: in a minute
05:28 PM Emil: jdoe_: you didn't find any results for what?
05:29 PM jdoe_: AB problem
05:29 PM Emil: ...
05:29 PM Emil: Can you not read?
05:29 PM Emil: 2017-02-25 00:50:50 +0200 < Emil> jdoe_: it's also called the XY problem
05:29 PM Emil: 2017-02-25 00:50:51 +0200 < Emil> http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem
05:29 PM jdoe_: sorry i missed your link, working between two computers and a soldering station
05:29 PM jdoe_: but thank you for the condescenscion
05:30 PM polprog: oh, i just didnt know that somebody gave this problem a name Emil :)
05:30 PM aczid: http://xyproblem.info/
05:30 PM jdoe_: oh wow
05:30 PM Emil: jdoe_: no really, we are not #arduino (and even there you'll get shit if you can't bother to read). The AB problem is the fucking bane of my existence
05:30 PM Emil: You want to help but it hurts you head so much when people don't even try :D
05:30 PM jdoe_: I'm very sorry.
05:30 PM Emil: jdoe_: anycase
05:31 PM Emil: like I was saying
05:31 PM jdoe_: I was trying to explain as best I can, but I am new to this,.
05:31 PM Emil: polprog: eh
05:31 PM Emil: jdoe_: but now you know, so next time you'll do better
05:31 PM Emil: anycase hold on for a second and I'll share my code
05:31 PM polprog: dont worry
05:31 PM polprog: i fell for that a couple of times too
05:32 PM polprog: i was novice and daft ;)
05:32 PM jdoe_: I've actually been developing on desktop for more than a decade, so it's not as if the point of asking a question concisely and knowing what to ask is a strange concept to me.
05:33 PM jdoe_: but if you are new, it can be hard to know what to ask, because you are basing your question in your existing knowledge
05:33 PM Emil: Yeah
05:33 PM jdoe_: so calling it daft i think is a bit strong
05:33 PM Emil: It's hard getting started :D
05:34 PM jdoe_: i just know every platform ive ever touched before has been able to give me some measure of time that has passed and a sine wave function
05:34 PM jdoe_: math.h is found with a quick google search
05:34 PM jdoe_: but to translate that concept over to embedded
05:34 PM jdoe_: is apparently something i should hesitate to even attempt asking about?
05:35 PM Emil: jdoe_: yeah don't do math.h
05:35 PM Emil: :D
05:35 PM Emil: it's kind of like meth
05:35 PM Emil: jdoe_: you are also asking it wrong
05:35 PM Emil: btw
05:36 PM Emil: You want to generate a sinewave
05:36 PM polprog: Emil: i know its a dumb question but is there a good alternative?
05:36 PM Emil: but you don't want to generate a sinewave as a function of time
05:36 PM Emil: the latter implies that you want to generate a sinewave with varying frequency
05:38 PM Emil: God damn searching through my code takes time
05:38 PM Emil: what was the grep switch to exclude dirs
05:39 PM Emil: Alright now we are talking
05:39 PM jdoe_: i think i'm starting to understand now
05:39 PM jdoe_: since instructions are expensive, you can't really rely on time to be constant unless you engineer things very exactly
05:40 PM Emil: Alright I have a list of my avr files
05:40 PM Emil: lemme just grab the correct one
05:40 PM jdoe_: but it's like 5 lines of code, can't i just increment an integer and let it overflow
05:40 PM jdoe_: use that as time
05:41 PM Emil: yeah
05:41 PM Emil: But I have a driver code that does exactly what you are after
05:41 PM Emil: We have it driving the leds in our electronics workshop
05:43 PM Emil: Alright, can get the filename from my vidoe D:
05:43 PM Emil: :D
05:43 PM Emil: https://www.youtube.com/watch?v=tK0Nde0J-nc
05:43 PM Emil: It's in Finnish but you'll survive
05:43 PM Emil: Alright, I got the filename, code inbound
05:44 PM polprog: Emil: awesome workoshop !
05:45 PM Emil: polprog: it's shitty, we are moving to a better one this spring :)
05:46 PM jdoe_: Emil, this is awesome, thanks
05:47 PM Emil: https://emil.fi/jako/koodi/pajavalot.c
05:48 PM Emil: There you go
05:48 PM Emil: It's extremely purpose built but it does exactly what you see in the video
05:48 PM Emil: And it's for attiny84v
05:48 PM Emil: so adapting it for the attiny25v should be extremely easy
05:49 PM jdoe_: super cool
05:50 PM jdoe_: I'm gonna try that but if I have a lot of trouble translating the pins I will continue tomorrow
05:50 PM Emil: jdoe_: if you have trouble translating the pins you are bad and you should feel bad ;)
05:51 PM Emil: jdoe_: the hardware you should figure out based on the video
05:51 PM Emil: it's all _very_ clearly laid out
05:51 PM polprog: are the comments in english or finnish?
05:51 PM polprog: just curious
05:51 PM Emil: what comments?
05:51 PM jdoe_: it's half past midnight and this is my first adventure with a microcontroller
05:51 PM polprog: code comments
05:51 PM Emil: polprog: what comments?
05:52 PM jdoe_: i spent a couple hours at least just getting the ICE to work
05:52 PM jdoe_: so i think it's okay to call it a day and continue tomorrow
05:52 PM polprog: jdoe_: its no use working tired
05:52 PM jdoe_: datasheets are starting to blur in my head
05:52 PM polprog: i spent a whole day making the goddamn dragon work
05:52 PM Emil: jdoe_: you can share https://emil.fi/avr if you think its worth it
05:52 PM jdoe_: it helped a lot
05:52 PM Emil: jdoe_: but I'm glad I could help you
05:53 PM polprog: this reminds me i need to get a site too
05:53 PM Emil: polprog: you should
05:53 PM Emil: polprog: also ask for a cloak
05:53 PM Emil: on #freenode
05:53 PM polprog: i have ine
05:53 PM polprog: one*
05:53 PM Emil: polprog: it's not active
05:53 PM polprog: oh
05:53 PM polprog: shite
05:54 PM polprog: how do i turn it on?
05:54 PM Emil: it's a dynamic address so eh whocares
05:54 PM Emil: https://freenode.net/kb/answer/cloaks
05:54 PM polprog: yeah, but im getting a vps so it wont be one...
05:54 PM Emil: polprog: I recommend digitalocean
05:54 PM Emil: If you are a student its fucking worth it
05:54 PM Emil: You get 100 credit :D
05:55 PM Emil: If you are not a student take my code and we both get free money
05:55 PM Emil: use my referral code*
05:55 PM polprog: i wanted DO but their eula sucks
05:55 PM Emil: What's with their EULA?
05:55 PM polprog: they have access to everything on your server
05:55 PM Emil: I'ma ctually considering moving to OVH but haven't managed to test it yet
05:55 PM Emil: polprog: oh
05:56 PM Emil: that's well damn shit :D
05:56 PM polprog: its bad from definition
05:56 PM polprog: ;)
05:56 PM Emil: I have to move the fuck away from DO :D
05:56 PM polprog: i think i will go ovh too
05:56 PM Emil: But still, all vps providers have access to your vps if they want
05:56 PM polprog: yeah
05:57 PM Emil: jdoe_: but if you dedice to go, good night :)
05:57 PM Emil: decide*
05:57 PM polprog: thats weird, i thought i was identified with nickserv
05:58 PM Emil: jdoe_: also, once you have done hardware for 24 hours straight you know you have achieved a life long money black hole and say that "I have some experience"
05:58 PM jdoe_: Emil, good night to you too
05:59 PM polprog: good night!
05:59 PM jdoe_: hopefully you'll be here tomorrow so i can bother you with more xy confused question
05:59 PM jdoe_: :P
05:59 PM Emil: jdoe_: you can always send me a private message, too
05:59 PM Emil: I use a server so I'm not tied to some lowly webchat ;)
05:59 PM jdoe_: awesome, made a lot of progress today i feel, a lot of it thanks to you
05:59 PM Emil: jdoe_: But yeah, I am on this channel
05:59 PM jdoe_: anyway, talk to you all tomorrow :))
06:00 PM Emil: jdoe_: I'm glad to hear you appreciate it :)
06:00 PM Emil: Good night
06:00 PM jdoe_: :)
06:00 PM Emil: Did polgrog quit? I think he might be authenticating but I have disabled all the crap on this channel
06:00 PM Emil: So I don't know
06:00 PM polprog: im here
06:01 PM Emil: you came back
06:01 PM Tom_itx: what country are you guys from?
06:01 PM Emil: I only know that someone left because autocomplete fails :D
06:01 PM Emil: Tom_itx: guess ;)
06:02 PM NoHitWonder2: finland
06:02 PM Emil: oh another finn
06:02 PM polprog: poland
06:02 PM Emil: The fuck you are using an usa server :o
06:03 PM Emil: NoHitWonder2: where in Finland from? A student?
06:03 PM Tom_itx: sometimes it's not so obvious
06:03 PM NoHitWonder2: yes a student
06:03 PM NoHitWonder2: lahti
06:03 PM Emil: Tom_itx: I was joking ;)
06:03 PM Emil: NoHitWonder2: LUT?
06:03 PM NoHitWonder2: no, lamk
06:04 PM Emil: NoHitWonder2: you don't have shell servers?
06:04 PM NoHitWonder2: no i dont right now
06:04 PM Emil: NoHitWonder2: get yourself a free one from the github edupack
06:04 PM Emil: Tom_itx: You are from germany, I take it?
06:04 PM Emil: polprog: get yourself chrissomething.pl
06:05 PM Tom_itx: and why would you say that?
06:05 PM Emil: polprog: also your cloack is still not active
06:05 PM polprog: pl is cheaper but i wanted org
06:05 PM Emil: Tom_itx: from your server
06:05 PM polprog: i know, im requesting a new one
06:05 PM Tom_itx: you can't tell from the server
06:05 PM Emil: Tom_itx: true, but it's a hint
06:05 PM polprog: thats probably cos i changed nicks recently
06:06 PM Emil: Tom_itx: where are you from? I have a feeling it was the states but can never know
06:11 PM Emil: And everyone stopped talking :/
06:12 PM polprog: i finished my max31855 proto today
06:12 PM polprog: finally the thermocouple arrived
06:16 PM Emil: Uu
06:16 PM Emil: How's it working?
06:17 PM Emil: My dad has asked me to do a temperature sensor for an oven
06:17 PM Emil: (Smoking and stuff)
06:17 PM Emil: Would need one that can withstand "high" temperatures
06:17 PM polprog: righy now its blinking some leds basing.on the second output bit from the max
06:17 PM polprog: i have a photo
06:18 PM polprog: im attaching a regular hd44780 to it, i have a library for it by some polish electronic hobbyist
06:19 PM Emil: polprog: I think country specific domains are quite cool, btw
06:19 PM Emil: Though I got exceptionally lucky with mine, given m name
06:20 PM polprog: http://m.imgur.com/NnvH6oZ,t0iBH0u
06:20 PM polprog: maybe pl is not a bad choive
06:20 PM polprog: ill se whay sounds better
06:22 PM polprog: by the way thats the ugliest proto ive ever made
06:24 PM Emil: :D
06:24 PM Emil: It looks... "active"
06:25 PM Emil: But if it works it werks
06:26 PM polprog: the hardest part is hooking the probes :D
06:26 PM polprog: and the bastard lizard (dragon ;) )
06:27 PM polprog: but it eventually worked and had no problems afterwards
06:27 PM polprog: i just used a usb cable with ferrite beads around it
06:27 PM polprog: i asked them for that cloak half an hour ago
06:28 PM polprog: :|
06:29 PM Emil: NoHitWonder2: I'm quite surprised I couldn't find a mention about shell server
06:29 PM Emil: I'm sure there is one, though
06:30 PM Emil: NoHitWonder2: Send a message to servicedesk@lamk.fi and ask for access to a shell server
06:30 PM Emil: (For studying, computation and research purposes, meaning mainly IRC and IRCLogging ;D)
06:31 PM Emil: polprog: they might be slow
06:31 PM Emil: Ask again
06:31 PM polprog: i got it just now
06:31 PM Emil: And they'll do it when they notice
06:31 PM Emil: Nice
06:31 PM Emil: haha
06:31 PM Emil: PolishProgrammer
06:31 PM Emil: Nice
06:31 PM polprog: yeah, that was my old nick
06:31 PM Emil: I should have seen that with your current nick, too
06:32 PM polprog: i need to design a pcb for that asap
06:32 PM Emil: polprog: fire up kicad
06:32 PM polprog: its 1 am here
06:32 PM Emil: polprog: so?
06:32 PM Emil: It's 2 here ;)
06:32 PM Emil: And it's the weekend!
06:32 PM polprog: parents sleep ;)
06:33 PM Emil: You are still using IRC so you can use Kicad ;)
06:33 PM polprog: i should be sleeping but i have a raspi hooked up to our router so i can have a persistent irc session among other stuff
06:33 PM polprog: shh, its a samba share officially
06:33 PM polprog: ;]
06:34 PM Emil: haha :D
06:34 PM Emil: That's the spirit
06:34 PM Emil: and you were a student, right?
06:34 PM Emil: At least get the free shit from github edupack
06:34 PM polprog: like an uni student?
06:34 PM Emil: polprog: I don't know what all they accept
06:34 PM Emil: Doesn't hurt to try
06:35 PM Emil: polprog: but you in uni?
06:35 PM polprog: nah, 3 years to uni
06:36 PM Emil: polprog: oh you are a young one?
06:36 PM Emil: you are like what, 15? :D
06:36 PM Emil: 16?
06:36 PM polprog: yeah, 17 :)
06:37 PM Emil: Get ready for the existential crisis at around 19-20
06:37 PM Emil: Age crisis
06:37 PM Emil: polprog: but cool that you are into electronics and microcontrollers :)
06:37 PM Emil: also amateur radio?
06:38 PM polprog: SDR a bit
06:38 PM Emil: Cool
06:38 PM polprog: amateur radio has a bad past in pl
06:38 PM specing: I used to be 17 and did AVRs
06:38 PM Emil: really?
06:38 PM specing: fun times
06:38 PM Emil: specing: now you just do ADA? ;)
06:38 PM polprog: its legal but you need all sorts of exams and stuff
06:38 PM specing: Emil: mostly Python :/
06:38 PM Emil: polprog: oh that's the same in everywhere
06:38 PM Emil: specing: pls no
06:39 PM specing: Emil: :(
06:39 PM Emil: specing: heh, python is cool, I guess
06:39 PM polprog: nobody checks papers for dvbt sticks ;)
06:39 PM specing: Emil: no, it is not
06:39 PM Emil: specing: at least it's usable
06:39 PM Emil: polprog: oh listening is always okay
06:39 PM specing: but it is the only language that has seamless bignum support
06:39 PM specing: great for crypto homeworks
06:39 PM Emil: polprog: it's the transmitting that you'll have a hard time with
06:40 PM polprog: pythin <3
06:40 PM Emil: specing: pyh pah
06:40 PM Emil: specing: C bignum
06:40 PM polprog: s/pythin/python
06:40 PM specing: Emil: keyword *seamless*
06:40 PM Emil: specing: gmplib
06:40 PM specing: I'm looking at having bignums in ada
06:41 PM specing: I've had a few rants about bignum support in #ada
06:41 PM hetii: Hi :)
06:41 PM polprog: hi
06:41 PM Emil: hetii: evening
06:42 PM Emil: Another pole
06:42 PM Emil: hetii: get yourself a cloack also
06:42 PM Emil: specing: where are you from btw?
06:42 PM specing: Slovenia
06:43 PM Emil: Interesting
06:44 PM polprog: Slovenia, nice
06:45 PM polprog: oh, i didnt notice hetii's ip
06:46 PM hetii: ;P
06:51 PM NoHitWonder2: i could set up a server here in under 5 mintues if i wanted to so i dont have a need for school shell server
06:51 PM NoHitWonder2: just plugging my raspi to the wall
06:52 PM hetii: good for you :)
06:54 PM NoHitWonder2: and we do have a server at school but im dont remember if irc is allowed
06:54 PM polprog: why would they disallow irc?
06:55 PM NoHitWonder2: its mainly for programming purposes
06:55 PM NoHitWonder2: the server
06:55 PM NoHitWonder2: web development
06:55 PM polprog: program an irc client then ;)
07:01 PM Emil: Yeah
07:01 PM Emil: if they give you a server, of course you put irc on it!
07:01 PM Emil: (I should program an avr + esp8266 irc handheld device :DDD)
07:01 PM polprog: ircing via avrs
07:01 PM Emil: Fuck yeha
07:01 PM polprog: that would be cool (check my version)
07:02 PM Emil: Anycase
07:02 PM Emil: I'll go now
07:02 PM Emil: good night
07:02 PM NoHitWonder2: nite
07:03 PM Emil: Hyvää yötä : )
07:03 PM polprog: nite
07:05 PM specing: or maybe that 320 MHz RISC-V mcu
07:05 PM polprog: see you tomorrow, goodnight
07:10 PM NoHitWonder2: im gonna do a project with avr + freertos
07:10 PM NoHitWonder2: a midi synthesizer
11:41 PM enhering: LeoNerd: are you awake?
11:46 PM wpo_ is now known as wpo
11:48 PM Thrashbarg__ is now known as Thrashbarg