#avr Logs

Feb 13 2017

#avr Calendar

12:31 AM daey_ is now known as daey
01:01 AM longus_catus: How do I connect an xmega pll output to a gpio? I think I have the cpu speed, pll properly set up, i just need to set the output
01:03 AM Emil: longus_catus: read the datasheet
01:03 AM Emil: see where the pin output is defined and go from there
01:03 AM longus_catus: Is it in the.... i/o or the pll section?
01:03 AM Emil: if it is a fuse
01:03 AM CapnJ: O hai Emil
01:03 AM Emil: then burn the fuse
01:03 AM CapnJ: didn't knew you were on AVR as well
01:03 AM longus_catus: but the pll output pin can be in many places...very configurable
01:04 AM Emil: CapnJ: Been here longer than you have ;)
01:04 AM CapnJ: Emil: So is that a thing? being longer that me? then congratulations I guess
01:04 AM Emil: CapnJ: such salt
01:04 AM Emil: I thought you learned your lesson already :D
01:05 AM CapnJ: Emil: I still love you Emil
01:05 AM CapnJ: Emil: :* ;)
01:05 AM Emil: :3
01:06 AM Emil: CapnJ: you do realise you looked at the wrong module, right
01:06 AM Emil: I just want to make sure of thay
01:06 AM CapnJ: Emil: The OOK thingie?
01:06 AM Emil: Yes
01:06 AM CapnJ: Emil: What model were you using btw?
01:07 AM Emil: ... seriously? You entered the conversation back then without reading the context :D Anyase, you can lastlog it, SYN115/480R
01:07 AM CapnJ: Emil: Isn't SYN115/480R = SYN115 ?
01:08 AM Emil: 480R is the receiver
01:08 AM Emil: 115 is the transmitter
01:08 AM Emil: There's also 470R
01:09 AM Emil: longus_catus: just read the datasheet
01:09 AM longus_catus: sigh i am
01:09 AM CapnJ: Well I'm kinda lost there
01:09 AM longus_catus: half of it is errata
01:09 AM Emil: :D
01:09 AM longus_catus: which has no point really other than so much space is wasted
01:09 AM CapnJ: Right now, I am messing around with my own PLL implementation, using DDS on a AVR
01:10 AM CapnJ: Well, its "kinda" DDS
01:10 AM Emil: DDS?
01:10 AM CapnJ: Direct digital Synthesis
01:10 AM longus_catus: It's never fun, and it's never easy, but it they were, they wouldn't be callled microcontrollers
01:10 AM CapnJ: I generate a "clock signal" from an input signal
01:10 AM Emil: longus_catus: m328p is warm and fuzzy :3
01:11 AM longus_catus: I'll take the pain because I need the flexility
01:11 AM longus_catus: I guess.... I'll go through the experience...not reallly taking the pain....but just.... trying to black out until it's over
01:12 AM longus_catus: wow, that sounds dirty
01:13 AM Emil: CapnJ: do continue
01:13 AM longus_catus: for some reason i was reading the manual and not the datasheet
01:14 AM CapnJ: well, right now its just an AVR sitting on my desk doing nothing
01:14 AM longus_catus: im trying to generate a pci clock signal
01:15 AM longus_catus: i had to cut wires to all sorts of different lengths to compensate for ....their lengths
01:16 AM CapnJ: https://www.youtube.com/watch?v=QaW5K85UDR0
01:28 AM longus_catus: what's solved all my other problems is adding more bypass caps
01:30 AM longus_catus: this document, http://www.atmel.com/Images/Atmel-8068-8-and16-bit-AVR-XMEGA-A3-Microcontrollers_Datasheet.pdf, contains the answer?
01:30 AM longus_catus: of putting PLL output to a pin of my choosing, from atmel's banks of pins of their choosing?
01:40 AM Xark: longus_catus: Sounds like you want to set the CLKOUT fuse. Then one of the pins will be the clk signal (after prescale).
01:40 AM longus_catus: emil knew exactly what they were talking about when they dropped 'fuse'
01:40 AM longus_catus: thanks, Xark
01:42 AM Xark: I think the pin is fixed...(but still handy).
01:42 AM longus_catus: I don't even have that fuse
01:42 AM longus_catus: this is the xmega256a3
01:43 AM longus_catus: I could try disabling jtag and reset, but only if I really hated myself
01:45 AM Xark: Hmm, yeah, it does not. However, you can use a timer apparently -> http://www.avrfreaks.net/forum/xmega-clock-output
01:46 AM longus_catus: no way, the pll can generate up to 200mhz
01:46 AM Xark: Umm, no.
01:47 AM CapnJ: 200Mhz on a XMega256 ?
01:47 AM CapnJ: >Max. Operating Freq. (MHz):
01:47 AM CapnJ: 32 MHz
01:47 AM longus_catus: the documentation says "dont generate more than 200mhz with the pll" and says it works with 128mhz
01:47 AM CapnJ: http://www.atmel.com/devices/ATXMEGA256A3U.aspx
01:48 AM longus_catus: doesn't say as system clock, although it does say you can get 56mhz as system clock
01:48 AM CapnJ: http://www.atmel.com/devices/ATXMEGA256A3U.aspx <- 32 Mhz max clock
01:48 AM longus_catus: ok man
01:49 AM Xark: Perhaps they mean internal PLL freq that is then prescaled to < 32Mhz for system clock
01:49 AM * Xark recalls fun article about overclocking ATTiny to modulate 88Mhz FM radio with prescaler... :)
01:52 AM CapnJ: In addition, an internal PLL can be used to multiply selected
01:52 AM CapnJ: clock sources with a factor ranging from 1x to 31x.
01:52 AM CapnJ: http://www.atmel.com/Images/doc8315.pdf
01:52 AM longus_catus: yeah...so why not the xmega...anyway there's posts on forums with people clocking between 50-60mhz and i saw in the documentation i think about 56mhz being a maz
01:52 AM * Xark links https://spritesmods.com/?art=avrfmtx
01:52 AM longus_catus: it's just a fucking clock, not a system clock source
01:52 AM Xark: longus_catus: Sure you can overclock a fair bit (but some things may get wacky - like EEPROM and ADC).
01:52 AM longus_catus: Xark: i heard the same...i dont care about overclocking.. i just need a multiple of 32mhz for my MRI
01:52 AM CapnJ: so basically you just want a pin with a clock multiple of 32Mhz
01:53 AM CapnJ: like, 32, 64, 128mhz and so on...
01:53 AM longus_catus: no... i want the PLL output
01:53 AM longus_catus: maybe i want 16 or 2mhz
01:53 AM longus_catus: sorry...
01:54 AM CapnJ: hmmm
01:54 AM CapnJ: do you need your PLL output coming from your AVR?
01:54 AM longus_catus: I would love that
01:55 AM longus_catus: appaprently there's a PORTCFG_CLKOUT
01:57 AM CapnJ: isn't PORTCFG_CLKOUT the AVR clock?
02:08 AM longus_catus: need to see what this event channel 0 is
02:20 AM _ami_: is there any usbdebug tool? like python shell or ui?
02:20 AM _ami_: $usbdebugtool
02:20 AM _ami_: >> connect name vid pid
02:20 AM _ami_: >> send [1,2,...]
02:21 AM _ami_: meh, don't want to reinvent it if something similar to this is already present!
02:22 AM Xark: _ami_: I don't think USB is quite that simple...
02:25 AM _ami_: Xark: for my purpose, i am only interested in analyzing URBs
05:47 AM enhering: One more module assembled: https://hackaday.io/project/11724-yauvc-yet-another-unmanned-vehicle-controller/log/53284-power-supplies-assembled-with-lipo-support
05:58 AM enhering: Hi. I've assembled one more module. If you have time, please visit the link and write what you think about it: https://hackaday.io/project/11724-yauvc-yet-another-unmanned-vehicle-controller/log/53284-power-supplies-assembled-with-lipo-support
05:58 AM enhering: Sorry, double post
06:09 AM * longus_catus goes to court and orders a 30 day eviction notice
06:09 AM longus_catus is now known as LAWNCAT
06:22 AM enhering: Sorry, LAWNCAT
06:23 AM LAWNCAT: LOL.......irc is pretty tolerant almost everywhere, except suicide support channels
06:24 AM enhering: I wonder where can I find carabia. He would like to see these development
06:24 AM Thrashbarg: IRC, tolerant? Try a Linux channel or ##electronics, ##fpga, etc xD
06:24 AM enhering: s
06:24 AM LAWNCAT: ##Electronics has tolerated me since i joined
06:24 AM Thrashbarg: last time there it was a trollfest :P
06:26 AM specing: you are more likely to get better electronics support here than in ##electronics
06:26 AM specing: or in just about any channel
06:26 AM Thrashbarg: yay
06:26 AM specing: believe me, I've tried
06:26 AM LAWNCAT: specing sounds familiar
06:28 AM LAWNCAT is now known as LAWNCAT_STEALTH
07:05 AM Lambda_Aurigae: try #stm and ask about open source tools.
07:07 AM specing: one should be bashed for that
07:07 AM specing: as one should ask about libre tools instead
08:01 AM eichiro_ is now known as eichiro
08:13 AM dunz0r_ is now known as dunz0r
08:14 AM hetii: Hey :)
08:16 AM Lambda_Aurigae: is for horses.
08:17 AM specing: it is hay, not hey
08:17 AM Emil: ##electronics is cancer
08:17 AM Emil: ##stm32 is corporate shills
08:18 AM Emil: I've noticed that this channel is the most unbiased and open
08:18 AM Lambda_Aurigae: yeah.
08:18 AM Emil: Though I might be biased in saying that
08:18 AM Lambda_Aurigae: we even let people mention arduino without stringing them up!
08:18 AM Lambda_Aurigae: well...once anyhow.
08:18 AM Emil: heh
08:18 AM Lambda_Aurigae: :}
08:23 AM hetii: Lambda_Aurigae, http://grammarist.com/homophones/hay-vs-hey/ ;)
09:04 AM Lambda_Aurigae: hetii, yup.
09:04 AM Lambda_Aurigae: hay is for cows
09:15 AM JanC_ is now known as JanC
10:34 AM Jartza: hello
10:38 AM Lambda_Aurigae: olleh
10:39 AM Jartza: what's up?
10:40 AM Lambda_Aurigae: at work trying to solve 4 problems at once.
10:41 AM Lambda_Aurigae: and none can be solved with the application of an avr.
10:43 AM Jartza: darn
10:43 AM Jartza: not even OPV?
10:43 AM Emil: Lambda_Aurigae: what are those problems?
10:43 AM Emil: Because
10:43 AM Emil: https://cdn.meme.am/cache/instances/folder443/500x/44849443.jpg
10:43 AM Jartza: then they are hard problems!
10:44 AM Emil: Hmm
11:40 AM LAWNCAT_STEALTH is now known as lawncat
02:10 PM Lambda_Aurigae: Emil, getting xerox wc 7225 to talk to xerox printsafe software, teaching customer how to use machine without driving out there(1.5 hour drive each way), how to get off work early today but look like I worked a whole day, teach other techs how to READ THE MANUALS
02:10 PM Lambda_Aurigae: amongst other things.
02:12 PM bss36504: I fucking hate printers, Lambda_Aurigae
02:13 PM bss36504: And trying to remotely explaiin them is literally the worst
02:13 PM Lambda_Aurigae: bss36504, sometimes I do too.
02:13 PM Lambda_Aurigae: I hate windows 10 more.
02:13 PM Lambda_Aurigae: and the combination of the two.....
02:14 PM bss36504: Oh yes, very much
02:15 PM Lambda_Aurigae: specially since mickysoft broke the V4 printer driver system.
02:15 PM lawncat: so I finally got my clock to output to port e, which goes to pin 7....but i only see a waveform when debug-stepping...whenfree-running it doesn't accomplish much
02:15 PM Lambda_Aurigae: last 3 releases of winblows 10 won't accept V4 drivers from other manufacturers...if it's not a class driver it won't work right.
02:16 PM specing: Is there a printer that does not have microchipped ink cartridges?
02:16 PM lawncat: i mean i got my .... wait a sec, i wanted the peripheral clock, which is the pll clock
02:16 PM Lambda_Aurigae: lawncat, might be going really fast?
02:16 PM lawncat: Lambda_Aurigae: could be
02:16 PM Lambda_Aurigae: specing, probably.
02:16 PM Lambda_Aurigae: I don't deal with inkjets though.
02:16 PM Lambda_Aurigae: hp, samsung, and xerox laser devices.
02:17 PM Lambda_Aurigae: xerox colorqube devices don't microchip the ink...can't...it's just a block of wax.
02:17 PM lawncat: so I got the wrong clock to output, butr looking at it on the sdr shows it's not really that great ofa clock
02:18 PM lawncat: it'ts as if it has 2 peaks sometimes and 3 others
02:18 PM Lambda_Aurigae: noisy board or something there lawncat ?
02:19 PM lawncat: could be the board.... but it's intermittent so maybe not
02:19 PM Lambda_Aurigae: never used an sdr to look at digital waveforms before either.
02:19 PM Lambda_Aurigae: probably because I don't have an sdr.
02:20 PM lawncat: well its not a digital wave form.. just the rf output from the osc
02:20 PM lawncat: im not pwming or something
02:21 PM Lambda_Aurigae: if it is coming out of an avr gpio port, it's a digital output.
02:21 PM lawncat: it's coming from PortE pin 78
02:21 PM lawncat: PE7
02:21 PM Lambda_Aurigae: probably with some ringing that your sdr is picking up.
02:23 PM lawncat: http://imgur.com/a/5KvVg
02:23 PM Lambda_Aurigae: it should be a nice square wave but there will likely be some ringing.
02:23 PM lawncat: it could be the fll adjuster circuit causing it...it's enabled
02:24 PM lawncat: (thats probably it..let me see)
02:24 PM Lambda_Aurigae: use a real oscilloscope
02:24 PM lawncat: i dont have one. so im using the rf output
02:24 PM Lambda_Aurigae: well, you are treating it as RF anyhow by using an sdr.
02:24 PM lawncat: the closest thing to a sillyscope i have is are these two wires i soldered onto a male-male 3.5mm and 'visual analyzer 2014'
02:25 PM lawncat: hooked up to my sound card
02:26 PM lawncat: ah please dont bash me for looking at the osc with an sdr
02:27 PM lawncat: im pretty sure a similarly relevant change would appear on a silly scope too
02:30 PM lawncat: its much different with the dffl off
02:32 PM lawncat: http://imgur.com/a/5KvVg
02:32 PM lawncat: (I guesse just refresh, it became an album for some reason)
02:37 PM lawncat: heated it up with a soldering iron a little and the freq went down...lifted it up just a mm (so capacitance couldnt be blamed) and it went back quickly. i mean, this is important for applications that expect instructions to execute in a certain time, but not too fast. but we all know..use an external to do that. but im just showing it because it amused me. ok.
02:38 PM lawncat: and it surprised me. its obviously stepping between calibration steps, but they appear large (whether or not they are relevantly large) so... yeah
02:41 PM lawncat: maybe being output to a pin adds enough capacitance that it makes it unstable so it wouldnt look like this in the hcip
02:49 PM Lambda_Aurigae: what are you using for the AVR clock source?
02:52 PM lawncat: internal 2mhz and dfll is based off of the internal 32khz
02:54 PM lawncat: im using the 32mhz clock, but they are based off of other clocks
02:54 PM bss36504: lawncat: the output pin should be able to drive quite a bit of capacitance, at least in the realm of GPIO-GPIO stuff. Is the way youre using the SDR a "usual" activity? Have you checked that this works on other clock sources around that speed?
02:56 PM lawncat: It's usual. Antenna is near oscillator, picks up emissions. Using SDRSharp. It's normal if you go by numbers. the oscillator noise can still be picked up when not driving the pin but it's obviously less strong
02:57 PM lawncat: I've never seen a clock signal so clearly before so that's why I said anything...because it was interesting
03:01 PM lawncat: Most clock sources can't be picked up....except my ram, clocked at 1000mhz, 2000 effective, gives a grand show at 1000mhz
03:01 PM lawncat: tuning to a frequency my phone cpu will hop on for a while doesnt show anything
03:02 PM lawncat: i dont want to go listing everything that leaks clock and doesn't. obviously everything does to a certain extent
03:03 PM lawncat: my sdr clock is a txco so i dont think that's at fault
03:04 PM lawncat: might be fun to go to sleep and wake up after 1ms and see what the clock looks like as it starts up
03:05 PM lawncat: i know i've written an unnovel novel
03:06 PM lawncat: funny thing is, however i configured it - right or wrong, the 32mhz internal osc is 32.5mhz, and the pll on x2 is 65, and i assume it would be .5mhz per multiplier
03:08 PM Lambda_Aurigae: 32MHz internal oscillator? oddish.
03:08 PM Lambda_Aurigae: the 32Khz is going to be 32768hz though.
03:09 PM Lambda_Aurigae: and any of the internal oscillators are going to be funky as they are just RC oscillators and not real accurate
03:09 PM lawncat: doesn't bother me much - I probably did something wrong. but it does say calibrated, etc
03:12 PM lawncat: ah - turning on the FLL makes the clock exactly 32mhz
03:13 PM lawncat: i should adjust the cal values myself..ha ha
03:15 PM lawncat: sometimes you think maybe you're just catching power noise, but when breaking in the debugger stops the emission, and changing dfll setting changes the frequency, it's unlikely
03:45 PM Lambda_Aurigae: I just know that running internal RC oscillator and doing rs232/usart comms you have to fiddle with speeds on the usart because it isn't quite there...or did back when I did that.
03:46 PM Lambda_Aurigae: I did some aut0baud detection back in the day...even a packet by packet retune for one project.
03:46 PM Lambda_Aurigae: because as the chip heated up the oscillator speed would change enough to throw off usart comms.
03:47 PM lawncat: did the speed go up or down when you heated it? i put a soldering iron to the chip and the freq went down without the fll
03:49 PM Lambda_Aurigae: down as I recall.
03:50 PM Lambda_Aurigae: resistor heats up, the resistance goes up, the RC time constant goes down.
03:54 PM lawncat: good thing with dedicated serial hardware, we have super speeds and nice buffers..even dma
03:55 PM arij is now known as arij_work
03:56 PM Emil: eh
03:56 PM Emil: Just ad a oscillator and nice stable serial is achieved
03:56 PM Emil: add an*
03:57 PM Lambda_Aurigae: yup.
03:57 PM Lambda_Aurigae: I did it more as a learning project than anything.
03:58 PM Lambda_Aurigae: was fun making up a protocol that included a clock drift adjustment sequence.
03:59 PM lawncat: did it adjust during a frame?
04:00 PM Lambda_Aurigae: first part of every packet was a transmission of UUUUUUUU
04:00 PM LeoNerd: Lambda_Aurigae: I did one of those for a shared radio system
04:00 PM lawncat: ahhhh
04:00 PM Lambda_Aurigae: then 8 spaces
04:00 PM Lambda_Aurigae: then the data of 256 bytes.
04:01 PM lawncat: when i made a wireless serial protocol, i did a 0x55 or whatever sync....needed 512 symbols to train the receiver properly
04:01 PM Lambda_Aurigae: I was close enough that 8 Us was sufficient to train.
04:02 PM lawncat: you built that. i used what someone else built. and it required a lot to train
04:08 PM lawncat: was one of those 315mhz sparkfun modules
06:07 PM Lambda_Aurigae: hehe...I've used those.
06:08 PM Lambda_Aurigae: I prefer nordic chips myself.
06:08 PM Lambda_Aurigae: but haven't done much with those in the last 5 years either.
06:10 PM LoneElf: Hey dudes, random question. Not sure where else to turn. Anybody had much success getting GDB console to work in atmel studio 7? I've got a segger SAM-ICE, and it's giving me serious greif.
06:10 PM LoneElf: The gdb server is up and running, but the gdb console window in atmel studio just aint working.
06:22 PM Lambda_Aurigae: not I.
06:22 PM Lambda_Aurigae: but, atmel studio requires windows.
06:32 PM specing: LoneElf: OpenOCD + gdb in one terminal, GNU Emacs in the other
06:33 PM LoneElf: specing, haha ;)
06:33 PM specing: You can even configure it such that Emacs displays it in another buffer
06:36 PM LoneElf: I'm pretty close to trying out eclipse, to be honest. I wonder how well SAM development is supported in eclipse?
06:43 PM specing: try GNU Emacs instead.
06:45 PM LoneElf: Not a big fan :)
07:03 PM enhering: Try SublimeText.
07:03 PM enhering: Ecellent editor.
07:03 PM enhering: Excellent
07:05 PM Emil: Damn
07:05 PM Emil: How's everyone's evening going?
07:06 PM Emil: s/evening/night
07:06 PM Lambda_Aurigae: swerving a bit to port here.
07:06 PM Emil: I have no idea what that means
07:06 PM Lambda_Aurigae: me either.
07:06 PM Lambda_Aurigae: could be left, could be wine, could be WTFK?
07:07 PM Emil: Have you tried the old invalid?
07:07 PM Emil: Port wine
07:07 PM specing: enhering: not as excellent as Emacs
07:07 PM Lambda_Aurigae: edlin for the win!
07:07 PM Emil: https://www.alko.fi/tuotteet/003211/Old-Invalid-Port
07:07 PM Emil: I can recommend that
07:08 PM Lambda_Aurigae: I haven't had any port since about 1988.
07:08 PM Lambda_Aurigae: and no wine in at least 10 years.
07:08 PM Emil: Break the habit
07:08 PM Lambda_Aurigae: yeah...
07:08 PM Lambda_Aurigae: not
07:09 PM Lambda_Aurigae: in the last 5 years I've had one mixed drink....no other alcohol.
07:09 PM Emil: Damn
07:09 PM Emil: Get some GT into yourself asap
07:09 PM enhering: specing: Have you tried it?
07:09 PM Lambda_Aurigae: and that one drink was at a party this last summer.
07:09 PM Lambda_Aurigae: alcohol does nasty things to my bloodsugar....diabetic.
07:10 PM Lambda_Aurigae: also, some years ago I gave myself alcohol poisoning and ever since, one drink makes me sick.
07:10 PM specing: enhering: no need
07:10 PM specing: enhering: Emacs has freedom
07:10 PM Emil: ah
07:11 PM Emil: That's too bad :/
07:11 PM Lambda_Aurigae: I used to drink heavily.
07:11 PM Lambda_Aurigae: could have easily been an alcoholic.
07:11 PM Lambda_Aurigae: until I overdid it that weekend.
07:11 PM Lambda_Aurigae: my body started rejecting it bigtime after that.
07:12 PM Lambda_Aurigae: is cheaper this way.
07:14 PM Emil: Way cheaper
07:14 PM Emil: it's also why I pretty much only by 80% vodka from estonia
07:14 PM Emil: Way cheaper
07:14 PM Emil: tastes horrible
07:14 PM Lambda_Aurigae: now I just OD on diet dew and diet pepper.
07:14 PM Emil: And you actually drink less
07:15 PM Emil: And that's not that fucked up "proof" Muricans are saying. That's 80 per-cent, meaning 160 proof.
07:15 PM Emil: Anycase, I'll head to bed
07:15 PM Emil: good night guys
07:16 PM Emil: Way past the bedtime
07:16 PM enhering: specing: I now see you are right. You enlightened me.
08:24 PM arij_work is now known as arij
11:41 PM JanC is now known as Guest77653
11:41 PM JanC_ is now known as JanC